diff options
author | Olivier Blanvillain <olivier.blanvillain@gmail.com> | 2016-09-07 10:06:46 +0200 |
---|---|---|
committer | Olivier Blanvillain <olivier.blanvillain@gmail.com> | 2016-09-08 09:06:34 +0200 |
commit | 006e233c6ab457a1851274b6d3ff457352e98dac (patch) | |
tree | 9fc975d730bc7aa03bcb6dd629846710a5ae45e2 /tests/pos | |
parent | fbb9dba1a2a98f60bdb62d11113a6fea844857db (diff) | |
download | dotty-006e233c6ab457a1851274b6d3ff457352e98dac.tar.gz dotty-006e233c6ab457a1851274b6d3ff457352e98dac.tar.bz2 dotty-006e233c6ab457a1851274b6d3ff457352e98dac.zip |
Fix #1335: Generate null checks for extractors
Diffstat (limited to 'tests/pos')
-rw-r--r-- | tests/pos/t1335.scala | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/pos/t1335.scala b/tests/pos/t1335.scala new file mode 100644 index 000000000..047f7b566 --- /dev/null +++ b/tests/pos/t1335.scala @@ -0,0 +1,11 @@ +case class MyTuple(a: Int, b: Int) + +object Test { + def main(args: Array[String]): Unit = + try { + val mt: MyTuple = null + val MyTuple(a, b) = mt + } catch { + case e: MatchError => () + } +} |