From 73e4f0a006f1fe038689a65180a34df81ce16ed8 Mon Sep 17 00:00:00 2001 From: Alexander Gorshenev Date: Thu, 18 Sep 2025 11:09:30 +0300 Subject: [PATCH] Workaround compiler bug 30152 and 30154 Signed-off-by: Alexander Gorshenev --- incremental/runtime/src/states/State.ts | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/incremental/runtime/src/states/State.ts b/incremental/runtime/src/states/State.ts index 7a437e911..2fd712266 100644 --- a/incremental/runtime/src/states/State.ts +++ b/incremental/runtime/src/states/State.ts @@ -453,7 +453,8 @@ export /* Improve:HQ private as public*/ class StateImpl implements Obser manager.checkForStateDisposing() this.manager = undefined this.tracker = undefined - this.dependencies = this.dependencies?.clear() + this.dependencies?.clear() + this.dependencies = undefined manager.removeCreatedState(this, this.name) this.trackedScopes.clear() } @@ -615,7 +616,8 @@ class ParameterImpl implements StateEx, MutableState { if (manager === undefined) return // already disposed manager.checkForStateDisposing() this.manager = undefined - this.dependencies = this.dependencies?.clear() + this.dependencies?.clear() + this.dependencies = undefined } hasDependencies(): boolean { @@ -1325,8 +1327,10 @@ class ScopeImpl implements ManagedScope, IncrementalScope, Computa manager.checkForStateDisposing() let error: Error | undefined = undefined this.manager = undefined - this._states = this._states?.clear() - this.dependencies = this.dependencies?.clear() + this._states?.clear() + this._states = undefined + this.dependencies?.clear() + this.dependencies = undefined const scope = manager.current manager.current = this try { @@ -1394,7 +1398,8 @@ class ControlledScopeImpl implements Dependency, ControlledScope { static cleanup(scope?: ControlledScopeImpl): void { if (scope) { scope.manager = undefined - scope._states = scope._states?.clear() + scope._states?.clear() + scope._states = undefined } } -- Gitee