We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ddb9c01 commit fe3125fCopy full SHA for fe3125f
compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala
@@ -511,6 +511,9 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
511
changePrec(OrTypePrec) { toText(args(0)) ~ " | " ~ atPrec(OrTypePrec + 1) { toText(args(1)) } }
512
else if (tpt.symbol == defn.andType && args.length == 2)
513
changePrec(AndTypePrec) { toText(args(0)) ~ " & " ~ atPrec(AndTypePrec + 1) { toText(args(1)) } }
514
+ else if defn.isFunctionClass(tpt.symbol)
515
+ && tpt.isInstanceOf[TypeTree] && tree.hasType && !printDebug
516
+ then changePrec(GlobalPrec) { toText(tree.typeOpt) }
517
else args match
518
case arg :: _ if arg.isTerm =>
519
toTextLocal(tpt) ~ "(" ~ Text(args.map(argText), ", ") ~ ")"
0 commit comments