Support indexing with known symbols

This commit is contained in:
Jason Freeman
2015-02-05 17:18:32 -08:00
parent df826de042
commit d07ed679a0
26 changed files with 495 additions and 14 deletions

View File

@@ -97,7 +97,7 @@ module ts {
if (node.name.kind === SyntaxKind.ComputedPropertyName) {
var nameExpression = (<ComputedPropertyName>node.name).expression;
Debug.assert(isWellKnownSymbolSyntactically(nameExpression));
return "__@" + (<PropertyAccessExpression>nameExpression).name.text;
return getPropertyNameForKnownSymbolName((<PropertyAccessExpression>nameExpression).name.text);
}
return (<Identifier | LiteralExpression>node.name).text;
}