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 db2464f commit 5ca28ddCopy full SHA for 5ca28dd
compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala
@@ -573,7 +573,12 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
573
changePrec(AndTypePrec) { toText(args(0)) ~ " & " ~ atPrec(AndTypePrec + 1) { toText(args(1)) } }
574
else if defn.isFunctionSymbol(tpt.symbol)
575
&& tpt.isInstanceOf[TypeTree] && tree.hasType && !printDebug
576
- then changePrec(GlobalPrec) { toText(tree.typeOpt) }
+ then
577
+ changePrec(GlobalPrec) { toText(tree.typeOpt) }
578
+ else if tpt.symbol == defn.NamedTupleTypeRef.symbol
579
+ && !printDebug && tree.typeOpt.exists
580
581
+ toText(tree.typeOpt)
582
else args match
583
case arg :: _ if arg.isTerm =>
584
toTextLocal(tpt) ~ "(" ~ Text(args.map(argText), ", ") ~ ")"
0 commit comments