diff options
Diffstat (limited to 'test/files/pos/expressions-current.scala')
-rw-r--r-- | test/files/pos/expressions-current.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/files/pos/expressions-current.scala b/test/files/pos/expressions-current.scala index 207adb2b14..b343dbf68b 100644 --- a/test/files/pos/expressions-current.scala +++ b/test/files/pos/expressions-current.scala @@ -48,13 +48,13 @@ abstract class Lang2 extends Lang { object Main { def main(args: Array[String]) = { - val l1 = new Lang { type visitor = Visitor } + object l1 extends Lang { type visitor = Visitor } val e1: l1.Exp = new l1.Num(42); val iref = new Ref(0); System.out.println("eval: " + { e1.visit(new l1.Eval(iref)); iref.elem }); - val l2 = new Lang2 { type visitor = Visitor2 } + object l2 extends Lang2 { type visitor = Visitor2 } val e2: l2.Exp = new l2.Plus(new l2.Num(5), new l2.Num(37)); val sref = new Ref(""); System.out.println("eval: " + { e2.visit(new l2.Eval2(iref)); iref.elem }); |