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 Issue 21956 - ice on foreach over an AA of noreturn #14274
Conversation
Thanks for your pull request and interest in making D better, @RazvanN7! 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
|
12e60d7
to
420f07e
Compare
ICEs go to stable |
Also, noreturn is just half implemented. If I were to decide, I would have put it behind a preview switch. Anyway, I have more fixes for noreturn on my pipeline and it would be easier to put them in master. |
cc @dkorpel . Is this in line with the DIP? |
Probably need an ltsstable branch soon too. :-) |
The backend does not know how to treat assignments where the rhs is a noreturn expression. And that is probably fine since such expressions should be replaced with
assert(0)
.For each statements over
noreturn
arrays, the compiler ends up generatingel = __r[idx]
, therefore trying to assign a noreturn expression. With this patch, the mentioned assignment is replaced withassert(0)
.I'm targeting master because this is the first step to unblock dlang/phobos#8283