aboutsummaryrefslogtreecommitdiff
path: root/src/dotty
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-04-30 09:32:14 +0200
committerMartin Odersky <odersky@gmail.com>2015-05-02 19:07:38 +0200
commite2c23bd56ef739682699384cf1956b62b75c1ae0 (patch)
tree210a0038ff3816842f373637e87c4032684b3481 /src/dotty
parent959a112c6278ef06e501f117fbc3aba50f280eb7 (diff)
downloaddotty-e2c23bd56ef739682699384cf1956b62b75c1ae0.tar.gz
dotty-e2c23bd56ef739682699384cf1956b62b75c1ae0.tar.bz2
dotty-e2c23bd56ef739682699384cf1956b62b75c1ae0.zip
Avoid prepare actions form earlier phases when doing a transformFollowinfDeep
See comment in the code.
Diffstat (limited to 'src/dotty')
-rw-r--r--src/dotty/tools/dotc/transform/TreeTransform.scala9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/transform/TreeTransform.scala b/src/dotty/tools/dotc/transform/TreeTransform.scala
index 3bd005991..0aba1e213 100644
--- a/src/dotty/tools/dotc/transform/TreeTransform.scala
+++ b/src/dotty/tools/dotc/transform/TreeTransform.scala
@@ -486,7 +486,14 @@ object TreeTransforms {
var nxCopied = false
var result = info.transformers
var resultNX = info.nx
- var i = mutationPlan(0) // if TreeTransform.transform() method didn't exist we could have used mutationPlan(cur)
+ var i = mutationPlan(cur)
+ // @DarkDimius You commented on the previous version
+ //
+ // var i = mutationPlan(0) // if TreeTransform.transform() method didn't exist we could have used mutationPlan(cur)
+ //
+ // But we need to use `cur` or otherwise we call prepare actions preceding the
+ // phase that issued a transformFollowing. This can lead to "denotation not defined
+ // here" errors. Note that tests still pass with the current modified code.
val l = result.length
var allDone = i < l
while (i < l) {