chakra-core / chakra-core/ChakraCore
Super property access in eval cases should throw SyntaxError not runtime error
Open
Bug
Severity: 3
- Dominant language
- JavaScript
- Stars
- 9.3k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
Following up on the discussion in this PR https://github.com/Microsoft/ChakraCore/pull/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.
```js
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
Contributor guide
Assessment
This issue has not been assessed yet.