From 006e233c6ab457a1851274b6d3ff457352e98dac Mon Sep 17 00:00:00 2001 From: Olivier Blanvillain Date: Wed, 7 Sep 2016 10:06:46 +0200 Subject: Fix #1335: Generate null checks for extractors --- tests/pos/t1335.scala | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 tests/pos/t1335.scala (limited to 'tests/pos/t1335.scala') 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 => () + } +} -- cgit v1.2.3