33 lines
479 B
Plaintext
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>
|
|
|