aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/core/classfile
diff options
context:
space:
mode:
authorGuillaume Martres <smarter@ubuntu.com>2017-02-14 17:01:55 +0100
committerGuillaume Martres <smarter@ubuntu.com>2017-02-18 23:35:34 +0100
commit42e112b92a526bb9352febb14d8af48138bcfb87 (patch)
treed05b5915bbdeec5f65808c5c3c8f201bb3eac06a /compiler/src/dotty/tools/dotc/core/classfile
parentb2e4fe3212c226f03869c9f7c4d0b921a4e424de (diff)
downloaddotty-42e112b92a526bb9352febb14d8af48138bcfb87.tar.gz
dotty-42e112b92a526bb9352febb14d8af48138bcfb87.tar.bz2
dotty-42e112b92a526bb9352febb14d8af48138bcfb87.zip
ClassfileParser: avoid looking up inner class in wrong phase
getMember needs to take an implicit `Context` parameter, otherwise the following code: val result = ctx.atPhaseNotLaterThan(ctx.typerPhase) { implicit ctx => getMember(owner, innerName.toTypeName) } will not run getMember at the typer phase.
Diffstat (limited to 'compiler/src/dotty/tools/dotc/core/classfile')
-rw-r--r--compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala b/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala
index 5b751ef3c..36d478c6d 100644
--- a/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala
+++ b/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala
@@ -806,7 +806,7 @@ class ClassfileParser(
def classSymbol(externalName: Name)(implicit ctx: Context): Symbol = {
/** Return the symbol of `innerName`, having the given `externalName`. */
def innerSymbol(externalName: Name, innerName: Name, static: Boolean): Symbol = {
- def getMember(sym: Symbol, name: Name): Symbol =
+ def getMember(sym: Symbol, name: Name)(implicit ctx: Context): Symbol =
if (static)
if (sym == classRoot.symbol) staticScope.lookup(name)
else sym.companionModule.info.member(name).symbol