File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11703,10 +11703,12 @@ namespace ts {
1170311703 // derived class inherits base without override/redeclaration
1170411704
1170511705 let derivedClassDecl = getDeclarationOfKind(type.symbol, SyntaxKind.ClassDeclaration);
11706- Debug.assert(derivedClassDecl !== undefined);
11706+ // Debug.assert(derivedClassDecl !== undefined);
1170711707
1170811708 // It is an error to inherit an abstract member without implementing it or being declared abstract.
11709- if ((baseDeclarationFlags & NodeFlags.Abstract) && !(derivedClassDecl.flags & NodeFlags.Abstract)) {
11709+ // If there is no declaration for the derived class (as in the case of class expressions),
11710+ // then the class cannot be declared abstract.
11711+ if ( baseDeclarationFlags & NodeFlags.Abstract && (!derivedClassDecl || !(derivedClassDecl.flags & NodeFlags.Abstract))) {
1171011712 error(derivedClassDecl, Diagnostics.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2,
1171111713 typeToString(type), symbolToString(baseProperty), typeToString(baseType));
1171211714 }
You can’t perform that action at this time.
0 commit comments