Skip to content

const "members" in [AllArgsConstructor] #61

Description

@daaa57150

Describe the bug
[AllArgsConstructor] also picks up const "members".

To Reproduce

[AllArgsConstructor]
public partial class MyService
{
    // Compile-time constant
    private const string SomeId = "ConstId";
    
    // Injections
    private readonly AnotherService service;
}

Expected behavior
I expect a constructor injecting AnotherService, but I get one with AnotherService and SomeId.
This of course does not compile and I get the error Error CS0176 Member 'MyService.SomeId' cannot be accessed with an instance reference; qualify it with a type name instead

Environment info

  • .NET version: 6.x
  • Lombok.NET version: 2.4.1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions