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
committed by Mohamed Hegazy
parent 86f69f13fa
commit e5b5fe1bd7
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");