Skip to content

Commit cea9894

Browse files
committed
Actually fill the TyperState#testReporter cache
This cache was never set before, only read from.
1 parent 60be656 commit cea9894

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

compiler/src/dotty/tools/dotc/core/TyperState.scala

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,14 @@ class TyperState(previous: TyperState /* | Null */) extends DotClass with Showab
9595
val savedCommittable = myIsCommittable
9696
val savedCommitted = isCommitted
9797
myIsCommittable = false
98-
myReporter =
99-
if (testReporter == null) new StoreReporter(reporter)
100-
else {
98+
myReporter = {
99+
if (testReporter == null) {
100+
testReporter = new StoreReporter(reporter)
101+
} else {
101102
testReporter.reset()
102-
testReporter
103103
}
104+
testReporter
105+
}
104106
try op
105107
finally {
106108
myReporter = savedReporter

0 commit comments

Comments
 (0)