Bug 187045 - Inconsistent output compared with other JS engines
Summary: Inconsistent output compared with other JS engines
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
: 187758 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-06-26 08:16 PDT by sunlili
Modified: 2018-07-22 13:04 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sunlili 2018-06-26 08:16:04 PDT
Hello,
The following code behaves strangely (inconsistent with other engines).

class cc extends ( x = function () {
    console.log("Hi");
}) {
};

In webkit, 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
Comment 1 Yusuke Suzuki 2018-07-22 13:04:26 PDT
*** Bug 187758 has been marked as a duplicate of this bug. ***