File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
compiler/src/dotty/tools/dotc/printing Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -522,19 +522,19 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
522522 (varianceText(tree.mods) ~ typeText(nameIdText(tree))) ~
523523 withEnclosingDef(tree) { tparamsText ~ rhsText }
524524 }
525- def recur (rhs : Tree , tparamsTxt : => Text ): Text = rhs match {
525+ def recur (rhs : Tree , tparamsTxt : => Text , printMemberArgs : Boolean ): Text = rhs match {
526526 case impl : Template =>
527527 templateText(tree, impl)
528528 case rhs : TypeBoundsTree =>
529529 typeDefText(tparamsTxt, toText(rhs))
530- case LambdaTypeTree (tparams, body) =>
531- recur(body, tparamsText(tparams))
530+ case LambdaTypeTree (tparams, body) if printMemberArgs =>
531+ recur(body, tparamsText(tparams), false )
532532 case rhs : TypeTree if isBounds(rhs.typeOpt) =>
533533 typeDefText(tparamsTxt, toText(rhs))
534534 case rhs =>
535535 typeDefText(tparamsTxt, optText(rhs)(" = " ~ _))
536536 }
537- recur(rhs, " " )
537+ recur(rhs, " " , true )
538538 case Import (expr, selectors) =>
539539 keywordText(" import " ) ~ importText(expr, selectors)
540540 case Export (expr, selectors) =>
Original file line number Diff line number Diff line change 1+ object Foo1 { type T [+ A ] = (A , Int ) }
2+ object Foo2 { type T [+ A ] = [+ B ] =>> (A , B ) }
3+ object Foo3 { type T [+ A ] = [+ B ] =>> [C ] =>> (A , B ) }
4+ object Foo4 { type T = [+ A ] =>> [+ B ] =>> [C ] =>> (A , B ) }
You can’t perform that action at this time.
0 commit comments