2014-07-13 01:04:16 +02:00
|
|
|
//// [typeParameterConstrainedToOuterTypeParameter.ts]
|
|
|
|
interface A<T> {
|
|
|
|
<U extends T>(x: U[])
|
|
|
|
}
|
|
|
|
|
|
|
|
interface B<T> {
|
|
|
|
<U extends T>(x: U)
|
|
|
|
}
|
|
|
|
|
|
|
|
var a: A<string>
|
|
|
|
var b: B<string> = a; // assignment should be legal (both U's get instantiated to any for comparison)
|
|
|
|
|
|
|
|
//// [typeParameterConstrainedToOuterTypeParameter.js]
|
|
|
|
var a;
|
2014-08-15 01:36:33 +02:00
|
|
|
var b = a; // assignment should be legal (both U's get instantiated to any for comparison)
|