@@ -130,16 +130,16 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
130130
131131 override def toText (tp : Type ): Text = controlled {
132132 def toTextTuple (args : List [Type ]): Text =
133- " (" ~ Text (args.map(argText ), " , " ) ~ " )"
133+ " (" ~ Text (args.map(globalPrecArgText ), " , " ) ~ " )"
134134
135135 def toTextFunction (args : List [Type ], isImplicit : Boolean , isErased : Boolean ): Text =
136136 changePrec(GlobalPrec ) {
137137 val argStr : Text =
138138 if (args.length == 2 && ! defn.isTupleType(args.head))
139- atPrec(InfixPrec ) { argText (args.head) }
139+ atPrec(InfixPrec ) { globalPrecArgText (args.head) }
140140 else
141141 toTextTuple(args.init)
142- (keywordText(" erased " ) provided isErased) ~ (keywordText(" implicit " ) provided isImplicit) ~ argStr ~ " => " ~ argText (args.last)
142+ (keywordText(" erased " ) provided isErased) ~ (keywordText(" implicit " ) provided isImplicit) ~ argStr ~ " => " ~ globalPrecArgText (args.last)
143143 }
144144
145145 def toTextDependentFunction (appType : MethodType ): Text = {
@@ -162,8 +162,8 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
162162 * needs to be parenthesized if it's an infix type, and vice versa. */
163163 val l :: r :: Nil = args
164164 val isRightAssoc = op.typeSymbol.name.endsWith(" :" )
165- val leftArg = if (isRightAssoc && isInfixType(l)) " (" ~ argText (l) ~ " )" else argText (l)
166- val rightArg = if (! isRightAssoc && isInfixType(r)) " (" ~ argText (r) ~ " )" else argText (r)
165+ val leftArg = if (isRightAssoc && isInfixType(l)) " (" ~ globalPrecArgText (l) ~ " )" else globalPrecArgText (l)
166+ val rightArg = if (! isRightAssoc && isInfixType(r)) " (" ~ globalPrecArgText (r) ~ " )" else globalPrecArgText (r)
167167
168168 leftArg ~ " " ~ toTextLocal(op) ~ " " ~ rightArg
169169 }
0 commit comments