aboutsummaryrefslogblamecommitdiff
path: root/tests/run/t1434.scala
blob: 63bd88ec90830b8ba13a4b7d5cb8e87257359668 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15














                                              
object Test {
  class A[T] { val op = null }
  class B extends A[Any]
  class C extends B

  def f(o: AnyRef) = o match {
    case a: A[_] if(a.op != null) => "with op"
    case c: C => "C"
    case b: B => "B"
  }

  def main(args: Array[String]) = {
    assert("C" == f(new C))
  }
}