Repository navigation
Commit 3a7a60a
committed
fix(compiler): peel TS wrappers around dependency arrays in ref classification
The ArrayExpression case in classify() took parents[index - 1] as the
hook call, but when the dependency array is wrapped in as const,
satisfies, !, or extra parentheses, that parent is the TypeScript or
grouping node rather than the CallExpression. This caused the ref to be
marked as escaped, preventing isValueRef from returning true and
silencing the OCTANE_STRONG_EFFECT_HIDDEN_DEPENDENCY diagnostic.
Walk up through transparent wrappers above the ArrayExpression before
looking up the call in callNames, mirroring the existing identifier
peeling at the top of classify().1 parent 041edbd commit 3a7a60a
2 files changed
Lines changed: 18 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
611 | 611 | | |
612 | 612 | | |
613 | 613 | | |
614 | | - | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
615 | 622 | | |
616 | | - | |
| 623 | + | |
617 | 624 | | |
618 | 625 | | |
619 | 626 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
986 | 986 | | |
987 | 987 | | |
988 | 988 | | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
989 | 998 | | |
990 | 999 | | |
991 | 1000 | | |
| |||
0 commit comments