better classes, more spec compliant and nicer output - fixes #952

This commit is contained in:
Sebastian McKenzie
2015-03-06 23:08:10 +11:00
parent 69c836fc8d
commit 130e0ebe6b
63 changed files with 571 additions and 370 deletions

View File

@@ -2,8 +2,12 @@
var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } };
var Test = function Test() {
_classCallCheck(this, Test);
var Test = (function () {
var _Test = function Test() {
_classCallCheck(this, _Test);
arr.map(x => x * x);
};
arr.map(x => x * x);
};
return _Test;
})();

View File

@@ -1,16 +1,16 @@
"use strict";
var Foo = (function () {
function Foo() {
babelHelpers.classCallCheck(this, Foo);
}
var _Foo = function Foo() {
babelHelpers.classCallCheck(this, _Foo);
};
babelHelpers.createClass(Foo, {
babelHelpers.createClass(_Foo, {
foo: {
value: babelHelpers.asyncToGenerator(function* () {
var wat = yield bar();
})
}
});
return Foo;
return _Foo;
})();

View File

@@ -7,11 +7,11 @@ var _createClass = (function () { function defineProperties(target, props) { for
var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } };
var Foo = (function () {
function Foo() {
_classCallCheck(this, Foo);
}
var _Foo = function Foo() {
_classCallCheck(this, _Foo);
};
_createClass(Foo, {
_createClass(_Foo, {
foo: {
value: _bluebird.coroutine(function* () {
var wat = yield bar();
@@ -19,5 +19,5 @@ var Foo = (function () {
}
});
return Foo;
return _Foo;
})();

View File

@@ -4,4 +4,4 @@ var _bluebird = require("bluebird");
var foo = _bluebird.coroutine(function* () {
var wat = yield bar();
});
});

View File

@@ -4,4 +4,4 @@ var _bluebird = require("bluebird");
var foo = _bluebird.coroutine(function* () {
var wat = yield bar();
});
});

View File

@@ -1,39 +1,39 @@
"use strict";
var Test = (function (Foo) {
function Test() {
var Test = (function (_Foo) {
var _Test = function Test() {
var _Foo$prototype$test, _Foo$prototype$test2;
babelHelpers.classCallCheck(this, Test);
babelHelpers.classCallCheck(this, _Test);
woops["super"].test();
Foo.call(this);
Foo.prototype.test.call(this);
_Foo.call(this);
_Foo.prototype.test.call(this);
Foo.call.apply(Foo, [this].concat(babelHelpers.slice.call(arguments)));
Foo.call.apply(Foo, [this, "test"].concat(babelHelpers.slice.call(arguments)));
_Foo.call.apply(_Foo, [this].concat(babelHelpers.slice.call(arguments)));
_Foo.call.apply(_Foo, [this, "test"].concat(babelHelpers.slice.call(arguments)));
(_Foo$prototype$test = Foo.prototype.test).call.apply(_Foo$prototype$test, [this].concat(babelHelpers.slice.call(arguments)));
(_Foo$prototype$test2 = Foo.prototype.test).call.apply(_Foo$prototype$test2, [this, "test"].concat(babelHelpers.slice.call(arguments)));
}
(_Foo$prototype$test = _Foo.prototype.test).call.apply(_Foo$prototype$test, [this].concat(babelHelpers.slice.call(arguments)));
(_Foo$prototype$test2 = _Foo.prototype.test).call.apply(_Foo$prototype$test2, [this, "test"].concat(babelHelpers.slice.call(arguments)));
};
babelHelpers.inherits(Test, Foo);
babelHelpers.inherits(_Test, _Foo);
Test.prototype.test = function test() {
_Test.prototype.test = function test() {
var _Foo$prototype$test, _Foo$prototype$test2;
Foo.prototype.test.call(this);
(_Foo$prototype$test = Foo.prototype.test).call.apply(_Foo$prototype$test, [this].concat(babelHelpers.slice.call(arguments)));
(_Foo$prototype$test2 = Foo.prototype.test).call.apply(_Foo$prototype$test2, [this, "test"].concat(babelHelpers.slice.call(arguments)));
_Foo.prototype.test.call(this);
(_Foo$prototype$test = _Foo.prototype.test).call.apply(_Foo$prototype$test, [this].concat(babelHelpers.slice.call(arguments)));
(_Foo$prototype$test2 = _Foo.prototype.test).call.apply(_Foo$prototype$test2, [this, "test"].concat(babelHelpers.slice.call(arguments)));
};
Test.foo = function foo() {
_Test.foo = function foo() {
var _Foo$foo, _Foo$foo2;
Foo.foo.call(this);
(_Foo$foo = Foo.foo).call.apply(_Foo$foo, [this].concat(babelHelpers.slice.call(arguments)));
(_Foo$foo2 = Foo.foo).call.apply(_Foo$foo2, [this, "test"].concat(babelHelpers.slice.call(arguments)));
_Foo.foo.call(this);
(_Foo$foo = _Foo.foo).call.apply(_Foo$foo, [this].concat(babelHelpers.slice.call(arguments)));
(_Foo$foo2 = _Foo.foo).call.apply(_Foo$foo2, [this, "test"].concat(babelHelpers.slice.call(arguments)));
};
return Test;
return _Test;
})(Foo);

View File

@@ -1,5 +1,6 @@
class Test extends Foo {
constructor() {
super();
super.test;
super.test.whatever;
}

View File

@@ -1,13 +1,14 @@
"use strict";
var Test = (function (Foo) {
function Test() {
babelHelpers.classCallCheck(this, Test);
var Test = (function (_Foo) {
var _Test = function Test() {
babelHelpers.classCallCheck(this, _Test);
Foo.prototype.test;
Foo.prototype.test.whatever;
}
_Foo.call(this);
_Foo.prototype.test;
_Foo.prototype.test.whatever;
};
babelHelpers.inherits(Test, Foo);
return Test;
babelHelpers.inherits(_Test, _Foo);
return _Test;
})(Foo);

View File

@@ -1,5 +1,6 @@
class Test extends Foo {
constructor() {
super();
super.test.whatever();
super.test();
}

View File

@@ -1,18 +1,19 @@
"use strict";
var Test = (function (Foo) {
function Test() {
babelHelpers.classCallCheck(this, Test);
var Test = (function (_Foo) {
var _Test = function Test() {
babelHelpers.classCallCheck(this, _Test);
Foo.prototype.test.whatever();
Foo.prototype.test.call(this);
}
babelHelpers.inherits(Test, Foo);
Test.test = function test() {
return Foo.wow.call(this);
_Foo.call(this);
_Foo.prototype.test.whatever();
_Foo.prototype.test.call(this);
};
return Test;
babelHelpers.inherits(_Test, _Foo);
_Test.test = function test() {
return _Foo.wow.call(this);
};
return _Test;
})(Foo);

View File

@@ -1,27 +1,27 @@
"use strict";
var BaseController = (function (_Chaplin$Controller) {
function BaseController() {
babelHelpers.classCallCheck(this, BaseController);
var _BaseController = function BaseController() {
babelHelpers.classCallCheck(this, _BaseController);
if (_Chaplin$Controller != null) {
_Chaplin$Controller.apply(this, arguments);
}
}
};
babelHelpers.inherits(BaseController, _Chaplin$Controller);
return BaseController;
babelHelpers.inherits(_BaseController, _Chaplin$Controller);
return _BaseController;
})(Chaplin.Controller);
var BaseController2 = (function (_Chaplin$Controller$Another) {
function BaseController2() {
babelHelpers.classCallCheck(this, BaseController2);
var _BaseController2 = function BaseController2() {
babelHelpers.classCallCheck(this, _BaseController2);
if (_Chaplin$Controller$Another != null) {
_Chaplin$Controller$Another.apply(this, arguments);
}
}
};
babelHelpers.inherits(BaseController2, _Chaplin$Controller$Another);
return BaseController2;
babelHelpers.inherits(_BaseController2, _Chaplin$Controller$Another);
return _BaseController2;
})(Chaplin.Controller.Another);

View File

@@ -1,14 +1,14 @@
"use strict";
var Test = (function (Foo) {
function Test() {
babelHelpers.classCallCheck(this, Test);
var Test = (function (_Foo) {
var _Test = function Test() {
babelHelpers.classCallCheck(this, _Test);
if (Foo != null) {
Foo.apply(this, arguments);
if (_Foo != null) {
_Foo.apply(this, arguments);
}
}
};
babelHelpers.inherits(Test, Foo);
return Test;
babelHelpers.inherits(_Test, _Foo);
return _Test;
})(Foo);

View File

@@ -1,7 +1,11 @@
"use strict";
var Test = function Test() {
babelHelpers.classCallCheck(this, Test);
var Test = (function () {
var _Test = function Test() {
babelHelpers.classCallCheck(this, _Test);
Function.prototype.hasOwnProperty.call(this, "test");
};
Function.prototype.hasOwnProperty.call(this, "test");
};
return _Test;
})();

View File

@@ -1,31 +1,31 @@
"use strict";
var Test = (function (Foo) {
function Test() {
var Test = (function (_Foo) {
var _Test = function Test() {
var _babelHelpers$get, _babelHelpers$get2;
babelHelpers.classCallCheck(this, Test);
babelHelpers.classCallCheck(this, _Test);
woops["super"].test();
babelHelpers.get(Object.getPrototypeOf(Test.prototype), "constructor", this).call(this);
babelHelpers.get(Object.getPrototypeOf(Test.prototype), "test", this).call(this);
babelHelpers.get(Object.getPrototypeOf(_Test.prototype), "constructor", this).call(this);
babelHelpers.get(Object.getPrototypeOf(_Test.prototype), "test", this).call(this);
babelHelpers.get(Object.getPrototypeOf(Test.prototype), "constructor", this).apply(this, arguments);
(_babelHelpers$get = babelHelpers.get(Object.getPrototypeOf(Test.prototype), "constructor", this)).call.apply(_babelHelpers$get, [this, "test"].concat(babelHelpers.slice.call(arguments)));
babelHelpers.get(Object.getPrototypeOf(_Test.prototype), "constructor", this).apply(this, arguments);
(_babelHelpers$get = babelHelpers.get(Object.getPrototypeOf(_Test.prototype), "constructor", this)).call.apply(_babelHelpers$get, [this, "test"].concat(babelHelpers.slice.call(arguments)));
babelHelpers.get(Object.getPrototypeOf(Test.prototype), "test", this).apply(this, arguments);
(_babelHelpers$get2 = babelHelpers.get(Object.getPrototypeOf(Test.prototype), "test", this)).call.apply(_babelHelpers$get2, [this, "test"].concat(babelHelpers.slice.call(arguments)));
}
babelHelpers.get(Object.getPrototypeOf(_Test.prototype), "test", this).apply(this, arguments);
(_babelHelpers$get2 = babelHelpers.get(Object.getPrototypeOf(_Test.prototype), "test", this)).call.apply(_babelHelpers$get2, [this, "test"].concat(babelHelpers.slice.call(arguments)));
};
babelHelpers.inherits(Test, Foo);
babelHelpers.createClass(Test, {
babelHelpers.inherits(_Test, _Foo);
babelHelpers.createClass(_Test, {
test: {
value: function test() {
var _babelHelpers$get;
babelHelpers.get(Object.getPrototypeOf(Test.prototype), "test", this).call(this);
babelHelpers.get(Object.getPrototypeOf(Test.prototype), "test", this).apply(this, arguments);
(_babelHelpers$get = babelHelpers.get(Object.getPrototypeOf(Test.prototype), "test", this)).call.apply(_babelHelpers$get, [this, "test"].concat(babelHelpers.slice.call(arguments)));
babelHelpers.get(Object.getPrototypeOf(_Test.prototype), "test", this).call(this);
babelHelpers.get(Object.getPrototypeOf(_Test.prototype), "test", this).apply(this, arguments);
(_babelHelpers$get = babelHelpers.get(Object.getPrototypeOf(_Test.prototype), "test", this)).call.apply(_babelHelpers$get, [this, "test"].concat(babelHelpers.slice.call(arguments)));
}
}
}, {
@@ -33,11 +33,11 @@ var Test = (function (Foo) {
value: function foo() {
var _babelHelpers$get;
babelHelpers.get(Object.getPrototypeOf(Test), "foo", this).call(this);
babelHelpers.get(Object.getPrototypeOf(Test), "foo", this).apply(this, arguments);
(_babelHelpers$get = babelHelpers.get(Object.getPrototypeOf(Test), "foo", this)).call.apply(_babelHelpers$get, [this, "test"].concat(babelHelpers.slice.call(arguments)));
babelHelpers.get(Object.getPrototypeOf(_Test), "foo", this).call(this);
babelHelpers.get(Object.getPrototypeOf(_Test), "foo", this).apply(this, arguments);
(_babelHelpers$get = babelHelpers.get(Object.getPrototypeOf(_Test), "foo", this)).call.apply(_babelHelpers$get, [this, "test"].concat(babelHelpers.slice.call(arguments)));
}
}
});
return Test;
})(Foo);
return _Test;
})(Foo);

View File

@@ -1,5 +1,6 @@
class Test extends Foo {
constructor() {
super();
super.test;
super.test.whatever;
}

View File

@@ -1,13 +1,14 @@
"use strict";
var Test = (function (Foo) {
function Test() {
babelHelpers.classCallCheck(this, Test);
var Test = (function (_Foo) {
var _Test = function Test() {
babelHelpers.classCallCheck(this, _Test);
babelHelpers.get(Object.getPrototypeOf(Test.prototype), "test", this);
babelHelpers.get(Object.getPrototypeOf(Test.prototype), "test", this).whatever;
}
babelHelpers.get(Object.getPrototypeOf(_Test.prototype), "constructor", this).call(this);
babelHelpers.get(Object.getPrototypeOf(_Test.prototype), "test", this);
babelHelpers.get(Object.getPrototypeOf(_Test.prototype), "test", this).whatever;
};
babelHelpers.inherits(Test, Foo);
return Test;
babelHelpers.inherits(_Test, _Foo);
return _Test;
})(Foo);

View File

@@ -1,5 +1,6 @@
class Test extends Foo {
constructor() {
super();
super.test.whatever();
super.test();
}

View File

@@ -1,20 +1,21 @@
"use strict";
var Test = (function (Foo) {
function Test() {
babelHelpers.classCallCheck(this, Test);
var Test = (function (_Foo) {
var _Test = function Test() {
babelHelpers.classCallCheck(this, _Test);
babelHelpers.get(Object.getPrototypeOf(Test.prototype), "test", this).whatever();
babelHelpers.get(Object.getPrototypeOf(Test.prototype), "test", this).call(this);
}
babelHelpers.get(Object.getPrototypeOf(_Test.prototype), "constructor", this).call(this);
babelHelpers.get(Object.getPrototypeOf(_Test.prototype), "test", this).whatever();
babelHelpers.get(Object.getPrototypeOf(_Test.prototype), "test", this).call(this);
};
babelHelpers.inherits(Test, Foo);
babelHelpers.createClass(Test, null, {
babelHelpers.inherits(_Test, _Foo);
babelHelpers.createClass(_Test, null, {
test: {
value: function test() {
return babelHelpers.get(Object.getPrototypeOf(Test), "wow", this).call(this);
return babelHelpers.get(Object.getPrototypeOf(_Test), "wow", this).call(this);
}
}
});
return Test;
return _Test;
})(Foo);

View File

@@ -6,6 +6,7 @@ class Test {
class Foo extends Bar {
constructor() {
super();
this.state = "test";
}
}

View File

@@ -1,18 +1,23 @@
"use strict";
var Test = function Test() {
babelHelpers.classCallCheck(this, Test);
this.state = "test";
};
var Foo = (function (Bar) {
function Foo() {
babelHelpers.classCallCheck(this, Foo);
var Test = (function () {
var _Test = function Test() {
babelHelpers.classCallCheck(this, _Test);
this.state = "test";
}
};
babelHelpers.inherits(Foo, Bar);
return Foo;
return _Test;
})();
var Foo = (function (_Bar) {
var _Foo = function Foo() {
babelHelpers.classCallCheck(this, _Foo);
babelHelpers.get(Object.getPrototypeOf(_Foo.prototype), "constructor", this).call(this);
this.state = "test";
};
babelHelpers.inherits(_Foo, _Bar);
return _Foo;
})(Bar);

View File

@@ -0,0 +1,5 @@
class Foo extends Bar {
constructor() {
}
}

View File

@@ -0,0 +1,3 @@
{
"throws": "Derived constructor must call super()"
}

View File

@@ -1,11 +1,11 @@
"use strict";
var Test = (function () {
function Test() {
babelHelpers.classCallCheck(this, Test);
}
var _Test = function Test() {
babelHelpers.classCallCheck(this, _Test);
};
babelHelpers.createClass(Test, {
babelHelpers.createClass(_Test, {
test: {
get: function () {
return 5 + 5;
@@ -15,5 +15,5 @@ var Test = (function () {
}
}
});
return Test;
return _Test;
})();

View File

@@ -1,16 +1,16 @@
"use strict";
var Test = (function () {
function Test() {
babelHelpers.classCallCheck(this, Test);
}
var _Test = function Test() {
babelHelpers.classCallCheck(this, _Test);
};
babelHelpers.createClass(Test, {
babelHelpers.createClass(_Test, {
test: {
get: function () {
return 5 + 5;
}
}
});
return Test;
return _Test;
})();

View File

@@ -1,16 +1,16 @@
"use strict";
var Test = (function () {
function Test() {
babelHelpers.classCallCheck(this, Test);
}
var _Test = function Test() {
babelHelpers.classCallCheck(this, _Test);
};
babelHelpers.createClass(Test, {
babelHelpers.createClass(_Test, {
test: {
value: function test() {
return 5 + 5;
}
}
});
return Test;
return _Test;
})();

View File

@@ -1,16 +1,16 @@
"use strict";
var Test = (function () {
function Test() {
babelHelpers.classCallCheck(this, Test);
}
var _Test = function Test() {
babelHelpers.classCallCheck(this, _Test);
};
babelHelpers.createClass(Test, {
babelHelpers.createClass(_Test, {
test: {
set: function (val) {
this._test = val;
}
}
});
return Test;
return _Test;
})();

View File

@@ -1,5 +1,9 @@
"use strict";
var Test = function Test() {
babelHelpers.classCallCheck(this, Test);
};
var Test = (function () {
var _Test = function Test() {
babelHelpers.classCallCheck(this, _Test);
};
return _Test;
})();

View File

@@ -1,28 +1,36 @@
"use strict";
var BaseView = function BaseView() {
babelHelpers.classCallCheck(this, BaseView);
this.autoRender = true;
};
var BaseView = function BaseView() {
babelHelpers.classCallCheck(this, BaseView);
this.autoRender = true;
};
var BaseView = (function () {
function BaseView() {
babelHelpers.classCallCheck(this, BaseView);
this.autoRender = true;
}
babelHelpers.createClass(BaseView, {
return BaseView;
})();
var BaseView = (function () {
var _class = function BaseView() {
babelHelpers.classCallCheck(this, _class);
this.autoRender = true;
};
return _class;
})();
var BaseView = (function () {
var _class2 = function BaseView() {
babelHelpers.classCallCheck(this, _class2);
};
babelHelpers.createClass(_class2, {
foo: {
value: function foo() {
this.autoRender = true;
}
}
});
return BaseView;
return _class2;
})();

View File

@@ -1,11 +1,11 @@
"use strict";
var A = (function () {
function A() {
babelHelpers.classCallCheck(this, A);
}
var _A = function A() {
babelHelpers.classCallCheck(this, _A);
};
babelHelpers.createClass(A, null, {
babelHelpers.createClass(_A, null, {
a: {
value: function a() {}
},
@@ -14,5 +14,5 @@ var A = (function () {
set: function (b) {}
}
});
return A;
})();
return _A;
})();

View File

@@ -0,0 +1,5 @@
class Foo {
constructor() {
super();
}
}

View File

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

View File

@@ -0,0 +1,3 @@
{
"throws": "super call is only allowed in derived constructor"
}

View File

@@ -1,46 +1,54 @@
"use strict";
var TestEmpty = (function (_ref) {
function TestEmpty() {
babelHelpers.classCallCheck(this, TestEmpty);
var _TestEmpty = function TestEmpty() {
babelHelpers.classCallCheck(this, _TestEmpty);
if (_ref != null) {
_ref.apply(this, arguments);
}
}
};
babelHelpers.inherits(TestEmpty, _ref);
return TestEmpty;
})(function _class() {
babelHelpers.classCallCheck(this, _class);
});
babelHelpers.inherits(_TestEmpty, _ref);
return _TestEmpty;
})((function () {
var _class = function () {
babelHelpers.classCallCheck(this, _class);
};
return _class;
})());
var TestConstructorOnly = (function (_ref2) {
function TestConstructorOnly() {
babelHelpers.classCallCheck(this, TestConstructorOnly);
var _TestConstructorOnly = function TestConstructorOnly() {
babelHelpers.classCallCheck(this, _TestConstructorOnly);
if (_ref2 != null) {
_ref2.apply(this, arguments);
}
}
};
babelHelpers.inherits(TestConstructorOnly, _ref2);
return TestConstructorOnly;
})(function _class2() {
babelHelpers.classCallCheck(this, _class2);
});
babelHelpers.inherits(_TestConstructorOnly, _ref2);
return _TestConstructorOnly;
})((function () {
var _class2 = function () {
babelHelpers.classCallCheck(this, _class2);
};
return _class2;
})());
var TestMethodOnly = (function (_ref3) {
function TestMethodOnly() {
babelHelpers.classCallCheck(this, TestMethodOnly);
var _TestMethodOnly = function TestMethodOnly() {
babelHelpers.classCallCheck(this, _TestMethodOnly);
if (_ref3 != null) {
_ref3.apply(this, arguments);
}
}
};
babelHelpers.inherits(TestMethodOnly, _ref3);
return TestMethodOnly;
babelHelpers.inherits(_TestMethodOnly, _ref3);
return _TestMethodOnly;
})((function () {
var _class3 = function () {
babelHelpers.classCallCheck(this, _class3);
@@ -55,16 +63,16 @@ var TestMethodOnly = (function (_ref3) {
})());
var TestConstructorAndMethod = (function (_ref4) {
function TestConstructorAndMethod() {
babelHelpers.classCallCheck(this, TestConstructorAndMethod);
var _TestConstructorAndMethod = function TestConstructorAndMethod() {
babelHelpers.classCallCheck(this, _TestConstructorAndMethod);
if (_ref4 != null) {
_ref4.apply(this, arguments);
}
}
};
babelHelpers.inherits(TestConstructorAndMethod, _ref4);
return TestConstructorAndMethod;
babelHelpers.inherits(_TestConstructorAndMethod, _ref4);
return _TestConstructorAndMethod;
})((function () {
var _class4 = function () {
babelHelpers.classCallCheck(this, _class4);
@@ -79,16 +87,16 @@ var TestConstructorAndMethod = (function (_ref4) {
})());
var TestMultipleMethods = (function (_ref5) {
function TestMultipleMethods() {
babelHelpers.classCallCheck(this, TestMultipleMethods);
var _TestMultipleMethods = function TestMultipleMethods() {
babelHelpers.classCallCheck(this, _TestMultipleMethods);
if (_ref5 != null) {
_ref5.apply(this, arguments);
}
}
};
babelHelpers.inherits(TestMultipleMethods, _ref5);
return TestMultipleMethods;
babelHelpers.inherits(_TestMultipleMethods, _ref5);
return _TestMultipleMethods;
})((function () {
var _class5 = function () {
babelHelpers.classCallCheck(this, _class5);

View File

@@ -1,27 +1,27 @@
"use strict";
var BaseController = (function (_Chaplin$Controller) {
function BaseController() {
babelHelpers.classCallCheck(this, BaseController);
var _BaseController = function BaseController() {
babelHelpers.classCallCheck(this, _BaseController);
if (_Chaplin$Controller != null) {
_Chaplin$Controller.apply(this, arguments);
}
}
};
babelHelpers.inherits(BaseController, _Chaplin$Controller);
return BaseController;
babelHelpers.inherits(_BaseController, _Chaplin$Controller);
return _BaseController;
})(Chaplin.Controller);
var BaseController2 = (function (_Chaplin$Controller$Another) {
function BaseController2() {
babelHelpers.classCallCheck(this, BaseController2);
var _BaseController2 = function BaseController2() {
babelHelpers.classCallCheck(this, _BaseController2);
if (_Chaplin$Controller$Another != null) {
_Chaplin$Controller$Another.apply(this, arguments);
}
}
};
babelHelpers.inherits(BaseController2, _Chaplin$Controller$Another);
return BaseController2;
babelHelpers.inherits(_BaseController2, _Chaplin$Controller$Another);
return _BaseController2;
})(Chaplin.Controller.Another);

View File

@@ -1,14 +1,14 @@
"use strict";
var Test = (function (Foo) {
function Test() {
babelHelpers.classCallCheck(this, Test);
var Test = (function (_Foo) {
var _Test = function Test() {
babelHelpers.classCallCheck(this, _Test);
if (Foo != null) {
Foo.apply(this, arguments);
if (_Foo != null) {
_Foo.apply(this, arguments);
}
}
};
babelHelpers.inherits(Test, Foo);
return Test;
babelHelpers.inherits(_Test, _Foo);
return _Test;
})(Foo);

View File

@@ -1,7 +1,11 @@
"use strict";
var Test = function Test() {
babelHelpers.classCallCheck(this, Test);
var Test = (function () {
var _Test = function Test() {
babelHelpers.classCallCheck(this, _Test);
babelHelpers.get(Object.getPrototypeOf(Test.prototype), "hasOwnProperty", this).call(this, "test");
};
babelHelpers.get(Object.getPrototypeOf(_Test.prototype), "hasOwnProperty", this).call(this, "test");
};
return _Test;
})();

View File

@@ -0,0 +1,6 @@
class Foo extends Bar {
constructor() {
this.foo = "bar";
super();
}
}

View File

@@ -0,0 +1,3 @@
{
"throws": "'this' is not allowed before super()"
}

View File

@@ -11,17 +11,25 @@ define(["exports", "module"], function (exports, module) {
module.exports = function () {};
var _default = function _default() {
_classCallCheck(this, _default);
};
var _default = (function () {
var _class = function _default() {
_classCallCheck(this, _class);
};
return _class;
})();
module.exports = _default;
function foo() {}
var Foo = function Foo() {
_classCallCheck(this, Foo);
};
var Foo = (function () {
var _Foo = function Foo() {
_classCallCheck(this, _Foo);
};
return _Foo;
})();
module.exports = Foo;
});

View File

@@ -15,9 +15,13 @@ define(["exports"], function (exports) {
function foo7() {}
var foo8 = exports.foo8 = function foo8() {
_classCallCheck(this, foo8);
};
var foo8 = exports.foo8 = (function () {
var _foo8 = function foo8() {
_classCallCheck(this, _foo8);
};
return _foo8;
})();
Object.defineProperty(exports, "__esModule", {
value: true

View File

@@ -5,4 +5,4 @@ var _foo = require("foo");
var foo = _foo["default"];
var foo2 = _foo["default"];
var foo3 = _foo.foo3;
var foo4 = _foo;
var foo4 = _foo;

View File

@@ -10,16 +10,24 @@ module.exports = foo;
module.exports = function () {};
var _default = function _default() {
_classCallCheck(this, _default);
};
var _default = (function () {
var _class = function _default() {
_classCallCheck(this, _class);
};
return _class;
})();
module.exports = _default;
function foo() {}
var Foo = function Foo() {
_classCallCheck(this, Foo);
};
var Foo = (function () {
var _Foo = function Foo() {
_classCallCheck(this, _Foo);
};
return _Foo;
})();
module.exports = Foo;

View File

@@ -14,9 +14,13 @@ var foo6 = exports.foo6 = 3;
function foo7() {}
var foo8 = exports.foo8 = function foo8() {
_classCallCheck(this, foo8);
};
var foo8 = exports.foo8 = (function () {
var _foo8 = function foo8() {
_classCallCheck(this, _foo8);
};
return _foo8;
})();
Object.defineProperty(exports, "__esModule", {
value: true

View File

@@ -15,4 +15,4 @@ var isOdd = exports.isOdd = (function (isEven) {
})(isEven);
Object.defineProperty(exports, "__esModule", {
value: true
});
});

View File

@@ -7,4 +7,4 @@ var bar2 = _foo.bar2;
var baz = _foo.baz;
var baz2 = _foo.bar;
var baz3 = _foo.bar;
var xyz = _foo.xyz;
var xyz = _foo.xyz;

View File

@@ -22,4 +22,4 @@ exports.test = test;
var test = exports.test = 5;
Object.defineProperty(exports, "__esModule", {
value: true
});
});

View File

@@ -2,12 +2,20 @@
var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } };
var _default = function _default() {
_classCallCheck(this, _default);
};
var _default = (function () {
var _class = function _default() {
_classCallCheck(this, _class);
};
return _class;
})();
function foo() {}
var Foo = function Foo() {
_classCallCheck(this, Foo);
};
var Foo = (function () {
var _Foo = function Foo() {
_classCallCheck(this, _Foo);
};
return _Foo;
})();

View File

@@ -13,6 +13,10 @@ var foo6 = 3;
function foo7() {}
var foo8 = function foo8() {
_classCallCheck(this, foo8);
};
var foo8 = (function () {
var _foo8 = function foo8() {
_classCallCheck(this, _foo8);
};
return _foo8;
})();

View File

@@ -22,15 +22,23 @@ System.register([], function (_export) {
_export("default", function () {});
_default = function _default() {
_classCallCheck(this, _default);
};
_default = (function () {
var _class = function _default() {
_classCallCheck(this, _class);
};
return _class;
})();
_export("default", _default);
Foo = function Foo() {
_classCallCheck(this, Foo);
};
Foo = (function () {
var _Foo = function Foo() {
_classCallCheck(this, _Foo);
};
return _Foo;
})();
_export("default", Foo);
}

View File

@@ -18,9 +18,13 @@ System.register([], function (_export) {
foo4 = _export("foo4", 2);
foo5 = _export("foo5", undefined);
foo6 = _export("foo6", 3);
foo8 = _export("foo8", function foo8() {
_classCallCheck(this, foo8);
});
foo8 = _export("foo8", (function () {
var _foo8 = function foo8() {
_classCallCheck(this, _foo8);
};
return _foo8;
})());
_export("foo3", foo3 = 5);
}

View File

@@ -17,17 +17,25 @@
module.exports = function () {};
var _default = function _default() {
_classCallCheck(this, _default);
};
var _default = (function () {
var _class = function _default() {
_classCallCheck(this, _class);
};
return _class;
})();
module.exports = _default;
function foo() {}
var Foo = function Foo() {
_classCallCheck(this, Foo);
};
var Foo = (function () {
var _Foo = function Foo() {
_classCallCheck(this, _Foo);
};
return _Foo;
})();
module.exports = Foo;
});

View File

@@ -21,9 +21,13 @@
function foo7() {}
var foo8 = exports.foo8 = function foo8() {
_classCallCheck(this, foo8);
};
var foo8 = exports.foo8 = (function () {
var _foo8 = function foo8() {
_classCallCheck(this, _foo8);
};
return _foo8;
})();
Object.defineProperty(exports, "__esModule", {
value: true

View File

@@ -7,25 +7,23 @@ var B = new WeakMap(),
C = new WeakMap();
var D = (function () {
var _D = function D() {
_classCallCheck(this, _D);
};
var F = new WeakMap(),
G = new WeakMap();
var E = new WeakMap();
function D() {
_classCallCheck(this, D);
}
return D;
return _D;
})();
var H = (function () {
var _class = function H() {
_classCallCheck(this, _class);
};
var J = new WeakMap(),
K = new WeakMap();
var I = new WeakMap();
function H() {
_classCallCheck(this, H);
}
return H;
})();
return _class;
})();

View File

@@ -1,11 +1,11 @@
"use strict";
var Foo = (function () {
function Foo() {
babelHelpers.classCallCheck(this, Foo);
}
var _Foo = function Foo() {
babelHelpers.classCallCheck(this, _Foo);
};
babelHelpers.createClass(Foo, babelHelpers.defineProperty({
babelHelpers.createClass(_Foo, babelHelpers.defineProperty({
bar: {
get: function () {
return babelHelpers.defineProperty(this, "bar", complex()).bar;
@@ -16,7 +16,7 @@ var Foo = (function () {
return babelHelpers.defineProperty(this, bar, complex())[bar];
}
}));
return Foo;
return _Foo;
})();
var foo = Object.defineProperties({}, babelHelpers.defineProperty({

View File

@@ -8,4 +8,4 @@ obj.constructor === _core.Promise;
_core.Symbol();
_core.Symbol("test");
new _core.Map();
new _core.Map();

View File

@@ -31,4 +31,4 @@ var bar = _babelHelpers.interopRequireWildcard(_someModule);
var myWord = exports.myWord = _core.Symbol("abc");
Object.defineProperty(exports, "__esModule", {
value: true
});
});

View File

@@ -2,4 +2,4 @@
var _babelHelpers = require("babel-runtime/helpers")["default"];
var foo = _babelHelpers.interopRequire(require("foo"));
var foo = _babelHelpers.interopRequire(require("foo"));

View File

@@ -10,4 +10,4 @@ void _regeneratorRuntime.mark(function callee$0$0() {
return context$1$0.stop();
}
}, callee$0$0, this);
});
});

View File

@@ -2,4 +2,4 @@
var _core = require("babel-runtime/core-js")["default"];
_core.$for.isIterable(Object(arr));
_core.$for.isIterable(Object(arr));

View File

@@ -5,11 +5,11 @@ var _createClass = (function () { function defineProperties(target, props) { for
var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } };
var Test = (function () {
function Test() {
_classCallCheck(this, Test);
}
var _Test = function Test() {
_classCallCheck(this, _Test);
};
_createClass(Test, {
_createClass(_Test, {
bar: {
get: function () {
throw new Error("wow");
@@ -17,7 +17,7 @@ var Test = (function () {
}
});
return Test;
return _Test;
})();
var test = new Test();

View File

@@ -6,16 +6,16 @@ var _inherits = function (subClass, superClass) { if (typeof superClass !== "fun
var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } };
var Foo = (function (Bar) {
function Foo() {
_classCallCheck(this, Foo);
var Foo = (function (_Bar) {
var _Foo = function Foo() {
_classCallCheck(this, _Foo);
if (Bar != null) {
Bar.apply(this, arguments);
if (_Bar != null) {
_Bar.apply(this, arguments);
}
}
};
_inherits(Foo, Bar);
_inherits(_Foo, _Bar);
return Foo;
return _Foo;
})(Bar);