TypeScript/tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility5.ts
Nathan Shively-Sanders 25525607d5 Test that protected constructors are accessible
in static methods of subclasses
2016-07-22 13:38:45 -07:00

11 lines
190 B
TypeScript

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