Skip to content

Commit b5ee96c

Browse files
committed
fix(compiler): forward returned-array/returned-object through const aliases and expressionBinding
The const-alias path and expressionBinding did not copy returned-array or returned-object provenance kinds, so member accesses (e.g. setter, getter) on an alias of a stored hook result or through a same-module helper were not recognized by strong mode.
1 parent 1b9b0de commit b5ee96c

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎packages/octane/src/compiler/strong-mode.js‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2664,7 +2664,9 @@ export function analyzeStrongMode(ast, source, filename, options = {}) {
26642664
value?.kind === 'linked-key' ||
26652665
value?.kind === 'constant' ||
26662666
value?.kind === 'transition-start' ||
2667-
value?.kind === 'transition-tuple'
2667+
value?.kind === 'transition-tuple' ||
2668+
value?.kind === 'returned-array' ||
2669+
value?.kind === 'returned-object'
26682670
) {
26692671
target.bindings.set(declaration.id.name, value);
26702672
} else if (value == null && initial.name === 'undefined') {
@@ -3622,7 +3624,9 @@ export function analyzeStrongMode(ast, source, filename, options = {}) {
36223624
binding?.kind === 'state-tuple' ||
36233625
binding?.kind === 'constant' ||
36243626
binding?.kind === 'linked-key' ||
3625-
binding?.kind === 'transition-start'
3627+
binding?.kind === 'transition-start' ||
3628+
binding?.kind === 'returned-array' ||
3629+
binding?.kind === 'returned-object'
36263630
) {
36273631
return binding;
36283632
}

0 commit comments

Comments
 (0)