aboutsummaryrefslogtreecommitdiff
path: root/tests/untried/neg/virtpatmat_reach_null.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/untried/neg/virtpatmat_reach_null.scala')
-rw-r--r--tests/untried/neg/virtpatmat_reach_null.scala19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/untried/neg/virtpatmat_reach_null.scala b/tests/untried/neg/virtpatmat_reach_null.scala
new file mode 100644
index 000000000..6314a5b1d
--- /dev/null
+++ b/tests/untried/neg/virtpatmat_reach_null.scala
@@ -0,0 +1,19 @@
+sealed abstract class Const {
+ final def excludes(other: Const) =
+ (this, other) match {
+ case (_, NullConst) =>
+ case (NullConst, _) =>
+ case (_: ValueConst, _: ValueConst) =>
+ case (_: ValueConst, _: TypeConst) =>
+ case (_: TypeConst, _: ValueConst) =>
+ case (_: TypeConst, _: TypeConst) =>
+ case (null, _) =>
+ case (_, null) =>
+ case null =>
+ case _ => // unreachable
+ }
+}
+
+sealed class TypeConst extends Const
+sealed class ValueConst extends Const
+case object NullConst extends Const