==== tests/cases/compiler/typeParameterAssignmentCompat1.ts (4 errors) ==== interface Foo { frobble(value: T): T; } function f(): Foo { var x: Foo; var y: Foo; x = y; // should be an error ~ !!! Type 'Foo' is not assignable to type 'Foo': !!! Type 'U' is not assignable to type 'T'. return x; ~ !!! Type 'Foo' is not assignable to type 'Foo': !!! Type 'T' is not assignable to type 'U'. } class C { f(): Foo { var x: Foo; var y: Foo; x = y; // should be an error ~ !!! Type 'Foo' is not assignable to type 'Foo': !!! Type 'U' is not assignable to type 'T'. return x; ~ !!! Type 'Foo' is not assignable to type 'Foo': !!! Type 'T' is not assignable to type 'U'. } }