@@ -34,9 +34,7 @@ abstract class Recheck extends Phase, IdentityDenotTransformer:
3434 // One failing test is pos/i583a.scala
3535
3636 def run (using Context ): Unit =
37- val unit = ctx.compilationUnit
38- // println(i"recheck types of $unit")
39- newRechecker().checkUnit(unit)
37+ newRechecker().checkUnit(ctx.compilationUnit)
4038
4139 def newRechecker ()(using Context ): Rechecker
4240
@@ -94,7 +92,7 @@ abstract class Recheck extends Phase, IdentityDenotTransformer:
9492 def recheckBind (tree : Bind , pt : Type )(using Context ): Type = tree match
9593 case Bind (name, body) =>
9694 enterDef(tree)
97- val bodyType = recheck(body, pt)
95+ recheck(body, pt)
9896 val sym = tree.symbol
9997 if sym.isType then sym.typeRef else sym.info
10098
@@ -249,11 +247,9 @@ abstract class Recheck extends Phase, IdentityDenotTransformer:
249247 stats.foreach(enterDef)
250248 stats.foreach(recheck(_))
251249
252- /** Typecheck tree without adapting it, returning a recheck tree .
253- * @param initTree the unrecheck tree
250+ /** Recheck tree without adapting it, returning its new type .
251+ * @param tree the original tree
254252 * @param pt the expected result type
255- * @param locked the set of type variables of the current typer state that cannot be interpolated
256- * at the present time
257253 */
258254 def recheck (tree : Tree , pt : Type = WildcardType )(using Context ): Type = trace(i " rechecking $tree with pt = $pt" , recheckr, show = true ) {
259255
0 commit comments