Error message for implicit this-access in initializer list is not understandable. #37293
Labels
analyzer-ux
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
type-enhancement
A request for a change that isn't a bug
See: https://stackoverflow.com/questions/56640524/named-inherited-constructor-not-taking-arguments-in-dart/56645417#56645417
The error message is:
(Display differs depending on environment, in VS Code it shows the variable name too), but that's basically it.
Saying that you can only access static methods is simplistic (you can access instance members of other objects), and it doesn't tell you what is wrong. You have to take a mental step to recognize that this thing is not a static access, and only then try to figure out what to do instead.
So, this message could use a better description of what is wrong. Perhaps:
The underscored name is not useful to end-users. Should IDEs hide it, or use it to look up a better description from somewhere? That would be a fine way to give a more elaborate explanation of the error. I can see that VS Code does not.
The text was updated successfully, but these errors were encountered: