TypeScript/tests/cases/compiler/typeParametersShouldNotBeEqual.ts

8 lines
131 B
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
function ff<T, U>(x: T, y: U) {
var z: Object;
x = x; // Ok
x = y; // Error
x = z; // Error
z = x; // Ok
}