Skip to content

Commit 28499dd

Browse files
committed
Fixes issues with emit for cloned identifiers
1 parent 913545e commit 28499dd

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/compiler/factory.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ namespace ts {
127127

128128
export function createIdentifier(text: string, location?: TextRange): Identifier {
129129
const node = <Identifier>createNode(SyntaxKind.Identifier, location);
130-
node.text = text;
130+
node.text = escapeIdentifier(text);
131131
return node;
132132
}
133133

src/compiler/printer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2349,7 +2349,7 @@ const _super = (function (geti, seti) {
23492349
return getGeneratedIdentifier(node);
23502350
}
23512351
else if (nodeIsSynthesized(node) || !node.parent) {
2352-
return node.text;
2352+
return unescapeIdentifier(node.text);
23532353
}
23542354
}
23552355
else if (isLiteralExpression(node) && (nodeIsSynthesized(node) || !node.parent)) {

0 commit comments

Comments
 (0)