TypeScript/tests/baselines/reference/mergedInterfacesWithMultipleBases2.types

172 lines
6.8 KiB
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithMultipleBases2.ts ===
// merged interfaces behave as if all extends clauses from each declaration are merged together
// no errors expected
class C {
2015-04-13 23:01:57 +02:00
>C : C, Symbol(C, Decl(mergedInterfacesWithMultipleBases2.ts, 0, 0))
2014-08-15 23:33:16 +02:00
a: number;
2015-04-13 23:01:57 +02:00
>a : number, Symbol(a, Decl(mergedInterfacesWithMultipleBases2.ts, 3, 9))
2014-08-15 23:33:16 +02:00
}
class C2 {
2015-04-13 23:01:57 +02:00
>C2 : C2, Symbol(C2, Decl(mergedInterfacesWithMultipleBases2.ts, 5, 1))
2014-08-15 23:33:16 +02:00
b: number;
2015-04-13 23:01:57 +02:00
>b : number, Symbol(b, Decl(mergedInterfacesWithMultipleBases2.ts, 7, 10))
2014-08-15 23:33:16 +02:00
}
class C3 {
2015-04-13 23:01:57 +02:00
>C3 : C3, Symbol(C3, Decl(mergedInterfacesWithMultipleBases2.ts, 9, 1))
2014-08-15 23:33:16 +02:00
c: string;
2015-04-13 23:01:57 +02:00
>c : string, Symbol(c, Decl(mergedInterfacesWithMultipleBases2.ts, 11, 10))
2014-08-15 23:33:16 +02:00
}
class C4 {
2015-04-13 23:01:57 +02:00
>C4 : C4, Symbol(C4, Decl(mergedInterfacesWithMultipleBases2.ts, 13, 1))
2014-08-15 23:33:16 +02:00
d: string;
2015-04-13 23:01:57 +02:00
>d : string, Symbol(d, Decl(mergedInterfacesWithMultipleBases2.ts, 15, 10))
2014-08-15 23:33:16 +02:00
}
interface A extends C, C3 {
2015-04-13 23:01:57 +02:00
>A : A, Symbol(A, Decl(mergedInterfacesWithMultipleBases2.ts, 17, 1), Decl(mergedInterfacesWithMultipleBases2.ts, 22, 1))
>C : C, Symbol(C, Decl(mergedInterfacesWithMultipleBases2.ts, 0, 0))
>C3 : C3, Symbol(C3, Decl(mergedInterfacesWithMultipleBases2.ts, 9, 1))
2014-08-15 23:33:16 +02:00
y: string;
2015-04-13 23:01:57 +02:00
>y : string, Symbol(y, Decl(mergedInterfacesWithMultipleBases2.ts, 20, 27))
2014-08-15 23:33:16 +02:00
}
interface A extends C2, C4 {
2015-04-13 23:01:57 +02:00
>A : A, Symbol(A, Decl(mergedInterfacesWithMultipleBases2.ts, 17, 1), Decl(mergedInterfacesWithMultipleBases2.ts, 22, 1))
>C2 : C2, Symbol(C2, Decl(mergedInterfacesWithMultipleBases2.ts, 5, 1))
>C4 : C4, Symbol(C4, Decl(mergedInterfacesWithMultipleBases2.ts, 13, 1))
2014-08-15 23:33:16 +02:00
z: string;
2015-04-13 23:01:57 +02:00
>z : string, Symbol(z, Decl(mergedInterfacesWithMultipleBases2.ts, 24, 28))
2014-08-15 23:33:16 +02:00
}
class D implements A {
2015-04-13 23:01:57 +02:00
>D : D, Symbol(D, Decl(mergedInterfacesWithMultipleBases2.ts, 26, 1))
>A : A, Symbol(A, Decl(mergedInterfacesWithMultipleBases2.ts, 17, 1), Decl(mergedInterfacesWithMultipleBases2.ts, 22, 1))
2014-08-15 23:33:16 +02:00
a: number;
2015-04-13 23:01:57 +02:00
>a : number, Symbol(a, Decl(mergedInterfacesWithMultipleBases2.ts, 28, 22))
2014-08-15 23:33:16 +02:00
b: number;
2015-04-13 23:01:57 +02:00
>b : number, Symbol(b, Decl(mergedInterfacesWithMultipleBases2.ts, 29, 14))
2014-08-15 23:33:16 +02:00
c: string;
2015-04-13 23:01:57 +02:00
>c : string, Symbol(c, Decl(mergedInterfacesWithMultipleBases2.ts, 30, 14))
2014-08-15 23:33:16 +02:00
d: string;
2015-04-13 23:01:57 +02:00
>d : string, Symbol(d, Decl(mergedInterfacesWithMultipleBases2.ts, 31, 14))
2014-08-15 23:33:16 +02:00
y: string;
2015-04-13 23:01:57 +02:00
>y : string, Symbol(y, Decl(mergedInterfacesWithMultipleBases2.ts, 32, 14))
2014-08-15 23:33:16 +02:00
z: string;
2015-04-13 23:01:57 +02:00
>z : string, Symbol(z, Decl(mergedInterfacesWithMultipleBases2.ts, 33, 14))
2014-08-15 23:33:16 +02:00
}
var a: A;
2015-04-13 23:01:57 +02:00
>a : A, Symbol(a, Decl(mergedInterfacesWithMultipleBases2.ts, 37, 3))
>A : A, Symbol(A, Decl(mergedInterfacesWithMultipleBases2.ts, 17, 1), Decl(mergedInterfacesWithMultipleBases2.ts, 22, 1))
2014-08-15 23:33:16 +02:00
var r = a.a;
2015-04-13 23:01:57 +02:00
>r : number, Symbol(r, Decl(mergedInterfacesWithMultipleBases2.ts, 38, 3))
>a.a : number, Symbol(C.a, Decl(mergedInterfacesWithMultipleBases2.ts, 3, 9))
>a : A, Symbol(a, Decl(mergedInterfacesWithMultipleBases2.ts, 37, 3))
>a : number, Symbol(C.a, Decl(mergedInterfacesWithMultipleBases2.ts, 3, 9))
2014-08-15 23:33:16 +02:00
// generic interfaces in a module
module M {
2015-04-13 23:01:57 +02:00
>M : typeof M, Symbol(M, Decl(mergedInterfacesWithMultipleBases2.ts, 38, 12))
2014-08-15 23:33:16 +02:00
class C<T> {
2015-04-13 23:01:57 +02:00
>C : C<T>, Symbol(C, Decl(mergedInterfacesWithMultipleBases2.ts, 41, 10))
>T : T, Symbol(T, Decl(mergedInterfacesWithMultipleBases2.ts, 42, 12))
2014-08-15 23:33:16 +02:00
a: T;
2015-04-13 23:01:57 +02:00
>a : T, Symbol(a, Decl(mergedInterfacesWithMultipleBases2.ts, 42, 16))
>T : T, Symbol(T, Decl(mergedInterfacesWithMultipleBases2.ts, 42, 12))
2014-08-15 23:33:16 +02:00
}
class C2<T> {
2015-04-13 23:01:57 +02:00
>C2 : C2<T>, Symbol(C2, Decl(mergedInterfacesWithMultipleBases2.ts, 44, 5))
>T : T, Symbol(T, Decl(mergedInterfacesWithMultipleBases2.ts, 46, 13))
2014-08-15 23:33:16 +02:00
b: T;
2015-04-13 23:01:57 +02:00
>b : T, Symbol(b, Decl(mergedInterfacesWithMultipleBases2.ts, 46, 17))
>T : T, Symbol(T, Decl(mergedInterfacesWithMultipleBases2.ts, 46, 13))
2014-08-15 23:33:16 +02:00
}
class C3<T> {
2015-04-13 23:01:57 +02:00
>C3 : C3<T>, Symbol(C3, Decl(mergedInterfacesWithMultipleBases2.ts, 48, 5))
>T : T, Symbol(T, Decl(mergedInterfacesWithMultipleBases2.ts, 50, 13))
2014-08-15 23:33:16 +02:00
c: T;
2015-04-13 23:01:57 +02:00
>c : T, Symbol(c, Decl(mergedInterfacesWithMultipleBases2.ts, 50, 17))
>T : T, Symbol(T, Decl(mergedInterfacesWithMultipleBases2.ts, 50, 13))
2014-08-15 23:33:16 +02:00
}
class C4<T> {
2015-04-13 23:01:57 +02:00
>C4 : C4<T>, Symbol(C4, Decl(mergedInterfacesWithMultipleBases2.ts, 52, 5))
>T : T, Symbol(T, Decl(mergedInterfacesWithMultipleBases2.ts, 54, 13))
2014-08-15 23:33:16 +02:00
d: T;
2015-04-13 23:01:57 +02:00
>d : T, Symbol(d, Decl(mergedInterfacesWithMultipleBases2.ts, 54, 17))
>T : T, Symbol(T, Decl(mergedInterfacesWithMultipleBases2.ts, 54, 13))
2014-08-15 23:33:16 +02:00
}
interface A<T> extends C<T>, C3<T> {
2015-04-13 23:01:57 +02:00
>A : A<T>, Symbol(A, Decl(mergedInterfacesWithMultipleBases2.ts, 56, 5), Decl(mergedInterfacesWithMultipleBases2.ts, 60, 5))
>T : T, Symbol(T, Decl(mergedInterfacesWithMultipleBases2.ts, 58, 16), Decl(mergedInterfacesWithMultipleBases2.ts, 62, 16))
>C : C<T>, Symbol(C, Decl(mergedInterfacesWithMultipleBases2.ts, 41, 10))
>T : T, Symbol(T, Decl(mergedInterfacesWithMultipleBases2.ts, 58, 16), Decl(mergedInterfacesWithMultipleBases2.ts, 62, 16))
>C3 : C3<T>, Symbol(C3, Decl(mergedInterfacesWithMultipleBases2.ts, 48, 5))
>T : T, Symbol(T, Decl(mergedInterfacesWithMultipleBases2.ts, 58, 16), Decl(mergedInterfacesWithMultipleBases2.ts, 62, 16))
2014-08-15 23:33:16 +02:00
y: T;
2015-04-13 23:01:57 +02:00
>y : T, Symbol(y, Decl(mergedInterfacesWithMultipleBases2.ts, 58, 40))
>T : T, Symbol(T, Decl(mergedInterfacesWithMultipleBases2.ts, 58, 16), Decl(mergedInterfacesWithMultipleBases2.ts, 62, 16))
2014-08-15 23:33:16 +02:00
}
interface A<T> extends C2<string>, C4<string> {
2015-04-13 23:01:57 +02:00
>A : A<T>, Symbol(A, Decl(mergedInterfacesWithMultipleBases2.ts, 56, 5), Decl(mergedInterfacesWithMultipleBases2.ts, 60, 5))
>T : T, Symbol(T, Decl(mergedInterfacesWithMultipleBases2.ts, 58, 16), Decl(mergedInterfacesWithMultipleBases2.ts, 62, 16))
>C2 : C2<T>, Symbol(C2, Decl(mergedInterfacesWithMultipleBases2.ts, 44, 5))
>C4 : C4<T>, Symbol(C4, Decl(mergedInterfacesWithMultipleBases2.ts, 52, 5))
2014-08-15 23:33:16 +02:00
z: T;
2015-04-13 23:01:57 +02:00
>z : T, Symbol(z, Decl(mergedInterfacesWithMultipleBases2.ts, 62, 51))
>T : T, Symbol(T, Decl(mergedInterfacesWithMultipleBases2.ts, 58, 16), Decl(mergedInterfacesWithMultipleBases2.ts, 62, 16))
2014-08-15 23:33:16 +02:00
}
class D implements A<boolean> {
2015-04-13 23:01:57 +02:00
>D : D, Symbol(D, Decl(mergedInterfacesWithMultipleBases2.ts, 64, 5))
>A : A<T>, Symbol(A, Decl(mergedInterfacesWithMultipleBases2.ts, 56, 5), Decl(mergedInterfacesWithMultipleBases2.ts, 60, 5))
2014-08-15 23:33:16 +02:00
a: boolean;
2015-04-13 23:01:57 +02:00
>a : boolean, Symbol(a, Decl(mergedInterfacesWithMultipleBases2.ts, 66, 35))
2014-08-15 23:33:16 +02:00
b: string;
2015-04-13 23:01:57 +02:00
>b : string, Symbol(b, Decl(mergedInterfacesWithMultipleBases2.ts, 67, 19))
2014-08-15 23:33:16 +02:00
c: boolean;
2015-04-13 23:01:57 +02:00
>c : boolean, Symbol(c, Decl(mergedInterfacesWithMultipleBases2.ts, 68, 18))
2014-08-15 23:33:16 +02:00
d: string;
2015-04-13 23:01:57 +02:00
>d : string, Symbol(d, Decl(mergedInterfacesWithMultipleBases2.ts, 69, 19))
2014-08-15 23:33:16 +02:00
y: boolean;
2015-04-13 23:01:57 +02:00
>y : boolean, Symbol(y, Decl(mergedInterfacesWithMultipleBases2.ts, 70, 18))
2014-08-15 23:33:16 +02:00
z: boolean;
2015-04-13 23:01:57 +02:00
>z : boolean, Symbol(z, Decl(mergedInterfacesWithMultipleBases2.ts, 71, 19))
2014-08-15 23:33:16 +02:00
}
}