Skip to content

fix(parser): reject meta_property as assignment target#175

Merged
ohah merged 1 commit intomainfrom
feature/import-meta-assignment-target
Mar 20, 2026
Merged

fix(parser): reject meta_property as assignment target#175
ohah merged 1 commit intomainfrom
feature/import-meta-assignment-target

Conversation

@ohah
Copy link
Copy Markdown
Owner

@ohah ohah commented Mar 20, 2026

Summary

  • import.metanew.target(meta_property 노드)을 assignment target으로 명시적 거부
  • 기존: else 브랜치에서 is_top=true일 때만 에러 → 중첩 destructuring에서 누락
  • 수정: is_top 무관하게 항상 에러

Test plan

  • zig build test 통과
  • zig fmt --check src/ 통과
  • zig build test262-run import.meta 관련 개선 확인

🤖 Generated with Claude Code

import.meta and new.target should never be valid assignment targets.
Previously they fell through to the else branch which only errored
when is_top=true, allowing them to silently pass in nested
destructuring positions like [import.meta] = arr.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ohah ohah added the enhancement New feature or request label Mar 20, 2026
@ohah ohah self-assigned this Mar 20, 2026
@ohah ohah merged commit da16ea7 into main Mar 20, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant