Debian Codegraph @

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

raw
1 /* REQUIRED_ARGS: -preview=dip1000
2 TEST_OUTPUT:
3 ---
4 fail_compilation/fail20461.d(106): Error: assigningreference to local variable `buffer` to non-scope parameter calling `assert()` is not allowed in a `@safe` function
5 ---
6 */
7
8 #line 100
9
10 // https://issues.dlang.org/show_bug.cgi?id=20461
11
12 void test() @safe
13 {
14 char[10] buffer = "0123456789";
15 assert(false, buffer[]);
16 }