Skip to content

Commit 289bd35

Browse files
committed
Reset Cache.changed after each iteration
1 parent ac9ef34 commit 289bd35

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

compiler/src/dotty/tools/dotc/transform/init/Semantic.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -798,6 +798,9 @@ object Semantic {
798798
cache.update()
799799
heap.restore(heapBefore)
800800

801+
// reset change
802+
cache.changed = false
803+
801804
work()
802805
case _ =>
803806

@@ -873,6 +876,7 @@ object Semantic {
873876
cache.out.put(thisV, expr, assumeValue)
874877
val res = cases(expr, thisV, klass)
875878
if res.value != assumeValue then
879+
// println("changed: old = " + assumeValue + ", res = " + res.value)
876880
cache.changed = true
877881
cache.out.put(thisV, expr, res.value) // must put in cache for termination
878882
else

0 commit comments

Comments
 (0)