File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -11703,10 +11703,12 @@ namespace ts {
11703
11703
// derived class inherits base without override/redeclaration
11704
11704
11705
11705
let derivedClassDecl = getDeclarationOfKind(type.symbol, SyntaxKind.ClassDeclaration);
11706
- Debug.assert(derivedClassDecl !== undefined);
11706
+ // Debug.assert(derivedClassDecl !== undefined);
11707
11707
11708
11708
// 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))) {
11710
11712
error(derivedClassDecl, Diagnostics.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2,
11711
11713
typeToString(type), symbolToString(baseProperty), typeToString(baseType));
11712
11714
}
You can’t perform that action at this time.
0 commit comments