Skip to content

Commit e81801f

Browse files
committed
Revert "move test to patmat"
This reverts commit e25bd07.
1 parent 8ceb58f commit e81801f

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

tests/patmat/patmat-lazy-nothing-not-exhaustive.check

Lines changed: 0 additions & 1 deletion
This file was deleted.

tests/warn/patmat-lazy-nothing-not-exhaustive.check

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
-- [E029] Pattern Match Exhaustivity Warning: tests\warn\patmat-lazy-nothing-not-exhaustive.scala:10:5 -----------------10 | id(x match { // warn | ^ | match may not be exhaustive. | | It would fail on pattern case: Bar() | | longer explanation available when compiling with `-explain`

tests/patmat/patmat-lazy-nothing-not-exhaustive.scala renamed to tests/warn/patmat-lazy-nothing-not-exhaustive.scala

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ case class Bar() extends Adt {
44
lazy val x: Nothing = throw new Exception()
55
}
66

7+
inline def id[A](a: A): A = a
8+
79
def shouldThrowAWarning(x: Adt) =
8-
x match { // warn
9-
case Foo() => "Foo"
10-
}
10+
id(x match { // warn
11+
case Foo() => "Bar"
12+
})

0 commit comments

Comments
 (0)