diff options
author | Martin Odersky <odersky@gmail.com> | 2017-02-19 21:58:50 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2017-02-19 21:59:01 +0100 |
commit | bd80a187c3792a4891bec72e0b27b858a5a992ab (patch) | |
tree | b031c9ecf7f29d23375067eee82cf473eaef9cca /compiler/src/dotty/tools/dotc/transform/Erasure.scala | |
parent | c54e942ef6275fc0c61c051539a1b37f4e12123c (diff) | |
download | dotty-bd80a187c3792a4891bec72e0b27b858a5a992ab.tar.gz dotty-bd80a187c3792a4891bec72e0b27b858a5a992ab.tar.bz2 dotty-bd80a187c3792a4891bec72e0b27b858a5a992ab.zip |
Harden outer proxy computation of inlined code
It turns out that we simply cannot do reliable outer path
computation that fills in the right hand sides of this-proxies
from the types of these proxies. As-seen-from logic can mangle
the types of proxies enough to scramble the necessary information.
What we now do instead is simply count: We record the number
of outer accesses to an outer this in inlineable code, and do the same number
of outer accesses when computing the proxy.
Diffstat (limited to 'compiler/src/dotty/tools/dotc/transform/Erasure.scala')
-rw-r--r-- | compiler/src/dotty/tools/dotc/transform/Erasure.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/src/dotty/tools/dotc/transform/Erasure.scala b/compiler/src/dotty/tools/dotc/transform/Erasure.scala index 34ea2bc6f..3857b405f 100644 --- a/compiler/src/dotty/tools/dotc/transform/Erasure.scala +++ b/compiler/src/dotty/tools/dotc/transform/Erasure.scala @@ -415,7 +415,7 @@ object Erasure extends TypeTestsCasts{ if (tree.symbol == ctx.owner.lexicallyEnclosingClass || tree.symbol.isStaticOwner) promote(tree) else { ctx.log(i"computing outer path from ${ctx.owner.ownersIterator.toList}%, % to ${tree.symbol}, encl class = ${ctx.owner.enclosingClass}") - outer.path(tree.symbol) + outer.path(toCls = tree.symbol) } private def runtimeCallWithProtoArgs(name: Name, pt: Type, args: Tree*)(implicit ctx: Context): Tree = { |