2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/genericOverloadSignatures.ts ===
|
|
|
|
interface A {
|
|
|
|
>A : A
|
|
|
|
|
|
|
|
<T>(x: T): void;
|
|
|
|
>T : T
|
|
|
|
>x : T
|
|
|
|
>T : T
|
|
|
|
|
|
|
|
<T>(x: T): void;
|
|
|
|
>T : T
|
|
|
|
>x : T
|
|
|
|
>T : T
|
|
|
|
}
|
|
|
|
|
|
|
|
function f<T>(a: T);
|
|
|
|
>f : { <T>(a: T): any; <T>(a: T): any; }
|
|
|
|
>T : T
|
|
|
|
>a : T
|
|
|
|
>T : T
|
|
|
|
|
|
|
|
function f<T>(a: T);
|
|
|
|
>f : { <T>(a: T): any; <T>(a: T): any; }
|
|
|
|
>T : T
|
|
|
|
>a : T
|
|
|
|
>T : T
|
|
|
|
|
|
|
|
function f(a) { }
|
|
|
|
>f : { <T>(a: T): any; <T>(a: T): any; }
|
|
|
|
>a : any
|
|
|
|
|
|
|
|
interface I2 {
|
|
|
|
>I2 : I2
|
|
|
|
|
|
|
|
f<T>(x: T): number;
|
|
|
|
>f : { <T>(x: T): number; <T>(x: T): string; }
|
|
|
|
>T : T
|
|
|
|
>x : T
|
|
|
|
>T : T
|
|
|
|
|
|
|
|
f<T>(x: T): string;
|
|
|
|
>f : { <T>(x: T): number; <T>(x: T): string; }
|
|
|
|
>T : T
|
|
|
|
>x : T
|
|
|
|
>T : T
|
|
|
|
}
|
|
|
|
|
|
|
|
interface I3<T> {
|
|
|
|
>I3 : I3<T>
|
|
|
|
>T : T
|
|
|
|
|
|
|
|
f(x: T): number;
|
|
|
|
>f : { (x: T): number; (x: T): string; }
|
|
|
|
>x : T
|
|
|
|
>T : T
|
|
|
|
|
|
|
|
f(x: T): string;
|
|
|
|
>f : { (x: T): number; (x: T): string; }
|
|
|
|
>x : T
|
|
|
|
>T : T
|
|
|
|
}
|
|
|
|
|
|
|
|
class C2<T> {
|
|
|
|
>C2 : C2<T>
|
|
|
|
>T : T
|
|
|
|
}
|
|
|
|
var b: {
|
|
|
|
>b : { new <T>(x: T, y: string): C2<T>; new <T>(x: T, y: string): C2<T>; }
|
|
|
|
|
|
|
|
new <T>(x: T, y: string): C2<T>;
|
|
|
|
>T : T
|
|
|
|
>x : T
|
|
|
|
>T : T
|
|
|
|
>y : string
|
2014-08-19 04:56:03 +02:00
|
|
|
>C2 : C2<T>
|
2014-08-15 23:33:16 +02:00
|
|
|
>T : T
|
|
|
|
|
|
|
|
new <T>(x: T, y: string): C2<T>;
|
|
|
|
>T : T
|
|
|
|
>x : T
|
|
|
|
>T : T
|
|
|
|
>y : string
|
2014-08-19 04:56:03 +02:00
|
|
|
>C2 : C2<T>
|
2014-08-15 23:33:16 +02:00
|
|
|
>T : T
|
|
|
|
}
|
|
|
|
|
|
|
|
interface D {
|
|
|
|
>D : D
|
|
|
|
|
|
|
|
<T>(x: T): T;
|
|
|
|
>T : T
|
|
|
|
>x : T
|
|
|
|
>T : T
|
|
|
|
>T : T
|
|
|
|
|
|
|
|
<T>(x: T): T;
|
|
|
|
>T : T
|
|
|
|
>x : T
|
|
|
|
>T : T
|
|
|
|
>T : T
|
|
|
|
}
|