File tree 1 file changed +4
-3
lines changed
compiler/src/dotty/tools/dotc/printing
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import typer.ImportInfo
12
12
import config .Config
13
13
import java .lang .Integer .toOctalString
14
14
import config .Config .summarizeDepth
15
+ import scala .util .control .NonFatal
15
16
import scala .annotation .switch
16
17
17
18
class PlainPrinter (_ctx : Context ) extends Printer {
@@ -69,11 +70,11 @@ class PlainPrinter(_ctx: Context) extends Printer {
69
70
else tp
70
71
71
72
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 }
74
75
75
76
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)
77
78
case _ => tp
78
79
}
79
80
You can’t perform that action at this time.
0 commit comments