TypeScript/tests/baselines/reference/typeParametersShouldNotBeEqual.js
2014-08-15 15:49:09 -07:00

19 lines
333 B
TypeScript

//// [typeParametersShouldNotBeEqual.ts]
function ff<T, U>(x: T, y: U) {
var z: Object;
x = x; // Ok
x = y; // Error
x = z; // Error
z = x; // Ok
}
//// [typeParametersShouldNotBeEqual.js]
function ff(x, y) {
var z;
x = x; // Ok
x = y; // Error
x = z; // Error
z = x; // Ok
}