From 8caff958adc541c2dbe7ce6eef7014dfd6bca510 Mon Sep 17 00:00:00 2001 From: odersky Date: Wed, 31 Aug 2022 18:17:03 +0200 Subject: [PATCH] Address review comment --- compiler/src/dotty/tools/dotc/core/TyperState.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/src/dotty/tools/dotc/core/TyperState.scala b/compiler/src/dotty/tools/dotc/core/TyperState.scala index 8a07981f1be7..f18ea23ed760 100644 --- a/compiler/src/dotty/tools/dotc/core/TyperState.scala +++ b/compiler/src/dotty/tools/dotc/core/TyperState.scala @@ -232,11 +232,12 @@ class TyperState() { tvars.foreach(tvar => if !tvar.inst.exists then if !isOwnedAnywhere(this, tvar) then includeVar(tvar) - if constraint.isHard(tvar) then constraint = constraint.withHard(tvar)) typeComparer.addToConstraint(tl, tvars) }) && // Integrate the additional constraints on type variables from `other` + // and merge hardness markers constraint.uninstVars.forall(tv => + if other.isHard(tv) then constraint = constraint.withHard(tv) val p = tv.origin val otherLos = other.lower(p) val otherHis = other.upper(p)