-
-
Notifications
You must be signed in to change notification settings - Fork 610
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
Fix Issues 20718, 15867, 12380 - Wrong location errors on const. folding / exp. optimization #11002
Conversation
…ing / exp. optimization
|
Thanks for your pull request and interest in making D better, @BorisCarvajal! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla references
Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "stable + dmd#11002" |
|
What's the problem with |
|
I think there's nothing invalid about |
|
Yep, And I discarded this approach in favor of something less invasive that can't silently break other uses. This is apparently harmless yet feels inelegant, and the alternative is maybe to make a copy of the expression however it's allocating more memory for a better error message that in a 99.9% will never going to happen. |
What does this mean in practice? The thing I don't want is to have the complier point at the wrong line for an error message. If we fix this bug, but introduce another for a different error, that's not progress. |
|
I'm sure I wanted to write "there is a catch".
I'll investigate if that's the case. |
|
Thanks, and pardon my ignorance on the compiler internals. I can't really review it, but I can just ask questions as a layman user. |
|
From the code changes this looks like two separate bug fixes. Please do ONE PR per issue, unless the issues are duplicates. The reason is simple. I don't like dealing with regressions, and if a PR that does multiple independent things causes a regression, it makes it much harder to isolate and fix. Another reason is one fix may be acceptable and the other not - the beleaguered reviewer shouldn't have to hold up the good one because of the bad one. I can go on ... Merging multiple issues into one PR does NOT save time, and there's no reason to conserve PR numbers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Break into 2 PRs because it's two different fixes.
|
I marked the issues as duplicates. The fix is small, so I don't know how you split it up. |
It seems like you have made changes but not pushed them? |
|
I think its more important to have this than split this in two PRs. |
|
This really shouldn't have been merged and must be reverted. The PR splitting is not the only cause to not merge it. I replied above that I discarded the current approach in favor of something else that I haven't finished/decided. Sorry I took a break on this issue, not sure when I'll resume it. |
A rude attempt to fix most of error messages with the wrong line when there are constant exp. rewrites, this also stops the special case handling of them. (I remember having seen a few
exp.locrepainting).fail_compilation/diag9250.dwas removed to see if everything else passes, and possibly discuss its validity.