Default constructor and extends null

Brendan Eich brendan at
Tue Jul 31 22:56:54 PDT 2012

Erik Arvidsson wrote:
> At the face to face meeting we agreed that if no constructor is
> present in a class a default one is provided as if the following
> constructor was present.
> class C extends null {
>    constructor(...args) {
>      super(...args)
>    }
> }
> What should this do when C extends null? If this was manually added I
> would prefer that this would be a runtime error.

Agreed. Allen probably has a thought. I think we just did not discuss 
this case, or overlooked it.

>   Should we special
> case this and use an empty constructor if the super class is null?



More information about the es-discuss mailing list