Skip to content

Assignment with invalid LHS does not throw SyntaxError #508

Closed

Description

@AnirudhKonduru

Assignments with invalid left-hand side(1=2) return the value of the right-hand side(2) instead of throwing SyntaxError.

To Reproduce

This JavaScript code reproduces the issue:

1=2 # should throw SyntaxError

-->

Expected behavior

The spec for the expected behaviour can be found in the ECMAScript specification.

Activity

  1. added
    A-Bug
    on Jun 18, 2020
  2. changed the title [-]Assignment with invalid LHS does not throw an error[/-] [+]Assignment with invalid LHS does not throw an SyntaxError[/+] on Jun 18, 2020
  3. changed the title [-]Assignment with invalid LHS does not throw an SyntaxError[/-] [+]Assignment with invalid LHS does not throw SyntaxError[/+] on Jun 18, 2020
  4. Lan2u commented on Aug 27, 2020

    @Lan2u

    Fixed by #559

  5. linked a pull request that will close this issueNew lexer #559on Aug 27, 2020
  6. added this to the v0.10.0 milestone on Sep 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-Bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions