aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/backend
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2017-03-22 17:59:25 +0100
committerMartin Odersky <odersky@gmail.com>2017-04-11 09:33:10 +0200
commit19bc1ff09fa73e13be7e3464b8440c04b657aa82 (patch)
treebc6934a3c47ab403f4dc3dd2c87531081887dc15 /compiler/src/dotty/tools/backend
parent2cc16c4d990fa404577dbe1c944958a0cf9896a8 (diff)
downloaddotty-19bc1ff09fa73e13be7e3464b8440c04b657aa82.tar.gz
dotty-19bc1ff09fa73e13be7e3464b8440c04b657aa82.tar.bz2
dotty-19bc1ff09fa73e13be7e3464b8440c04b657aa82.zip
Disentangle Names from Seqs
Structured names are not Seqs anymmore. But the Seq behavior is required in many places that mangle names. As an intermediate step we drop the Seq basetype but add Seq behavior through a decorator. Most Seq operations only work on SimpleTermNames and their TypeName analogue, will throw an exception wehn called on structured names.
Diffstat (limited to 'compiler/src/dotty/tools/backend')
-rw-r--r--compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala b/compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala
index 77e979e4d..309d97261 100644
--- a/compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala
+++ b/compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala
@@ -544,8 +544,8 @@ class DottyBackendInterface(outputDirectory: AbstractFile, val superCallsMap: Ma
def toTermName: Name = n.toTermName
def dropModule: Name = n.stripModuleClassSuffix
- def len: Int = n.length
- def offset: Int = n.start
+ def len: Int = n.toSimpleName.length
+ def offset: Int = n.toSimpleName.start
def isTermName: Boolean = n.isTermName
def startsWith(s: String): Boolean = n.startsWith(s)
}