@@ -184,20 +184,17 @@ class PlainPrinter(_ctx: Context) extends Printer {
184
184
case NoPrefix =>
185
185
" <noprefix>"
186
186
case tp : MethodType =>
187
- def paramText (name : TermName , tp : Type ) = toText(name) ~ " : " ~ toText(tp)
188
187
changePrec(GlobalPrec ) {
189
- (if (tp.isImplicitMethod) " (implicit " else " (" ) ~
190
- Text ((tp.paramNames, tp.paramInfos).zipped map paramText, " , " ) ~
188
+ (if (tp.isImplicitMethod) " (implicit " else " (" ) ~ paramsText(tp) ~
191
189
(if (tp.resultType.isInstanceOf [MethodType ]) " )" else " ): " ) ~
192
190
toText(tp.resultType)
193
191
}
194
192
case tp : ExprType =>
195
193
changePrec(GlobalPrec ) { " => " ~ toText(tp.resultType) }
196
194
case tp : TypeLambda =>
197
- def paramText (name : Name , bounds : TypeBounds ): Text = name.unexpandedName.toString ~ toText(bounds)
198
195
changePrec(GlobalPrec ) {
199
- " [" ~ Text ((tp.paramNames, tp.paramInfos).zipped.map(paramText), " , " ) ~
200
- " ] " ~ lambdaHash(tp) ~ (" => " provided ! tp.resultType.isInstanceOf [MethodType ]) ~
196
+ " [" ~ paramsText(tp) ~ " ] " ~ lambdaHash(tp ) ~
197
+ (" => " provided ! tp.resultType.isInstanceOf [MethodType ]) ~
201
198
toTextGlobal(tp.resultType)
202
199
}
203
200
case AnnotatedType (tpe, annot) =>
@@ -223,6 +220,11 @@ class PlainPrinter(_ctx: Context) extends Printer {
223
220
}
224
221
}.close
225
222
223
+ protected def paramsText (tp : LambdaType ): Text = {
224
+ def paramText (name : Name , tp : Type ) = toText(name) ~ toTextRHS(tp)
225
+ Text ((tp.paramNames, tp.paramInfos).zipped.map(paramText), " , " )
226
+ }
227
+
226
228
protected def ParamRefNameString (name : Name ): String = name.toString
227
229
228
230
protected def ParamRefNameString (param : ParamRef ): String =
0 commit comments