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 {
397
397
* what was expected
398
398
*/
399
399
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 = {
407
401
val map = new TypeMap {
408
402
def apply (t : Type ): Type = t match {
409
403
case t : TypeParamRef =>
@@ -420,6 +414,10 @@ object Implicits {
420
414
}
421
415
map(tp)
422
416
}
417
+
418
+ val ctx1 = ctx.fresh.setExploreTyperState()
419
+ ctx1.typerState.constraint = constraint
420
+ replace(ctx1)
423
421
}
424
422
425
423
def explanation (implicit ctx : Context ): String =
You can’t perform that action at this time.
0 commit comments