diff options
Diffstat (limited to 'test/files/neg/virtpatmat_reach_null.scala')
-rw-r--r-- | test/files/neg/virtpatmat_reach_null.scala | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/files/neg/virtpatmat_reach_null.scala b/test/files/neg/virtpatmat_reach_null.scala new file mode 100644 index 0000000000..6314a5b1d8 --- /dev/null +++ b/test/files/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 |