super() on class that extends
Erik Arvidsson
erik.arvidsson at gmail.com
Sun Apr 12 03:38:56 UTC 2015
On Sat, Apr 11, 2015 at 9:09 AM Sébastien Cevey <seb.cevey at guardian.co.uk>
wrote:
> Does the same apply to subclassing Error?
>
Subclassing Error works in V8 (Chrome 43).
Caitlin, the only issue I know of in V8 regarding subclassing is
subclassing Object and the weird wrapper we create.
class X extends Object {}
let x = new X('hi');
print(x); // Oops, we created a String wrapper.
This is because we haven't implemented new.target for our self hosted
Object function constructor.
https://code.google.com/p/v8/issues/detail?id=3886
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150412/7f8fc9b9/attachment-0001.html>
More information about the es-discuss
mailing list