TypeScript/tests/cases/compiler/superCallArgsMustMatch.ts
2014-07-12 17:30:19 -07:00

22 lines
323 B
TypeScript

class T5<T>{
public foo: T;
constructor(public bar: T) { }
}
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
var x: number = this.foo;
}
}