aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/transform/Memoize.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-11-09 10:36:37 +0100
committerMartin Odersky <odersky@gmail.com>2014-11-09 19:09:52 +0100
commitf2e3489e419a104ad5f30db68eeaf035a0f3339b (patch)
treebcb2e205a180e4c8c890360788325f44785197db /src/dotty/tools/dotc/transform/Memoize.scala
parent06c50af6551f56314f0587878035d7d7c4d8307b (diff)
downloaddotty-f2e3489e419a104ad5f30db68eeaf035a0f3339b.tar.gz
dotty-f2e3489e419a104ad5f30db68eeaf035a0f3339b.tar.bz2
dotty-f2e3489e419a104ad5f30db68eeaf035a0f3339b.zip
More docs and removing print statements
Diffstat (limited to 'src/dotty/tools/dotc/transform/Memoize.scala')
-rw-r--r--src/dotty/tools/dotc/transform/Memoize.scala6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/transform/Memoize.scala b/src/dotty/tools/dotc/transform/Memoize.scala
index 6b14d7714..ef70b9ecf 100644
--- a/src/dotty/tools/dotc/transform/Memoize.scala
+++ b/src/dotty/tools/dotc/transform/Memoize.scala
@@ -37,6 +37,12 @@ import Decorators._
override def phaseName = "memoize"
override def treeTransformPhase = thisTransform.next
+ /** Should to run after mixin so that fields get generated in the
+ * class that contains the concrete getter rather than the trait
+ * that defines it.
+ */
+ override def runsAfter: Set[Class[_ <: Phase]] = Set(classOf[Mixin])
+
override def prepareForDefDef(tree: DefDef)(implicit ctx: Context) = {
val sym = tree.symbol
if (sym.isGetter && !sym.is(NoFieldNeeded)) {