Debian Codegraph @

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

raw
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/ice9254c.d(15): Error: using the result of a comma expression is not allowed
5 fail_compilation/ice9254c.d(15): Error: using the result of a comma expression is not allowed
6 fail_compilation/ice9254c.d(15): Error: using the result of a comma expression is not allowed
7 fail_compilation/ice9254c.d(15): Error: using the result of a comma expression is not allowed
8 fail_compilation/ice9254c.d(15): Error: using the result of a comma expression is not allowed
9 fail_compilation/ice9254c.d(15): Error: invalid `foreach` aggregate `false` of type `bool`
10 ---
11 */
12
13 void main()
14 {
15 foreach(divisor; !(2, 3, 4, 8, 7, 9))
16 {
17 assert(0);
18
19 // ice in ForeachRangeStatement::comeFrom()
20 foreach (v; 0..uint.max) {}
21
22 // ice in WhileStatement::comeFrom()
23 while (1) {}
24 }
25 }