Bug 155251 - Function parameter gets optimized away when used as the default of a named parameter only
Summary: Function parameter gets optimized away when used as the default of a named pa...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Macintosh OS X 10.11
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-09 13:00 PST by Stefan Sechelmann
Modified: 2017-09-22 02:37 PDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Sechelmann 2016-03-09 13:00:18 PST
Define the following function:
f = function(a){ (function({aa = a}){ console.log('result: ' + aa); })({}); }

--------
f(42)
expected: 
result: 42
got: 
no log at all

--------
f(42)
f(42)
expected:
result: 42
result: 42
got:
result: 42
Comment 1 Stefan Sechelmann 2017-09-22 02:37:58 PDT
Seems to work now.