File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
compiler/src/dotty/tools/dotc/transform/patmat Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -722,8 +722,7 @@ class SpaceEngine(implicit ctx: Context) extends SpaceLogic {
722
722
case _ => ??? // impossible
723
723
}
724
724
725
- def checkConstraint (constrs : List [(Type , Type )]): Boolean = {
726
- implicit val ctx1 = ctx.fresh.setNewTyperState()
725
+ def checkConstraint (constrs : List [(Type , Type )])(implicit ctx : Context ): Boolean = {
727
726
val tvarMap = collection.mutable.Map .empty[Symbol , TypeVar ]
728
727
val typeParamMap = new TypeMap () {
729
728
override def apply (tp : Type ): Type = tp match {
@@ -741,7 +740,7 @@ class SpaceEngine(implicit ctx: Context) extends SpaceLogic {
741
740
constrs.forall { case (tp1, tp2) => typeParamMap(tp1) <:< typeParamMap(tp2) }
742
741
}
743
742
744
- checkConstraint(genConstraint(sp))
743
+ checkConstraint(genConstraint(sp))(ctx.fresh.setNewTyperState())
745
744
}
746
745
747
746
/** Display spaces */
You can’t perform that action at this time.
0 commit comments