set constructor of a class

The constructor of a class must be reset to the original constructor function. Otherwise inheritance is broken in a way that when A extends B, and B extends C, A.super() calls the constructor of C and not the constructor of B.