]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gdc.test/compilable/b6400.d
ipa-param-manip: Be careful about a reallocating hash_map
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / compilable / b6400.d
CommitLineData
b4c522fa
IB
1/* TEST_OUTPUT:
2---
3Foo
4Bar
5---
6*/
7class Foo
8{
9 void opDispatch(string name)() { pragma(msg, "Foo"); }
10}
11class Bar
12{
13 void opDispatch(string name)() { pragma(msg, "Bar"); }
14}
15class Baz
16{
17}
18
19void main()
20{
21 auto foo = new Foo;
22 auto bar = new Bar;
23 auto baz = new Baz;
24
25 with (foo)
26 {
27 f0();
28 with (bar)
29 {
30 f1();
31 }
32 with (baz)
33 {
34 static assert(!__traits(compiles, f2()));
35 }
36 }
37}