Default constructor and extends null

Erik Arvidsson erik.arvidsson at gmail.com
Tue Jul 31 21:46:31 PDT 2012


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. Should we special
case this and use an empty constructor if the super class is null?

-- 
erik


More information about the es-discuss mailing list