Skip to content

Reject unsupported let/const declarations explicitly #24

@memburg

Description

@memburg

Problem

let x = 1; and const x = 1; currently fail through generic invalid-assignment errors. Since GiavaScript intentionally supports var declarations only, these unsupported declaration forms should have explicit behavior and regression coverage.

Scope

  • Add tests for unsupported let declarations.
  • Add tests for unsupported const declarations.
  • Return a clear intentional error instead of a generic assignment-target error.
  • Keep var as the only supported declaration form.

Acceptance Criteria

  • let x = 1; fails with an intentional unsupported-declaration error.
  • const x = 1; fails with an intentional unsupported-declaration error.
  • Existing var declaration behavior remains unchanged.
  • crystal spec passes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions