fix(javascript): trace boundary results to assigned bindings (#7912)

This commit is contained in:
morluto authored and GitHub committed 2026-10-29 07:58:57 +08:00
1 parent 2129c17925
commit 794907fa3d
5 files changed
+166 -1

No files matched your search

@@ -237,6 +237,16 @@ export const projectSemanticBoundaries = (
resolution:
operation.resolution === "complete" ? "resolved" : "candidate",
});
// The producer only supplies a scalar result binding when this call is
// the assigned value itself, rather than an operand of another expression.
if (operation.resultBindingId !== null)
addSemanticGraphRelation(context.state, {
source: boundary,
target: context.bindingNodes.get(operation.resultBindingId),
relation: "defines",
resolution:
operation.resolution === "complete" ? "resolved" : "candidate",
});
if (operation.resolution !== "complete")
addDataUnknown({
context,