Skip to content

Commit e46b7b0

Browse files
committed
Merge pull request microsoft#7144 from Microsoft/super-inside-inner-class-crashes
Super inside inner class crashes
2 parents 3663d40 + 86047a7 commit e46b7b0

2 files changed

Lines changed: 19 additions & 2 deletions

File tree

src/compiler/checker.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10112,8 +10112,10 @@ namespace ts {
1011210112
// In super call, the candidate signatures are the matching arity signatures of the base constructor function instantiated
1011310113
// with the type arguments specified in the extends clause.
1011410114
const baseTypeNode = getClassExtendsHeritageClauseElement(getContainingClass(node));
10115-
const baseConstructors = getInstantiatedConstructorsForTypeArguments(superType, baseTypeNode.typeArguments);
10116-
return resolveCall(node, baseConstructors, candidatesOutArray);
10115+
if (baseTypeNode) {
10116+
const baseConstructors = getInstantiatedConstructorsForTypeArguments(superType, baseTypeNode.typeArguments);
10117+
return resolveCall(node, baseConstructors, candidatesOutArray);
10118+
}
1011710119
}
1011810120
return resolveUntypedCall(node);
1011910121
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/// <reference path="fourslash.ts" />
2+
////class Base {
3+
//// constructor(n: number) {
4+
//// }
5+
////}
6+
////class Derived extends Base {
7+
//// constructor() {
8+
//// class Nested {
9+
//// [super(/*1*/)] = 11111
10+
//// }
11+
//// }
12+
////}
13+
14+
goTo.marker('1');
15+
verify.signatureHelpCountIs(0);

0 commit comments

Comments
 (0)