[Webkit-unassigned] [Bug 155568] New: Method names should not appear in the lexical scope of the method's body.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 16 16:52:07 PDT 2016


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

            Bug ID: 155568
           Summary: Method names should not appear in the lexical scope of
                    the method's body.
    Classification: Unclassified
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: mark.lam at apple.com

Consider this scenario:

    var f = "foo";
    var result = ({
        f() {
            return f; // f should be the string "foo", not this method f.
        }
    }).f();
    result === "foo"; // Should be true.

The reason this is not current working is because the parser does not yet distinguish between FunctionExpressions and MethodDefinitions.  The ES6 spec explicitly distinguishes between the 2, and we should do the same.

-- 
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/20160316/97d3fbfc/attachment.html>


More information about the webkit-unassigned mailing list