Open cston opened 6 years ago
cc @gafter
We'll need to consider the implications on BestTypeInferrer
and MethodTypeInferrer
which also use ConversionsBase.IncludeNullability
.
Also, it would probably have to be something like a DiagnosticInfoBag
because Conversions
doesn't traffic in nodes or locations.
A preferred solution (from https://github.com/dotnet/roslyn/issues/30807) might be to remove nullability from ConversionsBase
if possible, and consider nullability in conversions in NullableWalker
only.
Consider replacing
ConversionsBase.IncludeNullability
with an optional diagnostic bag for nullable warnings.See https://github.com/dotnet/roslyn/pull/26356#issuecomment-391870677.