50 lines
1.6 KiB
Text
50 lines
1.6 KiB
Text
=== 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, 92, 1), Decl(lib.d.ts, 223, 11), 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(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, 633, 23), Decl(lib.d.ts, 815, 11))
|
|
|
|
|
|
|
|
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, 1007, 20))
|
|
>y : Symbol(y, Decl(inheritedGenericCallSignature.ts, 24, 3))
|
|
>length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20))
|
|
|