mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
71 lines
2.8 KiB
Plaintext
71 lines
2.8 KiB
Plaintext
//// [tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithProtecteds2.ts] ////
|
|
|
|
=== interfaceExtendingClassWithProtecteds2.ts ===
|
|
class Foo {
|
|
>Foo : Symbol(Foo, Decl(interfaceExtendingClassWithProtecteds2.ts, 0, 0))
|
|
|
|
protected x!: string;
|
|
>x : Symbol(Foo.x, Decl(interfaceExtendingClassWithProtecteds2.ts, 0, 11))
|
|
}
|
|
|
|
class Bar {
|
|
>Bar : Symbol(Bar, Decl(interfaceExtendingClassWithProtecteds2.ts, 2, 1))
|
|
|
|
protected x!: string;
|
|
>x : Symbol(Bar.x, Decl(interfaceExtendingClassWithProtecteds2.ts, 4, 11))
|
|
}
|
|
|
|
interface I3 extends Foo, Bar { // error
|
|
>I3 : Symbol(I3, Decl(interfaceExtendingClassWithProtecteds2.ts, 6, 1))
|
|
>Foo : Symbol(Foo, Decl(interfaceExtendingClassWithProtecteds2.ts, 0, 0))
|
|
>Bar : Symbol(Bar, Decl(interfaceExtendingClassWithProtecteds2.ts, 2, 1))
|
|
}
|
|
|
|
interface I4 extends Foo, Bar { // error
|
|
>I4 : Symbol(I4, Decl(interfaceExtendingClassWithProtecteds2.ts, 9, 1))
|
|
>Foo : Symbol(Foo, Decl(interfaceExtendingClassWithProtecteds2.ts, 0, 0))
|
|
>Bar : Symbol(Bar, Decl(interfaceExtendingClassWithProtecteds2.ts, 2, 1))
|
|
|
|
x: string;
|
|
>x : Symbol(I4.x, Decl(interfaceExtendingClassWithProtecteds2.ts, 11, 31))
|
|
}
|
|
|
|
class Baz {
|
|
>Baz : Symbol(Baz, Decl(interfaceExtendingClassWithProtecteds2.ts, 13, 1))
|
|
|
|
protected y!: string;
|
|
>y : Symbol(Baz.y, Decl(interfaceExtendingClassWithProtecteds2.ts, 15, 11))
|
|
}
|
|
|
|
interface I5 extends Foo, Baz {
|
|
>I5 : Symbol(I5, Decl(interfaceExtendingClassWithProtecteds2.ts, 17, 1))
|
|
>Foo : Symbol(Foo, Decl(interfaceExtendingClassWithProtecteds2.ts, 0, 0))
|
|
>Baz : Symbol(Baz, Decl(interfaceExtendingClassWithProtecteds2.ts, 13, 1))
|
|
|
|
z: string;
|
|
>z : Symbol(I5.z, Decl(interfaceExtendingClassWithProtecteds2.ts, 19, 31))
|
|
}
|
|
|
|
declare var i: I5;
|
|
>i : Symbol(i, Decl(interfaceExtendingClassWithProtecteds2.ts, 23, 11))
|
|
>I5 : Symbol(I5, Decl(interfaceExtendingClassWithProtecteds2.ts, 17, 1))
|
|
|
|
var r: string = i.z;
|
|
>r : Symbol(r, Decl(interfaceExtendingClassWithProtecteds2.ts, 24, 3))
|
|
>i.z : Symbol(I5.z, Decl(interfaceExtendingClassWithProtecteds2.ts, 19, 31))
|
|
>i : Symbol(i, Decl(interfaceExtendingClassWithProtecteds2.ts, 23, 11))
|
|
>z : Symbol(I5.z, Decl(interfaceExtendingClassWithProtecteds2.ts, 19, 31))
|
|
|
|
var r2 = i.x; // error
|
|
>r2 : Symbol(r2, Decl(interfaceExtendingClassWithProtecteds2.ts, 25, 3))
|
|
>i.x : Symbol(Foo.x, Decl(interfaceExtendingClassWithProtecteds2.ts, 0, 11))
|
|
>i : Symbol(i, Decl(interfaceExtendingClassWithProtecteds2.ts, 23, 11))
|
|
>x : Symbol(Foo.x, Decl(interfaceExtendingClassWithProtecteds2.ts, 0, 11))
|
|
|
|
var r3 = i.y; // error
|
|
>r3 : Symbol(r3, Decl(interfaceExtendingClassWithProtecteds2.ts, 26, 3))
|
|
>i.y : Symbol(Baz.y, Decl(interfaceExtendingClassWithProtecteds2.ts, 15, 11))
|
|
>i : Symbol(i, Decl(interfaceExtendingClassWithProtecteds2.ts, 23, 11))
|
|
>y : Symbol(Baz.y, Decl(interfaceExtendingClassWithProtecteds2.ts, 15, 11))
|
|
|