2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/transitiveTypeArgumentInference1.ts ===
|
|
|
|
interface I1<T, U> {
|
|
|
|
>I1 : I1<T, U>
|
|
|
|
>T : T
|
|
|
|
>U : U
|
|
|
|
|
|
|
|
m(value: T): U;
|
|
|
|
>m : (value: T) => U
|
|
|
|
>value : T
|
|
|
|
>T : T
|
|
|
|
>U : U
|
|
|
|
}
|
|
|
|
|
|
|
|
var i: I1<boolean, string> = null;
|
|
|
|
>i : I1<boolean, string>
|
2014-08-19 04:56:03 +02:00
|
|
|
>I1 : I1<T, U>
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
class C<T> {
|
|
|
|
>C : C<T>
|
|
|
|
>T : T
|
|
|
|
|
|
|
|
constructor(p: I1<boolean, T>) {
|
|
|
|
>p : I1<boolean, T>
|
2014-08-19 04:56:03 +02:00
|
|
|
>I1 : I1<T, U>
|
2014-08-15 23:33:16 +02:00
|
|
|
>T : T
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
var c = new C(i);
|
|
|
|
>c : C<string>
|
|
|
|
>new C(i) : C<string>
|
|
|
|
>C : typeof C
|
|
|
|
>i : I1<boolean, string>
|
|
|
|
|