Skip to content

Commit 31e07ef

Browse files
committed
Drop references to replaced TypeVar in replace
1 parent 96fc58c commit 31e07ef

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,6 @@ class OrderingConstraint(private val boundsMap: ParamBounds,
411411
tvars.copyToArray(entries1, nparams)
412412
newConstraint(boundsMap = this.boundsMap.updated(poly, entries1))
413413
.init(poly)
414-
.adjustDeps(poly, entries1, add = true)
415414
}
416415

417416
/** Split dependent parameters off the bounds for parameters in `poly`.
@@ -433,7 +432,8 @@ class OrderingConstraint(private val boundsMap: ParamBounds,
433432
todos.dropInPlace(1)
434433
i += 1
435434
}
436-
current.checkWellFormed()
435+
current.adjustDeps(poly, current.boundsMap(poly).nn, add = true)
436+
.checkWellFormed()
437437
}
438438

439439
// ---------- Updates ------------------------------------------------------------

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ object Substituters:
193193
def apply(tp: Type): Type = substRecThis(tp, from, to, this)(using mapCtx)
194194
}
195195

196-
final class SubstParamMap(from: ParamRef, to: Type)(using Context) extends DeepTypeMap, IdempotentCaptRefMap {
196+
class SubstParamMap(from: ParamRef, to: Type)(using Context) extends DeepTypeMap, IdempotentCaptRefMap {
197197
def apply(tp: Type): Type = substParam(tp, from, to, this)(using mapCtx)
198198
}
199199

0 commit comments

Comments
 (0)