Debian Codegraph @

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

raw
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/fail249.d(16): Error: invalid `foreach` aggregate `bar()` of type `void`
5 ---
6 */
7
8 module main;
9
10 public void bar()
11 {
12 }
13
14 void main()
15 {
16 foreach (Object o; bar())
17 {
18 debug Object foo = null; //error
19 }
20 }