mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-15 11:35:42 -06:00
Merge pull request #8035 from Microsoft/defaultClassName
[Transforms] Fix the name when synthesized node is clone of auto generate identifier kind
This commit is contained in:
commit
5458826106
@ -2609,8 +2609,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 "node" is not the exact clone of "original" identifier, use "original" identifier to generate the name
|
||||
if (isIdentifier(node) && node.autoGenerateKind === GeneratedIdentifierKind.Node && node.id !== nodeId) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user