diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/symtab/Types.scala | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/Types.scala b/src/compiler/scala/tools/nsc/symtab/Types.scala index 14450c28b7..f7099eb170 100644 --- a/src/compiler/scala/tools/nsc/symtab/Types.scala +++ b/src/compiler/scala/tools/nsc/symtab/Types.scala @@ -3790,12 +3790,11 @@ A type's typeSymbol should never be inspected directly. object adaptToNewRunMap extends TypeMap { private def adaptToNewRun(pre: Type, sym: Symbol): Symbol = { if (phase.refChecked) { - sym + sym } else if (sym.isModuleClass) { - if (!sym.owner.isPackageClass) - sym // Nested lazy object - else - adaptToNewRun(pre, sym.sourceModule).moduleClass + val adaptedSym = adaptToNewRun(pre, sym.sourceModule) + // Handle nested objects properly + if (adaptedSym.isLazy) adaptedSym.lazyAccessor else adaptedSym.moduleClass } else if ((pre eq NoPrefix) || (pre eq NoType) || sym.isPackageClass) { sym } else { |