aboutsummaryrefslogblamecommitdiff
path: root/tests/run/virtpatmat_npe.scala
blob: efa66f3286c4eb4cb5faed5f8813df7e8bab1445 (plain) (tree)
1
2
3
4
5
6
7
8
9








                                                                                                 
                              
class C {
  class D
  val values = new Array[AnyRef](10)
  values(0) match {
    case name: D => println("NOK: "+ name) // the outer check on D's outer should not cause a NPE
    case null   => println("OK")
  }
}

object Test extends C with App