csharpstandard
csharpstandard copied to clipboard
Nullable Spec Issue List
These are things that should be spelled out in the nullable reference types feature specification:
-
[ ] The handling of a lifted operator (if a comparison operator, the return type is still
bool, but other operators have value types turned intoNullableof that value type, and reference types are made nullable. If either operand might be null, then the result might be null if the resulting return type is capable containing null. -
[ ] In order to preserve the safety in the face of unconstrained type parameters, we warn immediately when a null value of such a type is introduced. This is a safety warning. The contexts in which such a warning are given are
-
defaultanddefault(T) -
nullconversion toT(whenTis known to be ref type) -
e?.M()when the return type isT -
dynamic conversion or cast to
Twhen the dynamic might be null -
explicit conversion to
T -
e as Twhen there is not an implicit conversion from the type ofetoT -
a call to a method like
FirstOrDefault()that is annotated with `[MaybeNull] (not yet implemented)