summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/symtab/Symbols.scala9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/Symbols.scala b/src/compiler/scala/tools/nsc/symtab/Symbols.scala
index cc2b25a7e7..e7220014fd 100644
--- a/src/compiler/scala/tools/nsc/symtab/Symbols.scala
+++ b/src/compiler/scala/tools/nsc/symtab/Symbols.scala
@@ -695,7 +695,7 @@ trait Symbols requires SymbolTable {
}
def expandedName(name: Name): Name =
- newTermName(fullNameString('$') + nme.EXPAND_SEPARATOR_STRING + name);
+ newTermName(fullNameString('$') + nme.EXPAND_SEPARATOR_STRING + name)
def sourceFile: AbstractFile =
(if (isModule) moduleClass else toplevelClass).sourceFile;
@@ -757,8 +757,11 @@ trait Symbols requires SymbolTable {
*/
final def fullNameString(separator: char): String = {
assert(owner != NoSymbol, this)
- if (owner.isRoot || owner.isEmptyPackageClass) simpleName.toString()
- else owner.fullNameString(separator) + separator + simpleName + idString;
+ var str =
+ if (owner.isRoot || owner.isEmptyPackageClass) simpleName.toString()
+ else owner.fullNameString(separator) + separator + simpleName + idString;
+ if (str.charAt(str.length - 1) == ' ') str = str.substring(0, str.length - 1)
+ str
}
final def fullNameString: String = fullNameString('.');