diff options
Diffstat (limited to 'compiler/src/dotty/tools/dotc/core')
-rw-r--r-- | compiler/src/dotty/tools/dotc/core/NameOps.scala | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/src/dotty/tools/dotc/core/NameOps.scala b/compiler/src/dotty/tools/dotc/core/NameOps.scala index cd3ae2a25..aac313892 100644 --- a/compiler/src/dotty/tools/dotc/core/NameOps.scala +++ b/compiler/src/dotty/tools/dotc/core/NameOps.scala @@ -271,6 +271,13 @@ object NameOps { else -1 } + + /** The number of hops specified in an outer-select name */ + def outerSelectHops: Int = { + require(isOuterSelect) + name.dropRight(nme.OUTER_SELECT.length).toString.toInt + } + /** The name of the generic runtime operation corresponding to an array operation */ def genericArrayOp: TermName = name match { case nme.apply => nme.array_apply |