You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: wrap synthetic element access with opaque refs in derive
Fixes a bug where element access expressions like `tagCounts[element]`
inside map callbacks weren't being wrapped in derive() calls. The issue
occurred because these expressions are synthetic (created by the
ClosureTransformer) and the dataflow analyzer wasn't properly handling
synthetic element access with dynamic opaque indices.
Changes:
- Extract isStaticElementAccess() helper to share logic between synthetic
and non-synthetic code paths
- Add proper handling for synthetic element access expressions:
- Static indices (e.g., element[0]) preserve merged analysis
- Dynamic indices with opaque refs (e.g., tagCounts[element]) set
requiresRewrite=true to trigger derive wrapper
- Update test expectations to use original variable names instead of
_v1, _v2 (matches pattern in other test fixtures)
- Fix HTML-encoded directive in test input file
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
0 commit comments