mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-22 12:03:44 -05:00
Fix the name when synthesized node is clone of auto generate identifier kind
This fixes variable declaration created for default exported class without name Fixes #7875
This commit is contained in:
@@ -2607,8 +2607,10 @@ const _super = (function (geti, seti) {
|
||||
function getSourceNodeForGeneratedName(name: Identifier) {
|
||||
let node: Node = name;
|
||||
while (node.original !== undefined) {
|
||||
const nodeId = node.id;
|
||||
node = node.original;
|
||||
if (isIdentifier(node) && node.autoGenerateKind === GeneratedIdentifierKind.Node) {
|
||||
// If this is not the exact clone of identifier use this identifier to generate the name
|
||||
if (isIdentifier(node) && node.autoGenerateKind === GeneratedIdentifierKind.Node && node.id !== nodeId) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user