@@ -130,16 +130,16 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
130
130
131
131
override def toText (tp : Type ): Text = controlled {
132
132
def toTextTuple (args : List [Type ]): Text =
133
- " (" ~ Text (args.map(argText ), " , " ) ~ " )"
133
+ " (" ~ Text (args.map(globalPrecArgText ), " , " ) ~ " )"
134
134
135
135
def toTextFunction (args : List [Type ], isImplicit : Boolean , isErased : Boolean ): Text =
136
136
changePrec(GlobalPrec ) {
137
137
val argStr : Text =
138
138
if (args.length == 2 && ! defn.isTupleType(args.head))
139
- atPrec(InfixPrec ) { argText (args.head) }
139
+ atPrec(InfixPrec ) { globalPrecArgText (args.head) }
140
140
else
141
141
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)
143
143
}
144
144
145
145
def toTextDependentFunction (appType : MethodType ): Text = {
@@ -162,8 +162,8 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
162
162
* needs to be parenthesized if it's an infix type, and vice versa. */
163
163
val l :: r :: Nil = args
164
164
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)
167
167
168
168
leftArg ~ " " ~ toTextLocal(op) ~ " " ~ rightArg
169
169
}
0 commit comments