Debian Codegraph @

gcc/testsuite/gdc.test/compilable/test23912.d

raw
1 // https://issues.dlang.org/show_bug.cgi?id=23912
2 // REQUIRED_ARGS: -preview=dip1000
3
4 struct Test
5 {
6 string val;
7
8 this(return scope string val) scope @safe {}
9 ~this() scope @safe {}
10 }
11
12 void giver(scope string input) @safe
13 {
14 accepts(Test(input));
15 }
16
17 void accepts(scope Test test) @safe {}