mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +03:00
16 lines
207 B
D
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
|
|
}
|