mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-20 05:17:43 -05:00
Accepted baselines for all tests apart from one with source map changes.
This commit is contained in:
@@ -37,8 +37,8 @@ var C = (function (_super) {
|
||||
function C() {
|
||||
var _this;
|
||||
_this = _super.apply(this, arguments) || this;
|
||||
this.raw = "edge";
|
||||
this.ro = "readonly please";
|
||||
_this.raw = "edge";
|
||||
_this.ro = "readonly please";
|
||||
}
|
||||
Object.defineProperty(C.prototype, "prop", {
|
||||
get: function () { return "foo"; },
|
||||
|
||||
@@ -59,7 +59,7 @@ var C = (function (_super) {
|
||||
function C() {
|
||||
var _this;
|
||||
_this = _super.apply(this, arguments) || this;
|
||||
this.ro = "readonly please";
|
||||
_this.ro = "readonly please";
|
||||
}
|
||||
Object.defineProperty(C.prototype, "concreteWithNoBody", {
|
||||
get: function () { },
|
||||
@@ -80,7 +80,7 @@ var WrongTypePropertyImpl = (function (_super) {
|
||||
function WrongTypePropertyImpl() {
|
||||
var _this;
|
||||
_this = _super.apply(this, arguments) || this;
|
||||
this.num = "nope, wrong";
|
||||
_this.num = "nope, wrong";
|
||||
}
|
||||
return WrongTypePropertyImpl;
|
||||
}(WrongTypeProperty));
|
||||
@@ -107,7 +107,7 @@ var WrongTypeAccessorImpl2 = (function (_super) {
|
||||
function WrongTypeAccessorImpl2() {
|
||||
var _this;
|
||||
_this = _super.apply(this, arguments) || this;
|
||||
this.num = "nope, wrong";
|
||||
_this.num = "nope, wrong";
|
||||
}
|
||||
return WrongTypeAccessorImpl2;
|
||||
}(WrongTypeAccessor));
|
||||
|
||||
@@ -36,7 +36,7 @@ var ColoredPoint = (function (_super) {
|
||||
function ColoredPoint(x, y, color) {
|
||||
var _this;
|
||||
_this = _super.call(this, x, y) || this;
|
||||
this.color = color;
|
||||
_this.color = color;
|
||||
}
|
||||
ColoredPoint.prototype.toString = function () {
|
||||
return _super.prototype.toString.call(this) + " color=" + this.color;
|
||||
|
||||
@@ -67,7 +67,7 @@ var D = (function (_super) {
|
||||
function D() {
|
||||
var _this;
|
||||
_this = _super.apply(this, arguments) || this;
|
||||
this.x = moduleA;
|
||||
_this.x = moduleA;
|
||||
}
|
||||
return D;
|
||||
}(C));
|
||||
|
||||
@@ -45,7 +45,7 @@ var Point3D = (function (_super) {
|
||||
function Point3D(x, y, z, m) {
|
||||
var _this;
|
||||
_this = _super.call(this, x, y) || this;
|
||||
this.z = z;
|
||||
_this.z = z;
|
||||
}
|
||||
Point3D.prototype.getDist = function () {
|
||||
return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.m);
|
||||
|
||||
@@ -63,8 +63,8 @@ var D = (function (_super) {
|
||||
__extends(D, _super);
|
||||
function D(z) {
|
||||
var _this;
|
||||
_this = _super.call(this, this.z) || this;
|
||||
this.z = z;
|
||||
_this = _super.call(this, _this.z) || this;
|
||||
_this.z = z;
|
||||
}
|
||||
return D;
|
||||
}(C)); // too few params
|
||||
@@ -72,8 +72,8 @@ var E = (function (_super) {
|
||||
__extends(E, _super);
|
||||
function E(z) {
|
||||
var _this;
|
||||
_this = _super.call(this, 0, this.z) || this;
|
||||
this.z = z;
|
||||
_this = _super.call(this, 0, _this.z) || this;
|
||||
_this.z = z;
|
||||
}
|
||||
return E;
|
||||
}(C));
|
||||
@@ -81,8 +81,8 @@ var F = (function (_super) {
|
||||
__extends(F, _super);
|
||||
function F(z) {
|
||||
var _this;
|
||||
_this = _super.call(this, "hello", this.z) || this;
|
||||
this.z = z;
|
||||
_this = _super.call(this, "hello", _this.z) || this;
|
||||
_this.z = z;
|
||||
}
|
||||
return F;
|
||||
}(C)); // first param type
|
||||
|
||||
@@ -37,7 +37,7 @@ var C = (function (_super) {
|
||||
__extends(C, _super);
|
||||
function C() {
|
||||
var _this;
|
||||
this.x;
|
||||
_this.x;
|
||||
any;
|
||||
}
|
||||
return C;
|
||||
|
||||
@@ -62,7 +62,7 @@ var D1 = (function (_super) {
|
||||
function D1() {
|
||||
var _this;
|
||||
_this = _super.apply(this, arguments) || this;
|
||||
this.i = "bar";
|
||||
_this.i = "bar";
|
||||
}
|
||||
return D1;
|
||||
}(C1));
|
||||
|
||||
@@ -26,9 +26,9 @@ var Derived = (function (_super) {
|
||||
function Derived() {
|
||||
var _this;
|
||||
_this = _super.call(this) || this;
|
||||
this;
|
||||
this.x = 10;
|
||||
var that = this;
|
||||
_this;
|
||||
_this.x = 10;
|
||||
var that = _this;
|
||||
}
|
||||
return Derived;
|
||||
}(Based));
|
||||
|
||||
@@ -25,10 +25,10 @@ var Derived = (function (_super) {
|
||||
__extends(Derived, _super);
|
||||
function Derived() {
|
||||
var _this;
|
||||
this.x = 100;
|
||||
_this.x = 100;
|
||||
_this = _super.call(this) || this;
|
||||
this.x = 10;
|
||||
var that = this;
|
||||
_this.x = 10;
|
||||
var that = _this;
|
||||
}
|
||||
return Derived;
|
||||
}(Based));
|
||||
|
||||
@@ -37,8 +37,8 @@ var Derived = (function (_super) {
|
||||
return innver;
|
||||
}());
|
||||
_this = _super.call(this) || this;
|
||||
this.x = 10;
|
||||
var that = this;
|
||||
_this.x = 10;
|
||||
var that = _this;
|
||||
}
|
||||
return Derived;
|
||||
}(Based));
|
||||
|
||||
@@ -45,8 +45,8 @@ var Derived = (function (_super) {
|
||||
})();
|
||||
_this = _super.call(this) || this;
|
||||
_this = _super.call(this) || this;
|
||||
this.x = 10;
|
||||
var that = this;
|
||||
_this.x = 10;
|
||||
var that = _this;
|
||||
}
|
||||
return Derived;
|
||||
}(Based));
|
||||
|
||||
@@ -26,7 +26,7 @@ var Derived = (function (_super) {
|
||||
__extends(Derived, _super);
|
||||
function Derived() {
|
||||
var _this;
|
||||
_this = _super.call(this, this.x) || this;
|
||||
_this = _super.call(this, _this.x) || this;
|
||||
}
|
||||
return Derived;
|
||||
}(Based));
|
||||
|
||||
@@ -29,7 +29,7 @@ var Super = (function (_super) {
|
||||
__extends(Super, _super);
|
||||
function Super() {
|
||||
var _this;
|
||||
var that = this;
|
||||
var that = _this;
|
||||
_this = _super.call(this) || this;
|
||||
}
|
||||
return Super;
|
||||
|
||||
@@ -79,7 +79,7 @@ var DerivedA = (function (_super) {
|
||||
function DerivedA(x) {
|
||||
var _this;
|
||||
_this = _super.call(this, x) || this;
|
||||
this.x = x;
|
||||
_this.x = x;
|
||||
}
|
||||
DerivedA.prototype.createInstance = function () { new DerivedA(5); };
|
||||
DerivedA.prototype.createBaseInstance = function () { new BaseA(6); };
|
||||
@@ -91,7 +91,7 @@ var DerivedB = (function (_super) {
|
||||
function DerivedB(x) {
|
||||
var _this;
|
||||
_this = _super.call(this, x) || this;
|
||||
this.x = x;
|
||||
_this.x = x;
|
||||
}
|
||||
DerivedB.prototype.createInstance = function () { new DerivedB(7); };
|
||||
DerivedB.prototype.createBaseInstance = function () { new BaseB(8); }; // ok
|
||||
@@ -103,7 +103,7 @@ var DerivedC = (function (_super) {
|
||||
function DerivedC(x) {
|
||||
var _this;
|
||||
_this = _super.call(this, x) || this;
|
||||
this.x = x;
|
||||
_this.x = x;
|
||||
}
|
||||
DerivedC.prototype.createInstance = function () { new DerivedC(9); };
|
||||
DerivedC.prototype.createBaseInstance = function () { new BaseC(10); }; // error
|
||||
|
||||
@@ -61,7 +61,7 @@ var Derived = (function (_super) {
|
||||
function Derived(p) {
|
||||
var _this;
|
||||
_this = _super.call(this, p) || this;
|
||||
this.p; // OK
|
||||
_this.p; // OK
|
||||
}
|
||||
return Derived;
|
||||
}(C3));
|
||||
|
||||
@@ -61,7 +61,7 @@ var Derived = (function (_super) {
|
||||
function Derived(p) {
|
||||
var _this;
|
||||
_this = _super.call(this, p) || this;
|
||||
this.p; // OK
|
||||
_this.p; // OK
|
||||
}
|
||||
return Derived;
|
||||
}(C3));
|
||||
|
||||
@@ -30,8 +30,8 @@ var Derived = (function (_super) {
|
||||
function Derived(p) {
|
||||
var _this;
|
||||
_this = _super.call(this, p) || this;
|
||||
this.p = p;
|
||||
this.p; // OK
|
||||
_this.p = p;
|
||||
_this.p; // OK
|
||||
}
|
||||
return Derived;
|
||||
}(Base));
|
||||
|
||||
@@ -17,7 +17,7 @@ var C = (function (_super) {
|
||||
function class_1() {
|
||||
var _this;
|
||||
_this = _super.apply(this, arguments) || this;
|
||||
this.c = 3;
|
||||
_this.c = 3;
|
||||
}
|
||||
return class_1;
|
||||
}((function (_super) {
|
||||
@@ -25,7 +25,7 @@ var C = (function (_super) {
|
||||
function class_2() {
|
||||
var _this;
|
||||
_this = _super.apply(this, arguments) || this;
|
||||
this.b = 2;
|
||||
_this.b = 2;
|
||||
}
|
||||
return class_2;
|
||||
}((function () {
|
||||
|
||||
@@ -78,8 +78,8 @@ var D1 = (function (_super) {
|
||||
function D1() {
|
||||
var _this;
|
||||
_this = _super.call(this, "abc", "def") || this;
|
||||
this.x = "x";
|
||||
this.y = "y";
|
||||
_this.x = "x";
|
||||
_this.y = "y";
|
||||
}
|
||||
return D1;
|
||||
}(getBase()));
|
||||
@@ -89,8 +89,8 @@ var D2 = (function (_super) {
|
||||
var _this;
|
||||
_this = _super.call(this, 10) || this;
|
||||
_this = _super.call(this, 10, 20) || this;
|
||||
this.x = 1;
|
||||
this.y = 2;
|
||||
_this.x = 1;
|
||||
_this.y = 2;
|
||||
}
|
||||
return D2;
|
||||
}(getBase()));
|
||||
@@ -99,8 +99,8 @@ var D3 = (function (_super) {
|
||||
function D3() {
|
||||
var _this;
|
||||
_this = _super.call(this, "abc", 42) || this;
|
||||
this.x = "x";
|
||||
this.y = 2;
|
||||
_this.x = "x";
|
||||
_this.y = 2;
|
||||
}
|
||||
return D3;
|
||||
}(getBase()));
|
||||
|
||||
@@ -35,7 +35,7 @@ var B = (function (_super) {
|
||||
function B(x, data) {
|
||||
var _this;
|
||||
_this = _super.call(this, x) || this;
|
||||
this.data = data;
|
||||
_this.data = data;
|
||||
}
|
||||
return B;
|
||||
}(A));
|
||||
|
||||
@@ -159,7 +159,7 @@ var E = (function (_super) {
|
||||
function E() {
|
||||
var _this;
|
||||
_this = _super.apply(this, arguments) || this;
|
||||
this.p1 = 0;
|
||||
_this.p1 = 0;
|
||||
}
|
||||
return E;
|
||||
}(D));
|
||||
@@ -175,7 +175,7 @@ var G = (function (_super) {
|
||||
function G() {
|
||||
var _this;
|
||||
_this = _super.call(this) || this;
|
||||
this.p1 = 0;
|
||||
_this.p1 = 0;
|
||||
} // NO ERROR
|
||||
return G;
|
||||
}(D));
|
||||
@@ -198,7 +198,7 @@ var J = (function (_super) {
|
||||
function J(p1) {
|
||||
var _this;
|
||||
_this = _super.call(this) || this; // NO ERROR
|
||||
this.p1 = p1;
|
||||
_this.p1 = p1;
|
||||
}
|
||||
return J;
|
||||
}(G));
|
||||
@@ -206,7 +206,7 @@ var K = (function (_super) {
|
||||
__extends(K, _super);
|
||||
function K(p1) {
|
||||
var _this;
|
||||
this.p1 = p1;
|
||||
_this.p1 = p1;
|
||||
var i = 0;
|
||||
_this = _super.call(this) || this;
|
||||
}
|
||||
@@ -217,7 +217,7 @@ var L = (function (_super) {
|
||||
function L(p1) {
|
||||
var _this;
|
||||
_this = _super.call(this) || this; // NO ERROR
|
||||
this.p1 = p1;
|
||||
_this.p1 = p1;
|
||||
}
|
||||
return L;
|
||||
}(G));
|
||||
@@ -225,7 +225,7 @@ var M = (function (_super) {
|
||||
__extends(M, _super);
|
||||
function M(p1) {
|
||||
var _this;
|
||||
this.p1 = p1;
|
||||
_this.p1 = p1;
|
||||
var i = 0;
|
||||
_this = _super.call(this) || this;
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ var b = (function (_super) {
|
||||
function b() {
|
||||
var _this;
|
||||
_this = _super.apply(this, arguments) || this;
|
||||
this.prop2 = {
|
||||
_this.prop2 = {
|
||||
doStuff: function () {
|
||||
function _super() {
|
||||
}
|
||||
|
||||
@@ -40,12 +40,12 @@ var b = (function (_super) {
|
||||
function b() {
|
||||
var _this;
|
||||
_this = _super.apply(this, arguments) || this;
|
||||
this.prop2 = {
|
||||
_this.prop2 = {
|
||||
doStuff: function () {
|
||||
var _super = 10; // Should be error
|
||||
}
|
||||
};
|
||||
this._super = 10; // No error
|
||||
_this._super = 10; // No error
|
||||
}
|
||||
return b;
|
||||
}(Foo));
|
||||
|
||||
@@ -96,7 +96,7 @@ var Foo2 = (function (_super) {
|
||||
function Foo2(_super) {
|
||||
var _this;
|
||||
_this = _super.call(this) || this;
|
||||
this.prop4 = {
|
||||
_this.prop4 = {
|
||||
doStuff: function (_super) {
|
||||
}
|
||||
};
|
||||
|
||||
@@ -54,7 +54,7 @@ var b2 = (function (_super) {
|
||||
function b2(_super) {
|
||||
var _this;
|
||||
_this = _super.call(this) || this;
|
||||
this._super = _super;
|
||||
_this._super = _super;
|
||||
}
|
||||
return b2;
|
||||
}(a));
|
||||
@@ -71,7 +71,7 @@ var b4 = (function (_super) {
|
||||
function b4(_super) {
|
||||
var _this;
|
||||
_this = _super.call(this) || this;
|
||||
this._super = _super;
|
||||
_this._super = _super;
|
||||
}
|
||||
return b4;
|
||||
}(a));
|
||||
|
||||
@@ -36,7 +36,7 @@ var C = (function (_super) {
|
||||
// Ideally, we would capture this. But the reference is
|
||||
// illegal, and not capturing this is consistent with
|
||||
//treatment of other similar violations.
|
||||
_a[(_this = _super.call(_this) || _this, "prop")] = function () { },
|
||||
_a[(_this = _super.call(this) || this, "prop")] = function () { },
|
||||
_a);
|
||||
var _a;
|
||||
});
|
||||
|
||||
@@ -31,7 +31,7 @@ var Sub = (function (_super) {
|
||||
function Sub(options) {
|
||||
var _this;
|
||||
_this = _super.call(this, options.value) || this;
|
||||
this.options = options;
|
||||
_this.options = options;
|
||||
}
|
||||
return Sub;
|
||||
}(Super));
|
||||
|
||||
@@ -81,7 +81,7 @@ var templa;
|
||||
function AbstractCompositeElementController() {
|
||||
var _this;
|
||||
_this = _super.call(this) || this;
|
||||
this._controllers = [];
|
||||
_this._controllers = [];
|
||||
}
|
||||
return AbstractCompositeElementController;
|
||||
}(templa.dom.mvc.AbstractElementController));
|
||||
|
||||
@@ -60,7 +60,7 @@ var Derived2 = (function (_super) {
|
||||
__extends(Derived2, _super);
|
||||
function Derived2() {
|
||||
var _this;
|
||||
var r2 = function () { return _this = _super.call(_this) || _this; }; // error for misplaced super call (nested function)
|
||||
var r2 = function () { return _this = _super.call(this) || this; }; // error for misplaced super call (nested function)
|
||||
}
|
||||
return Derived2;
|
||||
}(Base2));
|
||||
|
||||
@@ -119,7 +119,7 @@ var Derived2 = (function (_super) {
|
||||
__extends(Derived2, _super);
|
||||
function Derived2(y) {
|
||||
var _this;
|
||||
this.y = y;
|
||||
_this.y = y;
|
||||
var a = 1;
|
||||
_this = _super.call(this) || this; // error
|
||||
}
|
||||
@@ -130,7 +130,7 @@ var Derived3 = (function (_super) {
|
||||
function Derived3(y) {
|
||||
var _this;
|
||||
_this = _super.call(this) || this; // ok
|
||||
this.y = y;
|
||||
_this.y = y;
|
||||
var a = 1;
|
||||
}
|
||||
return Derived3;
|
||||
@@ -139,7 +139,7 @@ var Derived4 = (function (_super) {
|
||||
__extends(Derived4, _super);
|
||||
function Derived4(y) {
|
||||
var _this;
|
||||
this.a = 1;
|
||||
_this.a = 1;
|
||||
var b = 2;
|
||||
_this = _super.call(this) || this; // error
|
||||
}
|
||||
@@ -150,7 +150,7 @@ var Derived5 = (function (_super) {
|
||||
function Derived5(y) {
|
||||
var _this;
|
||||
_this = _super.call(this) || this; // ok
|
||||
this.a = 1;
|
||||
_this.a = 1;
|
||||
var b = 2;
|
||||
}
|
||||
return Derived5;
|
||||
@@ -159,7 +159,7 @@ var Derived6 = (function (_super) {
|
||||
__extends(Derived6, _super);
|
||||
function Derived6(y) {
|
||||
var _this;
|
||||
this.a = 1;
|
||||
_this.a = 1;
|
||||
var b = 2;
|
||||
_this = _super.call(this) || this; // error: "super" has to be called before "this" accessing
|
||||
}
|
||||
@@ -169,9 +169,9 @@ var Derived7 = (function (_super) {
|
||||
__extends(Derived7, _super);
|
||||
function Derived7(y) {
|
||||
var _this;
|
||||
this.a = 1;
|
||||
this.a = 3;
|
||||
this.b = 3;
|
||||
_this.a = 1;
|
||||
_this.a = 3;
|
||||
_this.b = 3;
|
||||
_this = _super.call(this) || this; // error
|
||||
}
|
||||
return Derived7;
|
||||
@@ -181,9 +181,9 @@ var Derived8 = (function (_super) {
|
||||
function Derived8(y) {
|
||||
var _this;
|
||||
_this = _super.call(this) || this; // ok
|
||||
this.a = 1;
|
||||
this.a = 3;
|
||||
this.b = 3;
|
||||
_this.a = 1;
|
||||
_this.a = 3;
|
||||
_this.b = 3;
|
||||
}
|
||||
return Derived8;
|
||||
}(Base));
|
||||
@@ -197,9 +197,9 @@ var Derived9 = (function (_super) {
|
||||
__extends(Derived9, _super);
|
||||
function Derived9(y) {
|
||||
var _this;
|
||||
this.a = 1;
|
||||
this.a = 3;
|
||||
this.b = 3;
|
||||
_this.a = 1;
|
||||
_this.a = 3;
|
||||
_this.b = 3;
|
||||
_this = _super.call(this) || this; // error
|
||||
}
|
||||
return Derived9;
|
||||
@@ -209,9 +209,9 @@ var Derived10 = (function (_super) {
|
||||
function Derived10(y) {
|
||||
var _this;
|
||||
_this = _super.call(this) || this; // ok
|
||||
this.a = 1;
|
||||
this.a = 3;
|
||||
this.b = 3;
|
||||
_this.a = 1;
|
||||
_this.a = 3;
|
||||
_this.b = 3;
|
||||
}
|
||||
return Derived10;
|
||||
}(Base2));
|
||||
|
||||
@@ -48,7 +48,7 @@ var Derived = (function (_super) {
|
||||
function Derived() {
|
||||
var _this;
|
||||
_this = _super.apply(this, arguments) || this;
|
||||
this.a = _this = _super.call(this) || this;
|
||||
_this.a = _this = _super.call(this) || this;
|
||||
}
|
||||
Derived.prototype.b = function () {
|
||||
_this = _super.call(this) || this;
|
||||
|
||||
@@ -43,7 +43,7 @@ var Derived = (function (_super) {
|
||||
__extends(Derived, _super);
|
||||
function Derived() {
|
||||
var _this;
|
||||
_this = _super.call(this, this) || this; // ok
|
||||
_this = _super.call(this, _this) || this; // ok
|
||||
}
|
||||
return Derived;
|
||||
}(Base));
|
||||
@@ -51,8 +51,8 @@ var Derived2 = (function (_super) {
|
||||
__extends(Derived2, _super);
|
||||
function Derived2(a) {
|
||||
var _this;
|
||||
_this = _super.call(this, this) || this; // error
|
||||
this.a = a;
|
||||
_this = _super.call(this, _this) || this; // error
|
||||
_this.a = a;
|
||||
}
|
||||
return Derived2;
|
||||
}(Base));
|
||||
@@ -61,7 +61,7 @@ var Derived3 = (function (_super) {
|
||||
function Derived3(a) {
|
||||
var _this;
|
||||
_this = _super.call(this, function () { return _this; }) || this; // error
|
||||
this.a = a;
|
||||
_this.a = a;
|
||||
}
|
||||
return Derived3;
|
||||
}(Base));
|
||||
@@ -70,7 +70,7 @@ var Derived4 = (function (_super) {
|
||||
function Derived4(a) {
|
||||
var _this;
|
||||
_this = _super.call(this, function () { return this; }) || this; // ok
|
||||
this.a = a;
|
||||
_this.a = a;
|
||||
}
|
||||
return Derived4;
|
||||
}(Base));
|
||||
|
||||
@@ -43,8 +43,8 @@ var Derived = (function (_super) {
|
||||
function Derived() {
|
||||
var _this;
|
||||
_this = _super.apply(this, arguments) || this;
|
||||
this.x = 1;
|
||||
this.y = 'hello';
|
||||
_this.x = 1;
|
||||
_this.y = 'hello';
|
||||
}
|
||||
return Derived;
|
||||
}(Base));
|
||||
@@ -61,8 +61,8 @@ var D = (function (_super) {
|
||||
function D() {
|
||||
var _this;
|
||||
_this = _super.apply(this, arguments) || this;
|
||||
this.x = 2;
|
||||
this.y = null;
|
||||
_this.x = 2;
|
||||
_this.y = null;
|
||||
}
|
||||
return D;
|
||||
}(Base2));
|
||||
|
||||
@@ -51,8 +51,8 @@ var Derived = (function (_super) {
|
||||
function Derived() {
|
||||
var _this;
|
||||
_this = _super.apply(this, arguments) || this;
|
||||
this.x = 1;
|
||||
this.y = 'hello';
|
||||
_this.x = 1;
|
||||
_this.y = 'hello';
|
||||
}
|
||||
return Derived;
|
||||
}(Base));
|
||||
@@ -71,8 +71,8 @@ var D = (function (_super) {
|
||||
function D() {
|
||||
var _this;
|
||||
_this = _super.apply(this, arguments) || this;
|
||||
this.x = 2;
|
||||
this.y = null;
|
||||
_this.x = 2;
|
||||
_this.y = null;
|
||||
}
|
||||
return D;
|
||||
}(Base2));
|
||||
|
||||
@@ -65,8 +65,8 @@ var Derived = (function (_super) {
|
||||
function Derived(y, z) {
|
||||
var _this;
|
||||
_this = _super.call(this, 2) || this;
|
||||
this.b = '';
|
||||
this.b = y;
|
||||
_this.b = '';
|
||||
_this.b = y;
|
||||
}
|
||||
return Derived;
|
||||
}(Base));
|
||||
@@ -75,8 +75,8 @@ var Derived2 = (function (_super) {
|
||||
function Derived2() {
|
||||
var _this;
|
||||
_this = _super.apply(this, arguments) || this;
|
||||
this.x = 1;
|
||||
this.y = 'hello';
|
||||
_this.x = 1;
|
||||
_this.y = 'hello';
|
||||
}
|
||||
return Derived2;
|
||||
}(Derived));
|
||||
@@ -94,8 +94,8 @@ var D = (function (_super) {
|
||||
function D(y, z) {
|
||||
var _this;
|
||||
_this = _super.call(this, 2) || this;
|
||||
this.b = null;
|
||||
this.b = y;
|
||||
_this.b = null;
|
||||
_this.b = y;
|
||||
}
|
||||
return D;
|
||||
}(Base));
|
||||
@@ -104,8 +104,8 @@ var D2 = (function (_super) {
|
||||
function D2() {
|
||||
var _this;
|
||||
_this = _super.apply(this, arguments) || this;
|
||||
this.x = 2;
|
||||
this.y = null;
|
||||
_this.x = 2;
|
||||
_this.y = null;
|
||||
}
|
||||
return D2;
|
||||
}(D));
|
||||
|
||||
@@ -32,7 +32,7 @@ var B = (function (_super) {
|
||||
"use strict";
|
||||
'someStringForEgngInject';
|
||||
_this = _super.call(this) || this;
|
||||
this.x = x;
|
||||
_this.x = x;
|
||||
}
|
||||
return B;
|
||||
}(A));
|
||||
|
||||
@@ -34,7 +34,7 @@ var B = (function (_super) {
|
||||
"use strict";
|
||||
'someStringForEgngInject';
|
||||
_this = _super.call(this) || this;
|
||||
this.blub = 12;
|
||||
_this.blub = 12;
|
||||
}
|
||||
return B;
|
||||
}(A));
|
||||
|
||||
@@ -32,8 +32,8 @@ var B = (function (_super) {
|
||||
"use strict";
|
||||
'someStringForEgngInject';
|
||||
_this = _super.call(this) || this;
|
||||
this.x = x;
|
||||
this.blah = 2;
|
||||
_this.x = x;
|
||||
_this.blah = 2;
|
||||
}
|
||||
return B;
|
||||
}(A));
|
||||
|
||||
@@ -133,7 +133,7 @@ var Derived = (function (_super) {
|
||||
//super call with type arguments
|
||||
function Derived() {
|
||||
var _this;
|
||||
_super.prototype..call(this);
|
||||
_super.prototype..call(_this);
|
||||
_this = _super.call(this) || this;
|
||||
}
|
||||
return Derived;
|
||||
@@ -149,7 +149,7 @@ var OtherDerived = (function (_super) {
|
||||
var _this;
|
||||
_this = _super.apply(this, arguments) || this;
|
||||
//super call in class member initializer of derived type
|
||||
this.t = _this = _super.call(this) || this;
|
||||
_this.t = _this = _super.call(this) || this;
|
||||
}
|
||||
OtherDerived.prototype.fn = function () {
|
||||
//super call in class member function of derived type
|
||||
|
||||
@@ -105,12 +105,12 @@ var Foo = (function (_super) {
|
||||
var _this;
|
||||
if (z === void 0) { z = 0; }
|
||||
_this = _super.call(this, x) || this;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
this.gar = 0;
|
||||
this.zoo = "zoo";
|
||||
this.x = x;
|
||||
this.gar = 5;
|
||||
_this.y = y;
|
||||
_this.z = z;
|
||||
_this.gar = 0;
|
||||
_this.zoo = "zoo";
|
||||
_this.x = x;
|
||||
_this.gar = 5;
|
||||
}
|
||||
Foo.prototype.bar = function () { return 0; };
|
||||
Foo.prototype.boo = function (x) { return x; };
|
||||
|
||||
@@ -61,7 +61,7 @@ var TypeScript;
|
||||
function PullTypeSymbol() {
|
||||
var _this;
|
||||
_this = _super.apply(this, arguments) || this;
|
||||
this._elementType = null;
|
||||
_this._elementType = null;
|
||||
}
|
||||
PullTypeSymbol.prototype.toString = function (scopeSymbol, useConstraintInName) {
|
||||
var s = this.getScopedNameEx(scopeSymbol, useConstraintInName).toString();
|
||||
|
||||
@@ -35,8 +35,8 @@ var Derived = (function (_super) {
|
||||
__extends(Derived, _super);
|
||||
function Derived() {
|
||||
var _this;
|
||||
var r2 = function () { return _this = _super.call(_this) || _this; };
|
||||
var r3 = function () { _this = _super.call(_this) || _this; };
|
||||
var r2 = function () { return _this = _super.call(this) || this; };
|
||||
var r3 = function () { _this = _super.call(this) || this; };
|
||||
var r4 = function () { _this = _super.call(this) || this; };
|
||||
var r5 = {
|
||||
get foo() {
|
||||
|
||||
@@ -41,8 +41,8 @@ var D = (function (_super) {
|
||||
function D() {
|
||||
var _this;
|
||||
_this = _super.apply(this, arguments) || this;
|
||||
this.x = 2;
|
||||
this.y = 3;
|
||||
_this.x = 2;
|
||||
_this.y = 3;
|
||||
}
|
||||
D.prototype.foo = function (x) { return x; };
|
||||
D.prototype.other = function (x) { return x; };
|
||||
@@ -54,7 +54,7 @@ var D2 = (function (_super) {
|
||||
function D2() {
|
||||
var _this;
|
||||
_this = _super.apply(this, arguments) || this;
|
||||
this.x = "";
|
||||
_this.x = "";
|
||||
}
|
||||
D2.prototype.foo = function (x) { return x; };
|
||||
D2.prototype.other = function (x) { return x; };
|
||||
|
||||
@@ -83,7 +83,7 @@ var MonsterFood = (function (_super) {
|
||||
function MonsterFood(name, flavor) {
|
||||
var _this;
|
||||
_this = _super.call(this, name) || this;
|
||||
this.flavor = flavor;
|
||||
_this.flavor = flavor;
|
||||
}
|
||||
return MonsterFood;
|
||||
}(Food));
|
||||
@@ -92,7 +92,7 @@ var IceCream = (function (_super) {
|
||||
function IceCream(flavor) {
|
||||
var _this;
|
||||
_this = _super.call(this, "Ice Cream", flavor) || this;
|
||||
this.flavor = flavor;
|
||||
_this.flavor = flavor;
|
||||
}
|
||||
return IceCream;
|
||||
}(MonsterFood));
|
||||
@@ -101,8 +101,8 @@ var Cookie = (function (_super) {
|
||||
function Cookie(flavor, isGlutenFree) {
|
||||
var _this;
|
||||
_this = _super.call(this, "Cookie", flavor) || this;
|
||||
this.flavor = flavor;
|
||||
this.isGlutenFree = isGlutenFree;
|
||||
_this.flavor = flavor;
|
||||
_this.isGlutenFree = isGlutenFree;
|
||||
}
|
||||
return Cookie;
|
||||
}(MonsterFood));
|
||||
@@ -111,7 +111,7 @@ var PetFood = (function (_super) {
|
||||
function PetFood(name, whereToBuy) {
|
||||
var _this;
|
||||
_this = _super.call(this, name) || this;
|
||||
this.whereToBuy = whereToBuy;
|
||||
_this.whereToBuy = whereToBuy;
|
||||
}
|
||||
return PetFood;
|
||||
}(Food));
|
||||
@@ -120,7 +120,7 @@ var ExpensiveOrganicDogFood = (function (_super) {
|
||||
function ExpensiveOrganicDogFood(whereToBuy) {
|
||||
var _this;
|
||||
_this = _super.call(this, "Origen", whereToBuy) || this;
|
||||
this.whereToBuy = whereToBuy;
|
||||
_this.whereToBuy = whereToBuy;
|
||||
}
|
||||
return ExpensiveOrganicDogFood;
|
||||
}(PetFood));
|
||||
@@ -129,8 +129,8 @@ var ExpensiveOrganicCatFood = (function (_super) {
|
||||
function ExpensiveOrganicCatFood(whereToBuy, containsFish) {
|
||||
var _this;
|
||||
_this = _super.call(this, "Nature's Logic", whereToBuy) || this;
|
||||
this.whereToBuy = whereToBuy;
|
||||
this.containsFish = containsFish;
|
||||
_this.whereToBuy = whereToBuy;
|
||||
_this.containsFish = containsFish;
|
||||
}
|
||||
return ExpensiveOrganicCatFood;
|
||||
}(PetFood));
|
||||
|
||||
@@ -111,7 +111,7 @@ var Derived = (function (_super) {
|
||||
function Derived() {
|
||||
var _this;
|
||||
_this = _super.apply(this, arguments) || this;
|
||||
this.a = 1;
|
||||
_this.a = 1;
|
||||
}
|
||||
Derived.prototype.f = function () { return 1; };
|
||||
return Derived;
|
||||
|
||||
@@ -27,7 +27,7 @@ var D = (function (_super) {
|
||||
function D(p) {
|
||||
var _this;
|
||||
_this = _super.call(this) || this;
|
||||
this.p = p;
|
||||
_this.p = p;
|
||||
}
|
||||
return D;
|
||||
}(C));
|
||||
|
||||
@@ -29,7 +29,7 @@ var A = (function (_super) {
|
||||
function A() {
|
||||
var _this;
|
||||
_this = _super.apply(this, arguments) || this;
|
||||
this.x = 1;
|
||||
_this.x = 1;
|
||||
}
|
||||
return A;
|
||||
}(Z));
|
||||
|
||||
@@ -320,7 +320,7 @@ var c3 = (function (_super) {
|
||||
function c3() {
|
||||
var _this;
|
||||
_this = _super.call(this, 10) || this;
|
||||
this.p1 = _super.prototype.c2_p1;
|
||||
_this.p1 = _super.prototype.c2_p1;
|
||||
}
|
||||
/** c3 f1*/
|
||||
c3.prototype.f1 = function () {
|
||||
@@ -408,7 +408,7 @@ var c6 = (function (_super) {
|
||||
function c6() {
|
||||
var _this;
|
||||
_this = _super.call(this) || this;
|
||||
this.d = _super.prototype.b;
|
||||
_this.d = _super.prototype.b;
|
||||
}
|
||||
return c6;
|
||||
}(c5));
|
||||
|
||||
@@ -828,8 +828,8 @@ var TypeScript;
|
||||
function NumberLiteralToken(value, hasEmptyFraction) {
|
||||
var _this;
|
||||
_this = _super.call(this, TokenID.NumberLiteral) || this;
|
||||
this.value = value;
|
||||
this.hasEmptyFraction = hasEmptyFraction;
|
||||
_this.value = value;
|
||||
_this.hasEmptyFraction = hasEmptyFraction;
|
||||
}
|
||||
NumberLiteralToken.prototype.getText = function () {
|
||||
return this.hasEmptyFraction ? this.value.toString() + ".0" : this.value.toString();
|
||||
@@ -845,7 +845,7 @@ var TypeScript;
|
||||
function StringLiteralToken(value) {
|
||||
var _this;
|
||||
_this = _super.call(this, TokenID.StringLiteral) || this;
|
||||
this.value = value;
|
||||
_this.value = value;
|
||||
}
|
||||
StringLiteralToken.prototype.getText = function () {
|
||||
return this.value;
|
||||
@@ -861,8 +861,8 @@ var TypeScript;
|
||||
function IdentifierToken(value, hasEscapeSequence) {
|
||||
var _this;
|
||||
_this = _super.call(this, TokenID.Identifier) || this;
|
||||
this.value = value;
|
||||
this.hasEscapeSequence = hasEscapeSequence;
|
||||
_this.value = value;
|
||||
_this.hasEscapeSequence = hasEscapeSequence;
|
||||
}
|
||||
IdentifierToken.prototype.getText = function () {
|
||||
return this.value;
|
||||
@@ -878,7 +878,7 @@ var TypeScript;
|
||||
function WhitespaceToken(tokenId, value) {
|
||||
var _this;
|
||||
_this = _super.call(this, tokenId) || this;
|
||||
this.value = value;
|
||||
_this.value = value;
|
||||
}
|
||||
WhitespaceToken.prototype.getText = function () {
|
||||
return this.value;
|
||||
@@ -894,11 +894,11 @@ var TypeScript;
|
||||
function CommentToken(tokenID, value, isBlock, startPos, line, endsLine) {
|
||||
var _this;
|
||||
_this = _super.call(this, tokenID) || this;
|
||||
this.value = value;
|
||||
this.isBlock = isBlock;
|
||||
this.startPos = startPos;
|
||||
this.line = line;
|
||||
this.endsLine = endsLine;
|
||||
_this.value = value;
|
||||
_this.isBlock = isBlock;
|
||||
_this.startPos = startPos;
|
||||
_this.line = line;
|
||||
_this.endsLine = endsLine;
|
||||
}
|
||||
CommentToken.prototype.getText = function () {
|
||||
return this.value;
|
||||
@@ -914,7 +914,7 @@ var TypeScript;
|
||||
function RegularExpressionLiteralToken(regex) {
|
||||
var _this;
|
||||
_this = _super.call(this, TokenID.RegularExpressionLiteral) || this;
|
||||
this.regex = regex;
|
||||
_this.regex = regex;
|
||||
}
|
||||
RegularExpressionLiteralToken.prototype.getText = function () {
|
||||
return this.regex.toString();
|
||||
|
||||
@@ -2388,14 +2388,14 @@ var TypeScript;
|
||||
function AST(nodeType) {
|
||||
var _this;
|
||||
_this = _super.call(this) || this;
|
||||
this.nodeType = nodeType;
|
||||
this.type = null;
|
||||
this.flags = ASTFlags.Writeable;
|
||||
_this.nodeType = nodeType;
|
||||
_this.type = null;
|
||||
_this.flags = ASTFlags.Writeable;
|
||||
// REVIEW: for diagnostic purposes
|
||||
this.passCreated = CompilerDiagnostics.analysisPass;
|
||||
this.preComments = null;
|
||||
this.postComments = null;
|
||||
this.isParenthesized = false;
|
||||
_this.passCreated = CompilerDiagnostics.analysisPass;
|
||||
_this.preComments = null;
|
||||
_this.postComments = null;
|
||||
_this.isParenthesized = false;
|
||||
}
|
||||
AST.prototype.isExpression = function () { return false; };
|
||||
AST.prototype.isStatementOrExpression = function () { return false; };
|
||||
@@ -2545,8 +2545,8 @@ var TypeScript;
|
||||
function IncompleteAST(min, lim) {
|
||||
var _this;
|
||||
_this = _super.call(this, NodeType.Error) || this;
|
||||
this.minChar = min;
|
||||
this.limChar = lim;
|
||||
_this.minChar = min;
|
||||
_this.limChar = lim;
|
||||
}
|
||||
return IncompleteAST;
|
||||
}(AST));
|
||||
@@ -2556,8 +2556,8 @@ var TypeScript;
|
||||
function ASTList() {
|
||||
var _this;
|
||||
_this = _super.call(this, NodeType.List) || this;
|
||||
this.enclosingScope = null;
|
||||
this.members = new AST[];
|
||||
_this.enclosingScope = null;
|
||||
_this.members = new AST[];
|
||||
}
|
||||
ASTList.prototype.addToControlFlow = function (context) {
|
||||
var len = this.members.length;
|
||||
@@ -2624,11 +2624,11 @@ var TypeScript;
|
||||
function Identifier(actualText, hasEscapeSequence) {
|
||||
var _this;
|
||||
_this = _super.call(this, NodeType.Name) || this;
|
||||
this.actualText = actualText;
|
||||
this.hasEscapeSequence = hasEscapeSequence;
|
||||
this.sym = null;
|
||||
this.cloId = -1;
|
||||
this.setText(actualText, hasEscapeSequence);
|
||||
_this.actualText = actualText;
|
||||
_this.hasEscapeSequence = hasEscapeSequence;
|
||||
_this.sym = null;
|
||||
_this.cloId = -1;
|
||||
_this.setText(actualText, hasEscapeSequence);
|
||||
}
|
||||
Identifier.prototype.setText = function (actualText, hasEscapeSequence) {
|
||||
this.actualText = actualText;
|
||||
@@ -2684,7 +2684,7 @@ var TypeScript;
|
||||
function Label(id) {
|
||||
var _this;
|
||||
_this = _super.call(this, NodeType.Label) || this;
|
||||
this.id = id;
|
||||
_this.id = id;
|
||||
}
|
||||
Label.prototype.printLabel = function () { return this.id.actualText + ":"; };
|
||||
Label.prototype.typeCheck = function (typeFlow) {
|
||||
@@ -2720,9 +2720,9 @@ var TypeScript;
|
||||
function UnaryExpression(nodeType, operand) {
|
||||
var _this;
|
||||
_this = _super.call(this, nodeType) || this;
|
||||
this.operand = operand;
|
||||
this.targetType = null; // Target type for an object literal (null if no target type)
|
||||
this.castTerm = null;
|
||||
_this.operand = operand;
|
||||
_this.targetType = null; // Target type for an object literal (null if no target type)
|
||||
_this.castTerm = null;
|
||||
}
|
||||
UnaryExpression.prototype.addToControlFlow = function (context) {
|
||||
_super.prototype.addToControlFlow.call(this, context);
|
||||
@@ -2865,10 +2865,10 @@ var TypeScript;
|
||||
function CallExpression(nodeType, target, arguments) {
|
||||
var _this;
|
||||
_this = _super.call(this, nodeType) || this;
|
||||
this.target = target;
|
||||
this.arguments = arguments;
|
||||
this.signature = null;
|
||||
this.minChar = this.target.minChar;
|
||||
_this.target = target;
|
||||
_this.arguments = arguments;
|
||||
_this.signature = null;
|
||||
_this.minChar = _this.target.minChar;
|
||||
}
|
||||
CallExpression.prototype.typeCheck = function (typeFlow) {
|
||||
if (this.nodeType == NodeType.New) {
|
||||
@@ -2898,8 +2898,8 @@ var TypeScript;
|
||||
function BinaryExpression(nodeType, operand1, operand2) {
|
||||
var _this;
|
||||
_this = _super.call(this, nodeType) || this;
|
||||
this.operand1 = operand1;
|
||||
this.operand2 = operand2;
|
||||
_this.operand1 = operand1;
|
||||
_this.operand2 = operand2;
|
||||
}
|
||||
BinaryExpression.prototype.typeCheck = function (typeFlow) {
|
||||
switch (this.nodeType) {
|
||||
@@ -3051,9 +3051,9 @@ var TypeScript;
|
||||
function ConditionalExpression(operand1, operand2, operand3) {
|
||||
var _this;
|
||||
_this = _super.call(this, NodeType.ConditionalExpression) || this;
|
||||
this.operand1 = operand1;
|
||||
this.operand2 = operand2;
|
||||
this.operand3 = operand3;
|
||||
_this.operand1 = operand1;
|
||||
_this.operand2 = operand2;
|
||||
_this.operand3 = operand3;
|
||||
}
|
||||
ConditionalExpression.prototype.typeCheck = function (typeFlow) {
|
||||
return typeFlow.typeCheckQMark(this);
|
||||
@@ -3077,9 +3077,9 @@ var TypeScript;
|
||||
function NumberLiteral(value, hasEmptyFraction) {
|
||||
var _this;
|
||||
_this = _super.call(this, NodeType.NumberLit) || this;
|
||||
this.value = value;
|
||||
this.hasEmptyFraction = hasEmptyFraction;
|
||||
this.isNegativeZero = false;
|
||||
_this.value = value;
|
||||
_this.hasEmptyFraction = hasEmptyFraction;
|
||||
_this.isNegativeZero = false;
|
||||
}
|
||||
NumberLiteral.prototype.typeCheck = function (typeFlow) {
|
||||
this.type = typeFlow.doubleType;
|
||||
@@ -3119,7 +3119,7 @@ var TypeScript;
|
||||
function RegexLiteral(regex) {
|
||||
var _this;
|
||||
_this = _super.call(this, NodeType.Regex) || this;
|
||||
this.regex = regex;
|
||||
_this.regex = regex;
|
||||
}
|
||||
RegexLiteral.prototype.typeCheck = function (typeFlow) {
|
||||
this.type = typeFlow.regexType;
|
||||
@@ -3140,7 +3140,7 @@ var TypeScript;
|
||||
function StringLiteral(text) {
|
||||
var _this;
|
||||
_this = _super.call(this, NodeType.QString) || this;
|
||||
this.text = text;
|
||||
_this.text = text;
|
||||
}
|
||||
StringLiteral.prototype.emit = function (emitter, tokenId, startLine) {
|
||||
emitter.emitParensAndCommentsInPlace(this, true);
|
||||
@@ -3176,10 +3176,10 @@ var TypeScript;
|
||||
function ImportDeclaration(id, alias) {
|
||||
var _this;
|
||||
_this = _super.call(this, NodeType.ImportDeclaration) || this;
|
||||
this.id = id;
|
||||
this.alias = alias;
|
||||
this.varFlags = VarFlags.None;
|
||||
this.isDynamicImport = false;
|
||||
_this.id = id;
|
||||
_this.alias = alias;
|
||||
_this.varFlags = VarFlags.None;
|
||||
_this.isDynamicImport = false;
|
||||
}
|
||||
ImportDeclaration.prototype.isStatementOrExpression = function () { return true; };
|
||||
ImportDeclaration.prototype.emit = function (emitter, tokenId, startLine) {
|
||||
@@ -3236,12 +3236,12 @@ var TypeScript;
|
||||
function BoundDecl(id, nodeType, nestingLevel) {
|
||||
var _this;
|
||||
_this = _super.call(this, nodeType) || this;
|
||||
this.id = id;
|
||||
this.nestingLevel = nestingLevel;
|
||||
this.init = null;
|
||||
this.typeExpr = null;
|
||||
this.varFlags = VarFlags.None;
|
||||
this.sym = null;
|
||||
_this.id = id;
|
||||
_this.nestingLevel = nestingLevel;
|
||||
_this.init = null;
|
||||
_this.typeExpr = null;
|
||||
_this.varFlags = VarFlags.None;
|
||||
_this.sym = null;
|
||||
}
|
||||
BoundDecl.prototype.isStatementOrExpression = function () { return true; };
|
||||
BoundDecl.prototype.isPrivate = function () { return hasFlag(this.varFlags, VarFlags.Private); };
|
||||
@@ -3279,8 +3279,8 @@ var TypeScript;
|
||||
function ArgDecl(id) {
|
||||
var _this;
|
||||
_this = _super.call(this, id, NodeType.ArgDecl, 0) || this;
|
||||
this.isOptional = false;
|
||||
this.parameterPropertySym = null;
|
||||
_this.isOptional = false;
|
||||
_this.parameterPropertySym = null;
|
||||
}
|
||||
ArgDecl.prototype.isOptionalArg = function () { return this.isOptional || this.init; };
|
||||
ArgDecl.prototype.treeViewLabel = function () {
|
||||
@@ -3302,35 +3302,35 @@ var TypeScript;
|
||||
function FuncDecl(name, bod, isConstructor, arguments, vars, scopes, statics, nodeType) {
|
||||
var _this;
|
||||
_this = _super.call(this, nodeType) || this;
|
||||
this.name = name;
|
||||
this.bod = bod;
|
||||
this.isConstructor = isConstructor;
|
||||
this.arguments = arguments;
|
||||
this.vars = vars;
|
||||
this.scopes = scopes;
|
||||
this.statics = statics;
|
||||
this.hint = null;
|
||||
this.fncFlags = FncFlags.None;
|
||||
this.returnTypeAnnotation = null;
|
||||
this.variableArgList = false;
|
||||
this.jumpRefs = null;
|
||||
this.internalNameCache = null;
|
||||
this.tmp1Declared = false;
|
||||
this.enclosingFnc = null;
|
||||
this.freeVariables = [];
|
||||
this.unitIndex = -1;
|
||||
this.classDecl = null;
|
||||
this.boundToProperty = null;
|
||||
this.isOverload = false;
|
||||
this.innerStaticFuncs = [];
|
||||
this.isTargetTypedAsMethod = false;
|
||||
this.isInlineCallLiteral = false;
|
||||
this.accessorSymbol = null;
|
||||
this.leftCurlyCount = 0;
|
||||
this.rightCurlyCount = 0;
|
||||
this.returnStatementsWithExpressions = [];
|
||||
this.scopeType = null; // Type of the FuncDecl, before target typing
|
||||
this.endingToken = null;
|
||||
_this.name = name;
|
||||
_this.bod = bod;
|
||||
_this.isConstructor = isConstructor;
|
||||
_this.arguments = arguments;
|
||||
_this.vars = vars;
|
||||
_this.scopes = scopes;
|
||||
_this.statics = statics;
|
||||
_this.hint = null;
|
||||
_this.fncFlags = FncFlags.None;
|
||||
_this.returnTypeAnnotation = null;
|
||||
_this.variableArgList = false;
|
||||
_this.jumpRefs = null;
|
||||
_this.internalNameCache = null;
|
||||
_this.tmp1Declared = false;
|
||||
_this.enclosingFnc = null;
|
||||
_this.freeVariables = [];
|
||||
_this.unitIndex = -1;
|
||||
_this.classDecl = null;
|
||||
_this.boundToProperty = null;
|
||||
_this.isOverload = false;
|
||||
_this.innerStaticFuncs = [];
|
||||
_this.isTargetTypedAsMethod = false;
|
||||
_this.isInlineCallLiteral = false;
|
||||
_this.accessorSymbol = null;
|
||||
_this.leftCurlyCount = 0;
|
||||
_this.rightCurlyCount = 0;
|
||||
_this.returnStatementsWithExpressions = [];
|
||||
_this.scopeType = null; // Type of the FuncDecl, before target typing
|
||||
_this.endingToken = null;
|
||||
}
|
||||
FuncDecl.prototype.internalName = function () {
|
||||
if (this.internalNameCache == null) {
|
||||
@@ -3443,21 +3443,21 @@ var TypeScript;
|
||||
function Script(vars, scopes) {
|
||||
var _this;
|
||||
_this = _super.call(this, new Identifier("script"), null, false, null, vars, scopes, null, NodeType.Script) || this;
|
||||
this.locationInfo = null;
|
||||
this.referencedFiles = [];
|
||||
this.requiresGlobal = false;
|
||||
this.requiresInherits = false;
|
||||
this.isResident = false;
|
||||
this.isDeclareFile = false;
|
||||
this.hasBeenTypeChecked = false;
|
||||
this.topLevelMod = null;
|
||||
this.leftCurlyCount = 0;
|
||||
this.rightCurlyCount = 0;
|
||||
_this.locationInfo = null;
|
||||
_this.referencedFiles = [];
|
||||
_this.requiresGlobal = false;
|
||||
_this.requiresInherits = false;
|
||||
_this.isResident = false;
|
||||
_this.isDeclareFile = false;
|
||||
_this.hasBeenTypeChecked = false;
|
||||
_this.topLevelMod = null;
|
||||
_this.leftCurlyCount = 0;
|
||||
_this.rightCurlyCount = 0;
|
||||
// Remember if the script contains Unicode chars, that is needed when generating code for this script object to decide the output file correct encoding.
|
||||
this.containsUnicodeChar = false;
|
||||
this.containsUnicodeCharInComment = false;
|
||||
this.vars = vars;
|
||||
this.scopes = scopes;
|
||||
_this.containsUnicodeChar = false;
|
||||
_this.containsUnicodeCharInComment = false;
|
||||
_this.vars = vars;
|
||||
_this.scopes = scopes;
|
||||
}
|
||||
Script.prototype.typeCheck = function (typeFlow) {
|
||||
return typeFlow.typeCheckScript(this);
|
||||
@@ -3513,10 +3513,10 @@ var TypeScript;
|
||||
function NamedDeclaration(nodeType, name, members) {
|
||||
var _this;
|
||||
_this = _super.call(this, nodeType) || this;
|
||||
this.name = name;
|
||||
this.members = members;
|
||||
this.leftCurlyCount = 0;
|
||||
this.rightCurlyCount = 0;
|
||||
_this.name = name;
|
||||
_this.members = members;
|
||||
_this.leftCurlyCount = 0;
|
||||
_this.rightCurlyCount = 0;
|
||||
}
|
||||
return NamedDeclaration;
|
||||
}(ModuleElement));
|
||||
@@ -3526,15 +3526,15 @@ var TypeScript;
|
||||
function ModuleDeclaration(name, members, vars, scopes, endingToken) {
|
||||
var _this;
|
||||
_this = _super.call(this, NodeType.ModuleDeclaration, name, members) || this;
|
||||
this.endingToken = endingToken;
|
||||
this.modFlags = ModuleFlags.ShouldEmitModuleDecl;
|
||||
this.amdDependencies = [];
|
||||
_this.endingToken = endingToken;
|
||||
_this.modFlags = ModuleFlags.ShouldEmitModuleDecl;
|
||||
_this.amdDependencies = [];
|
||||
// Remember if the module contains Unicode chars, that is needed for dynamic module as we will generate a file for each.
|
||||
this.containsUnicodeChar = false;
|
||||
this.containsUnicodeCharInComment = false;
|
||||
this.vars = vars;
|
||||
this.scopes = scopes;
|
||||
this.prettyName = this.name.actualText;
|
||||
_this.containsUnicodeChar = false;
|
||||
_this.containsUnicodeCharInComment = false;
|
||||
_this.vars = vars;
|
||||
_this.scopes = scopes;
|
||||
_this.prettyName = _this.name.actualText;
|
||||
}
|
||||
ModuleDeclaration.prototype.isExported = function () { return hasFlag(this.modFlags, ModuleFlags.Exported); };
|
||||
ModuleDeclaration.prototype.isAmbient = function () { return hasFlag(this.modFlags, ModuleFlags.Ambient); };
|
||||
@@ -3562,9 +3562,9 @@ var TypeScript;
|
||||
function TypeDeclaration(nodeType, name, extendsList, implementsList, members) {
|
||||
var _this;
|
||||
_this = _super.call(this, nodeType, name, members) || this;
|
||||
this.extendsList = extendsList;
|
||||
this.implementsList = implementsList;
|
||||
this.varFlags = VarFlags.None;
|
||||
_this.extendsList = extendsList;
|
||||
_this.implementsList = implementsList;
|
||||
_this.varFlags = VarFlags.None;
|
||||
}
|
||||
TypeDeclaration.prototype.isExported = function () {
|
||||
return hasFlag(this.varFlags, VarFlags.Exported);
|
||||
@@ -3580,10 +3580,10 @@ var TypeScript;
|
||||
function ClassDeclaration(name, members, extendsList, implementsList) {
|
||||
var _this;
|
||||
_this = _super.call(this, NodeType.ClassDeclaration, name, extendsList, implementsList, members) || this;
|
||||
this.knownMemberNames = {};
|
||||
this.constructorDecl = null;
|
||||
this.constructorNestingLevel = 0;
|
||||
this.endingToken = null;
|
||||
_this.knownMemberNames = {};
|
||||
_this.constructorDecl = null;
|
||||
_this.constructorNestingLevel = 0;
|
||||
_this.endingToken = null;
|
||||
}
|
||||
ClassDeclaration.prototype.typeCheck = function (typeFlow) {
|
||||
return typeFlow.typeCheckClass(this);
|
||||
@@ -3613,7 +3613,7 @@ var TypeScript;
|
||||
function Statement(nodeType) {
|
||||
var _this;
|
||||
_this = _super.call(this, nodeType) || this;
|
||||
this.flags |= ASTFlags.IsStatement;
|
||||
_this.flags |= ASTFlags.IsStatement;
|
||||
}
|
||||
Statement.prototype.isLoop = function () { return false; };
|
||||
Statement.prototype.isStatementOrExpression = function () { return true; };
|
||||
@@ -3630,8 +3630,8 @@ var TypeScript;
|
||||
function LabeledStatement(labels, stmt) {
|
||||
var _this;
|
||||
_this = _super.call(this, NodeType.LabeledStatement) || this;
|
||||
this.labels = labels;
|
||||
this.stmt = stmt;
|
||||
_this.labels = labels;
|
||||
_this.stmt = stmt;
|
||||
}
|
||||
LabeledStatement.prototype.emit = function (emitter, tokenId, startLine) {
|
||||
emitter.emitParensAndCommentsInPlace(this, true);
|
||||
@@ -3665,8 +3665,8 @@ var TypeScript;
|
||||
function Block(statements, isStatementBlock) {
|
||||
var _this;
|
||||
_this = _super.call(this, NodeType.Block) || this;
|
||||
this.statements = statements;
|
||||
this.isStatementBlock = isStatementBlock;
|
||||
_this.statements = statements;
|
||||
_this.isStatementBlock = isStatementBlock;
|
||||
}
|
||||
Block.prototype.emit = function (emitter, tokenId, startLine) {
|
||||
emitter.emitParensAndCommentsInPlace(this, true);
|
||||
@@ -3721,8 +3721,8 @@ var TypeScript;
|
||||
function Jump(nodeType) {
|
||||
var _this;
|
||||
_this = _super.call(this, nodeType) || this;
|
||||
this.target = null;
|
||||
this.resolvedTarget = null;
|
||||
_this.target = null;
|
||||
_this.resolvedTarget = null;
|
||||
}
|
||||
Jump.prototype.hasExplicitTarget = function () { return (this.target); };
|
||||
Jump.prototype.setResolvedTarget = function (parser, stmt) {
|
||||
@@ -3773,8 +3773,8 @@ var TypeScript;
|
||||
function WhileStatement(cond) {
|
||||
var _this;
|
||||
_this = _super.call(this, NodeType.While) || this;
|
||||
this.cond = cond;
|
||||
this.body = null;
|
||||
_this.cond = cond;
|
||||
_this.body = null;
|
||||
}
|
||||
WhileStatement.prototype.isLoop = function () { return true; };
|
||||
WhileStatement.prototype.emit = function (emitter, tokenId, startLine) {
|
||||
@@ -3826,9 +3826,9 @@ var TypeScript;
|
||||
function DoWhileStatement() {
|
||||
var _this;
|
||||
_this = _super.call(this, NodeType.DoWhile) || this;
|
||||
this.body = null;
|
||||
this.whileAST = null;
|
||||
this.cond = null;
|
||||
_this.body = null;
|
||||
_this.whileAST = null;
|
||||
_this.cond = null;
|
||||
}
|
||||
DoWhileStatement.prototype.isLoop = function () { return true; };
|
||||
DoWhileStatement.prototype.emit = function (emitter, tokenId, startLine) {
|
||||
@@ -3883,9 +3883,9 @@ var TypeScript;
|
||||
function IfStatement(cond) {
|
||||
var _this;
|
||||
_this = _super.call(this, NodeType.If) || this;
|
||||
this.cond = cond;
|
||||
this.elseBod = null;
|
||||
this.statement = new ASTSpan();
|
||||
_this.cond = cond;
|
||||
_this.elseBod = null;
|
||||
_this.statement = new ASTSpan();
|
||||
}
|
||||
IfStatement.prototype.isCompoundStatement = function () { return true; };
|
||||
IfStatement.prototype.emit = function (emitter, tokenId, startLine) {
|
||||
@@ -3962,7 +3962,7 @@ var TypeScript;
|
||||
function ReturnStatement() {
|
||||
var _this;
|
||||
_this = _super.call(this, NodeType.Return) || this;
|
||||
this.returnExpression = null;
|
||||
_this.returnExpression = null;
|
||||
}
|
||||
ReturnStatement.prototype.emit = function (emitter, tokenId, startLine) {
|
||||
emitter.emitParensAndCommentsInPlace(this, true);
|
||||
@@ -4003,11 +4003,11 @@ var TypeScript;
|
||||
function ForInStatement(lval, obj) {
|
||||
var _this;
|
||||
_this = _super.call(this, NodeType.ForIn) || this;
|
||||
this.lval = lval;
|
||||
this.obj = obj;
|
||||
this.statement = new ASTSpan();
|
||||
if (this.lval && (this.lval.nodeType == NodeType.VarDecl)) {
|
||||
this.lval.varFlags |= VarFlags.AutoInit;
|
||||
_this.lval = lval;
|
||||
_this.obj = obj;
|
||||
_this.statement = new ASTSpan();
|
||||
if (_this.lval && (_this.lval.nodeType == NodeType.VarDecl)) {
|
||||
_this.lval.varFlags |= VarFlags.AutoInit;
|
||||
}
|
||||
}
|
||||
ForInStatement.prototype.isLoop = function () { return true; };
|
||||
@@ -4119,7 +4119,7 @@ var TypeScript;
|
||||
function ForStatement(init) {
|
||||
var _this;
|
||||
_this = _super.call(this, NodeType.For) || this;
|
||||
this.init = init;
|
||||
_this.init = init;
|
||||
}
|
||||
ForStatement.prototype.isLoop = function () { return true; };
|
||||
ForStatement.prototype.emit = function (emitter, tokenId, startLine) {
|
||||
@@ -4211,8 +4211,8 @@ var TypeScript;
|
||||
function WithStatement(expr) {
|
||||
var _this;
|
||||
_this = _super.call(this, NodeType.With) || this;
|
||||
this.expr = expr;
|
||||
this.withSym = null;
|
||||
_this.expr = expr;
|
||||
_this.withSym = null;
|
||||
}
|
||||
WithStatement.prototype.isCompoundStatement = function () { return true; };
|
||||
WithStatement.prototype.emit = function (emitter, tokenId, startLine) {
|
||||
@@ -4238,9 +4238,9 @@ var TypeScript;
|
||||
function SwitchStatement(val) {
|
||||
var _this;
|
||||
_this = _super.call(this, NodeType.Switch) || this;
|
||||
this.val = val;
|
||||
this.defaultCase = null;
|
||||
this.statement = new ASTSpan();
|
||||
_this.val = val;
|
||||
_this.defaultCase = null;
|
||||
_this.statement = new ASTSpan();
|
||||
}
|
||||
SwitchStatement.prototype.isCompoundStatement = function () { return true; };
|
||||
SwitchStatement.prototype.emit = function (emitter, tokenId, startLine) {
|
||||
@@ -4311,7 +4311,7 @@ var TypeScript;
|
||||
function CaseStatement() {
|
||||
var _this;
|
||||
_this = _super.call(this, NodeType.Case) || this;
|
||||
this.expr = null;
|
||||
_this.expr = null;
|
||||
}
|
||||
CaseStatement.prototype.emit = function (emitter, tokenId, startLine) {
|
||||
emitter.emitParensAndCommentsInPlace(this, true);
|
||||
@@ -4365,8 +4365,8 @@ var TypeScript;
|
||||
function TypeReference(term, arrayCount) {
|
||||
var _this;
|
||||
_this = _super.call(this, NodeType.TypeRef) || this;
|
||||
this.term = term;
|
||||
this.arrayCount = arrayCount;
|
||||
_this.term = term;
|
||||
_this.arrayCount = arrayCount;
|
||||
}
|
||||
TypeReference.prototype.emit = function (emitter, tokenId, startLine) {
|
||||
throw new Error("should not emit a type ref");
|
||||
@@ -4396,8 +4396,8 @@ var TypeScript;
|
||||
function TryFinally(tryNode, finallyNode) {
|
||||
var _this;
|
||||
_this = _super.call(this, NodeType.TryFinally) || this;
|
||||
this.tryNode = tryNode;
|
||||
this.finallyNode = finallyNode;
|
||||
_this.tryNode = tryNode;
|
||||
_this.finallyNode = finallyNode;
|
||||
}
|
||||
TryFinally.prototype.isCompoundStatement = function () { return true; };
|
||||
TryFinally.prototype.emit = function (emitter, tokenId, startLine) {
|
||||
@@ -4442,8 +4442,8 @@ var TypeScript;
|
||||
function TryCatch(tryNode, catchNode) {
|
||||
var _this;
|
||||
_this = _super.call(this, NodeType.TryCatch) || this;
|
||||
this.tryNode = tryNode;
|
||||
this.catchNode = catchNode;
|
||||
_this.tryNode = tryNode;
|
||||
_this.catchNode = catchNode;
|
||||
}
|
||||
TryCatch.prototype.isCompoundStatement = function () { return true; };
|
||||
TryCatch.prototype.emit = function (emitter, tokenId, startLine) {
|
||||
@@ -4493,7 +4493,7 @@ var TypeScript;
|
||||
function Try(body) {
|
||||
var _this;
|
||||
_this = _super.call(this, NodeType.Try) || this;
|
||||
this.body = body;
|
||||
_this.body = body;
|
||||
}
|
||||
Try.prototype.emit = function (emitter, tokenId, startLine) {
|
||||
emitter.emitParensAndCommentsInPlace(this, true);
|
||||
@@ -4522,12 +4522,12 @@ var TypeScript;
|
||||
function Catch(param, body) {
|
||||
var _this;
|
||||
_this = _super.call(this, NodeType.Catch) || this;
|
||||
this.param = param;
|
||||
this.body = body;
|
||||
this.statement = new ASTSpan();
|
||||
this.containedScope = null;
|
||||
if (this.param) {
|
||||
this.param.varFlags |= VarFlags.AutoInit;
|
||||
_this.param = param;
|
||||
_this.body = body;
|
||||
_this.statement = new ASTSpan();
|
||||
_this.containedScope = null;
|
||||
if (_this.param) {
|
||||
_this.param.varFlags |= VarFlags.AutoInit;
|
||||
}
|
||||
}
|
||||
Catch.prototype.emit = function (emitter, tokenId, startLine) {
|
||||
@@ -4596,7 +4596,7 @@ var TypeScript;
|
||||
function Finally(body) {
|
||||
var _this;
|
||||
_this = _super.call(this, NodeType.Finally) || this;
|
||||
this.body = body;
|
||||
_this.body = body;
|
||||
}
|
||||
Finally.prototype.emit = function (emitter, tokenId, startLine) {
|
||||
emitter.emitParensAndCommentsInPlace(this, true);
|
||||
@@ -4625,10 +4625,10 @@ var TypeScript;
|
||||
function Comment(content, isBlockComment, endsLine) {
|
||||
var _this;
|
||||
_this = _super.call(this, NodeType.Comment) || this;
|
||||
this.content = content;
|
||||
this.isBlockComment = isBlockComment;
|
||||
this.endsLine = endsLine;
|
||||
this.text = null;
|
||||
_this.content = content;
|
||||
_this.isBlockComment = isBlockComment;
|
||||
_this.endsLine = endsLine;
|
||||
_this.text = null;
|
||||
}
|
||||
Comment.prototype.getText = function () {
|
||||
if (this.text == null) {
|
||||
|
||||
@@ -2382,8 +2382,8 @@ var Harness;
|
||||
function TestCase(description, block) {
|
||||
var _this;
|
||||
_this = _super.call(this, description, block) || this;
|
||||
this.description = description;
|
||||
this.block = block;
|
||||
_this.description = description;
|
||||
_this.block = block;
|
||||
}
|
||||
TestCase.prototype.addChild = function (child) {
|
||||
throw new Error("Testcases may not be nested inside other testcases");
|
||||
@@ -2417,8 +2417,8 @@ var Harness;
|
||||
function Scenario(description, block) {
|
||||
var _this;
|
||||
_this = _super.call(this, description, block) || this;
|
||||
this.description = description;
|
||||
this.block = block;
|
||||
_this.description = description;
|
||||
_this.block = block;
|
||||
}
|
||||
/** Run the block, and if the block doesn't raise an error, run the children. */
|
||||
Scenario.prototype.run = function (done) {
|
||||
|
||||
@@ -29,8 +29,8 @@ var Derived = (function (_super) {
|
||||
function Derived() {
|
||||
var _this;
|
||||
_this = _super.apply(this, arguments) || this;
|
||||
this.x = _super.prototype.foo; // error
|
||||
this.z = _super.prototype.foo; // error
|
||||
_this.x = _super.prototype.foo; // error
|
||||
_this.z = _super.prototype.foo; // error
|
||||
}
|
||||
Derived.prototype.y = function () {
|
||||
return _super.prototype.foo; // error
|
||||
|
||||
@@ -24,7 +24,7 @@ var Derived = (function (_super) {
|
||||
function Derived() {
|
||||
var _this;
|
||||
_this = _super.apply(this, arguments) || this;
|
||||
this.bing = function () { return Base.foo; }; // error
|
||||
_this.bing = function () { return Base.foo; }; // error
|
||||
}
|
||||
return Derived;
|
||||
}(Base));
|
||||
|
||||
@@ -59,7 +59,7 @@ var B = (function (_super) {
|
||||
var _this;
|
||||
_this = _super.call(this, x) || this;
|
||||
// Fails, x is readonly
|
||||
this.x = 1;
|
||||
_this.x = 1;
|
||||
}
|
||||
return B;
|
||||
}(A));
|
||||
@@ -70,8 +70,8 @@ var C = (function (_super) {
|
||||
function C(x) {
|
||||
var _this;
|
||||
_this = _super.call(this, x) || this;
|
||||
this.x = x;
|
||||
this.x = 1;
|
||||
_this.x = x;
|
||||
_this.x = 1;
|
||||
}
|
||||
return C;
|
||||
}(A));
|
||||
@@ -88,8 +88,8 @@ var E = (function (_super) {
|
||||
function E(x) {
|
||||
var _this;
|
||||
_this = _super.call(this, x) || this;
|
||||
this.x = x;
|
||||
this.x = 1;
|
||||
_this.x = x;
|
||||
_this.x = 1;
|
||||
}
|
||||
return E;
|
||||
}(D));
|
||||
|
||||
@@ -27,8 +27,8 @@ var D = (function (_super) {
|
||||
function D() {
|
||||
var _this;
|
||||
_this = _super.call(this) || this;
|
||||
this.v = 1;
|
||||
this.p = 1;
|
||||
_this.v = 1;
|
||||
_this.p = 1;
|
||||
C.s = 1;
|
||||
}
|
||||
return D;
|
||||
|
||||
@@ -29,8 +29,8 @@ var B = (function (_super) {
|
||||
function B() {
|
||||
var _this;
|
||||
_this = _super.apply(this, arguments) || this;
|
||||
this.p1 = doThing(A); // OK
|
||||
this.p2 = doThing(B); // OK
|
||||
_this.p1 = doThing(A); // OK
|
||||
_this.p2 = doThing(B); // OK
|
||||
}
|
||||
return B;
|
||||
}(A));
|
||||
|
||||
@@ -60,7 +60,7 @@ var C = (function (_super) {
|
||||
__extends(C, _super);
|
||||
function C() {
|
||||
var _this;
|
||||
this.p = 10;
|
||||
_this.p = 10;
|
||||
var x = 1; // should error
|
||||
}
|
||||
return C;
|
||||
@@ -69,7 +69,7 @@ var D = (function (_super) {
|
||||
__extends(D, _super);
|
||||
function D() {
|
||||
var _this;
|
||||
this.p = 11;
|
||||
_this.p = 11;
|
||||
var x = 1; // should error
|
||||
}
|
||||
return D;
|
||||
@@ -78,7 +78,7 @@ var E = (function (_super) {
|
||||
__extends(E, _super);
|
||||
function E() {
|
||||
var _this;
|
||||
this.p = 12;
|
||||
_this.p = 12;
|
||||
var x = 1; // should error
|
||||
}
|
||||
return E;
|
||||
|
||||
@@ -77,7 +77,7 @@ var B = (function (_super) {
|
||||
var _this;
|
||||
"use strict"; // No error
|
||||
_this = _super.call(this) || this;
|
||||
this.s = 9;
|
||||
_this.s = 9;
|
||||
}
|
||||
return B;
|
||||
}(A));
|
||||
@@ -86,7 +86,7 @@ var C = (function (_super) {
|
||||
function C() {
|
||||
var _this;
|
||||
_this = _super.call(this) || this; // No error
|
||||
this.s = 9;
|
||||
_this.s = 9;
|
||||
"use strict";
|
||||
}
|
||||
return C;
|
||||
@@ -95,7 +95,7 @@ var D = (function (_super) {
|
||||
__extends(D, _super);
|
||||
function D() {
|
||||
var _this;
|
||||
this.s = 9;
|
||||
_this.s = 9;
|
||||
var x = 1; // Error
|
||||
_this = _super.call(this) || this;
|
||||
"use strict";
|
||||
|
||||
@@ -46,8 +46,8 @@ var Q = (function (_super) {
|
||||
if (zz === void 0) { zz = _super.; }
|
||||
if (zzz === void 0) { zzz = function () { return _super.; }; }
|
||||
_this = _super.call(this) || this;
|
||||
this.z = z;
|
||||
this.xx = _super.prototype.;
|
||||
_this.z = z;
|
||||
_this.xx = _super.prototype.;
|
||||
}
|
||||
Q.prototype.foo = function (zz) {
|
||||
if (zz === void 0) { zz = _super.prototype.; }
|
||||
|
||||
@@ -44,7 +44,7 @@ var T6 = (function (_super) {
|
||||
// Should error; base constructor has type T for first arg,
|
||||
// which is instantiated with 'number' in the extends clause
|
||||
_this = _super.call(this, "hi") || this;
|
||||
var x = this.foo;
|
||||
var x = _this.foo;
|
||||
}
|
||||
return T6;
|
||||
}(T5));
|
||||
|
||||
@@ -33,7 +33,7 @@ var D = (function (_super) {
|
||||
var _this;
|
||||
_this = _super.call(this, i) || this;
|
||||
var s = {
|
||||
t: this._t
|
||||
t: _this._t
|
||||
};
|
||||
var i = Factory.create(s);
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ var D = (function (_super) {
|
||||
var _this;
|
||||
var x = function () { _this._t; };
|
||||
x(); // no error; we only check super is called before this when the container is a constructor
|
||||
this._t; // error
|
||||
_this._t; // error
|
||||
_this = _super.call(this, undefined) || this;
|
||||
}
|
||||
return D;
|
||||
|
||||
@@ -25,7 +25,7 @@ var D = (function (_super) {
|
||||
__extends(D, _super);
|
||||
function D() {
|
||||
var _this;
|
||||
this._t;
|
||||
_this._t;
|
||||
_this = _super.call(this) || this;
|
||||
}
|
||||
return D;
|
||||
@@ -35,7 +35,7 @@ var E = (function (_super) {
|
||||
function E() {
|
||||
var _this;
|
||||
_this = _super.call(this) || this;
|
||||
this._t;
|
||||
_this._t;
|
||||
}
|
||||
return E;
|
||||
}(null));
|
||||
|
||||
@@ -17,7 +17,7 @@ var D = (function (_super) {
|
||||
__extends(D, _super);
|
||||
function D() {
|
||||
var _this;
|
||||
this._t; // No error
|
||||
_this._t; // No error
|
||||
}
|
||||
return D;
|
||||
}(null));
|
||||
|
||||
@@ -25,7 +25,7 @@ var D = (function (_super) {
|
||||
__extends(D, _super);
|
||||
function D() {
|
||||
var _this;
|
||||
_this = _super.call(this, this) || this;
|
||||
_this = _super.call(this, _this) || this;
|
||||
}
|
||||
return D;
|
||||
}(Base));
|
||||
|
||||
@@ -29,7 +29,7 @@ var D = (function (_super) {
|
||||
function D() {
|
||||
var _this;
|
||||
var x = {
|
||||
j: this._t
|
||||
j: _this._t
|
||||
};
|
||||
_this = _super.call(this, undefined) || this;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ var D = (function (_super) {
|
||||
var _this;
|
||||
var x = {
|
||||
k: _this = _super.call(this, undefined) || this,
|
||||
j: this._t
|
||||
j: _this._t
|
||||
};
|
||||
}
|
||||
return D;
|
||||
|
||||
@@ -68,9 +68,9 @@ var Other = (function (_super) {
|
||||
function Other() {
|
||||
var _this;
|
||||
_this = _super.call(this) || this;
|
||||
this.propertyInitializer = _super.prototype.instanceMethod.call(this);
|
||||
this.functionProperty = function () { _super.prototype.instanceMethod.call(_this); };
|
||||
_super.prototype.instanceMethod.call(this);
|
||||
_this.propertyInitializer = _super.prototype.instanceMethod.call(_this);
|
||||
_this.functionProperty = function () { _super.prototype.instanceMethod.call(_this); };
|
||||
_super.prototype.instanceMethod.call(_this);
|
||||
}
|
||||
// in instance method
|
||||
Other.prototype.instanceMethod = function () {
|
||||
|
||||
@@ -39,9 +39,9 @@ var D = (function (_super) {
|
||||
function D() {
|
||||
var _this;
|
||||
_this = _super.call(this) || this;
|
||||
this.x = _this = _super.call(this) || this;
|
||||
_this.x = _this = _super.call(this) || this;
|
||||
var y = function () {
|
||||
_this = _super.call(_this) || _this;
|
||||
_this = _super.call(this) || this;
|
||||
};
|
||||
var y2 = function () {
|
||||
_this = _super.call(this) || this;
|
||||
|
||||
@@ -57,7 +57,7 @@ var C = (function (_super) {
|
||||
}) || this;
|
||||
// Should be okay.
|
||||
// 'p' should have type 'string'.
|
||||
_super.prototype.foo.call(this, {
|
||||
_super.prototype.foo.call(_this, {
|
||||
method: function (p) {
|
||||
p.length;
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ var Derived = (function (_super) {
|
||||
function Derived(q) {
|
||||
var _this;
|
||||
_this = _super.call(this, '') || this;
|
||||
this.q = q;
|
||||
_this.q = q;
|
||||
//type of super call expression is void
|
||||
var p = _this = _super.call(this, '') || this;
|
||||
var p = v();
|
||||
|
||||
@@ -78,7 +78,7 @@ var RegisteredUser = (function (_super) {
|
||||
function RegisteredUser() {
|
||||
var _this;
|
||||
_this = _super.call(this) || this;
|
||||
this.name = "Frank";
|
||||
_this.name = "Frank";
|
||||
// super call in an inner function in a constructor
|
||||
function inner() {
|
||||
_super.sayHello.call(this);
|
||||
|
||||
@@ -28,7 +28,7 @@ var C = (function (_super) {
|
||||
__extends(C, _super);
|
||||
function C(a) {
|
||||
var _this;
|
||||
if (a === void 0) { a = _super.foo.call(this); }
|
||||
if (a === void 0) { a = _super.foo.call(_this); }
|
||||
}
|
||||
return C;
|
||||
}(B));
|
||||
|
||||
@@ -87,9 +87,9 @@ var RegisteredUser = (function (_super) {
|
||||
function RegisteredUser() {
|
||||
var _this;
|
||||
_this = _super.call(this) || this;
|
||||
this.name = "Frank";
|
||||
_this.name = "Frank";
|
||||
// super call in a constructor
|
||||
_super.prototype.sayHello.call(this);
|
||||
_super.prototype.sayHello.call(_this);
|
||||
// super call in a lambda in a constructor
|
||||
var x = function () { return _super.prototype.sayHello.call(_this); };
|
||||
}
|
||||
@@ -107,7 +107,7 @@ var RegisteredUser2 = (function (_super) {
|
||||
function RegisteredUser2() {
|
||||
var _this;
|
||||
_this = _super.call(this) || this;
|
||||
this.name = "Joe";
|
||||
_this.name = "Joe";
|
||||
// super call in a nested lambda in a constructor
|
||||
var x = function () { return function () { return function () { return _super.prototype.sayHello.call(_this); }; }; };
|
||||
}
|
||||
@@ -123,7 +123,7 @@ var RegisteredUser3 = (function (_super) {
|
||||
function RegisteredUser3() {
|
||||
var _this;
|
||||
_this = _super.call(this) || this;
|
||||
this.name = "Sam";
|
||||
_this.name = "Sam";
|
||||
// super property in a nested lambda in a constructor
|
||||
var superName = function () { return function () { return function () { return _super.prototype.name; }; }; };
|
||||
}
|
||||
@@ -139,7 +139,7 @@ var RegisteredUser4 = (function (_super) {
|
||||
function RegisteredUser4() {
|
||||
var _this;
|
||||
_this = _super.call(this) || this;
|
||||
this.name = "Mark";
|
||||
_this.name = "Mark";
|
||||
// super in a nested lambda in a constructor
|
||||
var x = function () { return function () { return _super.prototype.; }; };
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ var D = (function (_super) {
|
||||
function D() {
|
||||
var _this;
|
||||
_this = _super.call(this) || this;
|
||||
_super.prototype.bar.call(this);
|
||||
_super.prototype.bar.call(_this);
|
||||
_super.prototype.x; // error
|
||||
}
|
||||
D.prototype.foo = function () {
|
||||
|
||||
@@ -52,7 +52,7 @@ var D = (function (_super) {
|
||||
function D() {
|
||||
var _this;
|
||||
_this = _super.call(this) || this;
|
||||
_super.prototype.bar.call(this); // error
|
||||
_super.prototype.bar.call(_this); // error
|
||||
_super.prototype.x; // error
|
||||
}
|
||||
D.foo = function () {
|
||||
|
||||
@@ -101,7 +101,7 @@ var SomeDerivedClass = (function (_super) {
|
||||
function SomeDerivedClass() {
|
||||
var _this;
|
||||
_this = _super.call(this) || this;
|
||||
var x = _super.prototype.func.call(this);
|
||||
var x = _super.prototype.func.call(_this);
|
||||
var x;
|
||||
}
|
||||
SomeDerivedClass.prototype.fn = function () {
|
||||
|
||||
@@ -51,7 +51,7 @@ var MyDerived = (function (_super) {
|
||||
function MyDerived() {
|
||||
var _this;
|
||||
_this = _super.call(this) || this;
|
||||
var f1 = _super.prototype.getValue.call(this);
|
||||
var f1 = _super.prototype.getValue.call(_this);
|
||||
var f2 = _super.prototype.value;
|
||||
}
|
||||
return MyDerived;
|
||||
|
||||
@@ -24,7 +24,7 @@ var D = (function (_super) {
|
||||
__extends(D, _super);
|
||||
function D() {
|
||||
var _this;
|
||||
_super.prototype..call(this);
|
||||
_super.prototype..call(_this);
|
||||
}
|
||||
return D;
|
||||
}(C));
|
||||
|
||||
@@ -24,7 +24,7 @@ var D = (function (_super) {
|
||||
__extends(D, _super);
|
||||
function D(x) {
|
||||
var _this;
|
||||
_super.prototype..call(this, x);
|
||||
_super.prototype..call(_this, x);
|
||||
}
|
||||
return D;
|
||||
}(C));
|
||||
|
||||
@@ -29,7 +29,7 @@ var D = (function (_super) {
|
||||
__extends(D, _super);
|
||||
function D() {
|
||||
var _this;
|
||||
_super.prototype..call(this);
|
||||
_super.prototype..call(_this);
|
||||
}
|
||||
D.prototype.bar = function () {
|
||||
_super.prototype.bar.call(this, null);
|
||||
|
||||
@@ -71,7 +71,7 @@ var ClassWithNoInitializer = (function (_super) {
|
||||
//'this' in optional super call
|
||||
function ClassWithNoInitializer() {
|
||||
var _this;
|
||||
_this = _super.call(this, this) || this; // Error
|
||||
_this = _super.call(this, _this) || this; // Error
|
||||
}
|
||||
return ClassWithNoInitializer;
|
||||
}(BaseErrClass));
|
||||
@@ -80,8 +80,8 @@ var ClassWithInitializer = (function (_super) {
|
||||
//'this' in required super call
|
||||
function ClassWithInitializer() {
|
||||
var _this;
|
||||
_this = _super.call(this, this) || this; // Error
|
||||
this.t = 4;
|
||||
_this = _super.call(this, _this) || this; // Error
|
||||
_this.t = 4;
|
||||
}
|
||||
return ClassWithInitializer;
|
||||
}(BaseErrClass));
|
||||
|
||||
@@ -72,7 +72,7 @@ var ClassWithNoInitializer = (function (_super) {
|
||||
//'this' in optional super call
|
||||
function ClassWithNoInitializer() {
|
||||
var _this;
|
||||
_this = _super.call(this, this) || this; // error: "super" has to be called before "this" accessing
|
||||
_this = _super.call(this, _this) || this; // error: "super" has to be called before "this" accessing
|
||||
}
|
||||
return ClassWithNoInitializer;
|
||||
}(BaseErrClass));
|
||||
@@ -81,8 +81,8 @@ var ClassWithInitializer = (function (_super) {
|
||||
//'this' in required super call
|
||||
function ClassWithInitializer() {
|
||||
var _this;
|
||||
_this = _super.call(this, this) || this; // Error
|
||||
this.t = 4;
|
||||
_this = _super.call(this, _this) || this; // Error
|
||||
_this.t = 4;
|
||||
}
|
||||
return ClassWithInitializer;
|
||||
}(BaseErrClass));
|
||||
|
||||
@@ -37,7 +37,7 @@ var Foo = (function (_super) {
|
||||
__extends(Foo, _super);
|
||||
function Foo() {
|
||||
var _this;
|
||||
_this = _super.call(this, this) || this; // error: "super" has to be called before "this" accessing
|
||||
_this = _super.call(this, _this) || this; // error: "super" has to be called before "this" accessing
|
||||
}
|
||||
return Foo;
|
||||
}(Base));
|
||||
@@ -45,8 +45,8 @@ var Foo2 = (function (_super) {
|
||||
__extends(Foo2, _super);
|
||||
function Foo2() {
|
||||
var _this;
|
||||
_this = _super.call(this, this) || this; // error
|
||||
this.p = 0;
|
||||
_this = _super.call(this, _this) || this; // error
|
||||
_this.p = 0;
|
||||
}
|
||||
return Foo2;
|
||||
}(Base));
|
||||
@@ -54,8 +54,8 @@ var Foo3 = (function (_super) {
|
||||
__extends(Foo3, _super);
|
||||
function Foo3(p) {
|
||||
var _this;
|
||||
_this = _super.call(this, this) || this; // error
|
||||
this.p = p;
|
||||
_this = _super.call(this, _this) || this; // error
|
||||
_this.p = p;
|
||||
}
|
||||
return Foo3;
|
||||
}(Base));
|
||||
|
||||
@@ -25,8 +25,8 @@ var Foo = (function (_super) {
|
||||
__extends(Foo, _super);
|
||||
function Foo(x) {
|
||||
var _this;
|
||||
_this = _super.call(this, this) || this;
|
||||
this.x = x;
|
||||
_this = _super.call(this, _this) || this;
|
||||
_this.x = x;
|
||||
}
|
||||
return Foo;
|
||||
}(Base));
|
||||
|
||||
@@ -34,7 +34,7 @@ var Foo = (function (_super) {
|
||||
__extends(Foo, _super);
|
||||
function Foo() {
|
||||
var _this;
|
||||
_this = _super.call(this, this) || this; // error: "super" has to be called before "this" accessing
|
||||
_this = _super.call(this, _this) || this; // error: "super" has to be called before "this" accessing
|
||||
}
|
||||
return Foo;
|
||||
}(Base));
|
||||
@@ -42,8 +42,8 @@ var Foo2 = (function (_super) {
|
||||
__extends(Foo2, _super);
|
||||
function Foo2() {
|
||||
var _this;
|
||||
_this = _super.call(this, this) || this; // error
|
||||
this.x = 0;
|
||||
_this = _super.call(this, _this) || this; // error
|
||||
_this.x = 0;
|
||||
}
|
||||
return Foo2;
|
||||
}(Base));
|
||||
|
||||
@@ -27,8 +27,8 @@ var Foo = (function (_super) {
|
||||
__extends(Foo, _super);
|
||||
function Foo() {
|
||||
var _this;
|
||||
_this = _super.call(this, this) || this;
|
||||
this.x = 0;
|
||||
_this = _super.call(this, _this) || this;
|
||||
_this.x = 0;
|
||||
}
|
||||
return Foo;
|
||||
}(Base));
|
||||
|
||||
@@ -32,7 +32,7 @@ var Text = (function (_super) {
|
||||
function Text() {
|
||||
var _this;
|
||||
_this = _super.apply(this, arguments) || this;
|
||||
this._tagName = 'div';
|
||||
_this._tagName = 'div';
|
||||
}
|
||||
Text.prototype.render = function () {
|
||||
return (<this._tagName />);
|
||||
|
||||
@@ -32,7 +32,7 @@ var Text = (function (_super) {
|
||||
function Text() {
|
||||
var _this;
|
||||
_this = _super.apply(this, arguments) || this;
|
||||
this._tagName = 'div';
|
||||
_this._tagName = 'div';
|
||||
}
|
||||
Text.prototype.render = function () {
|
||||
return (<this /> // this should be an error
|
||||
|
||||
@@ -32,7 +32,7 @@ var Text = (function (_super) {
|
||||
function Text() {
|
||||
var _this;
|
||||
_this = _super.apply(this, arguments) || this;
|
||||
this._tagName = 'div';
|
||||
_this._tagName = 'div';
|
||||
}
|
||||
Text.prototype.render = function () {
|
||||
return (<this._tagName> Hello world </this._tagName>);
|
||||
|
||||
@@ -32,7 +32,7 @@ var Text = (function (_super) {
|
||||
function Text() {
|
||||
var _this;
|
||||
_this = _super.apply(this, arguments) || this;
|
||||
this._tagName = 'div';
|
||||
_this._tagName = 'div';
|
||||
}
|
||||
Text.prototype.render = function () {
|
||||
return (<this._tagName> Hello world </this._tagName>);
|
||||
|
||||
@@ -120,7 +120,7 @@ var Test;
|
||||
function File(path, content) {
|
||||
var _this;
|
||||
_this = _super.call(this, path) || this;
|
||||
this.content = content;
|
||||
_this.content = content;
|
||||
}
|
||||
return File;
|
||||
}(FileSystemObject));
|
||||
|
||||
@@ -70,7 +70,7 @@ var Test;
|
||||
function File(path, content) {
|
||||
var _this;
|
||||
_this = _super.call(this, path) || this;
|
||||
this.content = content;
|
||||
_this.content = content;
|
||||
}
|
||||
return File;
|
||||
}(FileSystemObject));
|
||||
|
||||
@@ -74,10 +74,10 @@ var D = (function (_super) {
|
||||
function D() {
|
||||
var _this;
|
||||
_this = _super.apply(this, arguments) || this;
|
||||
this.self1 = this;
|
||||
this.self2 = this.self;
|
||||
this.self3 = this.foo();
|
||||
this.d = new D();
|
||||
_this.self1 = _this;
|
||||
_this.self2 = _this.self;
|
||||
_this.self3 = _this.foo();
|
||||
_this.d = new D();
|
||||
}
|
||||
D.prototype.bar = function () {
|
||||
this.self = this.self1;
|
||||
|
||||
@@ -236,9 +236,9 @@ var ts;
|
||||
function Property(name, type, flags) {
|
||||
var _this;
|
||||
_this = _super.call(this) || this;
|
||||
this.name = name;
|
||||
this.type = type;
|
||||
this.flags = flags;
|
||||
_this.name = name;
|
||||
_this.type = type;
|
||||
_this.flags = flags;
|
||||
}
|
||||
Property.prototype.equals = function (other) {
|
||||
return this.name === other.name &&
|
||||
@@ -257,9 +257,9 @@ var ts;
|
||||
function Signature(typeParameters, parameters, returnType) {
|
||||
var _this;
|
||||
_this = _super.call(this) || this;
|
||||
this.typeParameters = typeParameters;
|
||||
this.parameters = parameters;
|
||||
this.returnType = returnType;
|
||||
_this.typeParameters = typeParameters;
|
||||
_this.parameters = parameters;
|
||||
_this.returnType = returnType;
|
||||
}
|
||||
Signature.prototype.equalsNoReturn = function (other) {
|
||||
return this.parameters.length === other.parameters.length &&
|
||||
@@ -278,9 +278,9 @@ var ts;
|
||||
function Parameter(name, type, flags) {
|
||||
var _this;
|
||||
_this = _super.call(this) || this;
|
||||
this.name = name;
|
||||
this.type = type;
|
||||
this.flags = flags;
|
||||
_this.name = name;
|
||||
_this.type = type;
|
||||
_this.flags = flags;
|
||||
}
|
||||
Parameter.prototype.equals = function (other) {
|
||||
return this.name === other.name &&
|
||||
|
||||
@@ -43,8 +43,8 @@ define(["require", "exports"], function (require, exports) {
|
||||
function B(element, url) {
|
||||
var _this;
|
||||
_this = _super.call(this, element) || this;
|
||||
this.p1 = element;
|
||||
this.p2 = url;
|
||||
_this.p1 = element;
|
||||
_this.p2 = url;
|
||||
}
|
||||
return B;
|
||||
}(A));
|
||||
|
||||
Reference in New Issue
Block a user