diff options
author | Paul Phillips <paulp@improving.org> | 2010-03-06 13:26:30 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-03-06 13:26:30 +0000 |
commit | 68c2fff4c1103ded18788861f99654292c4e71d1 (patch) | |
tree | a8d81b829e7f6cce92fde969ae5da8485c144b27 /test | |
parent | 8d59708911be076e227a046eb1dd14421e1a9cb7 (diff) | |
download | scala-68c2fff4c1103ded18788861f99654292c4e71d1.tar.gz scala-68c2fff4c1103ded18788861f99654292c4e71d1.tar.bz2 scala-68c2fff4c1103ded18788861f99654292c4e71d1.zip |
Fixes for #3126.
null, and thrown MatchErrors don't NPE trying to stringify null. No
review.
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/bug3126.scala | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/files/run/bug3126.scala b/test/files/run/bug3126.scala new file mode 100644 index 0000000000..36322bf896 --- /dev/null +++ b/test/files/run/bug3126.scala @@ -0,0 +1,9 @@ +object Test { + case class C(x: Int) + val v: Some[Int] = null + + def main(args: Array[String]): Unit = { + try C.unapply(null) catch { case _: MatchError => } + try v match { case Some(1) => } catch { case _: MatchError => } + } +} |