Debian Codegraph @

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

raw
1 // REQUIRED_ARGS: -preview=dip1000
2
3 // https://github.com/dlang/dmd/pull/9374
4
5 struct OnlyResult
6 {
7 this(return scope ref int v2);
8
9 void* data;
10 }
11
12 OnlyResult foo(return scope ref int v2);
13
14 OnlyResult only(int y)
15 {
16 if (y)
17 return OnlyResult(y);
18 return foo(y);
19 }