aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/t1335.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pos/t1335.scala')
-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 => ()
+ }
+}