MATCH: Improve `A CMP 0 ? A : -A` set of patterns to use bitwise_equal_p.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / test23491.d
blobb66d8a860d0e2bcae736bdbbc04400da5a8a550c
1 /**
2 REQUIRED_ARGS: -preview=dip1000
3 TEST_OUTPUT:
4 ---
5 fail_compilation/test23491.d(16): Error: reference to local variable `buffer` assigned to non-scope anonymous parameter
6 fail_compilation/test23491.d(17): Error: reference to local variable `buffer` assigned to non-scope anonymous parameter calling `sinkF`
7 fail_compilation/test23491.d(18): Error: reference to local variable `buffer` assigned to non-scope parameter `buf`
8 ---
9 */
11 void sinkF(char[]) @safe;
13 void toString(void delegate (char[]) @safe sink, void delegate(char[] buf) @safe sinkNamed) @safe
15 char[20] buffer = void;
16 sink(buffer[]);
17 sinkF(buffer[]);
18 sinkNamed(buffer[]);