class extends null {} works. the super constructor is Function.prototype
-
-
You can make the declaration, but new throws: class C extends null {} new C(); > Uncaught TypeError: Super constructor null of C is not a constructor
1 reply 0 retweets 0 likes -
It not suppose to, see steps 5.b and 6.e.ii of https://tc39.github.io/ecma262/#sec-runtime-semantics-classdefinitionevaluation … But it looks like a spec. bug in step 10.ais cause the wrong default constructor go be generated. cc/
@bterlson@littledan1 reply 0 retweets 2 likes -
Might be fortuitous. Right now there's no way to write a class expression such that it could be either a base class or subclass depending on the result of the extends expression.
2 replies 0 retweets 0 likes -
Replying to @justinfagnani @tobie and
class NullBase extends null { construtor() {} }
3 replies 0 retweets 0 likes -
Replying to @awbjs @justinfagnani and
I thought we found that extends null was broken, tried to fix it, but the fix was still broken, so reverted to the initial broken state.
2 replies 0 retweets 2 likes -
Replying to @littledan @awbjs and
Still fixable because we can change throws into behavior, right?
1 reply 0 retweets 0 likes -
Replying to @wycats @littledan and
Still fixable, broken going back to ES2015
1 reply 0 retweets 2 likes -
Replying to @awbjs @littledan and
We should fix. I think I missed us never finishing extends null.
1 reply 0 retweets 2 likes -
Let's do this.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.