Skip to content

Commit f013bbf

Browse files
oderskyKordyjan
authored andcommitted
Rename to classNestingLevel
1 parent 0d65938 commit f013bbf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -614,14 +614,14 @@ class Inliner(call: tpd.Tree, rhsToInline: tpd.Tree)(using Context) {
614614
true
615615

616616
/** The number of enclosing classes of this class, plus one */
617-
private def nestingLevel(cls: Symbol) = cls.ownersIterator.count(_.isClass)
617+
private def classNestingLevel(cls: Symbol) = cls.ownersIterator.count(_.isClass)
618618

619619
// Compute val-definitions for all this-proxies and append them to `bindingsBuf`
620620
private def computeThisBindings() = {
621621
// All needed this-proxies, paired-with and sorted-by nesting depth of
622622
// the classes they represent (innermost first)
623623
val sortedProxies = thisProxy.toList
624-
.map((cls, proxy) => (nestingLevel(cls), proxy.symbol))
624+
.map((cls, proxy) => (classNestingLevel(cls), proxy.symbol))
625625
.sortBy(-_._1)
626626

627627
var lastSelf: Symbol = NoSymbol
@@ -643,7 +643,7 @@ class Inliner(call: tpd.Tree, rhsToInline: tpd.Tree)(using Context) {
643643
val pre = inlineCallPrefix match
644644
case Super(qual, _) => qual
645645
case pre => pre
646-
val preLevel = nestingLevel(inlinedMethod.owner)
646+
val preLevel = classNestingLevel(inlinedMethod.owner)
647647
if preLevel > level then pre.outerSelect(preLevel - level, selfSym.info)
648648
else pre
649649

0 commit comments

Comments
 (0)