diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index d829795439b..eddddb5cb2b 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -10112,8 +10112,10 @@ namespace ts { // In super call, the candidate signatures are the matching arity signatures of the base constructor function instantiated // with the type arguments specified in the extends clause. const baseTypeNode = getClassExtendsHeritageClauseElement(getContainingClass(node)); - const baseConstructors = getInstantiatedConstructorsForTypeArguments(superType, baseTypeNode.typeArguments); - return resolveCall(node, baseConstructors, candidatesOutArray); + if (baseTypeNode) { + const baseConstructors = getInstantiatedConstructorsForTypeArguments(superType, baseTypeNode.typeArguments); + return resolveCall(node, baseConstructors, candidatesOutArray); + } } return resolveUntypedCall(node); } diff --git a/tests/cases/fourslash/superInsideInnerClass.ts b/tests/cases/fourslash/superInsideInnerClass.ts new file mode 100644 index 00000000000..3b85179b0d8 --- /dev/null +++ b/tests/cases/fourslash/superInsideInnerClass.ts @@ -0,0 +1,15 @@ +/// +////class Base { +//// constructor(n: number) { +//// } +////} +////class Derived extends Base { +//// constructor() { +//// class Nested { +//// [super(/*1*/)] = 11111 +//// } +//// } +////} + +goTo.marker('1'); +verify.signatureHelpCountIs(0);