1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingProtectedStatic.ts(12,7): error TS2417: Class static side 'typeof Derived' incorrectly extends base class static side 'typeof Base'.
Property 'x' is private in type 'typeof Derived' but not in type 'typeof Base'.
==== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingProtectedStatic.ts (1 errors) ====
class Base {
protected static x: string;
protected static fn(): string {
return '';
}
protected static get a() { return 1; }
protected static set a(v) { }
}
// should be error
class Derived extends Base {
~~~~~~~
!!! error TS2417: Class static side 'typeof Derived' incorrectly extends base class static side 'typeof Base'.
!!! error TS2417: Property 'x' is private in type 'typeof Derived' but not in type 'typeof Base'.
private static x: string;
private static fn(): string {
return '';
}
private static get a() { return 1; }
private static set a(v) { }
}
|