MATCH: Improve `A CMP 0 ? A : -A` set of patterns to use bitwise_equal_p.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / opapplyscope.d
blob8414bf12845481547afb22c0cb2d5e58edc47cc9
1 /* TEST_OUTPUT:
2 ---
3 fail_compilation/opapplyscope.d(113): Error: function `opapplyscope.S.opApply(scope int delegate(scope int* ptr) @safe dg)` is not callable using argument types `(int delegate(int* x) nothrow @nogc @safe)`
4 fail_compilation/opapplyscope.d(113): cannot pass argument `__foreachbody3` of type `int delegate(int* x) nothrow @nogc @safe` to parameter `scope int delegate(scope int* ptr) @safe dg`
5 ---
6 */
8 #line 100
10 struct S
12 int opApply(scope int delegate (scope int* ptr) @safe dg) @safe
14 return 0;
18 void test() @safe
20 static int* global;
21 S s;
22 foreach (/*scope*/ int* x; s)
24 global = x;