chakra-core / chakra-core/ChakraCore

No error for assignment to undefined inside extends expression

Open
#5,367 1 comment 0 reactions 0 assignees View on GitHub
Bug Severity: 2
Dominant language
JavaScript
Stars
9.3k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Hello,
The following code behaves strangely (inconsistent with other engines).
```
class cc extends ( x = function () {
console.log("Hi");
}) {
};
```

In Edge, cc is defined normally and x is defined too.
However, in V8 and Firefox, a ReferenceError is reported:
`ReferenceError: assignment to undeclared variable x`

BT group
2018.6.26

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.