Skip to content

Commit ad698a5

Browse files
committed
Fix another outerSelect
1 parent 29b12b4 commit ad698a5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

compiler/src/dotty/tools/dotc/inlines/Inliner.scala

+5-5
Original file line numberDiff line numberDiff line change
@@ -278,10 +278,10 @@ class Inliner(val call: tpd.Tree)(using Context):
278278
.map((cls, proxy) => (cls.ownersIterator.length, proxy.symbol, cls))
279279
.sortBy(-_._1)
280280

281-
def outerSelect(prefix: Symbol, prefixCls: Symbol, level: Int, info: Type) =
281+
def outerSelect(prefix: Tree, prefixCls: Symbol, hops: Int, info: Type) =
282282
val tpt = TypeTree(adaptToPrefix(prefixCls.appliedRef))
283-
val qual = Typed(ref(prefix), tpt)
284-
qual.outerSelect(level, info)
283+
val qual = Typed(prefix, tpt)
284+
qual.outerSelect(hops, info)
285285

286286
var lastSelf: Symbol = NoSymbol
287287
var lastCls: Symbol = NoSymbol
@@ -298,13 +298,13 @@ class Inliner(val call: tpd.Tree)(using Context):
298298
if rhsClsSym.is(Module) && rhsClsSym.isStatic then
299299
ref(rhsClsSym.sourceModule)
300300
else if lastSelf.exists then
301-
outerSelect(lastSelf, lastCls, lastLevel - level, selfSym.info)
301+
outerSelect(ref(lastSelf), lastCls, lastLevel - level, selfSym.info)
302302
else
303303
val pre = inlineCallPrefix match
304304
case Super(qual, _) => qual
305305
case pre => pre
306306
val preLevel = inlinedMethod.owner.ownersIterator.length
307-
if preLevel > level then pre.outerSelect(preLevel - level, selfSym.info)
307+
if preLevel > level then outerSelect(pre, inlinedMethod.owner, preLevel - level, selfSym.info)
308308
else pre
309309

310310
val binding = accountForOpaques(

0 commit comments

Comments
 (0)