Skip to content

No error for assignment to undefined inside extends expression #5367

@sunlili

Description

@sunlili

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions