Issue when subclassing a bound function used as constructor

Claude Pache claude.pache at
Thu Jun 26 09:57:39 PDT 2014

    let C be some constructor
    let D = C.bind(obj, a, b)

Thanks to the carefully designed `D.[[Construct]]` internal method, the following expressions are equivalent:

    new D(...args)
    new C(a, b, ...args)

Consider now:

    class E extends D {
        contructor(...args) {

As I understand, `super(...args)` calls `D.[[Call]](this, args)`, which in turn calls `C.[[Call]](obj, [a, b, ...args])`. But what we probably want here, is  `C.[[Call]](this, [a, b, ...args])`.

I am missing something or is there an issue?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list