TypeScript/tests/baselines/reference/assignmentCompatWithGenericCallSignatures2.js

27 lines
510 B
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
//// [assignmentCompatWithGenericCallSignatures2.ts]
// some complex cases of assignment compat of generic signatures. No contextual signature instantiation
interface A {
<T>(x: T, ...y: T[][]): void
}
interface B {
<S>(x: S, ...y: S[]): void
}
var a: A;
var b: B;
// Both ok
a = b;
b = a;
//// [assignmentCompatWithGenericCallSignatures2.js]
// some complex cases of assignment compat of generic signatures. No contextual signature instantiation
2014-07-13 01:04:16 +02:00
var a;
var b;
// Both ok
2014-07-13 01:04:16 +02:00
a = b;
b = a;