]>
Commit | Line | Data |
---|---|---|
5fee5ec3 IB |
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 | } |