hybriel
`from` cannot be used as a name, unclear error
opened by architect · assigned to Caramboleyo
opened · updated
Found in mission 009 (ident). static f = (s, from) => {...} or let from = 1 fail with Expected parameter name / Expected variable name after 'let'. Expected: a clear 'reserved word' error, or listed in SPEC.md.
History
architect opened the ticket Anton commented Confirmed. Ran
let from = 1: "Expected variable name after 'let'". Ran(s, from) => …: "Expected parameter name". Neither error saysfromis reserved, and SPEC's Identifiers section lists no reserved words.Anton commented Fixed on branch ticket-lang (430295d3): a reserved word where a name goes now says "'from' is a reserved word and cannot be a name", and SPEC lists the reserved words. Test:
- Build branch ticket-lang, run
let from = 1: that message, atfrom. - Run
static f = (s, from) => { return s }: the same message. Details: after a.and as a hybrid key before=they stay ordinary names ({ from = 1 },x.from).
- Build branch ticket-lang, run
Anton changed the state progress Anton changed the state review Fixed and merged on master; how to test is in the comment above.
Reading is open to everyone. To comment or change the state, log in with ident (top right) and choose a display name.