aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/backend/jvm
diff options
context:
space:
mode:
authorodersky <odersky@gmail.com>2016-08-14 10:54:20 +0300
committerGitHub <noreply@github.com>2016-08-14 10:54:20 +0300
commit3265323f96f69bded3edb832519825bc7c89e40f (patch)
tree8ab4d2b88319fc6c7e91ee91b7e07860e83cda2c /src/dotty/tools/backend/jvm
parent5429e1dec30095893dd92ecfbb6b5775f607aa35 (diff)
parent4e95a105869ec2d978d5e7e0a3f78442e19b2fe5 (diff)
downloaddotty-3265323f96f69bded3edb832519825bc7c89e40f.tar.gz
dotty-3265323f96f69bded3edb832519825bc7c89e40f.tar.bz2
dotty-3265323f96f69bded3edb832519825bc7c89e40f.zip
Merge pull request #1414 from dotty-staging/add-array-strawman
Add arrays to collection strawman
Diffstat (limited to 'src/dotty/tools/backend/jvm')
-rw-r--r--src/dotty/tools/backend/jvm/DottyBackendInterface.scala4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dotty/tools/backend/jvm/DottyBackendInterface.scala b/src/dotty/tools/backend/jvm/DottyBackendInterface.scala
index f42a8eee2..30934605b 100644
--- a/src/dotty/tools/backend/jvm/DottyBackendInterface.scala
+++ b/src/dotty/tools/backend/jvm/DottyBackendInterface.scala
@@ -648,12 +648,14 @@ class DottyBackendInterface(outputDirectory: AbstractFile, val superCallsMap: Ma
originalOwner
}
def originalOwner: Symbol = {
+ // used to populate the EnclosingMethod attribute.
+ // it is very tricky in presence of classes(and annonymous classes) defined inside supper calls.
try {
if (sym.exists) {
val original = toDenot(sym).initial
val validity = original.validFor
val shiftedContext = ctx.withPhase(validity.phaseId)
- val r = toDenot(sym)(shiftedContext).maybeOwner.enclosingClass(shiftedContext)
+ val r = toDenot(sym)(shiftedContext).maybeOwner.lexicallyEnclosingClass(shiftedContext)
r
} else NoSymbol
} catch {