File tree 1 file changed +4
-3
lines changed
compiler/src/dotty/tools/dotc/printing
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -211,7 +211,8 @@ class PlainPrinter(_ctx: Context) extends Printer {
211
211
~ keywordText(" erased " ).provided(tp.isErasedMethod)
212
212
~ keywordText(" implicit " ).provided(tp.isImplicitMethod && ! tp.isContextualMethod)
213
213
~ paramsText(tp)
214
- ~ (if tp.resultType.isInstanceOf [MethodType ] then " )" else " ): " )
214
+ ~ " )"
215
+ ~ (Str (" : " ) provided ! tp.resultType.isInstanceOf [MethodOrPoly ])
215
216
~ toText(tp.resultType)
216
217
}
217
218
case tp : ExprType =>
@@ -223,7 +224,7 @@ class PlainPrinter(_ctx: Context) extends Printer {
223
224
case tp : PolyType =>
224
225
changePrec(GlobalPrec ) {
225
226
" [" ~ paramsText(tp) ~ " ]" ~ lambdaHash(tp) ~
226
- (Str (" : " ) provided ! tp.resultType.isInstanceOf [MethodType ]) ~
227
+ (Str (" : " ) provided ! tp.resultType.isInstanceOf [MethodOrPoly ]) ~
227
228
toTextGlobal(tp.resultType)
228
229
}
229
230
case AnnotatedType (tpe, annot) =>
@@ -418,7 +419,7 @@ class PlainPrinter(_ctx: Context) extends Printer {
418
419
(if (isParameter) " : => " else " : " ) ~ toTextGlobal(tp.widenExpr)
419
420
case tp : PolyType =>
420
421
" [" ~ paramsText(tp) ~ " ]"
421
- ~ (Str (" : " ) provided ! tp.resultType.isInstanceOf [MethodType ])
422
+ ~ (Str (" : " ) provided ! tp.resultType.isInstanceOf [MethodOrPoly ])
422
423
~ toTextGlobal(tp.resultType)
423
424
case tp =>
424
425
" : " ~ toTextGlobal(tp)
You can’t perform that action at this time.
0 commit comments