fix(javascript): retain uncertainty for conditionally skipped writes

Own skipped-write interpretation at definition collection, including conditional branches, loop iterations and optional-chain arguments. Remove the narrower initializer-only representation.

Fixes #2562
This commit is contained in:
morluto committed 2026-10-14 14:47:26 +08:00
1 parent 36c91428fc
commit 410537667e
7 files changed
+172 -33

No files matched your search

@@ -554,7 +554,7 @@ export const createSemanticModuleInterop = (
converted === undefined ||
initial.projection.length !== 0 ||
converted.projection.length !== 0 ||
state.conditionalInitializers.has(initial.node)
state.conditionallySkippedExpressions.has(initial.node)
)
return undefined;
const call = converted.node;