Bound methods are implemented as assignments to `this` in the
constructor. In derived classes, where `this` is unavailable until
after `super` has been called, the binding is applied and assigned after
the `super` call. This means that any references to 'bound' methods
reachable from the parent constructor will actually point to the unbound
prototype methods.
This can lead to very subtle bugs where a method that is thought to be
bound is handed off and later called with an incorrect context, and the
only defence is for users to be vigilant about referencing bound methods
in constructors.
* Swap Google Closure Compiler for Babili
* Browser compiler, minified by Babili
* Use Babel to transform, not just to minify; add process.env.TRANSFORM to disable transforming if we only want to minify. Unfortunately several browser tests fail when transformed . . .
* Move `super()` calls so that the Babel-transformed browser compiler passes all the browser tests (in Node, at least)
* Updated browser build
* Update browser tests
* Uncomment module test that was waiting for classes to be supported
* Rely on native indexOf
* Replace `bind` helper with native `bind` (no shortcut necessary)
* Update output
* Update modules class tests
* Remove helper for prototype extends
* Update docs to reflect removed extends operator
* Add shortcut for splice, like we have for slice
* Fix browser build to incorporate Markdown-It, not Marked
* Update Google Closure Compiler; recompile browser build but with MINIFY=false, because Closure Compiler throws an error on our current code; see https://github.com/google/closure-compiler-js/issues/59
* Bump version to 2.0.0-beta1; do release build, with updated docs and annotated source
* Output simple array destructuring assignments to ES2015
* Output simple object destructured assignments to ES2015
* Compile shorthand object properties to ES2015 shorthand properties
This dramatically improves the appearance of destructured imports.
* Compile default values in destructured assignment to ES2015
* Rename `wrapInBraces` to `wrapInParentheses`, and `compilePatternMatch` to `compileDestructuring`, for clarity; style improvements (no `==` or `!=`, etc.)
* Don’t confuse the syntax highlighter
* Comment Assign::compilePatternMatch a bit
* Assignment expressions in conditionals are a bad practice
* Optional check for existence that only checks `!== undefined`, not `!= null`, to follow ES convention that default values only apply when a variable is undefined, not falsy
* Add comments; remove unnecessary array splats in function tests
* The fallback destructuring code should apply default values only if `undefined`, not falsy, to follow ES spec
* Support destructuring in function parameters (first pass); catch destructured reserved words
* Destructured variables in function parameter lists shouldn’t be added to the function body with `var` declarations; treat splat array function parameters the legacy way to avoid rethinking #4005
* Remove redundancy in undefined-only check for existence; fix passing option to check
* Fix undefined redundancy
* Simplify getting the variable name
* Reimplement “check for existence if not undefined” without creating a new operator
* `Obj::isAssignable` should not mutate; pass `lhs` property in from `Assign` or `Code` to child arrays and objects so that those child nodes are set as allowable for destructuring
* Revert changes to tests
* Restore revised test for empty destructuring assignment