summaryrefslogtreecommitdiff
path: root/test/files/run/bug789.scala
diff options
context:
space:
mode:
authorBurak Emir <emir@epfl.ch>2007-09-01 06:51:58 +0000
committerBurak Emir <emir@epfl.ch>2007-09-01 06:51:58 +0000
commit8af1dfade7e0fafcbe7adb4dbea14d734d9b8dea (patch)
tree3ec75d2046cb589b9c7d4d0ae4bffa27f1159b26 /test/files/run/bug789.scala
parent77de72ce86f2fd83c646cfc1c5fd21de26318477 (diff)
downloadscala-8af1dfade7e0fafcbe7adb4dbea14d734d9b8dea.tar.gz
scala-8af1dfade7e0fafcbe7adb4dbea14d734d9b8dea.tar.bz2
scala-8af1dfade7e0fafcbe7adb4dbea14d734d9b8dea.zip
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
Diffstat (limited to 'test/files/run/bug789.scala')
-rw-r--r--test/files/run/bug789.scala31
1 files changed, 0 insertions, 31 deletions
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))
- }
-}