Open alrz opened 8 months ago
This would need to be changed in the runtime before we could do anything here https://github.com/dotnet/runtime/blob/1d5f483fa4344328fb85fd67fc482b70b31e6c4d/src/libraries/System.Private.CoreLib/src/System/Diagnostics/CodeAnalysis/NullableAttributes.cs
Of course, the compiler team needs to show interest to do this before proposing the change to the runtime. This alongside of https://github.com/dotnet/roslyn/issues/43906 and possibly others.
The current workaround is to define a new property as it is done for
BoundExpression.Type
in roslyn.Note the member doesn't actually need to be defined in the base so some constructor could be setting this member and some not.