File tree 2 files changed +3
-4
lines changed
compiler/src/dotty/tools/dotc
2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ import util.Positions._
19
19
import Names ._
20
20
import collection .mutable
21
21
import ResolveSuper ._
22
- import config .Config
23
22
24
23
/** This phase adds super accessors and method overrides where
25
24
* linearization differs from Java's rule for default methods in interfaces.
@@ -96,7 +95,7 @@ object ResolveSuper {
96
95
def rebindSuper (base : Symbol , acc : Symbol )(implicit ctx : Context ): Symbol = {
97
96
var bcs = base.info.baseClasses.dropWhile(acc.owner != _).tail
98
97
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
100
99
ctx.debuglog(i " starting rebindsuper from $base of ${acc.showLocated}: ${acc.info} in $bcs, name = $memberName" )
101
100
while (bcs.nonEmpty && sym == NoSymbol ) {
102
101
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 =>
570
570
571
571
/** Create links between companion object and companion class */
572
572
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)
575
575
ctx.synthesizeCompanionMethod(nme.COMPANION_CLASS_METHOD , claz, modl).entered
576
576
ctx.synthesizeCompanionMethod(nme.COMPANION_MODULE_METHOD , modl, claz).entered
577
577
}
You can’t perform that action at this time.
0 commit comments