TypeScript/tests/baselines/reference/typeParameterConstrainedToOuterTypeParameter.types
2014-08-18 19:56:03 -07:00

33 lines
479 B
Plaintext

=== tests/cases/compiler/typeParameterConstrainedToOuterTypeParameter.ts ===
interface A<T> {
>A : A<T>
>T : T
<U extends T>(x: U[])
>U : U
>T : T
>x : U[]
>U : U
}
interface B<T> {
>B : B<T>
>T : T
<U extends T>(x: U)
>U : U
>T : T
>x : U
>U : U
}
var a: A<string>
>a : A<string>
>A : A<T>
var b: B<string> = a; // assignment should be legal (both U's get instantiated to any for comparison)
>b : B<string>
>B : B<T>
>a : A<string>