TypeScript/tests/baselines/reference/inheritedGenericCallSignature.types
2015-04-13 14:29:37 -07:00

52 lines
1.8 KiB
Plaintext

=== tests/cases/compiler/inheritedGenericCallSignature.ts ===
interface I1<T> {
>I1 : I1<T>, Symbol(I1, Decl(inheritedGenericCallSignature.ts, 0, 0))
>T : T, Symbol(T, Decl(inheritedGenericCallSignature.ts, 1, 13))
(a: T): T;
>a : T, Symbol(a, Decl(inheritedGenericCallSignature.ts, 3, 5))
>T : T, Symbol(T, Decl(inheritedGenericCallSignature.ts, 1, 13))
>T : T, Symbol(T, Decl(inheritedGenericCallSignature.ts, 1, 13))
}
interface Object {}
>Object : Object, Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11), Decl(inheritedGenericCallSignature.ts, 5, 1))
interface I2<T> extends I1<T[]> {
>I2 : I2<T>, Symbol(I2, Decl(inheritedGenericCallSignature.ts, 8, 19))
>T : T, Symbol(T, Decl(inheritedGenericCallSignature.ts, 12, 13))
>I1 : I1<T>, Symbol(I1, Decl(inheritedGenericCallSignature.ts, 0, 0))
>T : T, Symbol(T, Decl(inheritedGenericCallSignature.ts, 12, 13))
b: T;
>b : T, Symbol(b, Decl(inheritedGenericCallSignature.ts, 12, 33))
>T : T, Symbol(T, Decl(inheritedGenericCallSignature.ts, 12, 13))
}
var x: I2<Date>;
>x : I2<Date>, Symbol(x, Decl(inheritedGenericCallSignature.ts, 20, 3))
>I2 : I2<T>, Symbol(I2, Decl(inheritedGenericCallSignature.ts, 8, 19))
>Date : Date, Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11))
var y = x(undefined);
>y : Date[], Symbol(y, Decl(inheritedGenericCallSignature.ts, 24, 3))
>x(undefined) : Date[]
>x : I2<Date>, Symbol(x, Decl(inheritedGenericCallSignature.ts, 20, 3))
>undefined : undefined, Symbol(undefined)
y.length; // should not error
>y.length : number, Symbol(Array.length, Decl(lib.d.ts, 1007, 20))
>y : Date[], Symbol(y, Decl(inheritedGenericCallSignature.ts, 24, 3))
>length : number, Symbol(Array.length, Decl(lib.d.ts, 1007, 20))