Bug 162720

Summary: Arrow functions do not infer name from computed property but normal functions do
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: JavaScriptCoreAssignee: Joseph Pecoraro <joepeck>
Status: RESOLVED FIXED    
Severity: Normal CC: joepeck, saam
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
[PATCH] Proposed Fix saam: review+

Joseph Pecoraro
Reported 2016-09-29 02:57:38 PDT
Summary: Arrow functions do not infer name from computed property but normal functions do Test: js> function funcName() { return "funcName" } ... js> ({"func": function(){}}).func.name "func" js> ({["func"]: function(){}}).func.name "func" js> ({[funcName()]: function(){}}).func.name "func" js> ({func: ()=>{}}).func.name "func" js> ({["func"]: ()=>{}}).func.name "" js> ({[funcName()]: ()=>{}}).func.name "" Why is this? And is this actually specced anywhere? Maybe this is runtime, since evaluating funcName() must happen at runtime.
Attachments
[PATCH] Proposed Fix (3.06 KB, patch)
2016-09-29 11:49 PDT, Joseph Pecoraro
saam: review+
Joseph Pecoraro
Comment 1 2016-09-29 11:49:50 PDT
Created attachment 290227 [details] [PATCH] Proposed Fix Waiting on the other change to land.
Saam Barati
Comment 2 2016-09-29 11:55:15 PDT
Comment on attachment 290227 [details] [PATCH] Proposed Fix r=me
Joseph Pecoraro
Comment 3 2016-09-29 13:36:24 PDT
Note You need to log in before you can comment on or make changes to this bug.