Bug 155251

Summary: Function parameter gets optimized away when used as the default of a named parameter only
Product: WebKit Reporter: Stefan Sechelmann <stefan>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Mac   
OS: OS X 10.11   

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.