]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gdc.test/fail_compilation/deprecate1553.d
Add D front-end, libphobos library, and D2 testsuite.
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / fail_compilation / deprecate1553.d
1 // REQUIRED_ARGS: -de
2 // PERMUTE_ARGS:
3
4 /*
5 TEST_OUTPUT:
6 ---
7 fail_compilation/deprecate1553.d(19): Deprecation: cannot use foreach_reverse with a delegate
8 ---
9 */
10
11 struct S
12 {
13 int dg(int delegate(ref int a)) { return 0; }
14 }
15
16 void main()
17 {
18 S s;
19 foreach_reverse(a; &s.dg) {}
20 }