Permalink
Browse files

Test case closes SI-4818

Fixed between 2.10.0 M2 and M3, with both the old and new pattern matcher.
  • Loading branch information...
retronym committed May 25, 2012
1 parent 123050c commit 64c57631ab64308327504a56a27a74630b22f434
Showing with 13 additions and 0 deletions.
  1. +6 −0 test/files/neg/t4818.check
  2. +7 −0 test/files/neg/t4818.scala
@@ -0,0 +1,6 @@
+t4818.scala:4: error: type mismatch;
+ found : Int(5)
+ required: Nothing
+ def f(x: Any) = x match { case Fn(f) => f(5) }
+ ^
+one error found
@@ -0,0 +1,7 @@
+object Test {
+ case class Fn[A, B](f: A => B)
+
+ def f(x: Any) = x match { case Fn(f) => f(5) }
+
+ Fn((x: String) => x)
+}

0 comments on commit 64c5763

Please sign in to comment.