-
Notifications
You must be signed in to change notification settings - Fork 258
[BUG] Wrong location for ill formed definitions #488
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
Comments
See also #358 (comment), #352 (comment). |
Thanks for the references. I could have a look at this kind of error next week and try to improve the message. Is anybody else working on this? So we do not come into conflict? |
My impression is that the logic isn't centralized, |
That means there's little chance of conflict. |
Ok, then will try to hunt it down next week. |
I could track it down yesterday. The stacktrace for the parsing error is:
The best position to insert it was at frame 3. Adding an error at frame 0 would have broken everything. The principle that a creation failure does not imply a parse failure makes it not possible. Adding it at frame 3 did not change anything in the regression tests. The if prevents an error message when a more detailed message was already added to the stack and also prevents, that the same message is printed twice. |
Title: Wrong location for ill formed definitions
Description:
A wrong definition like
int a = 4;
should be reported with the correct line.Minimal reproducer (https://cpp2.godbolt.org/z/vcb5xWKxz):
Commands:
Expected result:
Actual result and error:
The text was updated successfully, but these errors were encountered: