mirror of
https://github.com/swc-project/swc.git
synced 2024-12-20 20:22:26 +03:00
31 lines
435 B
TypeScript
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
|
|
}
|
|
}
|
|
} |