mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
101 lines
4.0 KiB
Plaintext
101 lines
4.0 KiB
Plaintext
//// [tests/cases/conformance/interfaces/declarationMerging/twoInterfacesDifferentRootModule2.ts] ////
|
|
|
|
=== twoInterfacesDifferentRootModule2.ts ===
|
|
// two interfaces with different root modules should not merge
|
|
|
|
namespace M {
|
|
>M : Symbol(M, Decl(twoInterfacesDifferentRootModule2.ts, 0, 0))
|
|
|
|
export interface A {
|
|
>A : Symbol(A, Decl(twoInterfacesDifferentRootModule2.ts, 2, 13))
|
|
|
|
foo: string;
|
|
>foo : Symbol(A.foo, Decl(twoInterfacesDifferentRootModule2.ts, 3, 24))
|
|
}
|
|
|
|
export interface B<T> {
|
|
>B : Symbol(B, Decl(twoInterfacesDifferentRootModule2.ts, 5, 5))
|
|
>T : Symbol(T, Decl(twoInterfacesDifferentRootModule2.ts, 7, 23))
|
|
|
|
foo: T;
|
|
>foo : Symbol(B.foo, Decl(twoInterfacesDifferentRootModule2.ts, 7, 27))
|
|
>T : Symbol(T, Decl(twoInterfacesDifferentRootModule2.ts, 7, 23))
|
|
}
|
|
|
|
namespace M2 {
|
|
>M2 : Symbol(M2, Decl(twoInterfacesDifferentRootModule2.ts, 9, 5))
|
|
|
|
export interface A {
|
|
>A : Symbol(A, Decl(twoInterfacesDifferentRootModule2.ts, 11, 18))
|
|
|
|
bar: number;
|
|
>bar : Symbol(A.bar, Decl(twoInterfacesDifferentRootModule2.ts, 12, 28))
|
|
}
|
|
|
|
declare var a: A;
|
|
>a : Symbol(a, Decl(twoInterfacesDifferentRootModule2.ts, 16, 19))
|
|
>A : Symbol(A, Decl(twoInterfacesDifferentRootModule2.ts, 11, 18))
|
|
|
|
var r1 = a.foo; // error
|
|
>r1 : Symbol(r1, Decl(twoInterfacesDifferentRootModule2.ts, 17, 11))
|
|
>a : Symbol(a, Decl(twoInterfacesDifferentRootModule2.ts, 16, 19))
|
|
|
|
var r2 = a.bar;
|
|
>r2 : Symbol(r2, Decl(twoInterfacesDifferentRootModule2.ts, 18, 11))
|
|
>a.bar : Symbol(A.bar, Decl(twoInterfacesDifferentRootModule2.ts, 12, 28))
|
|
>a : Symbol(a, Decl(twoInterfacesDifferentRootModule2.ts, 16, 19))
|
|
>bar : Symbol(A.bar, Decl(twoInterfacesDifferentRootModule2.ts, 12, 28))
|
|
|
|
export interface B<T> {
|
|
>B : Symbol(B, Decl(twoInterfacesDifferentRootModule2.ts, 18, 23))
|
|
>T : Symbol(T, Decl(twoInterfacesDifferentRootModule2.ts, 20, 27))
|
|
|
|
bar: T;
|
|
>bar : Symbol(B.bar, Decl(twoInterfacesDifferentRootModule2.ts, 20, 31))
|
|
>T : Symbol(T, Decl(twoInterfacesDifferentRootModule2.ts, 20, 27))
|
|
}
|
|
|
|
declare var b: B<string>;
|
|
>b : Symbol(b, Decl(twoInterfacesDifferentRootModule2.ts, 24, 19))
|
|
>B : Symbol(B, Decl(twoInterfacesDifferentRootModule2.ts, 18, 23))
|
|
|
|
var r3 = b.foo; // error
|
|
>r3 : Symbol(r3, Decl(twoInterfacesDifferentRootModule2.ts, 25, 11))
|
|
>b : Symbol(b, Decl(twoInterfacesDifferentRootModule2.ts, 24, 19))
|
|
|
|
var r4 = b.bar;
|
|
>r4 : Symbol(r4, Decl(twoInterfacesDifferentRootModule2.ts, 26, 11))
|
|
>b.bar : Symbol(B.bar, Decl(twoInterfacesDifferentRootModule2.ts, 20, 31))
|
|
>b : Symbol(b, Decl(twoInterfacesDifferentRootModule2.ts, 24, 19))
|
|
>bar : Symbol(B.bar, Decl(twoInterfacesDifferentRootModule2.ts, 20, 31))
|
|
}
|
|
|
|
declare var a: A;
|
|
>a : Symbol(a, Decl(twoInterfacesDifferentRootModule2.ts, 29, 15))
|
|
>A : Symbol(A, Decl(twoInterfacesDifferentRootModule2.ts, 2, 13))
|
|
|
|
var r1 = a.foo;
|
|
>r1 : Symbol(r1, Decl(twoInterfacesDifferentRootModule2.ts, 30, 7))
|
|
>a.foo : Symbol(A.foo, Decl(twoInterfacesDifferentRootModule2.ts, 3, 24))
|
|
>a : Symbol(a, Decl(twoInterfacesDifferentRootModule2.ts, 29, 15))
|
|
>foo : Symbol(A.foo, Decl(twoInterfacesDifferentRootModule2.ts, 3, 24))
|
|
|
|
var r2 = a.bar; // error
|
|
>r2 : Symbol(r2, Decl(twoInterfacesDifferentRootModule2.ts, 31, 7))
|
|
>a : Symbol(a, Decl(twoInterfacesDifferentRootModule2.ts, 29, 15))
|
|
|
|
declare var b: B<string>;
|
|
>b : Symbol(b, Decl(twoInterfacesDifferentRootModule2.ts, 33, 15))
|
|
>B : Symbol(B, Decl(twoInterfacesDifferentRootModule2.ts, 5, 5))
|
|
|
|
var r3 = b.foo;
|
|
>r3 : Symbol(r3, Decl(twoInterfacesDifferentRootModule2.ts, 34, 7))
|
|
>b.foo : Symbol(B.foo, Decl(twoInterfacesDifferentRootModule2.ts, 7, 27))
|
|
>b : Symbol(b, Decl(twoInterfacesDifferentRootModule2.ts, 33, 15))
|
|
>foo : Symbol(B.foo, Decl(twoInterfacesDifferentRootModule2.ts, 7, 27))
|
|
|
|
var r4 = b.bar; // error
|
|
>r4 : Symbol(r4, Decl(twoInterfacesDifferentRootModule2.ts, 35, 7))
|
|
>b : Symbol(b, Decl(twoInterfacesDifferentRootModule2.ts, 33, 15))
|
|
}
|