]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gdc.test/compilable/test12807.d
d: Import dmd b8384668f, druntime e6caaab9, phobos 5ab9ad256 (v2.098.0-beta.1)
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / compilable / test12807.d
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 }