When creating string literal for property access, unescape the identifier text

Fixes #12562
This commit is contained in:
Sheetal Nandi 2016-11-30 10:51:35 -08:00
parent ea1f03915b
commit 7bb8331124
2 changed files with 2 additions and 2 deletions

View File

@ -1905,7 +1905,7 @@ namespace ts {
: (<ComputedPropertyName>name).expression;
}
else if (isIdentifier(name)) {
return createLiteral(name.text);
return createLiteral(unescapeIdentifier(name.text));
}
else {
return getSynthesizedClone(name);

View File

@ -34,4 +34,4 @@ var A = (function () {
}());
__decorate([
dec()
], A.prototype, "___foo");
], A.prototype, "__foo");