From 8af1dfade7e0fafcbe7adb4dbea14d734d9b8dea Mon Sep 17 00:00:00 2001 From: Burak Emir Date: Sat, 1 Sep 2007 06:51:58 +0000 Subject: fixed ticket #2 (patch from tags/R_2_6_0-RC2), ... fixed ticket #2 (patch from tags/R_2_6_0-RC2), reorganized test cases --- test/files/run/bug789.scala | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 test/files/run/bug789.scala (limited to 'test/files/run/bug789.scala') diff --git a/test/files/run/bug789.scala b/test/files/run/bug789.scala deleted file mode 100644 index 8cd4102dcf..0000000000 --- a/test/files/run/bug789.scala +++ /dev/null @@ -1,31 +0,0 @@ -object Test { // don't do this at home - - trait Impl - - trait SizeImpl extends Impl { def size = 42 } - - trait ColorImpl extends Impl { def color = "red" } - - type Both = SizeImpl with ColorImpl - - def info(x:Impl) = x match { - case x:Both => "size "+x.size+" color "+x.color // you wish - case x:SizeImpl => "size "+x.size - case x:ColorImpl => "color "+x.color - case _ => "n.a." - } - - def info2(x:Impl) = x match { - case x:SizeImpl with ColorImpl => "size "+x.size+" color "+x.color // you wish - case x:SizeImpl => "size "+x.size - case x:ColorImpl => "color "+x.color - case _ => "n.a." - } - - def main(args:Array[String]): Unit = { - // make up some class that has a size - class MyNode extends SizeImpl - Console.println("hello " + info(new MyNode)) - Console.println("hello " + info2(new MyNode)) - } -} -- cgit v1.2.3