121 lines
4.7 KiB
Text
121 lines
4.7 KiB
Text
=== tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithMultipleBases.ts ===
|
|
// merged interfaces behave as if all extends clauses from each declaration are merged together
|
|
// no errors expected
|
|
|
|
class C {
|
|
>C : C, Symbol(C,Decl(mergedInterfacesWithMultipleBases.ts,0,0))
|
|
|
|
a: number;
|
|
>a : number, Symbol(a,Decl(mergedInterfacesWithMultipleBases.ts,3,9))
|
|
}
|
|
|
|
class C2 {
|
|
>C2 : C2, Symbol(C2,Decl(mergedInterfacesWithMultipleBases.ts,5,1))
|
|
|
|
b: number;
|
|
>b : number, Symbol(b,Decl(mergedInterfacesWithMultipleBases.ts,7,10))
|
|
}
|
|
|
|
interface A extends C {
|
|
>A : A, Symbol(A,Decl(mergedInterfacesWithMultipleBases.ts,9,1),Decl(mergedInterfacesWithMultipleBases.ts,13,1))
|
|
>C : C, Symbol(C,Decl(mergedInterfacesWithMultipleBases.ts,0,0))
|
|
|
|
y: string;
|
|
>y : string, Symbol(y,Decl(mergedInterfacesWithMultipleBases.ts,11,23))
|
|
}
|
|
|
|
interface A extends C2 {
|
|
>A : A, Symbol(A,Decl(mergedInterfacesWithMultipleBases.ts,9,1),Decl(mergedInterfacesWithMultipleBases.ts,13,1))
|
|
>C2 : C2, Symbol(C2,Decl(mergedInterfacesWithMultipleBases.ts,5,1))
|
|
|
|
z: string;
|
|
>z : string, Symbol(z,Decl(mergedInterfacesWithMultipleBases.ts,15,24))
|
|
}
|
|
|
|
class D implements A {
|
|
>D : D, Symbol(D,Decl(mergedInterfacesWithMultipleBases.ts,17,1))
|
|
>A : A, Symbol(A,Decl(mergedInterfacesWithMultipleBases.ts,9,1),Decl(mergedInterfacesWithMultipleBases.ts,13,1))
|
|
|
|
a: number;
|
|
>a : number, Symbol(a,Decl(mergedInterfacesWithMultipleBases.ts,19,22))
|
|
|
|
b: number;
|
|
>b : number, Symbol(b,Decl(mergedInterfacesWithMultipleBases.ts,20,14))
|
|
|
|
y: string;
|
|
>y : string, Symbol(y,Decl(mergedInterfacesWithMultipleBases.ts,21,14))
|
|
|
|
z: string;
|
|
>z : string, Symbol(z,Decl(mergedInterfacesWithMultipleBases.ts,22,14))
|
|
}
|
|
|
|
var a: A;
|
|
>a : A, Symbol(a,Decl(mergedInterfacesWithMultipleBases.ts,26,3))
|
|
>A : A, Symbol(A,Decl(mergedInterfacesWithMultipleBases.ts,9,1),Decl(mergedInterfacesWithMultipleBases.ts,13,1))
|
|
|
|
var r = a.a;
|
|
>r : number, Symbol(r,Decl(mergedInterfacesWithMultipleBases.ts,27,3))
|
|
>a.a : number, Symbol(C.a,Decl(mergedInterfacesWithMultipleBases.ts,3,9))
|
|
>a : A, Symbol(a,Decl(mergedInterfacesWithMultipleBases.ts,26,3))
|
|
>a : number, Symbol(C.a,Decl(mergedInterfacesWithMultipleBases.ts,3,9))
|
|
|
|
// generic interfaces in a module
|
|
module M {
|
|
>M : typeof M, Symbol(M,Decl(mergedInterfacesWithMultipleBases.ts,27,12))
|
|
|
|
class C<T> {
|
|
>C : C<T>, Symbol(C,Decl(mergedInterfacesWithMultipleBases.ts,30,10))
|
|
>T : T, Symbol(T,Decl(mergedInterfacesWithMultipleBases.ts,31,12))
|
|
|
|
a: T;
|
|
>a : T, Symbol(a,Decl(mergedInterfacesWithMultipleBases.ts,31,16))
|
|
>T : T, Symbol(T,Decl(mergedInterfacesWithMultipleBases.ts,31,12))
|
|
}
|
|
|
|
class C2<T> {
|
|
>C2 : C2<T>, Symbol(C2,Decl(mergedInterfacesWithMultipleBases.ts,33,5))
|
|
>T : T, Symbol(T,Decl(mergedInterfacesWithMultipleBases.ts,35,13))
|
|
|
|
b: T;
|
|
>b : T, Symbol(b,Decl(mergedInterfacesWithMultipleBases.ts,35,17))
|
|
>T : T, Symbol(T,Decl(mergedInterfacesWithMultipleBases.ts,35,13))
|
|
}
|
|
|
|
interface A<T> extends C<T> {
|
|
>A : A<T>, Symbol(A,Decl(mergedInterfacesWithMultipleBases.ts,37,5),Decl(mergedInterfacesWithMultipleBases.ts,41,5))
|
|
>T : T, Symbol(T,Decl(mergedInterfacesWithMultipleBases.ts,39,16),Decl(mergedInterfacesWithMultipleBases.ts,43,16))
|
|
>C : C<T>, Symbol(C,Decl(mergedInterfacesWithMultipleBases.ts,30,10))
|
|
>T : T, Symbol(T,Decl(mergedInterfacesWithMultipleBases.ts,39,16),Decl(mergedInterfacesWithMultipleBases.ts,43,16))
|
|
|
|
y: T;
|
|
>y : T, Symbol(y,Decl(mergedInterfacesWithMultipleBases.ts,39,33))
|
|
>T : T, Symbol(T,Decl(mergedInterfacesWithMultipleBases.ts,39,16),Decl(mergedInterfacesWithMultipleBases.ts,43,16))
|
|
}
|
|
|
|
interface A<T> extends C2<string> {
|
|
>A : A<T>, Symbol(A,Decl(mergedInterfacesWithMultipleBases.ts,37,5),Decl(mergedInterfacesWithMultipleBases.ts,41,5))
|
|
>T : T, Symbol(T,Decl(mergedInterfacesWithMultipleBases.ts,39,16),Decl(mergedInterfacesWithMultipleBases.ts,43,16))
|
|
>C2 : C2<T>, Symbol(C2,Decl(mergedInterfacesWithMultipleBases.ts,33,5))
|
|
|
|
z: T;
|
|
>z : T, Symbol(z,Decl(mergedInterfacesWithMultipleBases.ts,43,39))
|
|
>T : T, Symbol(T,Decl(mergedInterfacesWithMultipleBases.ts,39,16),Decl(mergedInterfacesWithMultipleBases.ts,43,16))
|
|
}
|
|
|
|
class D implements A<boolean> {
|
|
>D : D, Symbol(D,Decl(mergedInterfacesWithMultipleBases.ts,45,5))
|
|
>A : A<T>, Symbol(A,Decl(mergedInterfacesWithMultipleBases.ts,37,5),Decl(mergedInterfacesWithMultipleBases.ts,41,5))
|
|
|
|
a: boolean;
|
|
>a : boolean, Symbol(a,Decl(mergedInterfacesWithMultipleBases.ts,47,35))
|
|
|
|
b: string;
|
|
>b : string, Symbol(b,Decl(mergedInterfacesWithMultipleBases.ts,48,19))
|
|
|
|
y: boolean;
|
|
>y : boolean, Symbol(y,Decl(mergedInterfacesWithMultipleBases.ts,49,18))
|
|
|
|
z: boolean;
|
|
>z : boolean, Symbol(z,Decl(mergedInterfacesWithMultipleBases.ts,50,19))
|
|
}
|
|
}
|