Debian Codegraph @

gcc/testsuite/gdc.test/fail_compilation/fix22108.d

raw
1 /* REQUIRED_ARGS: -preview=dip1000
2 TEST_OUTPUT:
3 ---
4 fail_compilation/fix22108.d(12): Error: returning scope variable `p` is not allowed in a `@safe` function
5 ---
6 */
7
8 // https://issues.dlang.org/show_bug.cgi?id=22108
9
10 @safe ref int test(ref scope return int* p)
11 {
12 return *p;
13 }