Lombok.NET
Lombok.NET copied to clipboard
`const` "members" in `[AllArgsConstructor]`
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