Skip to content

Commit 7eba7f7

Browse files
committed
Use Context#setReporter where possible
1 parent a33d517 commit 7eba7f7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/dotty/tools/dotc/transform/TreeChecker.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,7 @@ class TreeChecker extends Phase with SymTransformer {
118118
val prevPhase = ctx.phase.prev // can be a mini-phase
119119
val squahsedPhase = ctx.squashed(prevPhase)
120120
ctx.println(s"checking ${ctx.compilationUnit} after phase ${squahsedPhase}")
121-
val checkingCtx = ctx.fresh
122-
.setTyperState(ctx.typerState.withReporter(new ThrowingReporter(ctx.reporter)))
121+
val checkingCtx = ctx.fresh.setReporter(new ThrowingReporter(ctx.reporter))
123122
val checker = new Checker(previousPhases(phasesToRun.toList)(ctx))
124123
try checker.typedExpr(ctx.compilationUnit.tpdTree)(checkingCtx)
125124
catch {

0 commit comments

Comments
 (0)