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

16 lines
207 B
D

void foo(T)(ref T t)
{
}
struct S
{
int impure() {assert(0);}
alias impure this;
}
void main() pure
{
S s;
foo(s);
s.foo(); // triggering alias this violates purity, but ufcs matches
}