1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
=== tests/cases/compiler/inheritedGenericCallSignature.ts ===
interface I1<T> {
>I1 : Symbol(I1, Decl(inheritedGenericCallSignature.ts, 0, 0))
>T : Symbol(T, Decl(inheritedGenericCallSignature.ts, 1, 13))
(a: T): T;
>a : Symbol(a, Decl(inheritedGenericCallSignature.ts, 3, 5))
>T : Symbol(T, Decl(inheritedGenericCallSignature.ts, 1, 13))
>T : Symbol(T, Decl(inheritedGenericCallSignature.ts, 1, 13))
}
interface Object {}
>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(inheritedGenericCallSignature.ts, 5, 1))
interface I2<T> extends I1<T[]> {
>I2 : Symbol(I2, Decl(inheritedGenericCallSignature.ts, 8, 19))
>T : Symbol(T, Decl(inheritedGenericCallSignature.ts, 12, 13))
>I1 : Symbol(I1, Decl(inheritedGenericCallSignature.ts, 0, 0))
>T : Symbol(T, Decl(inheritedGenericCallSignature.ts, 12, 13))
b: T;
>b : Symbol(I2.b, Decl(inheritedGenericCallSignature.ts, 12, 33))
>T : Symbol(T, Decl(inheritedGenericCallSignature.ts, 12, 13))
}
var x: I2<Date>;
>x : Symbol(x, Decl(inheritedGenericCallSignature.ts, 20, 3))
>I2 : Symbol(I2, Decl(inheritedGenericCallSignature.ts, 8, 19))
>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
var y = x(undefined);
>y : Symbol(y, Decl(inheritedGenericCallSignature.ts, 24, 3))
>x : Symbol(x, Decl(inheritedGenericCallSignature.ts, 20, 3))
>undefined : Symbol(undefined)
y.length; // should not error
>y.length : Symbol(Array.length, Decl(lib.d.ts, --, --))
>y : Symbol(y, Decl(inheritedGenericCallSignature.ts, 24, 3))
>length : Symbol(Array.length, Decl(lib.d.ts, --, --))
|