Debian Codegraph @

gcc/testsuite/gdc.test/runnable/link7966.d

raw
1 enum E { i }
2
3 struct S1 { bool opCast(T)() { return true; } }
4 struct S2 { bool opCast(T)() { return true; } }
5
6 import a = core.stdc.stdio;
7
8 void main()
9 {
10 with (E) // exp == TOKtype
11 assert(S1()); // Doesn't enclose in ScopeStatement
12 assert(S1());
13
14 with (a) // exp == TOKimport
15 assert(S2()); // Doesn't enclose in ScopeStatement
16 assert(S2());
17 }