[Webkit-unassigned] [Bug 149743] Function.toString.call(class Foo {}) doesn't say "class"

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 5 14:47:41 PDT 2015


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

--- Comment #1 from Yusuke Suzuki <utatane.tea at gmail.com> ---
When implementing methods in class body, what happens?


function A() {
}

A.prototype.method = function () { };


class B {
    method() { }
}

In the above case, A.toString() just returns the function code, but B.toString() returns the class body including the method definition.
I don't think there should be difference because class declaration behaves like a syntax sugar.

So I think waiting the things specified in the spec.

-- 
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/20151005/d0dd224c/attachment.html>


More information about the webkit-unassigned mailing list