From 8ee09dbe6ebdcd18c3208936b6226c712a0050ea Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 27 Jan 2015 13:36:10 -0800 Subject: [PATCH] Addressed Jason's pedantic correction over the wording of a comment. --- .../baselines/reference/superCallArgsMustMatch.errors.txt | 6 ++++-- tests/baselines/reference/superCallArgsMustMatch.js | 8 ++++++-- tests/cases/compiler/superCallArgsMustMatch.ts | 4 +++- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/tests/baselines/reference/superCallArgsMustMatch.errors.txt b/tests/baselines/reference/superCallArgsMustMatch.errors.txt index e9a665acd1f..06758b44fe6 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 0b772fd39d8..e38c519ead9 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 a27aff3919b..5407c3301fa 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;