@@ -363,13 +363,15 @@ object Semantic {
363
363
* 4. Reset last cache.
364
364
*/
365
365
def prepareForNextClass ()(using Context ) =
366
- if this .changed then
367
- this .changed = false
368
- else
369
- this .commitToStableCache()
370
- this .heapStable = this .heap
366
+ if this .changed then
367
+ this .changed = false
368
+ this .heap = this .heapStable
369
+ else
370
+ this .commitToStableCache()
371
+ this .heapStable = this .heap
371
372
372
- this .last = mutable.Map .empty
373
+ this .last = mutable.Map .empty
374
+ this .current = mutable.Map .empty
373
375
374
376
def updateObject (ref : Ref , obj : Objekt ) =
375
377
assert(! this .heapStable.contains(ref))
@@ -951,20 +953,20 @@ object Semantic {
951
953
*
952
954
* This method should only be called from the work list scheduler.
953
955
*/
954
- private def doTask (task : Task )(using Cache , Context ): Unit = log( " checking " + task) {
956
+ private def doTask (task : Task )(using Cache , Context ): Unit = {
955
957
val thisRef = task.value
956
958
val tpl = thisRef.klass.defTree.asInstanceOf [TypeDef ].rhs.asInstanceOf [Template ]
957
959
958
960
val paramValues = tpl.constr.termParamss.flatten.map(param => param.symbol -> Hot ).toMap
959
961
960
- given Promoted = Promoted .empty
961
- given Trace = Trace .empty
962
- given Env = Env (paramValues)
963
-
964
962
@ tailrec
965
963
def iterate (): Unit = {
964
+ given Promoted = Promoted .empty
965
+ given Trace = Trace .empty
966
+ given Env = Env (paramValues)
967
+
966
968
thisRef.ensureFresh()
967
- val res = eval(tpl, thisRef, thisRef.klass)
969
+ val res = log( " checking " + task) { eval(tpl, thisRef, thisRef.klass) }
968
970
res.errors.foreach(_.issue)
969
971
970
972
if cache.hasChanged && res.errors.isEmpty then
0 commit comments