diff options
Diffstat (limited to 'src/dotty/tools/dotc/core/Names.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Names.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/Names.scala b/src/dotty/tools/dotc/core/Names.scala index b61f5ee06..5d78ce88c 100644 --- a/src/dotty/tools/dotc/core/Names.scala +++ b/src/dotty/tools/dotc/core/Names.scala @@ -79,7 +79,8 @@ object Names { */ def fromName(name: Name): ThisName = fromChars(chrs, name.start, name.length) - override def toString = new String(chrs, start, length) + override def toString = + if (length == 0) "" else new String(chrs, start, length) def show(implicit ctx: Context): String = ctx.nameString(this) |