stop constructor verification traversal on FunctionDeclaration/FunctionExpression - fixes #1155

This commit is contained in:
Sebastian McKenzie
2015-04-04 14:01:26 +11:00
parent 91d78afc67
commit 56335409d3
4 changed files with 35 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
{
"externalHelpers": true
}

View File

@@ -0,0 +1,9 @@
class Foo {
constructor (options) {
let parentOptions = {};
parentOptions.init = function () {
this;
};
super(parentOptions);
}
}

View File

@@ -0,0 +1,11 @@
"use strict";
var Foo = function Foo(options) {
babelHelpers.classCallCheck(this, Foo);
var parentOptions = {};
parentOptions.init = function () {
this;
};
babelHelpers.get(Object.getPrototypeOf(Foo.prototype), "constructor", this).call(this, parentOptions);
};