You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've got a .NET 8/C# 12 project with nullable references enabled and when I use BuilderGenerator on a class that has properties with nullable reference types, the generated builder becomes a source of compiler warnings:
FooDtoBuilder.g.cs(102,77): Warning CS8669 : The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.
This seems to be a consequence of a combination of #nullable disable in the generated code and the keeping the ? suffix on data fields:
public System.Lazy<string?> BazProperty = new System.Lazy<string?>(() => default(string?));
Can this be fixed somehow?
The text was updated successfully, but these errors were encountered:
I've got a .NET 8/C# 12 project with nullable references enabled and when I use BuilderGenerator on a class that has properties with nullable reference types, the generated builder becomes a source of compiler warnings:
This seems to be a consequence of a combination of
#nullable disable
in the generated code and the keeping the?
suffix on data fields:Can this be fixed somehow?
The text was updated successfully, but these errors were encountered: