Debian Codegraph @

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

raw
1 /* REQUIRED_ARGS: -preview=dip1000
2 TEST_OUTPUT:
3 ---
4 fail_compilation/fix5212.d(14): Error: assigning scope variable `args_` to non-scope `this.args` is not allowed in a `@safe` function
5 ---
6 */
7
8
9 // https://issues.dlang.org/show_bug.cgi?id=5212
10
11 class Foo {
12 int[] args;
13 @safe this(int[] args_...) {
14 args = args_;
15 }
16 }