summaryrefslogblamecommitdiff
path: root/test/files/run/virtpatmat_npe.scala
blob: 84a9276454d36d48fe2ebe51c12dda4f5285168f (plain) (tree)
1
2
3
4
5
6
7
8
9
10









                                                                                                 
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