Addressed Jason's pedantic correction over the wording of a comment.
This commit is contained in:
parent
4646d63558
commit
8ee09dbe6e
|
@ -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'.
|
||||
|
||||
|
|
|
@ -13,7 +13,9 @@ class T6 extends T5<number>{
|
|||
|
||||
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;
|
||||
|
|
|
@ -12,7 +12,9 @@ class T6 extends T5<number>{
|
|||
|
||||
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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue