29 lines
No EOL
1.2 KiB
Text
29 lines
No EOL
1.2 KiB
Text
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingProtectedStatic.ts(13,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) { }
|
|
} |