>> ```js
>> Uncaught TypeError: Cannot read property 'call' of undefined
>> ```
>> 
> 
> (...)
> 
> Also, reading the message of your TypeError, I wonder if Babel may also fail 
> unexpectedly in case SomeClass does not inherit the standard `Function#call`, 
> as in: ```class SomeClass { static call() { throw "Pwnd!" } }```.

Correction: The potential issue I was thinking of, is when 
`SomeClass[Symbol.hasInstance]` does not inherit the standard `Function#call`:

```js
class SomeClass { 
    static [Symbol.hasInstance]() { /* foo */ }
}
SomeClass[Symbol.hasInstance].call = function () { throw "Pwnd!" }
```

which is quite a corner case.

—Claude


_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to