Debian Codegraph @

gcc/testsuite/gdc.test/fail_compilation/ice13221.d

raw
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/ice13221.d(20): Error: variable `r` cannot be read at compile time
5 ---
6 */
7
8 struct Tuple(T...)
9 {
10 T field;
11 alias field this;
12 }
13
14 template test(T) {}
15
16 void main()
17 {
18 foreach (r; 0 .. 0)
19 {
20 enum i = r;
21 test!(Tuple!bool[i]);
22 }
23 }