TypeScript/tests/baselines/reference/typeParametersShouldNotBeEqual.errors.txt

13 lines
364 B
Plaintext
Raw Normal View History

2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/typeParametersShouldNotBeEqual.ts (2 errors) ====
function ff<T, U>(x: T, y: U) {
var z: Object;
x = x; // Ok
x = y; // Error
~
!!! Type 'U' is not assignable to type 'T'.
x = z; // Error
~
!!! Type 'Object' is not assignable to type 'T'.
z = x; // Ok
}