22 lines
840 B
Plaintext
22 lines
840 B
Plaintext
==== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPrivates.ts (2 errors) ====
|
|
class Base {
|
|
private x: { foo: string };
|
|
}
|
|
|
|
class Derived extends Base {
|
|
~~~~~~~
|
|
!!! error TS2416: Class 'Derived' incorrectly extends base class 'Base':
|
|
!!! error TS2416: Private property 'x' cannot be reimplemented.
|
|
private x: { foo: string; bar: string; }; // error
|
|
}
|
|
|
|
class Base2 {
|
|
private static y: { foo: string };
|
|
}
|
|
|
|
class Derived2 extends Base2 {
|
|
~~~~~~~~
|
|
!!! error TS2418: Class static side 'typeof Derived2' incorrectly extends base class static side 'typeof Base2':
|
|
!!! error TS2418: Private property 'y' cannot be reimplemented.
|
|
private static y: { foo: string; bar: string; }; // error
|
|
} |