35 lines
847 B
Plaintext
35 lines
847 B
Plaintext
==== tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates.ts (3 errors) ====
|
|
class C {
|
|
private x: number;
|
|
}
|
|
|
|
interface A extends C {
|
|
y: string;
|
|
}
|
|
|
|
interface A {
|
|
z: string;
|
|
}
|
|
|
|
class D implements A { // error
|
|
~
|
|
!!! Class 'D' incorrectly implements interface 'A':
|
|
!!! Private property 'x' cannot be reimplemented.
|
|
private x: number;
|
|
y: string;
|
|
z: string;
|
|
}
|
|
|
|
class E implements A { // error
|
|
~
|
|
!!! Class 'E' incorrectly implements interface 'A':
|
|
!!! Private property 'x' cannot be reimplemented.
|
|
x: number;
|
|
y: string;
|
|
z: string;
|
|
}
|
|
|
|
var a: A;
|
|
var r = a.x; // error
|
|
~~~
|
|
!!! Property 'C.x' is inaccessible. |