aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-07-19 17:27:51 +0200
committerMartin Odersky <odersky@gmail.com>2016-07-19 17:27:51 +0200
commita8f7e6cf691f96f8e3049be282c4c11b38ac6f71 (patch)
treec7012eab4b571368137e82f61fff51a85ac3c495 /src
parent5eeee54e1a1419edf40efb9f9928076a143e7cd7 (diff)
downloaddotty-a8f7e6cf691f96f8e3049be282c4c11b38ac6f71.tar.gz
dotty-a8f7e6cf691f96f8e3049be282c4c11b38ac6f71.tar.bz2
dotty-a8f7e6cf691f96f8e3049be282c4c11b38ac6f71.zip
Refine printing of tuple an function types with wildcards
Diffstat (limited to 'src')
-rw-r--r--src/dotty/tools/dotc/printing/RefinedPrinter.scala6
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) =>