diff --git a/tests/baselines/reference/superCallArgsMustMatch.errors.txt b/tests/baselines/reference/superCallArgsMustMatch.errors.txt index e9a665acd1..06758b44fe 100644 --- a/tests/baselines/reference/superCallArgsMustMatch.errors.txt +++ b/tests/baselines/reference/superCallArgsMustMatch.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/superCallArgsMustMatch.ts(15,15): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. +tests/cases/compiler/superCallArgsMustMatch.ts(17,15): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. ==== tests/cases/compiler/superCallArgsMustMatch.ts (1 errors) ==== @@ -16,7 +16,9 @@ tests/cases/compiler/superCallArgsMustMatch.ts(15,15): error TS2345: Argument of constructor() { - super("hi"); // Should error, base constructor has type T for first arg, which is fixed as number in the extends clause + // Should error; base constructor has type T for first arg, + // which is instantiated with 'number' in the extends clause + super("hi"); ~~~~ !!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. diff --git a/tests/baselines/reference/superCallArgsMustMatch.js b/tests/baselines/reference/superCallArgsMustMatch.js index 0b772fd39d..e38c519ead 100644 --- a/tests/baselines/reference/superCallArgsMustMatch.js +++ b/tests/baselines/reference/superCallArgsMustMatch.js @@ -13,7 +13,9 @@ class T6 extends T5{ constructor() { - super("hi"); // Should error, base constructor has type T for first arg, which is fixed as number in the extends clause + // Should error; base constructor has type T for first arg, + // which is instantiated with 'number' in the extends clause + super("hi"); var x: number = this.foo; @@ -39,7 +41,9 @@ var T5 = (function () { var T6 = (function (_super) { __extends(T6, _super); function T6() { - _super.call(this, "hi"); // Should error, base constructor has type T for first arg, which is fixed as number in the extends clause + // Should error; base constructor has type T for first arg, + // which is instantiated with 'number' in the extends clause + _super.call(this, "hi"); var x = this.foo; } return T6; diff --git a/tests/cases/compiler/superCallArgsMustMatch.ts b/tests/cases/compiler/superCallArgsMustMatch.ts index a27aff3919..5407c3301f 100644 --- a/tests/cases/compiler/superCallArgsMustMatch.ts +++ b/tests/cases/compiler/superCallArgsMustMatch.ts @@ -12,7 +12,9 @@ class T6 extends T5{ constructor() { - super("hi"); // Should error, base constructor has type T for first arg, which is fixed as number in the extends clause + // Should error; base constructor has type T for first arg, + // which is instantiated with 'number' in the extends clause + super("hi"); var x: number = this.foo;