diff --git a/tests/neg-custom-args/fatal-warnings/i4674.scala b/tests/neg-custom-args/fatal-warnings/i4674.scala new file mode 100644 index 000000000000..6595ee3f3ec2 --- /dev/null +++ b/tests/neg-custom-args/fatal-warnings/i4674.scala @@ -0,0 +1,8 @@ +class Test { + def test(x: String) = { + x.foreach { + case 's' => println("s") + case c: Char => println(c) // error: type test always succeeds + } + } +}