Nullable Reference Types: A warning should be reported when dereferencing a field/property before it is assigned #27016
Labels
Area-Compilers
Bug
Feature - Nullable Reference Types
Nullable Reference Types
Resolution-By Design
The behavior reported in the issue matches the current design
Milestone
Version Used: 05/14/18 Nullable Reference Types Preview (
csc
reports2.8.0.62830 (e595ee27)
) with Visual Studio 15.7.1Demonstration Code:
Expected Behavior:
A warning is reported when
x
is dereferenced.Actual Behavior:
There is no compile-time warning and a runtime exception occurs when the code is executed.
Additional info:
The current behavior is the same with a property.
The text was updated successfully, but these errors were encountered: