Skip to content

Commit a8f7e6c

Browse files
committed
Refine printing of tuple an function types with wildcards
1 parent 5eeee54 commit a8f7e6c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/dotty/tools/dotc/printing/RefinedPrinter.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,15 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
9696

9797
override def toText(tp: Type): Text = controlled {
9898
def toTextTuple(args: List[Type]): Text =
99-
"(" ~ toTextGlobal(args, ", ") ~ ")"
99+
"(" ~ Text(args.map(argText), ", ") ~ ")"
100100
def toTextFunction(args: List[Type]): Text =
101101
changePrec(GlobalPrec) {
102102
val argStr: Text =
103103
if (args.length == 2 && !defn.isTupleType(args.head))
104-
atPrec(InfixPrec) { toText(args.head) }
104+
atPrec(InfixPrec) { argText(args.head) }
105105
else
106106
toTextTuple(args.init)
107-
argStr ~ " => " ~ toText(args.last)
107+
argStr ~ " => " ~ argText(args.last)
108108
}
109109
homogenize(tp) match {
110110
case AppliedType(tycon, args) =>

0 commit comments

Comments
 (0)