]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gdc.test/fail_compilation/fail13424.d
Add D front-end, libphobos library, and D2 testsuite.
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / fail_compilation / fail13424.d
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/fail13424.d(12): Error: delegate fail13424.S.__lambda2 cannot be struct members
5 fail_compilation/fail13424.d(17): Error: delegate fail13424.U.__lambda2 cannot be union members
6 fail_compilation/fail13424.d(22): Error: delegate fail13424.C.__lambda2 cannot be class members
7 ---
8 */
9
10 struct S
11 {
12 void delegate(dchar) onChar = (dchar) {};
13 }
14
15 union U
16 {
17 void delegate(dchar) onChar = (dchar) {};
18 }
19
20 class C
21 {
22 void delegate(dchar) onChar = (dchar) {};
23 }