d: Merge upstream dmd, druntime 26f049fb26, phobos 330d6a4fd.
[official-gcc.git] / gcc / testsuite / gdc.test / compilable / test18976.d
blob57a531f8041d730de2250724ffc24d4ee5d54b65
1 // https://issues.dlang.org/show_bug.cgi?id=18976
3 class Expression : Statement {}
4 class Statement {}
6 class AssertSemanticVisitor
8 void visit (const Statement node) { }
11 class ExpressionVisitor : AssertSemanticVisitor
13 public void visit (Expression) { }
15 alias visit = typeof(super).visit;
18 class ExpressionVisitor2 : AssertSemanticVisitor
20 public void visit (Expression) { }
22 alias visit = AssertSemanticVisitor.visit;
25 void main ()
27 scope x1 = new ExpressionVisitor;
28 scope x2 = new ExpressionVisitor;
29 scope y = new Statement;
30 x1.visit(y);
31 x2.visit(y);