Skip to content

Commit 72f1789

Browse files
committed
Revert PR 56161
1 parent cc460dc commit 72f1789

File tree

4 files changed

+1
-31
lines changed

4 files changed

+1
-31
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45689,7 +45689,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
4568945689
}
4569045690
else {
4569145691
const text = getTextOfPropertyName(member.name);
45692-
if (isNumericLiteralName(text)) {
45692+
if (isNumericLiteralName(text) && !isInfinityOrNaNString(text)) {
4569345693
error(member.name, Diagnostics.An_enum_member_cannot_have_a_numeric_name);
4569445694
}
4569545695
}

tests/baselines/reference/enumWithInfinityProperty.errors.txt

Lines changed: 0 additions & 10 deletions
This file was deleted.

tests/baselines/reference/enumWithNaNProperty.errors.txt

Lines changed: 0 additions & 10 deletions
This file was deleted.

tests/baselines/reference/enumWithNegativeInfinityProperty.errors.txt

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)