diff --git a/tests/pos/i3500.scala b/tests/pos/i3500.scala new file mode 100644 index 000000000000..bedc3567e954 --- /dev/null +++ b/tests/pos/i3500.scala @@ -0,0 +1,10 @@ +trait Map2[K] { + def get(k: K): K = k + def foo: K = { + this match { + case that: Map2[b] => that.get(3.asInstanceOf[b]) + case that: Map2[b] => that.get(3.asInstanceOf[K]) + case _ => get(5.asInstanceOf[K]) + } + } +}