Debian Codegraph @

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

raw
1 /* PERMUTE_ARGS: -preview=rvaluerefparam
2 */
3
4 struct S
5 {
6 alias TT this;
7 long TT();
8 this(T)(int x) {} // works if `int` is `long`
9
10 this(S);
11 this(ref S);
12
13 ~this();
14 }
15
16 S fun(ref S arg);
17
18 void test()
19 {
20 S st;
21 fun(st);
22 }