@@ -444,13 +444,9 @@ class CheckCaptures extends Recheck, SymTransformer:
444444 atPhase(preRecheckPhase.prev)(meth.denot.copySymDenotation())
445445 .installAfter(preRecheckPhase)
446446
447- // atPhase(preRecheckPhase.prev)(meth.denot.copySymDenotation())
448- // .installAfter(thisPhase)
449447 // Next, update all parameter symbols to match expected formals
450448 meth.paramSymss.head.lazyZip(ptformals).foreach { (psym, pformal) =>
451- psym.copySymDenotation(info = pformal.mapExprType).installAfter(preRecheckPhase)
452- // psym.copySymDenotation(info = pformal).installAfter(thisPhase)
453- // println(i"UPDATE $psym to ${pformal.mapExprType}, was $pformal")
449+ psym.updateInfoBetween(preRecheckPhase, thisPhase, pformal.mapExprType)
454450 }
455451 // Next, update types of parameter ValDefs
456452 mdef.paramss.head.lazyZip(ptformals).foreach { (param, pformal) =>
@@ -464,8 +460,7 @@ class CheckCaptures extends Recheck, SymTransformer:
464460 denot.info = mt.companion(ptformals, mdef.tpt.knownType)
465461 .showing(i " simplify info of $meth to $result" , capt)
466462 recheckDef(mdef, meth)
467- meth.copySymDenotation(info = completer, initFlags = meth.flags &~ Touched )
468- .installAfter(preRecheckPhase)
463+ meth.updateInfoBetween(preRecheckPhase, thisPhase, completer)
469464 case _ =>
470465 case _ =>
471466 super .recheckBlock(block, pt)
0 commit comments