mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +03:00
add __rvalue(expression) builtin (#17050)
This commit is contained in:
parent
13775eb2d1
commit
a99a3894be
31 changed files with 471 additions and 163 deletions
22
compiler/test/compilable/rvalue2.d
Normal file
22
compiler/test/compilable/rvalue2.d
Normal file
|
@ -0,0 +1,22 @@
|
|||
/* 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);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue