Bug 187094 - Inconsistent output compared with other JS engines when declare a function in try...catch
Summary: Inconsistent output compared with other JS engines when declare a function in...
Status: RESOLVED DUPLICATE of bug 163209
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-06-27 06:39 PDT by sunlili
Modified: 2020-12-31 12:38 PST (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-27 06:39:32 PDT
Hello,
The following code behaves strangely (inconsistent with other engines).

try {                                                                                                                                                                
    f0();
    function g(f0){
        f0();
    };  

}catch(g){}
g(()=>{print("hi");});

In Safari, output is
hi

However, in V8 and Firefox, output is
TypeError: g is not a function

BT group
2018.6.27
Comment 1 Yusuke Suzuki 2020-12-31 12:38:41 PST
Thanks, this is dupe of 163209 :)

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