dmd/compiler/test/compilable/rvalue2.d
2024-12-15 12:13:28 -08:00

22 lines
249 B
D

/* PERMUTE_ARGS: -preview=rvaluerefparam
*/
struct S
{
alias TT this;
long TT();
this(T)(int x) {} // works if `int` is `long`
this(S);
this(ref S);
~this();
}
S fun(ref S arg);
void test()
{
S st;
fun(st);
}