Skip to content

Commit 80a3a67

Browse files
committed
Reclassify test
I believe #4674 had the wrong resolution. The test leads to spurious warnings for compiler-generated pattern matches. I believe it's better to revert the decision and check only explicit isInstanceOf, never patterns. Note the scalac does not check patterns either.
1 parent b95c66e commit 80a3a67

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/neg-custom-args/fatal-warnings/i4674.scala renamed to tests/pos-special/fatal-warnings/i4674.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ class Test {
22
def test(x: String) = {
33
x.foreach {
44
case 's' => println("s")
5-
case c: Char => println(c) // error: type test always succeeds
5+
case c: Char => println(c) // should compile without warning
66
}
77
}
88
}

0 commit comments

Comments
 (0)