Skip to content

Commit cb69307

Browse files
committed
Patch exhaustivity tests
The order of `Some` and `None` seem to have reversed. Not sure why and if we should care about it. The following seems to be a valid error but with the wrong error message: ``` -- Error: tests/patmat/t4408.scala:3:16 ---------------------------------------- 3 | case Nil => Unit | ^^^^ |Reference to object Unit in package scala should not have survived, |it should have been processed and eliminated during expansion of an enclosing macro or term erasure. ```
1 parent 2a39cc2 commit cb69307

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

tests/patmat/i13003.check

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
4: Pattern Match Exhaustivity: One(Two(None))
22
7: Pattern Match Exhaustivity: Two(None)
3-
10: Pattern Match Exhaustivity: None, Some(None)
4-
13: Pattern Match Exhaustivity: None, Some(None), Some(Some(None))
3+
10: Pattern Match Exhaustivity: Some(None), None
4+
13: Pattern Match Exhaustivity: Some(Some(None)), Some(None), None

tests/patmat/patmat-ortype.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
8: Pattern Match Exhaustivity: _: String
2-
18: Pattern Match Exhaustivity: None, Some(_: String)
2+
18: Pattern Match Exhaustivity: Some(_: String), None
33
36: Pattern Match Exhaustivity: Some(_: String)

tests/patmat/t4408.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
object Test {
22
def printList(in: List[String]): Unit = in match {
3-
case Nil => Unit
3+
case Nil => ()
44

55
case (s: String) :: Nil =>
66
println(s)

tests/patmat/t7746.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2: Pattern Match Exhaustivity: None, Some(_)
1+
2: Pattern Match Exhaustivity: Some(_), None

0 commit comments

Comments
 (0)