swc/crates/swc_ecma_parser/tests/tsc/classConstructorAccessibility4.ts

31 lines
435 B
TypeScript

// @declaration: true
class A {
private constructor() { }
method() {
class B {
method() {
new A(); // OK
}
}
class C extends A { // OK
}
}
}
class D {
protected constructor() { }
method() {
class E {
method() {
new D(); // OK
}
}
class F extends D { // OK
}
}
}