From f8d5c8401ab7e4a31c9f4430ad64e27d8cb08bac Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Fri, 5 Apr 2013 12:15:45 +0200 Subject: Refactored test framework Moves worksheets to test. Factored out class DottyTest and made it usable from worksheets. Added worksheet test for signatures. --- src/dotty/tools/dotc/core/Names.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/dotty/tools/dotc/core/Names.scala') 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) -- cgit v1.2.3