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
|
=== tests/cases/conformance/classes/members/privateNames/a.ts ===
export class Foo {
>Foo : Symbol(Foo, Decl(a.ts, 0, 0))
#x;
>#x : Symbol(Foo.#x, Decl(a.ts, 0, 18))
copy(other: import("./b").Foo) {
>copy : Symbol(Foo.copy, Decl(a.ts, 1, 7))
>other : Symbol(other, Decl(a.ts, 2, 9))
>Foo : Symbol(Foo, Decl(b.ts, 0, 0))
other.#x; // error
>other : Symbol(other, Decl(a.ts, 2, 9))
}
}
=== tests/cases/conformance/classes/members/privateNames/b.ts ===
export class Foo {
>Foo : Symbol(Foo, Decl(b.ts, 0, 0))
#x;
>#x : Symbol(Foo.#x, Decl(b.ts, 0, 18))
}
=== tests/cases/conformance/classes/members/privateNames/main.ts ===
import { Foo as A } from "./a";
>Foo : Symbol(A, Decl(a.ts, 0, 0))
>A : Symbol(A, Decl(main.ts, 0, 8))
import { Foo as B } from "./b";
>Foo : Symbol(B, Decl(b.ts, 0, 0))
>B : Symbol(B, Decl(main.ts, 1, 8))
const a = new A();
>a : Symbol(a, Decl(main.ts, 3, 5))
>A : Symbol(A, Decl(main.ts, 0, 8))
const b = new B();
>b : Symbol(b, Decl(main.ts, 4, 5))
>B : Symbol(B, Decl(main.ts, 1, 8))
a.copy(b); // error
>a.copy : Symbol(A.copy, Decl(a.ts, 1, 7))
>a : Symbol(a, Decl(main.ts, 3, 5))
>copy : Symbol(A.copy, Decl(a.ts, 1, 7))
>b : Symbol(b, Decl(main.ts, 4, 5))
|