Skip to content

Commit e965128

Browse files
committed
Handle HKTermLambdas in Printer
1 parent 703edea commit e965128

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,8 @@ class PlainPrinter(_ctx: Context) extends Printer {
172172
("(" + (if (tp.isErasedMethod) "erased " else "")
173173
+ (if (tp.isImplicitMethod) "implicit " else "")
174174
) ~ paramsText(tp) ~
175-
(if (tp.resultType.isInstanceOf[MethodType]) ")" else "): ") ~
175+
(if (tp.isInstanceOf[TermLambda] ||
176+
tp.resultType.isInstanceOf[MethodType]) ")" else "): ") ~
176177
toText(tp.resultType)
177178
}
178179
case tp: ExprType =>
@@ -326,7 +327,7 @@ class PlainPrinter(_ctx: Context) extends Printer {
326327
else dclsText(trueDecls)
327328
tparamsText ~ " extends " ~ toTextParents(tp.parents) ~ "{" ~ selfText ~ declsText ~
328329
"} at " ~ preText
329-
case mt: MethodType =>
330+
case mt: LambdaType =>
330331
toTextGlobal(mt)
331332
case tp: ExprType =>
332333
": => " ~ toTextGlobal(tp.widenExpr)

0 commit comments

Comments
 (0)