summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/transform/ExplicitOuter.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/transform/ExplicitOuter.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/transform/ExplicitOuter.scala')
-rw-r--r--src/compiler/scala/tools/nsc/transform/ExplicitOuter.scala6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/ExplicitOuter.scala b/src/compiler/scala/tools/nsc/transform/ExplicitOuter.scala
index bc35084a4c..86acf3f3c2 100644
--- a/src/compiler/scala/tools/nsc/transform/ExplicitOuter.scala
+++ b/src/compiler/scala/tools/nsc/transform/ExplicitOuter.scala
@@ -468,8 +468,10 @@ abstract class ExplicitOuter extends InfoTransform
}
}
super.transform(
- treeCopy.Template(tree, parents, self,
- if (newDefs.isEmpty) decls else decls ::: newDefs.toList)
+ deriveTemplate(tree)(decls =>
+ if (newDefs.isEmpty) decls
+ else decls ::: newDefs.toList
+ )
)
case DefDef(_, _, _, vparamss, _, rhs) =>
if (sym.isClassConstructor) {