aboutsummaryrefslogtreecommitdiff
path: root/tests/pos
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-12-15 17:48:49 +0100
committerMartin Odersky <odersky@gmail.com>2014-12-15 18:08:32 +0100
commita928d99799be8f9ab567b5aca5e21cdd861fb5df (patch)
treec1d9b2e76a19d9ddd4f6843e20993bb5b4eda8eb /tests/pos
parent4494c16758836296bdcc6567b3042ae3d3d02857 (diff)
downloaddotty-a928d99799be8f9ab567b5aca5e21cdd861fb5df.tar.gz
dotty-a928d99799be8f9ab567b5aca5e21cdd861fb5df.tar.bz2
dotty-a928d99799be8f9ab567b5aca5e21cdd861fb5df.zip
Fix typechecking rules for Binds of type trees.
Diffstat (limited to 'tests/pos')
-rw-r--r--tests/pos/i0290-type-bind.scala19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/pos/i0290-type-bind.scala b/tests/pos/i0290-type-bind.scala
new file mode 100644
index 000000000..83fdbbcc5
--- /dev/null
+++ b/tests/pos/i0290-type-bind.scala
@@ -0,0 +1,19 @@
+object foo{
+ val x = List(1,2,3)
+ x match {
+ case t: List[tt] => t.head.asInstanceOf[tt]
+ }
+}
+
+object bar {
+
+ class C[T <: Seq[_]]
+
+ val x: AnyRef = new C
+
+ x match {
+ case x: C[u] =>
+ def x: u = x
+ val s: Seq[_] = x
+ }
+}