Skip to content

Commit 4aa13b0

Browse files
authored
Merge pull request #3258 from dotty-staging/fix-typerstate
Actually fill the TyperState#testReporter cache
2 parents de7b370 + cea9894 commit 4aa13b0

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)