Skip to content

Commit 179f4d9

Browse files
committed
fix compilation error with implicits
1 parent fedd450 commit 179f4d9

File tree

1 file changed

+2
-3
lines changed
  • compiler/src/dotty/tools/dotc/transform/patmat

1 file changed

+2
-3
lines changed

compiler/src/dotty/tools/dotc/transform/patmat/Space.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -722,8 +722,7 @@ class SpaceEngine(implicit ctx: Context) extends SpaceLogic {
722722
case _ => ??? // impossible
723723
}
724724

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 = {
727726
val tvarMap = collection.mutable.Map.empty[Symbol, TypeVar]
728727
val typeParamMap = new TypeMap() {
729728
override def apply(tp: Type): Type = tp match {
@@ -741,7 +740,7 @@ class SpaceEngine(implicit ctx: Context) extends SpaceLogic {
741740
constrs.forall { case (tp1, tp2) => typeParamMap(tp1) <:< typeParamMap(tp2) }
742741
}
743742

744-
checkConstraint(genConstraint(sp))
743+
checkConstraint(genConstraint(sp))(ctx.fresh.setNewTyperState())
745744
}
746745

747746
/** Display spaces */

0 commit comments

Comments
 (0)