summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-01-08 19:36:33 -0800
committerPaul Phillips <paulp@improving.org>2012-01-08 19:57:49 -0800
commitaf4a5299290090ff433f2ad7bb801bf4226f423f (patch)
treecff3ece068ac1eb90e29976ebc9d28cdb603473a /test
parent1684baefd23a806dbbec7e8f536ac3d624702886 (diff)
downloadscala-af4a5299290090ff433f2ad7bb801bf4226f423f.tar.gz
scala-af4a5299290090ff433f2ad7bb801bf4226f423f.tar.bz2
scala-af4a5299290090ff433f2ad7bb801bf4226f423f.zip
Fix for PartialFunction NPE.
Was going straight to the field and bypassing the null guard. Closes SI-5300.
Diffstat (limited to 'test')
-rw-r--r--test/files/run/t5300.scala7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/files/run/t5300.scala b/test/files/run/t5300.scala
new file mode 100644
index 0000000000..073b29604a
--- /dev/null
+++ b/test/files/run/t5300.scala
@@ -0,0 +1,7 @@
+object Test {
+ val pf: PartialFunction[Any, Unit] = { case _ => () }
+
+ def main(args: Array[String]): Unit = {
+ pf orElse pf
+ }
+}