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) {
522
522
(varianceText(tree.mods) ~ typeText(nameIdText(tree))) ~
523
523
withEnclosingDef(tree) { tparamsText ~ rhsText }
524
524
}
525
- def recur (rhs : Tree , tparamsTxt : => Text ): Text = rhs match {
525
+ def recur (rhs : Tree , tparamsTxt : => Text , printMemberArgs : Boolean ): Text = rhs match {
526
526
case impl : Template =>
527
527
templateText(tree, impl)
528
528
case rhs : TypeBoundsTree =>
529
529
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 )
532
532
case rhs : TypeTree if isBounds(rhs.typeOpt) =>
533
533
typeDefText(tparamsTxt, toText(rhs))
534
534
case rhs =>
535
535
typeDefText(tparamsTxt, optText(rhs)(" = " ~ _))
536
536
}
537
- recur(rhs, " " )
537
+ recur(rhs, " " , true )
538
538
case Import (expr, selectors) =>
539
539
keywordText(" import " ) ~ importText(expr, selectors)
540
540
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