summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Typers.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-02-23 00:36:18 -0800
committerPaul Phillips <paulp@improving.org>2012-02-23 02:27:05 -0800
commitd5006b118f6ad1bf10ed35491cd0bda05fc88972 (patch)
treed76b018d1de05407467af068e68d8b74d73fe977 /src/compiler/scala/tools/nsc/typechecker/Typers.scala
parent4a984f82d5bfca05123c53bd385d0299818f8a75 (diff)
downloadscala-d5006b118f6ad1bf10ed35491cd0bda05fc88972.tar.gz
scala-d5006b118f6ad1bf10ed35491cd0bda05fc88972.tar.bz2
scala-d5006b118f6ad1bf10ed35491cd0bda05fc88972.zip
Methods to derive ValDefs and Templates.
It's a lot like the last one. I also found trees being duplicated before being sent to the tree copier. Looks like xerox has gotten a mole in here. Trust no one.
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 1c1f35aac2..25e6de462e 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -1503,12 +1503,12 @@ trait Typers extends Modes with Adaptations with PatMatVirtualiser {
if (templ.symbol == NoSymbol)
templ setSymbol clazz.newLocalDummy(templ.pos)
val self1 = templ.self match {
- case vd @ ValDef(mods, name, tpt, EmptyTree) =>
+ case vd @ ValDef(_, _, tpt, EmptyTree) =>
val tpt1 = checkNoEscaping.privates(
clazz.thisSym,
treeCopy.TypeTree(tpt).setOriginal(tpt) setType vd.symbol.tpe
)
- treeCopy.ValDef(vd, mods, name, tpt1, EmptyTree) setType NoType
+ copyValDef(vd)(tpt = tpt1, rhs = EmptyTree) setType NoType
}
// was:
// val tpt1 = checkNoEscaping.privates(clazz.thisSym, typedType(tpt))