Skip to content

Super property access in eval cases should throw SyntaxError not runtime error #5559

@aneeshdk

Description

@aneeshdk

Following up on the discussion in this PR #5471. Right now for eval cases we always assume superpopertyallowed status and then throw a runtime error for error cases. Ideally is should be a Syntax Error.

function foo() {
    print(eval("print('Inside eval');super.a"));
}
foo();

This shouldn't print 'Inside eval' at all. We should only get a SyntaxError.

edit:formatting

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions