Files
tsgo/testdata/baselines/reference/submodule/conformance/derivedClassOverridesPrivates.errors.txt

34 lines
1.7 KiB
Plaintext

derivedClassOverridesPrivates.ts(2,13): error TS2564: Property 'x' has no initializer and is not definitely assigned in the constructor.
derivedClassOverridesPrivates.ts(5,7): error TS2415: Class 'Derived' incorrectly extends base class 'Base'.
Types have separate declarations of a private property 'x'.
derivedClassOverridesPrivates.ts(6,13): error TS2564: Property 'x' has no initializer and is not definitely assigned in the constructor.
derivedClassOverridesPrivates.ts(13,7): error TS2417: Class static side 'typeof Derived2' incorrectly extends base class static side 'typeof Base2'.
Types have separate declarations of a private property 'y'.
==== derivedClassOverridesPrivates.ts (4 errors) ====
class Base {
private x: { foo: string };
~
!!! error TS2564: Property 'x' has no initializer and is not definitely assigned in the constructor.
}
class Derived extends Base {
~~~~~~~
!!! error TS2415: Class 'Derived' incorrectly extends base class 'Base'.
!!! error TS2415: Types have separate declarations of a private property 'x'.
private x: { foo: string; bar: string; }; // error
~
!!! error TS2564: Property 'x' has no initializer and is not definitely assigned in the constructor.
}
class Base2 {
private static y: { foo: string };
}
class Derived2 extends Base2 {
~~~~~~~~
!!! error TS2417: Class static side 'typeof Derived2' incorrectly extends base class static side 'typeof Base2'.
!!! error TS2417: Types have separate declarations of a private property 'y'.
private static y: { foo: string; bar: string; }; // error
}