tnhu / jsface

Small, fast, elegant, powerful, and cross platform JavaScript OOP library. Support main(), singleton, super call, private, mixins, plugins, AOP and more.
MIT License
301 stars 46 forks source link

Super's constructor not getting called if sub class not defining constructor (yes, again). #32

Closed sunrize531 closed 8 years ago

sunrize531 commented 9 years ago

Just reopening this issue: https://github.com/tnhu/jsface/issues/13

Actually it's a first OOP model I ever seen, which behaves this way. In most cases you expect parent's constructor to be called. If you don't need parent's class constructor to be called from child class, you could define constructor in child class without a $super call, right?

Nope. Not in this library. You have to create an empty constructors, containing only super's call here.

webprogramozo commented 9 years ago

+1

vursen commented 8 years ago

+1

tnhu commented 8 years ago

This should be fixed in 2.4.10. Thanks everyone for reporting!

P.S: I apologize for being super late.