MATCH: Improve `A CMP 0 ? A : -A` set of patterns to use bitwise_equal_p.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / test22910.d
blob581c693ccb0c0a04cdbe8fb4fca76035e7642428
1 /* REQUIRED_ARGS: -preview=dip1000
2 TEST_OUTPUT:
3 ---
4 fail_compilation/test22910.d(17): Error: returning `&this.val` escapes a reference to parameter `this`
5 fail_compilation/test22910.d(15): perhaps change the `return scope` into `scope return`
6 ---
7 */
8 @safe:
10 struct S
12 int val;
13 int* ptr;
15 int* retScope() return scope
17 return &this.val;