You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix issue 21284: report "no property" error at identifier location
The "no property `X` for type `Y`" error for enum member access was
reported at the location of the enum type expression instead of the
invalid identifier, e.g. across:
auto x =
E
.
three;
it reported the error on the "E" line instead of the "three" line.
- Add identLoc to DotIdExp, set by the parser from the identifier's
own token location.
- Thread identLoc through dotExp() and use it (falling back to the
previous location when unset) when reporting the "no property"
error for TypeEnum.
- Add fail_compilation test diag21284.d.
Based on the diagnosis and approach explored in #22740 by
Jay-Lokhande.
Fixes https://issues.dlang.org/show_bug.cgi?id=21284
0 commit comments