TypeScript/tests/baselines/reference/interfaceExtendingClassWithPrivates.errors.txt
2014-09-11 16:11:08 -07:00

21 lines
604 B
Plaintext

==== tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithPrivates.ts (2 errors) ====
class Foo {
private x: string;
}
interface I extends Foo { // error
~
!!! error TS2429: Interface 'I' incorrectly extends interface 'Foo':
!!! error TS2429: Private property 'x' cannot be reimplemented.
x: string;
}
interface I2 extends Foo {
y: string;
}
var i: I2;
var r = i.y;
var r2 = i.x; // error
~~~
!!! error TS2341: Property 'Foo.x' is inaccessible.