dmd/compiler/test/compilable/must_use_opunary.d
2022-07-09 18:53:07 +02:00

18 lines
179 B
D

import core.attribute;
@mustuse struct S
{
ref S opUnary(string op)() return
{
return this;
}
}
void test()
{
S s;
++s;
--s;
s++;
s--;
}