TypeScript/tests/baselines/reference/typeParameterConstrainedToOuterTypeParameter.types

33 lines
479 B
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== 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>
2014-08-15 23:33:16 +02:00
var b: B<string> = a; // assignment should be legal (both U's get instantiated to any for comparison)
>b : B<string>
>B : B<T>
2014-08-15 23:33:16 +02:00
>a : A<string>