aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/printing
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2017-03-31 18:32:02 +0200
committerMartin Odersky <odersky@gmail.com>2017-04-11 09:33:12 +0200
commitb4f21c6da6b6bc1797908f1400631573b6445e31 (patch)
tree19efe5c588230059b04ef046114c30d3fd64b1f9 /compiler/src/dotty/tools/dotc/printing
parent7a927ce233a8ea4b8ddc285b8a36c61ca3fdd405 (diff)
downloaddotty-b4f21c6da6b6bc1797908f1400631573b6445e31.tar.gz
dotty-b4f21c6da6b6bc1797908f1400631573b6445e31.tar.bz2
dotty-b4f21c6da6b6bc1797908f1400631573b6445e31.zip
Names are no longer Seqs
Drop Seq implementation of name. This implementation was always problematic because it entailed potentially very costly conversions to toSimpleName. We now have better control over when we convert a name to a simple name.
Diffstat (limited to 'compiler/src/dotty/tools/dotc/printing')
-rw-r--r--compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala b/compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala
index f6399d3b7..c3f36cc46 100644
--- a/compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala
+++ b/compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala
@@ -156,8 +156,9 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
// one version of the annotation tree that has the correct positions).
withoutPos(super.toText(tp))
case tp: SelectionProto =>
- return "?{ " ~ toText(tp.name) ~ (" " provided !tp.name.decode.last.isLetterOrDigit) ~
- ": " ~ toText(tp.memberProto) ~ " }"
+ return "?{ " ~ toText(tp.name) ~
+ (" " provided !tp.name.toSimpleName.decode.last.isLetterOrDigit) ~
+ ": " ~ toText(tp.memberProto) ~ " }"
case tp: ViewProto =>
return toText(tp.argType) ~ " ?=>? " ~ toText(tp.resultType)
case tp @ FunProto(args, resultType, _) =>