-
-
Notifications
You must be signed in to change notification settings - Fork 606
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2614 from WalterBright/fix10942
fix Issue 10942 - ICE on 1087+ initializers (Internal error: backend\cgc...
- Loading branch information
Showing
2 changed files
with
78 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// REQUIRED_ARGS: -g | ||
|
||
import std.string; | ||
|
||
string getEnum(size_t count) | ||
{ | ||
string en; | ||
en ~= "enum KeyCode\n { \n"; | ||
|
||
foreach (i; 0 .. count) | ||
{ | ||
en ~= format(" memb_%s = %s,\n", i+1, i+1); | ||
} | ||
|
||
en ~= "} "; | ||
return en; | ||
} | ||
|
||
// Linker warning: Warning 161: Unknown CV version, ignored | ||
// mixin(getEnum(1024)); | ||
|
||
// ICE | ||
mixin(getEnum(1087)); | ||
|
||
void main() { } | ||
|