Bug 187758 - Inconsistent output compared with other JS engines
Summary: Inconsistent output compared with other JS engines
Status: RESOLVED DUPLICATE of bug 187045
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-18 07:32 PDT by sunlili
Modified: 2018-07-22 13:04 PDT (History)
2 users (show)

See Also:


Attachments

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

class c {                                                                                                                                        
    [d = function () {
        return c;
    }]() {
    }   
}

print("BT_FLAG");
In JavaScriptCore, the output is
BT_FLAG
However, in V8 and SpiderMonkey, output is
ReferenceError: d is not defined

BT group
2018.7.18
Comment 1 Yusuke Suzuki 2018-07-22 13:04:26 PDT
Because class heritage should be handled as strict code.

*** This bug has been marked as a duplicate of bug 187045 ***