[WIP] Fix Issue 18721 - ICE in dmd/cond.d(378) when compiling static foreach with -D#8128
[WIP] Fix Issue 18721 - ICE in dmd/cond.d(378) when compiling static foreach with -D#8128wilzbach wants to merge 1 commit intodlang:masterfrom
Conversation
|
Thanks for your pull request, @wilzbach! Bugzilla references
|
|
Is |
|
static foreach is supposed to be run as soon as possible. @wilzbach |
AFAICT yes and that's the problem.: (the rest of the stack trace)
Well, I would prefer an error from semantic like: But the way I see this bug is that semantic never runs and DDoc still tries to resolve the invalid |
I though it would be run at the same time as |
|
FTW I accidentally found another Bugzilla issues that segfault on the same line in the Json generator: |
| /// | ||
| template allSameType() | ||
| { | ||
| static foreach (idx; T) |
There was a problem hiding this comment.
The actual error looks like T is undefined.
|
This has been fixed in master already. Closing. |
Okay, so yet another noobish attempt.
The ICE is caused by the invalid template never been instantiated and run through semantic.
DDoc, however, tries to inspect the template with
getEponymousMemberand thus obviously spectactuarly fails.Has anyone a better idea to tackle this?