diff options
author | Paul Phillips <paulp@improving.org> | 2012-01-08 19:36:33 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-01-08 19:57:49 -0800 |
commit | af4a5299290090ff433f2ad7bb801bf4226f423f (patch) | |
tree | cff3ece068ac1eb90e29976ebc9d28cdb603473a /test/files/run | |
parent | 1684baefd23a806dbbec7e8f536ac3d624702886 (diff) | |
download | scala-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/files/run')
-rw-r--r-- | test/files/run/t5300.scala | 7 |
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 + } +} |