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 @@ -892,7 +892,8 @@ namespace ts {
892
892
case SyntaxKind . FunctionExpression :
893
893
case SyntaxKind . ArrowFunction :
894
894
checkStrictModeFunctionName ( < FunctionExpression > node ) ;
895
- return bindAnonymousDeclaration ( < FunctionExpression > node , SymbolFlags . Function , "__function" ) ;
895
+ let bindingName = ( < FunctionExpression > node ) . name ? ( < FunctionExpression > node ) . name . text : "__function" ;
896
+ return bindAnonymousDeclaration ( < FunctionExpression > node , SymbolFlags . Function , bindingName ) ;
896
897
case SyntaxKind . ClassExpression :
897
898
case SyntaxKind . ClassDeclaration :
898
899
return bindClassLikeDeclaration ( < ClassLikeDeclaration > node ) ;
@@ -964,7 +965,8 @@ namespace ts {
964
965
bindBlockScopedDeclaration ( node , SymbolFlags . Class , SymbolFlags . ClassExcludes ) ;
965
966
}
966
967
else {
967
- bindAnonymousDeclaration ( node , SymbolFlags . Class , "__class" ) ;
968
+ let bindingName = node . name ? node . name . text : "__class" ;
969
+ bindAnonymousDeclaration ( node , SymbolFlags . Class , bindingName ) ;
968
970
}
969
971
970
972
let symbol = node . symbol ;
You can’t perform that action at this time.
0 commit comments