summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
authormichelou <michelou@epfl.ch>2007-07-02 11:31:50 +0000
committermichelou <michelou@epfl.ch>2007-07-02 11:31:50 +0000
commit8eed99684f2a351ee6d6db28899204c3f4ef7d73 (patch)
treec9ebf40605c50dedadfe0e4de12725eca1288b7b /test/files/run
parentd618e1f8981c8bda8dcc991057aa023f0160a009 (diff)
downloadscala-8eed99684f2a351ee6d6db28899204c3f4ef7d73.tar.gz
scala-8eed99684f2a351ee6d6db28899204c3f4ef7d73.tar.bz2
scala-8eed99684f2a351ee6d6db28899204c3f4ef7d73.zip
added bug 1189 to run/existentials.scala
Diffstat (limited to 'test/files/run')
-rwxr-xr-xtest/files/run/existentials.scala15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/files/run/existentials.scala b/test/files/run/existentials.scala
index b6421bcbaf..a08a9da9b3 100755
--- a/test/files/run/existentials.scala
+++ b/test/files/run/existentials.scala
@@ -35,6 +35,21 @@ object LUB {
def zzs: C[_ >: Int with java.lang.String] = z
}
+object Bug1189 {
+ case class Cell[T](x: T)
+ type U = Cell[T1] forSome { type T1 }
+ def f(x: Any): U = x match { case y: Cell[_] => y }
+
+ var x: U = Cell(1)
+ println(x)
+
+ println(f(x))
+
+ x = Cell("abc")
+ println(x)
+ println(f(x))
+}
+
object Test extends Application {
def foo(x : Counter[T] { def name : String } forSome { type T }) = x match {