File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
compiler/src/dotty/tools/dotc/printing Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import typer.ImportInfo
1212import config .Config
1313import java .lang .Integer .toOctalString
1414import config .Config .summarizeDepth
15+ import scala .util .control .NonFatal
1516import scala .annotation .switch
1617
1718class PlainPrinter (_ctx : Context ) extends Printer {
@@ -69,11 +70,11 @@ class PlainPrinter(_ctx: Context) extends Printer {
6970 else tp
7071
7172 private def sameBound (lo : Type , hi : Type ): Boolean =
72- try lo =:= hi
73- catch { case ex : Throwable => false }
73+ try ctx.typeComparer.isSameTypeWhenFrozen(lo, hi)
74+ catch { case NonFatal (ex) => false }
7475
7576 private def homogenizeArg (tp : Type ) = tp match {
76- case TypeBounds (lo, hi) if sameBound(lo, hi) => homogenize(hi)
77+ case TypeBounds (lo, hi) if homogenizedView && sameBound(lo, hi) => homogenize(hi)
7778 case _ => tp
7879 }
7980
You can’t perform that action at this time.
0 commit comments