ticketsLog in with ident

hybriel #22

`from` cannot be used as a name, unclear error

review

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

  1. architect opened the ticket
  2. Anton commented

    Confirmed. Ran let from = 1: "Expected variable name after 'let'". Ran (s, from) => …: "Expected parameter name". Neither error says from is reserved, and SPEC's Identifiers section lists no reserved words.

  3. 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:

    1. Build branch ticket-lang, run let from = 1: that message, at from.
    2. 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).
  4. Anton changed the state progress
  5. 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.