mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
196 lines
8.4 KiB
Plaintext
196 lines
8.4 KiB
Plaintext
//// [tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts] ////
|
|
|
|
=== implementingAnInterfaceExtendingClassWithPrivates2.ts ===
|
|
class Foo {
|
|
>Foo : Symbol(Foo, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 0, 0))
|
|
|
|
private x!: string;
|
|
>x : Symbol(Foo.x, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 0, 11))
|
|
}
|
|
|
|
interface I extends Foo {
|
|
>I : Symbol(I, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 2, 1))
|
|
>Foo : Symbol(Foo, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 0, 0))
|
|
|
|
y: number;
|
|
>y : Symbol(I.y, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 4, 25))
|
|
}
|
|
|
|
class Bar extends Foo implements I { // ok
|
|
>Bar : Symbol(Bar, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 6, 1))
|
|
>Foo : Symbol(Foo, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 0, 0))
|
|
>I : Symbol(I, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 2, 1))
|
|
|
|
y!: number;
|
|
>y : Symbol(Bar.y, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 8, 36))
|
|
}
|
|
|
|
class Bar2 extends Foo implements I { // error
|
|
>Bar2 : Symbol(Bar2, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 10, 1))
|
|
>Foo : Symbol(Foo, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 0, 0))
|
|
>I : Symbol(I, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 2, 1))
|
|
|
|
x!: string;
|
|
>x : Symbol(Bar2.x, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 12, 37))
|
|
|
|
y!: number;
|
|
>y : Symbol(Bar2.y, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 13, 15))
|
|
}
|
|
|
|
class Bar3 extends Foo implements I { // error
|
|
>Bar3 : Symbol(Bar3, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 15, 1))
|
|
>Foo : Symbol(Foo, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 0, 0))
|
|
>I : Symbol(I, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 2, 1))
|
|
|
|
private x!: string;
|
|
>x : Symbol(Bar3.x, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 17, 37))
|
|
|
|
y!: number;
|
|
>y : Symbol(Bar3.y, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 18, 23))
|
|
}
|
|
|
|
// another level of indirection
|
|
namespace M {
|
|
>M : Symbol(M, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 20, 1))
|
|
|
|
class Foo {
|
|
>Foo : Symbol(Foo, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 23, 13))
|
|
|
|
private x!: string;
|
|
>x : Symbol(Foo.x, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 24, 15))
|
|
}
|
|
|
|
class Baz extends Foo {
|
|
>Baz : Symbol(Baz, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 26, 5))
|
|
>Foo : Symbol(Foo, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 23, 13))
|
|
|
|
z!: number;
|
|
>z : Symbol(Baz.z, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 28, 27))
|
|
}
|
|
|
|
interface I extends Baz {
|
|
>I : Symbol(I, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 30, 5))
|
|
>Baz : Symbol(Baz, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 26, 5))
|
|
|
|
y: number;
|
|
>y : Symbol(I.y, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 32, 29))
|
|
}
|
|
|
|
class Bar extends Foo implements I { // ok
|
|
>Bar : Symbol(Bar, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 34, 5))
|
|
>Foo : Symbol(Foo, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 23, 13))
|
|
>I : Symbol(I, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 30, 5))
|
|
|
|
y!: number;
|
|
>y : Symbol(Bar.y, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 36, 40))
|
|
|
|
z!: number;
|
|
>z : Symbol(Bar.z, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 37, 19))
|
|
}
|
|
|
|
class Bar2 extends Foo implements I { // error
|
|
>Bar2 : Symbol(Bar2, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 39, 5))
|
|
>Foo : Symbol(Foo, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 23, 13))
|
|
>I : Symbol(I, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 30, 5))
|
|
|
|
x!: string;
|
|
>x : Symbol(Bar2.x, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 41, 41))
|
|
|
|
y!: number;
|
|
>y : Symbol(Bar2.y, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 42, 19))
|
|
}
|
|
|
|
class Bar3 extends Foo implements I { // error
|
|
>Bar3 : Symbol(Bar3, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 44, 5))
|
|
>Foo : Symbol(Foo, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 23, 13))
|
|
>I : Symbol(I, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 30, 5))
|
|
|
|
private x!: string;
|
|
>x : Symbol(Bar3.x, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 46, 41))
|
|
|
|
y!: number;
|
|
>y : Symbol(Bar3.y, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 47, 27))
|
|
}
|
|
}
|
|
|
|
// two levels of privates
|
|
namespace M2 {
|
|
>M2 : Symbol(M2, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 50, 1))
|
|
|
|
class Foo {
|
|
>Foo : Symbol(Foo, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 53, 14))
|
|
|
|
private x!: string;
|
|
>x : Symbol(Foo.x, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 54, 15))
|
|
}
|
|
|
|
class Baz extends Foo {
|
|
>Baz : Symbol(Baz, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 56, 5))
|
|
>Foo : Symbol(Foo, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 53, 14))
|
|
|
|
private y!: number;
|
|
>y : Symbol(Baz.y, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 58, 27))
|
|
}
|
|
|
|
interface I extends Baz {
|
|
>I : Symbol(I, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 60, 5))
|
|
>Baz : Symbol(Baz, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 56, 5))
|
|
|
|
z: number;
|
|
>z : Symbol(I.z, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 62, 29))
|
|
}
|
|
|
|
class Bar extends Foo implements I { // error
|
|
>Bar : Symbol(Bar, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 64, 5))
|
|
>Foo : Symbol(Foo, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 53, 14))
|
|
>I : Symbol(I, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 60, 5))
|
|
|
|
z!: number;
|
|
>z : Symbol(Bar.z, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 66, 40))
|
|
}
|
|
|
|
declare var b: Bar;
|
|
>b : Symbol(b, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 70, 15))
|
|
>Bar : Symbol(Bar, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 64, 5))
|
|
|
|
var r1 = b.z;
|
|
>r1 : Symbol(r1, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 71, 7))
|
|
>b.z : Symbol(Bar.z, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 66, 40))
|
|
>b : Symbol(b, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 70, 15))
|
|
>z : Symbol(Bar.z, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 66, 40))
|
|
|
|
var r2 = b.x; // error
|
|
>r2 : Symbol(r2, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 72, 7))
|
|
>b.x : Symbol(Foo.x, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 54, 15))
|
|
>b : Symbol(b, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 70, 15))
|
|
>x : Symbol(Foo.x, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 54, 15))
|
|
|
|
var r3 = b.y; // error
|
|
>r3 : Symbol(r3, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 73, 7))
|
|
>b : Symbol(b, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 70, 15))
|
|
|
|
class Bar2 extends Foo implements I { // error
|
|
>Bar2 : Symbol(Bar2, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 73, 17))
|
|
>Foo : Symbol(Foo, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 53, 14))
|
|
>I : Symbol(I, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 60, 5))
|
|
|
|
x!: string;
|
|
>x : Symbol(Bar2.x, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 75, 41))
|
|
|
|
z!: number;
|
|
>z : Symbol(Bar2.z, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 76, 19))
|
|
}
|
|
|
|
class Bar3 extends Foo implements I { // error
|
|
>Bar3 : Symbol(Bar3, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 78, 5))
|
|
>Foo : Symbol(Foo, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 53, 14))
|
|
>I : Symbol(I, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 60, 5))
|
|
|
|
private x!: string;
|
|
>x : Symbol(Bar3.x, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 80, 41))
|
|
|
|
z!: number;
|
|
>z : Symbol(Bar3.z, Decl(implementingAnInterfaceExtendingClassWithPrivates2.ts, 81, 27))
|
|
}
|
|
}
|