[Webkit-unassigned] [Bug 150115] [ES6] Class method should not declare any variables to upper scope.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 13 23:04:02 PDT 2015


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

--- Comment #1 from Yusuke Suzuki <utatane.tea at gmail.com> ---
Copied from https://bugs.webkit.org/show_bug.cgi?id=150089

Current Class expression implementation declares method names as a variable.
For example,

class A {
    method() {
    }
}

In the above case, we declare a variable `method` in the current implementation.
I guess this is the old draft behavior because I can't see any step in the current spec.

http://www.ecma-international.org/ecma-262/6.0/#sec-runtime-semantics-definemethod

As a result, if we evaluate the following,

class A {
    1() {
    }
}

We attempt to declare the variable `1`. We now wrap the class body with the class lexical scope. However, the lexical scope does not allow us to declare incorrect Identifier variable (like `1`). So assertion is fired.

-- 
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/20151014/2594d655/attachment.html>


More information about the webkit-unassigned mailing list