File tree Expand file tree Collapse file tree 1 file changed +16
-12
lines changed
compiler/src/scala/quoted/runtime/impl/printers Expand file tree Collapse file tree 1 file changed +16
-12
lines changed Original file line number Diff line number Diff line change @@ -1345,18 +1345,22 @@ object SourceCode {
13451345 }
13461346
13471347 private def printBoundsTree (bounds : TypeBoundsTree )(using elideThis : Option [Symbol ]): this .type = {
1348- bounds.low match {
1349- case Inferred () =>
1350- case low =>
1351- this += " >: "
1352- printTypeTree(low)
1353- }
1354- bounds.hi match {
1355- case Inferred () => this
1356- case hi =>
1357- this += " <: "
1358- printTypeTree(hi)
1359- }
1348+ if bounds.low.tpe =:= bounds.hi.tpe then
1349+ this += " = "
1350+ printTypeTree(bounds.low)
1351+ else
1352+ bounds.low match {
1353+ case Inferred () =>
1354+ case low =>
1355+ this += " >: "
1356+ printTypeTree(low)
1357+ }
1358+ bounds.hi match {
1359+ case Inferred () => this
1360+ case hi =>
1361+ this += " <: "
1362+ printTypeTree(hi)
1363+ }
13601364 }
13611365
13621366 private def printBounds (bounds : TypeBounds )(using elideThis : Option [Symbol ]): this .type = {
You can’t perform that action at this time.
0 commit comments