diff options
author | Martin Odersky <odersky@gmail.com> | 2016-07-19 17:27:51 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-07-19 17:27:51 +0200 |
commit | a8f7e6cf691f96f8e3049be282c4c11b38ac6f71 (patch) | |
tree | c7012eab4b571368137e82f61fff51a85ac3c495 | |
parent | 5eeee54e1a1419edf40efb9f9928076a143e7cd7 (diff) | |
download | dotty-a8f7e6cf691f96f8e3049be282c4c11b38ac6f71.tar.gz dotty-a8f7e6cf691f96f8e3049be282c4c11b38ac6f71.tar.bz2 dotty-a8f7e6cf691f96f8e3049be282c4c11b38ac6f71.zip |
Refine printing of tuple an function types with wildcards
-rw-r--r-- | src/dotty/tools/dotc/printing/RefinedPrinter.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/printing/RefinedPrinter.scala b/src/dotty/tools/dotc/printing/RefinedPrinter.scala index ca62827af..bdfce266c 100644 --- a/src/dotty/tools/dotc/printing/RefinedPrinter.scala +++ b/src/dotty/tools/dotc/printing/RefinedPrinter.scala @@ -96,15 +96,15 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) { override def toText(tp: Type): Text = controlled { def toTextTuple(args: List[Type]): Text = - "(" ~ toTextGlobal(args, ", ") ~ ")" + "(" ~ Text(args.map(argText), ", ") ~ ")" def toTextFunction(args: List[Type]): Text = changePrec(GlobalPrec) { val argStr: Text = if (args.length == 2 && !defn.isTupleType(args.head)) - atPrec(InfixPrec) { toText(args.head) } + atPrec(InfixPrec) { argText(args.head) } else toTextTuple(args.init) - argStr ~ " => " ~ toText(args.last) + argStr ~ " => " ~ argText(args.last) } homogenize(tp) match { case AppliedType(tycon, args) => |