Debian Codegraph @

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

raw
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/deprecate1553.d(16): Error: cannot use `foreach_reverse` with a delegate
5 ---
6 */
7
8 struct S
9 {
10 int dg(int delegate(ref int a)) { return 0; }
11 }
12
13 void main()
14 {
15 S s;
16 foreach_reverse(a; &s.dg) {}
17 }