Update baselines add baselines Update baseline Port PR #6860 lexically check calling super before this Check using "super" before "this" lexically instead of using the NodeCheckFlags Remove "type-checking" way of checking if super is used before this. Instead check using whether super occurs before this syntactically Refactor the code Dive down to get super call Address PR Address PR about tests Add a flag so we don't repeatedly finding super call rename function Move tests into correct location Address PR: report error on super call instead of entire constructor node remove marge mark
40 lines
899 B
TypeScript
40 lines
899 B
TypeScript
//// [superCallBeforeThisAccessing1.ts]
|
|
declare var Factory: any
|
|
|
|
class Base {
|
|
constructor(c) { }
|
|
}
|
|
class D extends Base {
|
|
private _t;
|
|
constructor() {
|
|
super(i);
|
|
var s = {
|
|
t: this._t
|
|
}
|
|
var i = Factory.create(s);
|
|
}
|
|
}
|
|
|
|
|
|
//// [superCallBeforeThisAccessing1.js]
|
|
var __extends = (this && this.__extends) || function (d, b) {
|
|
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
function __() { this.constructor = d; }
|
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
};
|
|
var Base = (function () {
|
|
function Base(c) {
|
|
}
|
|
return Base;
|
|
}());
|
|
var D = (function (_super) {
|
|
__extends(D, _super);
|
|
function D() {
|
|
_super.call(this, i);
|
|
var s = {
|
|
t: this._t
|
|
};
|
|
var i = Factory.create(s);
|
|
}
|
|
return D;
|
|
}(Base));
|