@@ -184,20 +184,17 @@ class PlainPrinter(_ctx: Context) extends Printer {
184184 case NoPrefix =>
185185 " <noprefix>"
186186 case tp : MethodType =>
187- def paramText (name : TermName , tp : Type ) = toText(name) ~ " : " ~ toText(tp)
188187 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) ~
191189 (if (tp.resultType.isInstanceOf [MethodType ]) " )" else " ): " ) ~
192190 toText(tp.resultType)
193191 }
194192 case tp : ExprType =>
195193 changePrec(GlobalPrec ) { " => " ~ toText(tp.resultType) }
196194 case tp : TypeLambda =>
197- def paramText (name : Name , bounds : TypeBounds ): Text = name.unexpandedName.toString ~ toText(bounds)
198195 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 ]) ~
201198 toTextGlobal(tp.resultType)
202199 }
203200 case AnnotatedType (tpe, annot) =>
@@ -221,6 +218,11 @@ class PlainPrinter(_ctx: Context) extends Printer {
221218 }
222219 }.close
223220
221+ protected def paramsText (tp : LambdaType ): Text = {
222+ def paramText (name : Name , tp : Type ) = toText(name) ~ toTextRHS(tp)
223+ Text ((tp.paramNames, tp.paramInfos).zipped.map(paramText), " , " )
224+ }
225+
224226 protected def ParamRefNameString (name : Name ): String = name.toString
225227
226228 protected def ParamRefNameString (param : ParamRef ): String =
0 commit comments