mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-18 03:43:28 -06:00
Fixed bug where numeric check wasn't catching everything
This commit is contained in:
parent
cbfbae94fd
commit
7b9dee8df8
@ -3674,7 +3674,7 @@ module ts {
|
||||
var errorCountBeforeEnumMember = file.syntacticErrors.length;
|
||||
node.name = parsePropertyName();
|
||||
|
||||
if(isIntegerLiteral(node.name)) {
|
||||
if(!isNaN(Number(node.name.text))) {
|
||||
grammarErrorOnNode(node.name, Diagnostics.An_enum_member_cannot_have_a_numeric_name);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user