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

11 lines
180 B
TypeScript

class Base {
protected constructor() { }
}
class Derived extends Base {
static make() { new Base() } // ok
}
class Unrelated {
static fake() { new Base() } // error
}