Handle unreachable code in the nullable walker #28798
Labels
Area-Compilers
Area-Language Design
Bug
New Language Feature - Nullable Reference Types
Nullable Reference Types
Milestone
In unreachable code, the state for every trackable variable should be "not null".
There are a few reasons for this:
bool AbstractState.Reachable { get; }
There are a couple of approaches for doing this. The simplest is to have a bit in the state that tracks whether the state is reachable or not (just like control flow analysis and data flow analysis). When such a state is asked for the nullable state of some variable, it always answers "not null".
Another approach, which may be worth doing in addition, would be to
The text was updated successfully, but these errors were encountered: