Skip to content

Commit 8caff95

Browse files
committed
Address review comment
1 parent d7521bf commit 8caff95

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/src/dotty/tools/dotc/core/TyperState.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,11 +232,12 @@ class TyperState() {
232232
tvars.foreach(tvar =>
233233
if !tvar.inst.exists then
234234
if !isOwnedAnywhere(this, tvar) then includeVar(tvar)
235-
if constraint.isHard(tvar) then constraint = constraint.withHard(tvar))
236235
typeComparer.addToConstraint(tl, tvars)
237236
}) &&
238237
// Integrate the additional constraints on type variables from `other`
238+
// and merge hardness markers
239239
constraint.uninstVars.forall(tv =>
240+
if other.isHard(tv) then constraint = constraint.withHard(tv)
240241
val p = tv.origin
241242
val otherLos = other.lower(p)
242243
val otherHis = other.upper(p)

0 commit comments

Comments
 (0)