mirror of
https://github.com/swc-project/swc.git
synced 2024-12-19 03:31:45 +03:00
61 lines
881 B
TypeScript
61 lines
881 B
TypeScript
// Derived member is private, base member is not causes errors
|
|
|
|
class Base {
|
|
foo: string;
|
|
}
|
|
|
|
class Derived extends Base {
|
|
bar: string;
|
|
}
|
|
|
|
module ExplicitPublic {
|
|
class A {
|
|
private foo: Base;
|
|
}
|
|
|
|
class B extends A {
|
|
public foo: Derived; // error
|
|
}
|
|
|
|
class A2 {
|
|
private 1: Base;
|
|
}
|
|
|
|
class B2 extends A2 {
|
|
public 1: Derived; // error
|
|
}
|
|
|
|
class A3 {
|
|
private '1': Base;
|
|
}
|
|
|
|
class B3 extends A3 {
|
|
public '1': Derived; // error
|
|
}
|
|
}
|
|
|
|
module ImplicitPublic {
|
|
class A {
|
|
private foo: Base;
|
|
}
|
|
|
|
class B extends A {
|
|
foo: Derived; // error
|
|
}
|
|
|
|
class A2 {
|
|
private 1: Base;
|
|
}
|
|
|
|
class B2 extends A2 {
|
|
1: Derived; // error
|
|
}
|
|
|
|
class A3 {
|
|
private '1': Base;
|
|
}
|
|
|
|
class B3 extends A3 {
|
|
'1': Derived; // error
|
|
}
|
|
} |