aboutsummaryrefslogtreecommitdiff
path: root/tests/pos
diff options
context:
space:
mode:
authorFelix Mulder <felix.mulder@gmail.com>2016-09-14 09:41:28 +0200
committerGitHub <noreply@github.com>2016-09-14 09:41:28 +0200
commitd63dd11ed31f5b500fd08d630bbaec144dbee370 (patch)
treef85d01dfea7ad02018d28e255e7b429403d35b02 /tests/pos
parent7cff6a88cb72dee95313e1236e5f925440a5be57 (diff)
parent006e233c6ab457a1851274b6d3ff457352e98dac (diff)
downloaddotty-d63dd11ed31f5b500fd08d630bbaec144dbee370.tar.gz
dotty-d63dd11ed31f5b500fd08d630bbaec144dbee370.tar.bz2
dotty-d63dd11ed31f5b500fd08d630bbaec144dbee370.zip
Merge pull request #1499 from OlivierBlanvillain/fix-1335
Fix #1335: Generate null checks for extractors
Diffstat (limited to 'tests/pos')
-rw-r--r--tests/pos/t1335.scala11
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 => ()
+ }
+}