124 lines
5.8 KiB
Text
124 lines
5.8 KiB
Text
=== tests/cases/compiler/inheritedOverloadedSpecializedSignatures.ts ===
|
|
interface A {
|
|
>A : Symbol(A, Decl(inheritedOverloadedSpecializedSignatures.ts, 0, 0), Decl(inheritedOverloadedSpecializedSignatures.ts, 10, 19), Decl(inheritedOverloadedSpecializedSignatures.ts, 19, 1))
|
|
|
|
(key:string):void;
|
|
>key : Symbol(key, Decl(inheritedOverloadedSpecializedSignatures.ts, 1, 3))
|
|
}
|
|
|
|
interface B extends A {
|
|
>B : Symbol(B, Decl(inheritedOverloadedSpecializedSignatures.ts, 2, 1), Decl(inheritedOverloadedSpecializedSignatures.ts, 15, 1), Decl(inheritedOverloadedSpecializedSignatures.ts, 23, 1))
|
|
>A : Symbol(A, Decl(inheritedOverloadedSpecializedSignatures.ts, 0, 0), Decl(inheritedOverloadedSpecializedSignatures.ts, 10, 19), Decl(inheritedOverloadedSpecializedSignatures.ts, 19, 1))
|
|
|
|
(key:'foo'):string;
|
|
>key : Symbol(key, Decl(inheritedOverloadedSpecializedSignatures.ts, 5, 3))
|
|
}
|
|
|
|
var b:B;
|
|
>b : Symbol(b, Decl(inheritedOverloadedSpecializedSignatures.ts, 8, 3))
|
|
>B : Symbol(B, Decl(inheritedOverloadedSpecializedSignatures.ts, 2, 1), Decl(inheritedOverloadedSpecializedSignatures.ts, 15, 1), Decl(inheritedOverloadedSpecializedSignatures.ts, 23, 1))
|
|
|
|
// Should not error
|
|
b('foo').charAt(0);
|
|
>b('foo').charAt : Symbol(String.charAt, Decl(lib.d.ts, 279, 23))
|
|
>b : Symbol(b, Decl(inheritedOverloadedSpecializedSignatures.ts, 8, 3))
|
|
>charAt : Symbol(String.charAt, Decl(lib.d.ts, 279, 23))
|
|
|
|
interface A {
|
|
>A : Symbol(A, Decl(inheritedOverloadedSpecializedSignatures.ts, 0, 0), Decl(inheritedOverloadedSpecializedSignatures.ts, 10, 19), Decl(inheritedOverloadedSpecializedSignatures.ts, 19, 1))
|
|
|
|
(x: 'A1'): string;
|
|
>x : Symbol(x, Decl(inheritedOverloadedSpecializedSignatures.ts, 13, 5))
|
|
|
|
(x: string): void;
|
|
>x : Symbol(x, Decl(inheritedOverloadedSpecializedSignatures.ts, 14, 5))
|
|
}
|
|
|
|
interface B extends A {
|
|
>B : Symbol(B, Decl(inheritedOverloadedSpecializedSignatures.ts, 2, 1), Decl(inheritedOverloadedSpecializedSignatures.ts, 15, 1), Decl(inheritedOverloadedSpecializedSignatures.ts, 23, 1))
|
|
>A : Symbol(A, Decl(inheritedOverloadedSpecializedSignatures.ts, 0, 0), Decl(inheritedOverloadedSpecializedSignatures.ts, 10, 19), Decl(inheritedOverloadedSpecializedSignatures.ts, 19, 1))
|
|
|
|
(x: 'B1'): number;
|
|
>x : Symbol(x, Decl(inheritedOverloadedSpecializedSignatures.ts, 18, 5))
|
|
}
|
|
|
|
interface A {
|
|
>A : Symbol(A, Decl(inheritedOverloadedSpecializedSignatures.ts, 0, 0), Decl(inheritedOverloadedSpecializedSignatures.ts, 10, 19), Decl(inheritedOverloadedSpecializedSignatures.ts, 19, 1))
|
|
|
|
(x: 'A2'): boolean;
|
|
>x : Symbol(x, Decl(inheritedOverloadedSpecializedSignatures.ts, 22, 5))
|
|
}
|
|
|
|
interface B {
|
|
>B : Symbol(B, Decl(inheritedOverloadedSpecializedSignatures.ts, 2, 1), Decl(inheritedOverloadedSpecializedSignatures.ts, 15, 1), Decl(inheritedOverloadedSpecializedSignatures.ts, 23, 1))
|
|
|
|
(x: 'B2'): string[];
|
|
>x : Symbol(x, Decl(inheritedOverloadedSpecializedSignatures.ts, 26, 5))
|
|
}
|
|
|
|
interface C1 extends B {
|
|
>C1 : Symbol(C1, Decl(inheritedOverloadedSpecializedSignatures.ts, 27, 1))
|
|
>B : Symbol(B, Decl(inheritedOverloadedSpecializedSignatures.ts, 2, 1), Decl(inheritedOverloadedSpecializedSignatures.ts, 15, 1), Decl(inheritedOverloadedSpecializedSignatures.ts, 23, 1))
|
|
|
|
(x: 'C1'): number[];
|
|
>x : Symbol(x, Decl(inheritedOverloadedSpecializedSignatures.ts, 30, 2))
|
|
}
|
|
|
|
interface C2 extends B {
|
|
>C2 : Symbol(C2, Decl(inheritedOverloadedSpecializedSignatures.ts, 31, 1))
|
|
>B : Symbol(B, Decl(inheritedOverloadedSpecializedSignatures.ts, 2, 1), Decl(inheritedOverloadedSpecializedSignatures.ts, 15, 1), Decl(inheritedOverloadedSpecializedSignatures.ts, 23, 1))
|
|
|
|
(x: 'C2'): boolean[];
|
|
>x : Symbol(x, Decl(inheritedOverloadedSpecializedSignatures.ts, 34, 2))
|
|
}
|
|
|
|
interface C extends C1, C2 {
|
|
>C : Symbol(C, Decl(inheritedOverloadedSpecializedSignatures.ts, 35, 1))
|
|
>C1 : Symbol(C1, Decl(inheritedOverloadedSpecializedSignatures.ts, 27, 1))
|
|
>C2 : Symbol(C2, Decl(inheritedOverloadedSpecializedSignatures.ts, 31, 1))
|
|
|
|
(x: 'C'): string;
|
|
>x : Symbol(x, Decl(inheritedOverloadedSpecializedSignatures.ts, 38, 2))
|
|
}
|
|
|
|
var c: C;
|
|
>c : Symbol(c, Decl(inheritedOverloadedSpecializedSignatures.ts, 41, 3))
|
|
>C : Symbol(C, Decl(inheritedOverloadedSpecializedSignatures.ts, 35, 1))
|
|
|
|
// none of these lines should error
|
|
var x1: string[] = c('B2');
|
|
>x1 : Symbol(x1, Decl(inheritedOverloadedSpecializedSignatures.ts, 43, 3))
|
|
>c : Symbol(c, Decl(inheritedOverloadedSpecializedSignatures.ts, 41, 3))
|
|
|
|
var x2: number = c('B1');
|
|
>x2 : Symbol(x2, Decl(inheritedOverloadedSpecializedSignatures.ts, 44, 3))
|
|
>c : Symbol(c, Decl(inheritedOverloadedSpecializedSignatures.ts, 41, 3))
|
|
|
|
var x3: boolean = c('A2');
|
|
>x3 : Symbol(x3, Decl(inheritedOverloadedSpecializedSignatures.ts, 45, 3))
|
|
>c : Symbol(c, Decl(inheritedOverloadedSpecializedSignatures.ts, 41, 3))
|
|
|
|
var x4: string = c('A1');
|
|
>x4 : Symbol(x4, Decl(inheritedOverloadedSpecializedSignatures.ts, 46, 3))
|
|
>c : Symbol(c, Decl(inheritedOverloadedSpecializedSignatures.ts, 41, 3))
|
|
|
|
var x5: void = c('A0');
|
|
>x5 : Symbol(x5, Decl(inheritedOverloadedSpecializedSignatures.ts, 47, 3))
|
|
>c : Symbol(c, Decl(inheritedOverloadedSpecializedSignatures.ts, 41, 3))
|
|
|
|
var x6: number[] = c('C1');
|
|
>x6 : Symbol(x6, Decl(inheritedOverloadedSpecializedSignatures.ts, 48, 3))
|
|
>c : Symbol(c, Decl(inheritedOverloadedSpecializedSignatures.ts, 41, 3))
|
|
|
|
var x7: boolean[] = c('C2');
|
|
>x7 : Symbol(x7, Decl(inheritedOverloadedSpecializedSignatures.ts, 49, 3))
|
|
>c : Symbol(c, Decl(inheritedOverloadedSpecializedSignatures.ts, 41, 3))
|
|
|
|
var x8: string = c('C');
|
|
>x8 : Symbol(x8, Decl(inheritedOverloadedSpecializedSignatures.ts, 50, 3))
|
|
>c : Symbol(c, Decl(inheritedOverloadedSpecializedSignatures.ts, 41, 3))
|
|
|
|
var x9: void = c('generic');
|
|
>x9 : Symbol(x9, Decl(inheritedOverloadedSpecializedSignatures.ts, 51, 3))
|
|
>c : Symbol(c, Decl(inheritedOverloadedSpecializedSignatures.ts, 41, 3))
|
|
|