diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/pos/i0290-type-bind.scala | 19 |
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 + } +} |