Closed ristogod closed 2 weeks ago
Describe the bug If a property is named Default, the parameter is named default which is a reserved keyword in C#. It should be named @default.
Default
default
@default
To Reproduce
[With(MemberType = Property)] public partial class MyClass { public bool Default { get; set; } }
Generates
public partial class MyClass { public ImageDataModel WithDefault(bool default) { this.Default = default; return this; } }
Expected behavior
public partial class MyClass { public ImageDataModel WithDefault(bool @default) { this.Default = @default; return this; } }
Environment info
.NET version: 8.0 Lombok.NET version: 2.4.0
Thank you for the issue, the fix is available in v2.4.1.
Describe the bug If a property is named
Default
, the parameter is nameddefault
which is a reserved keyword in C#. It should be named@default
.To Reproduce
Generates
Expected behavior
Environment info
.NET version: 8.0 Lombok.NET version: 2.4.0