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 #3824 from 9rnsr/fix13221
[REG2.064] Issue 13221 - [ICE] '0' on line 318 in file 'interpret.c'
- Loading branch information
Showing
3 changed files
with
32 additions
and
1 deletion.
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
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,23 @@ | ||
/* | ||
TEST_OUTPUT: | ||
--- | ||
fail_compilation/ice13221.d(20): Error: variable r cannot be read at compile time | ||
--- | ||
*/ | ||
|
||
struct Tuple(T...) | ||
{ | ||
T field; | ||
alias field this; | ||
} | ||
|
||
template test(T) {} | ||
|
||
void main() | ||
{ | ||
foreach (r; 0 .. 0) | ||
{ | ||
enum i = r; | ||
test!(Tuple!bool[i]); | ||
} | ||
} |