diff options
Diffstat (limited to 'test/files/run/virtpatmat_npe.scala')
-rw-r--r-- | test/files/run/virtpatmat_npe.scala | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/files/run/virtpatmat_npe.scala b/test/files/run/virtpatmat_npe.scala new file mode 100644 index 0000000000..84a9276454 --- /dev/null +++ b/test/files/run/virtpatmat_npe.scala @@ -0,0 +1,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
\ No newline at end of file |