File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -397,13 +397,7 @@ object Implicits {
397397 * what was expected
398398 */
399399 override def clarify (tp : Type )(implicit ctx : Context ): Type = {
400- val ctx0 = ctx
401- locally {
402- implicit val ctx = ctx0.fresh.setTyperState {
403- val ts = ctx0.typerState.fresh()
404- ts.constraint_=(constraint)(ctx0)
405- ts
406- }
400+ def replace (implicit ctx : Context ): Type = {
407401 val map = new TypeMap {
408402 def apply (t : Type ): Type = t match {
409403 case t : TypeParamRef =>
@@ -420,6 +414,10 @@ object Implicits {
420414 }
421415 map(tp)
422416 }
417+
418+ val ctx1 = ctx.fresh.setExploreTyperState()
419+ ctx1.typerState.constraint = constraint
420+ replace(ctx1)
423421 }
424422
425423 def explanation (implicit ctx : Context ): String =
You can’t perform that action at this time.
0 commit comments