TypeScript/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.errors.txt

29 lines
1.2 KiB
Plaintext
Raw Normal View History

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'.
2014-09-23 20:22:38 +02:00
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'.
2014-09-23 20:22:38 +02:00
private static x: string;
private static fn(): string {
return '';
}
private static get a() { return 1; }
private static set a(v) { }
}