Skip to content

Commit 7b9dee8

Browse files
committed
Fixed bug where numeric check wasn't catching everything
1 parent cbfbae9 commit 7b9dee8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/parser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3674,7 +3674,7 @@ module ts {
36743674
var errorCountBeforeEnumMember = file.syntacticErrors.length;
36753675
node.name = parsePropertyName();
36763676

3677-
if(isIntegerLiteral(node.name)) {
3677+
if(!isNaN(Number(node.name.text))) {
36783678
grammarErrorOnNode(node.name, Diagnostics.An_enum_member_cannot_have_a_numeric_name);
36793679
}
36803680

0 commit comments

Comments
 (0)