I filed one on us: https://code.google.com/p/v8/issues/detail?id=4087
On Thu, May 7, 2015 at 4:25 PM Allen Wirfs-Brock <[email protected]> wrote: > > On May 7, 2015, at 12:50 PM, Francisco Tolmasky wrote: > > > In the existing implementations I’ve tried, it appears I can’t do this: > > > > class SuperFunction extends Function { } > > > > (also tried with constructor(str) { super(str) }) > > > > It “works”, but the resulting new SuperFunction(“return 5”) is just a > Function, not a SuperFunction. Is Function meants to be an exception to the > subclassing built-ins, or should it also work? > > Nope, it's supposed to work. `Object.getPrototypeOf(new SuperFunction("")` > should be SuperFunction.prototype and `new SuperFunction("") instanceof > SuperFunction` should be true. > > You need to file a bug report on the implementations where you tried it. > Sounds like they still have some work to do > > Allen > > _______________________________________________ > es-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es-discuss >
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

