mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
42 lines
966 B
TypeScript
42 lines
966 B
TypeScript
//// [tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingProtectedStatic.ts] ////
|
|
|
|
//// [derivedClassWithPrivateStaticShadowingProtectedStatic.ts]
|
|
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 {
|
|
private static x: string;
|
|
private static fn(): string {
|
|
return '';
|
|
}
|
|
|
|
private static get a() { return 1; }
|
|
private static set a(v) { }
|
|
}
|
|
|
|
//// [derivedClassWithPrivateStaticShadowingProtectedStatic.js]
|
|
"use strict";
|
|
class Base {
|
|
static fn() {
|
|
return '';
|
|
}
|
|
static get a() { return 1; }
|
|
static set a(v) { }
|
|
}
|
|
// should be error
|
|
class Derived extends Base {
|
|
static fn() {
|
|
return '';
|
|
}
|
|
static get a() { return 1; }
|
|
static set a(v) { }
|
|
}
|