TypeScript/tests/baselines/reference/typeParametersShouldNotBeEqual.js

19 lines
333 B
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
//// [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
2014-07-13 01:04:16 +02:00
}