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 51 52 53 54 55 56 57 58 59 60
|
=== tests/cases/compiler/derivedTypeIncompatibleSignatures.ts ===
interface A {
>A : Symbol(A, Decl(derivedTypeIncompatibleSignatures.ts, 0, 0))
(a: string): string;
>a : Symbol(a, Decl(derivedTypeIncompatibleSignatures.ts, 1, 5))
}
interface B extends A {
>B : Symbol(B, Decl(derivedTypeIncompatibleSignatures.ts, 2, 1))
>A : Symbol(A, Decl(derivedTypeIncompatibleSignatures.ts, 0, 0))
(a: string): number; // Number is not a subtype of string. Should error.
>a : Symbol(a, Decl(derivedTypeIncompatibleSignatures.ts, 5, 5))
}
interface C {
>C : Symbol(C, Decl(derivedTypeIncompatibleSignatures.ts, 6, 1))
new (a: string): string;
>a : Symbol(a, Decl(derivedTypeIncompatibleSignatures.ts, 9, 9))
}
interface D extends C {
>D : Symbol(D, Decl(derivedTypeIncompatibleSignatures.ts, 10, 1))
>C : Symbol(C, Decl(derivedTypeIncompatibleSignatures.ts, 6, 1))
new (a: string): number; // Number is not a subtype of string. Should error.
>a : Symbol(a, Decl(derivedTypeIncompatibleSignatures.ts, 13, 9))
}
interface E {
>E : Symbol(E, Decl(derivedTypeIncompatibleSignatures.ts, 14, 1))
[a: string]: string;
>a : Symbol(a, Decl(derivedTypeIncompatibleSignatures.ts, 17, 5))
}
interface F extends E {
>F : Symbol(F, Decl(derivedTypeIncompatibleSignatures.ts, 18, 1))
>E : Symbol(E, Decl(derivedTypeIncompatibleSignatures.ts, 14, 1))
[a: string]: number; // Number is not a subtype of string. Should error.
>a : Symbol(a, Decl(derivedTypeIncompatibleSignatures.ts, 21, 5))
}
interface G {
>G : Symbol(G, Decl(derivedTypeIncompatibleSignatures.ts, 22, 1))
[a: number]: string;
>a : Symbol(a, Decl(derivedTypeIncompatibleSignatures.ts, 25, 5))
}
interface H extends G {
>H : Symbol(H, Decl(derivedTypeIncompatibleSignatures.ts, 26, 1))
>G : Symbol(G, Decl(derivedTypeIncompatibleSignatures.ts, 22, 1))
[a: number]: number; // Should error for the same reason
>a : Symbol(a, Decl(derivedTypeIncompatibleSignatures.ts, 29, 5))
}
|