tenko icon indicating copy to clipboard operation
tenko copied to clipboard

Lhs check for `let` left of `in` and `instanceof` is only checking `in`

Open pvdz opened this issue 4 years ago • 0 comments

Silly oversight. Also need to write a test for it.

if ($tp_next_type === $ID_in || $tp_next_type === $ID_in) {
      return THROW_RANGE('Cannot use `let` as a regular var name as the lhs of `in` or `instanceof` in a toplevel expression statement', tok_getStart(), tok_getStop()); // And why would you.
    }

pvdz avatar May 18 '21 23:05 pvdz