MATCH: Improve `A CMP 0 ? A : -A` set of patterns to use bitwise_equal_p.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / fail17927.d
blobcf610ff8d9730fe335a6064385ef07d458baeb77
1 /* REQUIRED_ARGS: -preview=dip1000
2 * TEST_OUTPUT:
3 ---
4 fail_compilation/fail17927.d(13): Error: scope parameter `this` may not be returned
5 fail_compilation/fail17927.d(15): Error: scope parameter `this` may not be returned
6 fail_compilation/fail17927.d(21): Error: scope parameter `ptr` may not be returned
7 fail_compilation/fail17927.d(23): Error: scope parameter `ptr` may not be returned
8 ---
9 */
10 // https://issues.dlang.org/show_bug.cgi?id=17927
12 struct String {
13 const(char)* mem1() const scope @safe { return ptr; }
14 // https://issues.dlang.org/show_bug.cgi?id=22027
15 inout(char)* mem2() inout scope @safe { return ptr; }
17 char* ptr;
21 const(char)* foo1(scope const(char)* ptr) @safe { return ptr; }
23 inout(char)* foo2(scope inout(char)* ptr) @safe { return ptr; }