@@ -34,9 +34,7 @@ abstract class Recheck extends Phase, IdentityDenotTransformer:
34
34
// One failing test is pos/i583a.scala
35
35
36
36
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)
40
38
41
39
def newRechecker ()(using Context ): Rechecker
42
40
@@ -94,7 +92,7 @@ abstract class Recheck extends Phase, IdentityDenotTransformer:
94
92
def recheckBind (tree : Bind , pt : Type )(using Context ): Type = tree match
95
93
case Bind (name, body) =>
96
94
enterDef(tree)
97
- val bodyType = recheck(body, pt)
95
+ recheck(body, pt)
98
96
val sym = tree.symbol
99
97
if sym.isType then sym.typeRef else sym.info
100
98
@@ -249,11 +247,9 @@ abstract class Recheck extends Phase, IdentityDenotTransformer:
249
247
stats.foreach(enterDef)
250
248
stats.foreach(recheck(_))
251
249
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
254
252
* @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
257
253
*/
258
254
def recheck (tree : Tree , pt : Type = WildcardType )(using Context ): Type = trace(i " rechecking $tree with pt = $pt" , recheckr, show = true ) {
259
255
0 commit comments