MATCH: Improve `A CMP 0 ? A : -A` set of patterns to use bitwise_equal_p.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / test12822.d
blob510d9e2a9f1501e04a8ffa00bbf648f6128e8e1a
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/test12822.d(13): Error: cannot modify delegate pointer in `@safe` code `dg.ptr`
5 fail_compilation/test12822.d(14): Error: `dg.funcptr` cannot be used in `@safe` code
6 ---
7 */
9 // https://issues.dlang.org/show_bug.cgi?id=12822
10 void test2(int delegate() dg) @safe
12 static int i;
13 dg.ptr = &i;
14 dg.funcptr = &func;
17 int func();