Debian Codegraph @

gcc/testsuite/gdc.test/compilable/test12807.d

raw
1 void foo(T)(ref T t)
2 {
3 }
4
5 struct S
6 {
7 int impure() {assert(0);}
8 alias impure this;
9 }
10
11 void main() pure
12 {
13 S s;
14 foo(s);
15 s.foo(); // triggering alias this violates purity, but ufcs matches
16 }