aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/typer/Inliner.scala
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/src/dotty/tools/dotc/typer/Inliner.scala')
-rw-r--r--compiler/src/dotty/tools/dotc/typer/Inliner.scala9
1 files changed, 3 insertions, 6 deletions
diff --git a/compiler/src/dotty/tools/dotc/typer/Inliner.scala b/compiler/src/dotty/tools/dotc/typer/Inliner.scala
index eaabb0689..38a139be1 100644
--- a/compiler/src/dotty/tools/dotc/typer/Inliner.scala
+++ b/compiler/src/dotty/tools/dotc/typer/Inliner.scala
@@ -13,9 +13,9 @@ import Decorators._
import Constants._
import StdNames.nme
import Contexts.Context
-import Names.{Name, TermName}
+import Names.{Name, TermName, EmptyTermName}
import NameOps._
-import NameKinds.InlineAccessorName
+import NameKinds.{InlineAccessorName, OuterSelectName}
import SymDenotations.SymDenotation
import Annotations._
import transform.ExplicitOuter
@@ -399,9 +399,6 @@ class Inliner(call: tpd.Tree, rhs: tpd.Tree)(implicit ctx: Context) {
// The class that the this-proxy `selfSym` represents
def classOf(selfSym: Symbol) = selfSym.info.widen.classSymbol
- // The name of the outer selector that computes the rhs of `selfSym`
- def outerSelector(n: Int): TermName = n.toString.toTermName ++ nme.OUTER_SELECT
-
// The total nesting depth of the class represented by `selfSym`.
def outerLevel(selfSym: Symbol): Int = classOf(selfSym).ownersIterator.length
@@ -419,7 +416,7 @@ class Inliner(call: tpd.Tree, rhs: tpd.Tree)(implicit ctx: Context) {
if (!lastSelf.exists)
prefix
else
- untpd.Select(ref(lastSelf), outerSelector(lastLevel - level)).withType(selfSym.info)
+ untpd.Select(ref(lastSelf), OuterSelectName(EmptyTermName, lastLevel - level)).withType(selfSym.info)
bindingsBuf += ValDef(selfSym.asTerm, rhs)
lastSelf = selfSym
lastLevel = level