summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Typers.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-12-10 00:27:53 -0800
committerPaul Phillips <paulp@improving.org>2012-12-12 10:57:48 -0800
commite77db05f7306aeb80c46df9c8d76dfd739a97e6a (patch)
tree0cf010694d360d5ec8e82fdfb2599acc8de80f58 /src/compiler/scala/tools/nsc/typechecker/Typers.scala
parent4bc3fa102768e78b194fd6a594f4b87d29e4efbf (diff)
downloadscala-e77db05f7306aeb80c46df9c8d76dfd739a97e6a.tar.gz
scala-e77db05f7306aeb80c46df9c8d76dfd739a97e6a.tar.bz2
scala-e77db05f7306aeb80c46df9c8d76dfd739a97e6a.zip
Normalized TRUE/FALSE trees in the pattern matcher.
There's no longer any need to maintain a distinction, as the tree sharing among literals which it is trying to avoid no longer takes place.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index fd6acc25cc..a1c1b53cce 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -2508,7 +2508,7 @@ trait Typers extends Modes with Adaptations with Tags {
import CODE._
// need to duplicate the cases before typing them to generate the apply method, or the symbols will be all messed up
- val casesTrue = if (isPartial) cases map (c => deriveCaseDef(c)(x => atPos(x.pos.focus)(TRUE_typed)).duplicate.asInstanceOf[CaseDef]) else Nil
+ val casesTrue = if (isPartial) cases map (c => deriveCaseDef(c)(x => atPos(x.pos.focus)(TRUE)).duplicate.asInstanceOf[CaseDef]) else Nil
// println("casesTrue "+ casesTrue)
def parentsPartial(targs: List[Type]) = addSerializable(appliedType(AbstractPartialFunctionClass.typeConstructor, targs))
@@ -2594,7 +2594,7 @@ trait Typers extends Modes with Adaptations with Tags {
methodSym setInfoAndEnter MethodType(paramSyms, BooleanClass.tpe)
val match_ = methodBodyTyper.typedMatch(gen.mkUnchecked(selector), casesTrue, mode, BooleanClass.tpe)
- val body = methodBodyTyper.virtualizedMatch(match_ updateAttachment DefaultOverrideMatchAttachment(FALSE_typed), mode, BooleanClass.tpe)
+ val body = methodBodyTyper.virtualizedMatch(match_ updateAttachment DefaultOverrideMatchAttachment(FALSE), mode, BooleanClass.tpe)
DefDef(methodSym, body)
}