summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-10-30 17:29:15 +0000
committerPaul Phillips <paulp@improving.org>2010-10-30 17:29:15 +0000
commitadbad7ba56a089a4365624a98d872cb040b55c37 (patch)
tree6b6c7f38e6db54ac881003047a3140f2e359d474
parente73e777e21eb92da35b3fac827a565392b0589e0 (diff)
downloadscala-adbad7ba56a089a4365624a98d872cb040b55c37.tar.gz
scala-adbad7ba56a089a4365624a98d872cb040b55c37.tar.bz2
scala-adbad7ba56a089a4365624a98d872cb040b55c37.zip
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.
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Infer.scala2
1 files changed, 1 insertions, 1 deletions
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.