From 19bc1ff09fa73e13be7e3464b8440c04b657aa82 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Wed, 22 Mar 2017 17:59:25 +0100 Subject: 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. --- compiler/src/dotty/tools/dotc/core/NameOps.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/src/dotty/tools/dotc/core/NameOps.scala') diff --git a/compiler/src/dotty/tools/dotc/core/NameOps.scala b/compiler/src/dotty/tools/dotc/core/NameOps.scala index 38eb21446..27065a50a 100644 --- a/compiler/src/dotty/tools/dotc/core/NameOps.scala +++ b/compiler/src/dotty/tools/dotc/core/NameOps.scala @@ -390,7 +390,7 @@ object NameOps { // has form <$-separated-trait-name>$_setter_$ `name`_$eq val start = name.indexOfSlice(TRAIT_SETTER_SEPARATOR) + TRAIT_SETTER_SEPARATOR.length val end = name.indexOfSlice(SETTER_SUFFIX) - name.slice(start, end) ++ LOCAL_SUFFIX + (name.slice(start, end) ++ LOCAL_SUFFIX).asTermName } else getterName.fieldName } else name ++ LOCAL_SUFFIX -- cgit v1.2.3