Fixed another bug in parser & fixed up baselines

This commit is contained in:
Chris Bubernak
2014-10-06 22:27:22 -07:00
parent c77135d3d9
commit 8286b67c09
34 changed files with 204 additions and 216 deletions

View File

@@ -3674,7 +3674,8 @@ module ts {
var errorCountBeforeEnumMember = file.syntacticErrors.length;
node.name = parsePropertyName();
if(!isNaN(Number(node.name.text))) {
// number("") returns 0 so we have to special case it
if(node.name.text !== "" && !isNaN(Number(node.name.text))) {
grammarErrorOnNode(node.name, Diagnostics.An_enum_member_cannot_have_a_numeric_name);
}