mirror of
https://github.com/swc-project/swc.git
synced 2024-12-29 00:23:10 +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
|
|
}
|
|
}
|
|
} |