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.
Problem
let x = 1;andconst x = 1;currently fail through generic invalid-assignment errors. Since GiavaScript intentionally supportsvardeclarations only, these unsupported declaration forms should have explicit behavior and regression coverage.Scope
letdeclarations.constdeclarations.varas 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.vardeclaration behavior remains unchanged.crystal specpasses.