jlongster / es6-macros

A collection of sweet.js macros that implement ES6 features for ES5
BSD 2-Clause "Simplified" License
237 stars 18 forks source link

set constructor of a class #24

Closed rendro closed 10 years ago

rendro commented 10 years ago

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.

rendro commented 10 years ago

Something went terribly wrong here... will open another PR with only 1 commit in it :-1: