-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Developer friendly errors for undeclared identifiers #2844
Labels
Comments
What I would really like are colors to help in visually separating hints, errors, and the possible invocations of ambiguous or overloaded functions. |
@kirbyfan64 - create an issue if there isn't one. It's free to wish. Or make a PR.. |
7 tasks
Araq
pushed a commit
that referenced
this issue
Mar 16, 2021
ringabout
pushed a commit
to ringabout/Nim
that referenced
this issue
Mar 22, 2021
…s in scope with similar spellings on undefined symbol error (nim-lang#16067) * add --spellsuggest to suggest symbols in scope with similar spellings on undefined symbol errors * implement --spellsuggest with 0 arguments
ardek66
pushed a commit
to ardek66/Nim
that referenced
this issue
Mar 26, 2021
…s in scope with similar spellings on undefined symbol error (nim-lang#16067) * add --spellsuggest to suggest symbols in scope with similar spellings on undefined symbol errors * implement --spellsuggest with 0 arguments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
somefile.nim(13, 6) Error: undeclared identifier: 'somVarName'
Clang is exceptional and a role model in this department. When the compiler has encountered an error, we might spend some extra cycles making it more helpful.
I suggest simply using Levenshtein distance algorithm on the scoped symbols where the error occured. Which in this case could have produced:
somefile.nim(13, 6) Error: undeclared identifier: 'somVarName'. Did you mean 'someVarName'?
Ofcourse if there are several near matches, they can be listed in 'nearest' order.
(I might take this on in a not too far future, if it's liked)
The text was updated successfully, but these errors were encountered: