summaryrefslogtreecommitdiff
path: root/test/files/neg/patmatexhaust.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/neg/patmatexhaust.scala')
-rw-r--r--test/files/neg/patmatexhaust.scala24
1 files changed, 12 insertions, 12 deletions
diff --git a/test/files/neg/patmatexhaust.scala b/test/files/neg/patmatexhaust.scala
index b172df8740..81812d6fd3 100644
--- a/test/files/neg/patmatexhaust.scala
+++ b/test/files/neg/patmatexhaust.scala
@@ -22,14 +22,14 @@ class TestSealedExhaustive { // compile only
def ma3(x:Mult) = (x,x) match { // not exhaustive
case (Kult(_), Qult()) => // Kult missing
- //case Pair(Kult(_), Kult(_)) =>
+ //case Pair(Kult(_), Kult(_)) =>
case (Qult(), Kult(_)) => // Qult missing
- //case Pair(Qult(), Qult()) =>
+ //case Pair(Qult(), Qult()) =>
}
def ma3u(x:Mult) = ((x,x) : @unchecked) match { // not exhaustive, but not checked!
- case (Kult(_), Qult()) =>
- case (Qult(), Kult(_)) =>
+ case (Kult(_), Qult()) =>
+ case (Qult(), Kult(_)) =>
}
sealed abstract class Deep
@@ -37,22 +37,22 @@ class TestSealedExhaustive { // compile only
case object Ga extends Deep
sealed class Gp extends Deep
case object Gu extends Gp
-
+
def zma3(x:Deep) = x match { // exhaustive!
case _ =>
}
def zma4(x:Deep) = x match { // exhaustive!
- case Ga =>
+ case Ga =>
case _ =>
}
def ma4(x:Deep) = x match { // missing cases: Gu, Gp
- case Ga =>
+ case Ga =>
}
def ma5(x:Deep) = x match { // Gp
case Gu =>
- case _ if 1 == 0 =>
+ case _ if 1 == 0 =>
case Ga =>
}
@@ -65,7 +65,7 @@ class TestSealedExhaustive { // compile only
case 1::2::Nil =>
case _ =>
}
-
+
sealed class B
case class B1() extends B
case object B2 extends B
@@ -85,11 +85,11 @@ class TestSealedExhaustive { // compile only
def ma10(x: C) = x match { // exhaustive
case C4() => true
case C2 | C6 => true
- }
-
+ }
+
def redundant = 1 match { // include this otherwise script won't test this in files/neg
case 1 =>
- case 1 =>
+ case 1 =>
}
}