From c956a27c3278b99d45676c268955a9e58a1ed15c Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Wed, 12 Feb 2014 14:41:36 +0100 Subject: SI-5900 Fix pattern inference regression This commit does not close SI-5900. It only addresses a regression in 2.11 prereleases caused by SI-7886. The fix for SI-7886 was incomplete (as shown by the last commit) and incorrect (as shown by the regression in pos/t5900a.scala and the fact it ended up inferring type parameters.) I believe that the key to fixing this problem will be unifying the inference of case class constructor patterns and extractor patterns. I've explored that idea: https://gist.github.com/retronym/7704153 https://github.com/retronym/scala/compare/ticket/5900 But didn't quite get there. --- test/files/neg/t4818.check | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/files/neg/t4818.check') diff --git a/test/files/neg/t4818.check b/test/files/neg/t4818.check index 8a2c024b30..a5e15e456b 100644 --- a/test/files/neg/t4818.check +++ b/test/files/neg/t4818.check @@ -1,6 +1,6 @@ t4818.scala:4: error: type mismatch; found : Int(5) - required: A + required: Nothing def f(x: Any) = x match { case Fn(f) => f(5) } ^ one error found -- cgit v1.2.3