From c79619bce51b73aa67cbac5e00daa7dbba3c9606 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 9 Oct 2014 14:16:19 -0700 Subject: [PATCH] Quick edit to comment. --- src/compiler/checker.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index fab031891a6..a3d90017272 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -4095,8 +4095,7 @@ module ts { var numericScanner: Scanner; function isNumericName(name: string) { // First see if the name is in canonical string representation. - // Unfortunately this permits various forms of "NaN" and "Infinity", - // but it is a good check to save time. + // We can't simply rely on this because this permits various forms of "NaN" and "Infinity". if ((+name).toString() !== name) { return false; } @@ -4104,7 +4103,7 @@ module ts { numericScanner = numericScanner || createScanner(compilerOptions.target || ScriptTarget.ES5, /*skipTrivia*/ false); numericScanner.setText(name); - // Ensure that the name is nothing more than an optional sign (+/-) and a numeric literal + // Ensure that the name is nothing more than an optional sign ('-') and a numeric literal // (i.e. it is preceded by nothing and scanning leaves us at the very end of the string). var token = numericScanner.scan();