tests/cases/compiler/genericTypeAssertions2.ts(10,5): error TS2322: Type 'B' is not assignable to type 'A'. Types of property 'foo' are incompatible. Type '(x: string) => void' is not assignable to type '(x: number) => void'. Types of parameters 'x' and 'x' are incompatible. Type 'string' is not assignable to type 'number'. tests/cases/compiler/genericTypeAssertions2.ts(11,5): error TS2322: Type 'A' is not assignable to type 'B'. Property 'bar' is missing in type 'A'. tests/cases/compiler/genericTypeAssertions2.ts(13,21): error TS2352: Neither type 'undefined[]' nor type 'A' is assignable to the other. Property 'foo' is missing in type 'undefined[]'. ==== tests/cases/compiler/genericTypeAssertions2.ts (3 errors) ==== class A { foo(x: T) { } } class B extends A { bar(): T { return null; } } var foo = new A(); var r: A = >new B(); var r2: A = >new B(); // error ~~ !!! error TS2322: Type 'B' is not assignable to type 'A'. !!! error TS2322: Types of property 'foo' are incompatible. !!! error TS2322: Type '(x: string) => void' is not assignable to type '(x: number) => void'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'string' is not assignable to type 'number'. var r3: B = >new B(); // error ~~ !!! error TS2322: Type 'A' is not assignable to type 'B'. !!! error TS2322: Property 'bar' is missing in type 'A'. var r4: A = >new A(); var r5: A = >[]; // error ~~~~~~~~~~~~~ !!! error TS2352: Neither type 'undefined[]' nor type 'A' is assignable to the other. !!! error TS2352: Property 'foo' is missing in type 'undefined[]'.