File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ import util.Positions._
1919import Names ._
2020import collection .mutable
2121import ResolveSuper ._
22- import config .Config
2322
2423/** This phase adds super accessors and method overrides where
2524 * linearization differs from Java's rule for default methods in interfaces.
@@ -96,7 +95,7 @@ object ResolveSuper {
9695 def rebindSuper (base : Symbol , acc : Symbol )(implicit ctx : Context ): Symbol = {
9796 var bcs = base.info.baseClasses.dropWhile(acc.owner != _).tail
9897 var sym : Symbol = NoSymbol
99- val SuperAccessorName (memberName) = acc.name.unexpandedName // dotty deviation: ": Name" needed otherwise pattern type is neither a subtype nor a supertype of selector type
98+ val SuperAccessorName (memberName) = acc.name.unexpandedName
10099 ctx.debuglog(i " starting rebindsuper from $base of ${acc.showLocated}: ${acc.info} in $bcs, name = $memberName" )
101100 while (bcs.nonEmpty && sym == NoSymbol ) {
102101 val other = bcs.head.info.nonPrivateDecl(memberName)
Original file line number Diff line number Diff line change @@ -570,8 +570,8 @@ class Namer { typer: Typer =>
570570
571571 /** Create links between companion object and companion class */
572572 def createLinks (classTree : TypeDef , moduleTree : TypeDef )(implicit ctx : Context ) = {
573- val claz = ctx.denotNamed (classTree.name).symbol
574- val modl = ctx.denotNamed (moduleTree.name).symbol
573+ val claz = ctx.effectiveScope.lookup (classTree.name)
574+ val modl = ctx.effectiveScope.lookup (moduleTree.name)
575575 ctx.synthesizeCompanionMethod(nme.COMPANION_CLASS_METHOD , claz, modl).entered
576576 ctx.synthesizeCompanionMethod(nme.COMPANION_MODULE_METHOD , modl, claz).entered
577577 }
You can’t perform that action at this time.
0 commit comments