diff --git a/compiler/src/dotty/tools/dotc/core/TypeComparer.scala b/compiler/src/dotty/tools/dotc/core/TypeComparer.scala index aae819880ee2..abe3810fb0ab 100644 --- a/compiler/src/dotty/tools/dotc/core/TypeComparer.scala +++ b/compiler/src/dotty/tools/dotc/core/TypeComparer.scala @@ -2508,11 +2508,11 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling !(tp2 <:< tp1) && (provablyDisjoint(tp1, tp2.tp2) || provablyDisjoint(tp1, tp2.tp1)) case (tp1: TypeProxy, tp2: TypeProxy) => - provablyDisjoint(tp1.underlying, tp2) || provablyDisjoint(tp1, tp2.underlying) + provablyDisjoint(tp1.superType, tp2) || provablyDisjoint(tp1, tp2.superType) case (tp1: TypeProxy, _) => - provablyDisjoint(tp1.underlying, tp2) + provablyDisjoint(tp1.superType, tp2) case (_, tp2: TypeProxy) => - provablyDisjoint(tp1, tp2.underlying) + provablyDisjoint(tp1, tp2.superType) case _ => false } diff --git a/tests/run-macros/tasty-simplified.check b/tests/run-macros/tasty-simplified.check index ae73a625ac58..55e725e10f17 100644 --- a/tests/run-macros/tasty-simplified.check +++ b/tests/run-macros/tasty-simplified.check @@ -1,4 +1,4 @@ -Functor[[A >: scala.Nothing <: scala.Any] => scala.collection.immutable.List[A]] +Functor[Const[scala.collection.immutable.List[Dummy]]] Functor[Const[scala.Int]] -Functor[Id] -Functor[[A >: scala.Nothing <: scala.Any] => scala.Option[A]] +Functor[Const[Dummy]] +Functor[Const[scala.Option[Dummy]]]