21 lines
No EOL
562 B
Text
21 lines
No EOL
562 B
Text
==== tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithPrivates.ts (2 errors) ====
|
|
class Foo {
|
|
private x: string;
|
|
}
|
|
|
|
interface I extends Foo { // error
|
|
~
|
|
!!! Interface 'I' incorrectly extends interface 'Foo':
|
|
!!! 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
|
|
~~~
|
|
!!! Property 'Foo.x' is inaccessible. |