[analyzer] Improve 'not a type' error message#62286
[analyzer] Improve 'not a type' error message#62286nathannewyen wants to merge 1 commit intodart-lang:mainfrom
Conversation
Changes the error message from: "'A' isn't a type." To: "'A' is a setter, but a type was expected." This provides more context about what the identifier actually refers to, making it easier to understand and fix the issue. Fixes dart-lang#48603
|
Thank you for your contribution! This project uses Gerrit for code reviews. Your pull request has automatically been converted into a code review at: https://dart-review.googlesource.com/c/sdk/+/469420 Please wait for a developer to review your code review at the above link; you can speed up the review if you sign into Gerrit and manually add a reviewer that has recently worked on the relevant code. See CONTRIBUTING.md to learn how to upload changes to Gerrit directly. Additional commits pushed to this PR will update both the PR and the corresponding Gerrit CL. After the review is complete on the CL, your reviewer will merge the CL (automatically closing this PR). |
|
@nathannewyen Are you still working on this? If you do please review comments in Gerrit and note that the code does not build and has merge conflicts - so it is not possible to test it. If you don't working on this anymore please close PR. Thanks. |
|
Seems stale. Ping us if you decide to return to this. |
Improves the error message when a non-type is used where a type is expected.
Before:
'A' isn't a type.After:
'A' is a setter, but a type was expected.The element kind is now included (setter, getter, function, method, variable, etc.) to help users understand what the identifier refers to.
Fixes #48603