diff options
author | Paul Phillips <paulp@improving.org> | 2010-10-30 17:29:15 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-10-30 17:29:15 +0000 |
commit | adbad7ba56a089a4365624a98d872cb040b55c37 (patch) | |
tree | 6b6c7f38e6db54ac881003047a3140f2e359d474 /src | |
parent | e73e777e21eb92da35b3fac827a565392b0589e0 (diff) | |
download | scala-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.
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Infer.scala | 2 |
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. |