From adbad7ba56a089a4365624a98d872cb040b55c37 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Sat, 30 Oct 2010 17:29:15 +0000 Subject: Widened the pattern type in the pattern matcher... Widened the pattern type in the pattern matcher's attempt to statically rule out matches so that "abc" match { case _: x.type => } is not incorrectly excluded. No review. --- src/compiler/scala/tools/nsc/typechecker/Infer.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/scala/tools/nsc/typechecker/Infer.scala b/src/compiler/scala/tools/nsc/typechecker/Infer.scala index fdcb692e45..4d5fe9549c 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Infer.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Infer.scala @@ -1376,7 +1376,7 @@ trait Infer { val ptparams = freeTypeParamsOfTerms.collect(pt) val tpparams = freeTypeParamsOfTerms.collect(pattp) - def ptMatchesPattp = pt matchesPattern pattp + def ptMatchesPattp = pt matchesPattern pattp.widen def pattpMatchesPt = pattp matchesPattern pt /** If we can absolutely rule out a match we can fail early. -- cgit v1.2.3