2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/typeParameterConstrainedToOuterTypeParameter2.ts ===
|
|
|
|
interface A<T> {
|
|
|
|
>A : A<T>
|
|
|
|
>T : T
|
|
|
|
|
|
|
|
foo<U extends T>(x: A<A<U>>)
|
|
|
|
>foo : <U extends T>(x: A<A<U>>) => any
|
|
|
|
>U : U
|
|
|
|
>T : T
|
|
|
|
>x : A<A<U>>
|
2014-08-19 04:56:03 +02:00
|
|
|
>A : A<T>
|
|
|
|
>A : A<T>
|
2014-08-15 23:33:16 +02:00
|
|
|
>U : U
|
|
|
|
}
|
|
|
|
|
|
|
|
interface B<T> {
|
|
|
|
>B : B<T>
|
|
|
|
>T : T
|
|
|
|
|
|
|
|
foo<U extends T>(x: B<B<U>>)
|
|
|
|
>foo : <U extends T>(x: B<B<U>>) => any
|
|
|
|
>U : U
|
|
|
|
>T : T
|
|
|
|
>x : B<B<U>>
|
2014-08-19 04:56:03 +02:00
|
|
|
>B : B<T>
|
|
|
|
>B : B<T>
|
2014-08-15 23:33:16 +02:00
|
|
|
>U : U
|
|
|
|
}
|
|
|
|
|
|
|
|
var a: A<string>
|
|
|
|
>a : A<string>
|
2014-08-19 04:56:03 +02:00
|
|
|
>A : A<T>
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var b: B<string> = a;
|
|
|
|
>b : B<string>
|
2014-08-19 04:56:03 +02:00
|
|
|
>B : B<T>
|
2014-08-15 23:33:16 +02:00
|
|
|
>a : A<string>
|
|
|
|
|