summaryrefslogtreecommitdiff
path: root/test/files/neg/t5189_inferred.scala
blob: e4e87654454b3e0cf5e91187064dd4829fff9bb7 (plain) (blame)
1
2
3
4
5
6
7
8
trait Covariant[+A]
case class Invariant[A](xs: Array[A]) extends Covariant[A]

class Test {
  val arr = Array("abc")
  def f[A](v: Covariant[A]) /*inferred!*/ = v match { case Invariant(xs) => xs }
  f(Invariant(arr): Covariant[Any])(0) = Nil
}