[Webkit-unassigned] [Bug 148148] New: Function.prototype.toString is incorrect for ArrowFunction

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Aug 18 15:53:50 PDT 2015


https://bugs.webkit.org/show_bug.cgi?id=148148

            Bug ID: 148148
           Summary: Function.prototype.toString is incorrect for
                    ArrowFunction
    Classification: Unclassified
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: All
                OS: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: bburg at apple.com

It should be possible to define an arrow function, call toString on it, and evaluate the result without a parse error.

TEST CASE:

1    let a = () => {};
2    a.toString(); // returns function () => {}


Evaluating line 2's result will cause a parse error.

(Relevant spec: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-function.prototype.tostring)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150818/b7a38beb/attachment.html>


More information about the webkit-unassigned mailing list