121 lines
4.7 KiB
Plaintext
121 lines
4.7 KiB
Plaintext
=== tests/cases/conformance/interfaces/declarationMerging/mergeTwoInterfaces2.ts ===
|
|
// two interfaces with the same root module should merge
|
|
|
|
// root module now multiple module declarations
|
|
module M2 {
|
|
>M2 : Symbol(M2, Decl(mergeTwoInterfaces2.ts, 0, 0), Decl(mergeTwoInterfaces2.ts, 11, 1), Decl(mergeTwoInterfaces2.ts, 21, 1), Decl(mergeTwoInterfaces2.ts, 34, 1))
|
|
|
|
export interface A {
|
|
>A : Symbol(A, Decl(mergeTwoInterfaces2.ts, 3, 11), Decl(mergeTwoInterfaces2.ts, 13, 11))
|
|
|
|
foo: string;
|
|
>foo : Symbol(A.foo, Decl(mergeTwoInterfaces2.ts, 4, 24))
|
|
}
|
|
|
|
var a: A;
|
|
>a : Symbol(a, Decl(mergeTwoInterfaces2.ts, 8, 7))
|
|
>A : Symbol(A, Decl(mergeTwoInterfaces2.ts, 3, 11), Decl(mergeTwoInterfaces2.ts, 13, 11))
|
|
|
|
var r1 = a.foo
|
|
>r1 : Symbol(r1, Decl(mergeTwoInterfaces2.ts, 9, 7))
|
|
>a.foo : Symbol(A.foo, Decl(mergeTwoInterfaces2.ts, 4, 24))
|
|
>a : Symbol(a, Decl(mergeTwoInterfaces2.ts, 8, 7))
|
|
>foo : Symbol(A.foo, Decl(mergeTwoInterfaces2.ts, 4, 24))
|
|
|
|
var r2 = a.bar;
|
|
>r2 : Symbol(r2, Decl(mergeTwoInterfaces2.ts, 10, 7))
|
|
>a.bar : Symbol(A.bar, Decl(mergeTwoInterfaces2.ts, 14, 24))
|
|
>a : Symbol(a, Decl(mergeTwoInterfaces2.ts, 8, 7))
|
|
>bar : Symbol(A.bar, Decl(mergeTwoInterfaces2.ts, 14, 24))
|
|
}
|
|
|
|
module M2 {
|
|
>M2 : Symbol(M2, Decl(mergeTwoInterfaces2.ts, 0, 0), Decl(mergeTwoInterfaces2.ts, 11, 1), Decl(mergeTwoInterfaces2.ts, 21, 1), Decl(mergeTwoInterfaces2.ts, 34, 1))
|
|
|
|
export interface A {
|
|
>A : Symbol(A, Decl(mergeTwoInterfaces2.ts, 3, 11), Decl(mergeTwoInterfaces2.ts, 13, 11))
|
|
|
|
bar: number;
|
|
>bar : Symbol(A.bar, Decl(mergeTwoInterfaces2.ts, 14, 24))
|
|
}
|
|
|
|
var a: A;
|
|
>a : Symbol(a, Decl(mergeTwoInterfaces2.ts, 18, 7))
|
|
>A : Symbol(A, Decl(mergeTwoInterfaces2.ts, 3, 11), Decl(mergeTwoInterfaces2.ts, 13, 11))
|
|
|
|
var r1 = a.foo
|
|
>r1 : Symbol(r1, Decl(mergeTwoInterfaces2.ts, 19, 7))
|
|
>a.foo : Symbol(A.foo, Decl(mergeTwoInterfaces2.ts, 4, 24))
|
|
>a : Symbol(a, Decl(mergeTwoInterfaces2.ts, 18, 7))
|
|
>foo : Symbol(A.foo, Decl(mergeTwoInterfaces2.ts, 4, 24))
|
|
|
|
var r2 = a.bar;
|
|
>r2 : Symbol(r2, Decl(mergeTwoInterfaces2.ts, 20, 7))
|
|
>a.bar : Symbol(A.bar, Decl(mergeTwoInterfaces2.ts, 14, 24))
|
|
>a : Symbol(a, Decl(mergeTwoInterfaces2.ts, 18, 7))
|
|
>bar : Symbol(A.bar, Decl(mergeTwoInterfaces2.ts, 14, 24))
|
|
}
|
|
|
|
// same as above but with an additional level of nesting
|
|
module M2 {
|
|
>M2 : Symbol(M2, Decl(mergeTwoInterfaces2.ts, 0, 0), Decl(mergeTwoInterfaces2.ts, 11, 1), Decl(mergeTwoInterfaces2.ts, 21, 1), Decl(mergeTwoInterfaces2.ts, 34, 1))
|
|
|
|
export module M3 {
|
|
>M3 : Symbol(M3, Decl(mergeTwoInterfaces2.ts, 24, 11), Decl(mergeTwoInterfaces2.ts, 36, 11))
|
|
|
|
export interface A {
|
|
>A : Symbol(A, Decl(mergeTwoInterfaces2.ts, 25, 22), Decl(mergeTwoInterfaces2.ts, 37, 22))
|
|
|
|
foo: string;
|
|
>foo : Symbol(A.foo, Decl(mergeTwoInterfaces2.ts, 26, 28))
|
|
}
|
|
|
|
var a: A;
|
|
>a : Symbol(a, Decl(mergeTwoInterfaces2.ts, 30, 11))
|
|
>A : Symbol(A, Decl(mergeTwoInterfaces2.ts, 25, 22), Decl(mergeTwoInterfaces2.ts, 37, 22))
|
|
|
|
var r1 = a.foo
|
|
>r1 : Symbol(r1, Decl(mergeTwoInterfaces2.ts, 31, 11))
|
|
>a.foo : Symbol(A.foo, Decl(mergeTwoInterfaces2.ts, 26, 28))
|
|
>a : Symbol(a, Decl(mergeTwoInterfaces2.ts, 30, 11))
|
|
>foo : Symbol(A.foo, Decl(mergeTwoInterfaces2.ts, 26, 28))
|
|
|
|
var r2 = a.bar;
|
|
>r2 : Symbol(r2, Decl(mergeTwoInterfaces2.ts, 32, 11))
|
|
>a.bar : Symbol(A.bar, Decl(mergeTwoInterfaces2.ts, 38, 28))
|
|
>a : Symbol(a, Decl(mergeTwoInterfaces2.ts, 30, 11))
|
|
>bar : Symbol(A.bar, Decl(mergeTwoInterfaces2.ts, 38, 28))
|
|
}
|
|
}
|
|
|
|
module M2 {
|
|
>M2 : Symbol(M2, Decl(mergeTwoInterfaces2.ts, 0, 0), Decl(mergeTwoInterfaces2.ts, 11, 1), Decl(mergeTwoInterfaces2.ts, 21, 1), Decl(mergeTwoInterfaces2.ts, 34, 1))
|
|
|
|
export module M3 {
|
|
>M3 : Symbol(M3, Decl(mergeTwoInterfaces2.ts, 24, 11), Decl(mergeTwoInterfaces2.ts, 36, 11))
|
|
|
|
export interface A {
|
|
>A : Symbol(A, Decl(mergeTwoInterfaces2.ts, 25, 22), Decl(mergeTwoInterfaces2.ts, 37, 22))
|
|
|
|
bar: number;
|
|
>bar : Symbol(A.bar, Decl(mergeTwoInterfaces2.ts, 38, 28))
|
|
}
|
|
|
|
var a: A;
|
|
>a : Symbol(a, Decl(mergeTwoInterfaces2.ts, 42, 11))
|
|
>A : Symbol(A, Decl(mergeTwoInterfaces2.ts, 25, 22), Decl(mergeTwoInterfaces2.ts, 37, 22))
|
|
|
|
var r1 = a.foo
|
|
>r1 : Symbol(r1, Decl(mergeTwoInterfaces2.ts, 43, 11))
|
|
>a.foo : Symbol(A.foo, Decl(mergeTwoInterfaces2.ts, 26, 28))
|
|
>a : Symbol(a, Decl(mergeTwoInterfaces2.ts, 42, 11))
|
|
>foo : Symbol(A.foo, Decl(mergeTwoInterfaces2.ts, 26, 28))
|
|
|
|
var r2 = a.bar;
|
|
>r2 : Symbol(r2, Decl(mergeTwoInterfaces2.ts, 44, 11))
|
|
>a.bar : Symbol(A.bar, Decl(mergeTwoInterfaces2.ts, 38, 28))
|
|
>a : Symbol(a, Decl(mergeTwoInterfaces2.ts, 42, 11))
|
|
>bar : Symbol(A.bar, Decl(mergeTwoInterfaces2.ts, 38, 28))
|
|
}
|
|
}
|