Skip to content

Commit 1a85e94

Browse files
committed
Fix pretty print
1 parent b9ac06f commit 1a85e94

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala

+3-3
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ class PlainPrinter(_ctx: Context) extends Printer {
211211
~ keywordText("erased ").provided(tp.isErasedMethod)
212212
~ keywordText("implicit ").provided(tp.isImplicitMethod && !tp.isContextualMethod)
213213
~ paramsText(tp)
214-
~ (if tp.resultType.isInstanceOf[MethodType] then ")" else "): ")
214+
~ (if tp.resultType.isInstanceOf[MethodOrPoly] then ")" else "): ")
215215
~ toText(tp.resultType)
216216
}
217217
case tp: ExprType =>
@@ -223,7 +223,7 @@ class PlainPrinter(_ctx: Context) extends Printer {
223223
case tp: PolyType =>
224224
changePrec(GlobalPrec) {
225225
"[" ~ paramsText(tp) ~ "]" ~ lambdaHash(tp) ~
226-
(Str(" => ") provided !tp.resultType.isInstanceOf[MethodType]) ~
226+
(Str(" => ") provided !tp.resultType.isInstanceOf[MethodOrPoly]) ~
227227
toTextGlobal(tp.resultType)
228228
}
229229
case AnnotatedType(tpe, annot) =>
@@ -418,7 +418,7 @@ class PlainPrinter(_ctx: Context) extends Printer {
418418
(if (isParameter) ": => " else ": ") ~ toTextGlobal(tp.widenExpr)
419419
case tp: PolyType =>
420420
"[" ~ paramsText(tp) ~ "]"
421-
~ (Str(": ") provided !tp.resultType.isInstanceOf[MethodType])
421+
~ (Str(": ") provided !tp.resultType.isInstanceOf[MethodOrPoly])
422422
~ toTextGlobal(tp.resultType)
423423
case tp =>
424424
": " ~ toTextGlobal(tp)

0 commit comments

Comments
 (0)