==== tests/cases/compiler/genericTypeAssertions2.ts (3 errors) ====
    class A<T> { foo(x: T) { } }
    class B<T> extends A<T> {
        bar(): T {
            return null;
        }
    }
    
    var foo = new A<number>();
    var r: A<string> = <B<string>>new B();
    var r2: A<number> = <B<string>>new B(); // error
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! genericTypeAssertions2.ts(10,5): error TS2012: Cannot convert 'B<string>' to 'A<number>':
!!! 	Types of property 'foo' of types 'B<string>' and 'A<number>' are incompatible:
!!! 		Call signatures of types '(x: string) => void' and '(x: number) => void' are incompatible.
    var r3: B<number> = <A<number>>new B(); // error
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! genericTypeAssertions2.ts(11,5): error TS2012: Cannot convert 'A<number>' to 'B<number>':
!!! 	Type 'A<number>' is missing property 'bar' from type 'B<number>'.
    var r4: A<number> = <A<number>>new A();
    var r5: A<number> = <A<number>>[]; // error
                        ~~~~~~~~~~~~~
!!! genericTypeAssertions2.ts(13,21): error TS2012: Cannot convert 'any[]' to 'A<number>':
!!! 	Type 'any[]' is missing property 'foo' from type 'A<number>'.
!!! 	Type 'A<number>' is missing property 'concat' from type 'any[]'.