Skip to content

Commit 91ea83c

Browse files
committed
Addressed PR
1 parent ec7e80e commit 91ea83c

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/compiler/checker.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14075,12 +14075,12 @@ namespace ts {
1407514075
}
1407614076

1407714077
function checkBaseTypeAccessibility(type: ObjectType, node: ExpressionWithTypeArguments) {
14078-
const typeClassDeclaration = <ClassLikeDeclaration>getClassLikeDeclarationOfSymbol(type.symbol);
14079-
if (!isNodeWithinClass(node, typeClassDeclaration)) {
14080-
const signatures = getSignaturesOfType(type, SignatureKind.Construct);
14081-
if (signatures.length) {
14082-
const declaration = signatures[0].declaration;
14083-
if (declaration && declaration.flags & NodeFlags.Private) {
14078+
const signatures = getSignaturesOfType(type, SignatureKind.Construct);
14079+
if (signatures.length) {
14080+
const declaration = signatures[0].declaration;
14081+
if (declaration && declaration.flags & NodeFlags.Private) {
14082+
const typeClassDeclaration = <ClassLikeDeclaration>getClassLikeDeclarationOfSymbol(type.symbol);
14083+
if (!isNodeWithinClass(node, typeClassDeclaration)) {
1408414084
error(node, Diagnostics.Cannot_extend_a_class_0_Class_constructor_is_marked_as_private, (<Identifier>node.expression).text);
1408514085
}
1408614086
}

0 commit comments

Comments
 (0)