Closed jcouv closed 6 years ago
I don't think LanguageVersion should affect "shape" of symbols. Otherwise, sharing of symbols is going to be affected in a negative way, as well as this is likely to complicate the Reference manager and make it dependent on ParserOptions, which never happened before.
From LDM discussion today:
true
!
, ?
or [NonNullTypes]
) and the flag isn't set, then we produce a new warning ("please enable the feature")Updated LDM decision to use [NonNullTypes]
to enable warnings.
For the prototype, we're using LangVersion as the flag for both language version and nullable annotations. At a minimum, we need an ability (separate from LangVersion) to disable nullable warnings.
From discussions with Chuck, we would have to decide whether this flag affects the symbols that we produce:
string
(no nullable annotations)string?
in source (with nullable warnings disabled), does QuickInfo show youstring?
back??
, since it is unnecessary. We can have a code fixer to remove the?
or to turn on nullable warnings.Some related questions, when the feature is turned off:
[NonNullTypes]
but the nullable feature is turned off? Warning??
or!
?Tagging @cston @AlekseyTs
Relates to https://github.com/dotnet/roslyn/issues/26199