]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gdc.test/fail_compilation/fail92.d
Add D front-end, libphobos library, and D2 testsuite.
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / fail_compilation / fail92.d
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/fail92.d(15): Error: invalid foreach aggregate `t`
5 fail_compilation/fail92.d(23): Error: template instance fail92.crash!(typeof(null)) error instantiating
6 ---
7 */
8
9 // [25]
10
11 template crash(T)
12 {
13 void crash(T t)
14 {
15 foreach (u; t)
16 {
17 }
18 }
19 }
20
21 void main()
22 {
23 crash(null);
24 }