You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, we report an error that a static modifier can't precede a constructor.
After reading through the spec a bit, I think we should reconsider how we wire up constructor in the compiler. It seems as if constructor is not special in any way, and that it simply places a member named constructor on the prototype. See here for more details.
The text was updated successfully, but these errors were encountered:
This is maybe understood but while constructor isn't special syntactically, it is special semantically. Eg. Foo.prototype.constructor is just a reference back to Foo, whereas other members are actually installed on Foo.prototype.
The following should be allowed:
However, we report an error that a
static
modifier can't precede a constructor.After reading through the spec a bit, I think we should reconsider how we wire up
constructor
in the compiler. It seems as ifconstructor
is not special in any way, and that it simply places a member namedconstructor
on the prototype. See here for more details.The text was updated successfully, but these errors were encountered: