Sync modifiableLvalue from D -> C++#6592
Conversation
|
@ibuclaw DAutoTest doesn't like this: FYI: |
That has nothing to do with this patch though. |
|
Forced new commit hash, no changes done to code. |
|
Confirmed, the autotest is broken, not this change (#6599 has the same failed message) - @CyberShadow know what's wrong? I'm running this on stable phobos+druntime branch, and it passes. |
|
@WalterBright - any reply? |
|
That reminds me of dlang/dlang.org#1568... but, looking at the branch history, it started failing again well after that was fixed. It looks like it got broken by either dlang/tools#219 or #6566, and I see that @WalterBright didn't use auto-merge for the latter (the documentation tester didn't even report in). |
It's definitely that. Compare the build log from stable today and February 8 - same errors in std.random. |
|
So, I guess I could stoop even lower and add an even dirtier workaround - pass the files in exactly the ext4 order - or someone could actually sit down and figure out WTF is wrong with the compiler this time :) |
|
Steps to reproduce:
|
|
OK, so I just needed to apply the same workaround to the prerelease stuff this time: dlang/dlang.org#1604 |
To be clear on if the mistake is it existing, or the mistake is in its implementation, one would need to examine the PR that inserted it. |
|
You rebased the pr, I'm pretty sure you would remember if you explicitly added a |
|
The PR number is in the commit message, or just visit #5852 |
|
Further proof... https://codecov.io/gh/dlang/dmd/src/master/src/expression.d#L12093...12101 Codecov says that this is dead code. |
|
I misread it. I thought it was IntegralExp, but it's IntervalExp. From examining the use of it, I don't think modifiableLvalue() should ever be called on it. But leaving it out means the default one would be called. I suggest replacing the body of the function with |
And I suggest you don't. If you wanted to restrict what kinds of expression are permitted to call this, then assert false should be the default case. |
|
Ping? |
|
Please replace the function body with |
|
I suggest: assert(0, "Just delete this function to fix the ICE");so that the fix is clear when this inevitably shows up again. |
|
Or just error gracefully, which is the default... |
|
Yeah I know. If you make it mergeable I'll merge it and Walter can yell at me in person in a few days. |
You mean, we'll yell at Walter in person, for not properly reviewing his own PRs. |
|
Or I could always add this to #2194. |
@WalterBright - please confirm. The addition of
IntervalExp::modifiableLvaluewas a mistake.My assumption is yes because it is identical to
DelegatePtrExp::modifiableLvalue.