mirror of
https://github.com/swc-project/swc.git
synced 2024-12-23 05:32:09 +03:00
33 lines
426 B
TypeScript
33 lines
426 B
TypeScript
|
// Derived member is private, base member is not causes errors
|
||
|
|
||
|
class Base {
|
||
|
foo: string;
|
||
|
}
|
||
|
|
||
|
class Derived extends Base {
|
||
|
bar: string;
|
||
|
}
|
||
|
|
||
|
class A {
|
||
|
public foo: Base;
|
||
|
}
|
||
|
|
||
|
class B extends A {
|
||
|
private foo: Derived; // error
|
||
|
}
|
||
|
|
||
|
class A2 {
|
||
|
public 1: Base;
|
||
|
}
|
||
|
|
||
|
class B2 extends A2 {
|
||
|
private 1: Derived; // error
|
||
|
}
|
||
|
|
||
|
class A3 {
|
||
|
public '1': Base;
|
||
|
}
|
||
|
|
||
|
class B3 extends A3 {
|
||
|
private '1': Derived; // error
|
||
|
}
|