Creating a value tuple with a non-existent field results in a confusing CS8619 #61462
Labels
4 - In Review
A fix for the issue is submitted for review.
Area-Compilers
Concept-Diagnostic Clarity
The issues deals with the ease of understanding of errors and warnings.
help wanted
The issue is "up for grabs" - add a comment if you are interested in working on it
Milestone
Version Used:
17.3.0 Preview 1.0
Steps to Reproduce:
Expected Behavior:
I expect the error that
S.B
does not exist and a squiggle just for that. Derived errors should be suppressed.Actual Behavior:
CS8619 Nullability of reference types in value of type '(string, ? B)' doesn't match target type '(string, string)'.
and then
CS0117 'S' does not contain a definition for 'B'
Notes
CS8619 comes before CS0117 in the Error List and the visible squiggle covers the entire tuple expression.
You need to carefully hover the squiggle to see the actual error.
The text was updated successfully, but these errors were encountered: