Lhs check for `let` left of `in` and `instanceof` is only checking `in`
pvdz opened this issue · comments
Peter van der Zee commented
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.
}