From 792b8bb78efdb91612784ad2b0241612a3efef22 Mon Sep 17 00:00:00 2001 From: Yuichi Nukiyama Date: Mon, 11 Dec 2017 23:05:49 +0000 Subject: [PATCH] Fix error messeage (#20601) * Fix error messeage * delete extra lint --- src/compiler/diagnosticMessages.json | 4 ++ src/compiler/scanner.ts | 18 ++++++ ...umericSeparators.binaryNegative.errors.txt | 8 +-- ...mericSeparators.decmialNegative.errors.txt | 60 +++++++++---------- ...r.numericSeparators.hexNegative.errors.txt | 8 +-- ...numericSeparators.octalNegative.errors.txt | 8 +-- 6 files changed, 64 insertions(+), 42 deletions(-) diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 7bec6b8257..2cb068f0ef 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -3424,6 +3424,10 @@ "category": "Error", "code": 6188 }, + "Multiple consecutive numeric separators are not permitted.": { + "category": "Error", + "code": 6189 + }, "Variable '{0}' implicitly has an '{1}' type.": { "category": "Error", "code": 7005 diff --git a/src/compiler/scanner.ts b/src/compiler/scanner.ts index f9d30fdd58..1cd6493115 100644 --- a/src/compiler/scanner.ts +++ b/src/compiler/scanner.ts @@ -866,6 +866,7 @@ namespace ts { function scanNumberFragment(): string { let start = pos; let allowSeparator = false; + let isPreviousTokenSeparator = false; let result = ""; while (true) { const ch = text.charCodeAt(pos); @@ -873,8 +874,12 @@ namespace ts { tokenFlags |= TokenFlags.ContainsSeparator; if (allowSeparator) { allowSeparator = false; + isPreviousTokenSeparator = true; result += text.substring(start, pos); } + else if (isPreviousTokenSeparator) { + error(Diagnostics.Multiple_consecutive_numeric_separators_are_not_permitted, pos, 1); + } else { error(Diagnostics.Numeric_separators_are_not_allowed_here, pos, 1); } @@ -884,6 +889,7 @@ namespace ts { } if (isDigit(ch)) { allowSeparator = true; + isPreviousTokenSeparator = false; pos++; continue; } @@ -962,12 +968,17 @@ namespace ts { let digits = 0; let value = 0; let allowSeparator = false; + let isPreviousTokenSeparator = false; while (digits < minCount || scanAsManyAsPossible) { const ch = text.charCodeAt(pos); if (canHaveSeparators && ch === CharacterCodes._) { tokenFlags |= TokenFlags.ContainsSeparator; if (allowSeparator) { allowSeparator = false; + isPreviousTokenSeparator = true; + } + else if (isPreviousTokenSeparator) { + error(Diagnostics.Multiple_consecutive_numeric_separators_are_not_permitted, pos, 1); } else { error(Diagnostics.Numeric_separators_are_not_allowed_here, pos, 1); @@ -990,6 +1001,7 @@ namespace ts { } pos++; digits++; + isPreviousTokenSeparator = false; } if (digits < minCount) { value = -1; @@ -1287,6 +1299,7 @@ namespace ts { // Similarly valid octalIntegerLiteral must have at least one octal digit following o or O. let numberOfDigits = 0; let separatorAllowed = false; + let isPreviousTokenSeparator = false; while (true) { const ch = text.charCodeAt(pos); // Numeric seperators are allowed anywhere within a numeric literal, except not at the beginning, or following another separator @@ -1294,6 +1307,10 @@ namespace ts { tokenFlags |= TokenFlags.ContainsSeparator; if (separatorAllowed) { separatorAllowed = false; + isPreviousTokenSeparator = true; + } + else if (isPreviousTokenSeparator) { + error(Diagnostics.Multiple_consecutive_numeric_separators_are_not_permitted, pos, 1); } else { error(Diagnostics.Numeric_separators_are_not_allowed_here, pos, 1); @@ -1309,6 +1326,7 @@ namespace ts { value = value * base + valueOfCh; pos++; numberOfDigits++; + isPreviousTokenSeparator = false; } // Invalid binaryIntegerLiteral or octalIntegerLiteral if (numberOfDigits === 0) { diff --git a/tests/baselines/reference/parser.numericSeparators.binaryNegative.errors.txt b/tests/baselines/reference/parser.numericSeparators.binaryNegative.errors.txt index afb39489b2..15e08088b1 100644 --- a/tests/baselines/reference/parser.numericSeparators.binaryNegative.errors.txt +++ b/tests/baselines/reference/parser.numericSeparators.binaryNegative.errors.txt @@ -3,8 +3,8 @@ tests/cases/conformance/parser/ecmascriptnext/numericSeparators/2.ts(1,3): error tests/cases/conformance/parser/ecmascriptnext/numericSeparators/3.ts(1,2): error TS6188: Numeric separators are not allowed here. tests/cases/conformance/parser/ecmascriptnext/numericSeparators/3.ts(1,3): error TS1005: ';' expected. tests/cases/conformance/parser/ecmascriptnext/numericSeparators/3.ts(1,3): error TS2304: Cannot find name 'B0101'. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/4.ts(1,6): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/5.ts(1,13): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascriptnext/numericSeparators/4.ts(1,6): error TS6189: Multiple consecutive numeric separators are not permitted. +tests/cases/conformance/parser/ecmascriptnext/numericSeparators/5.ts(1,13): error TS6189: Multiple consecutive numeric separators are not permitted. tests/cases/conformance/parser/ecmascriptnext/numericSeparators/6.ts(1,3): error TS6188: Numeric separators are not allowed here. tests/cases/conformance/parser/ecmascriptnext/numericSeparators/6.ts(1,4): error TS6188: Numeric separators are not allowed here. tests/cases/conformance/parser/ecmascriptnext/numericSeparators/6.ts(1,5): error TS6188: Numeric separators are not allowed here. @@ -32,12 +32,12 @@ tests/cases/conformance/parser/ecmascriptnext/numericSeparators/6.ts(1,5): error ==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/4.ts (1 errors) ==== 0b01__11 ~ -!!! error TS6188: Numeric separators are not allowed here. +!!! error TS6189: Multiple consecutive numeric separators are not permitted. ==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/5.ts (1 errors) ==== 0B0110_0110__ ~ -!!! error TS6188: Numeric separators are not allowed here. +!!! error TS6189: Multiple consecutive numeric separators are not permitted. ==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/6.ts (3 errors) ==== 0b___0111010_0101_1 diff --git a/tests/baselines/reference/parser.numericSeparators.decmialNegative.errors.txt b/tests/baselines/reference/parser.numericSeparators.decmialNegative.errors.txt index ab0262fd86..8e48e7c175 100644 --- a/tests/baselines/reference/parser.numericSeparators.decmialNegative.errors.txt +++ b/tests/baselines/reference/parser.numericSeparators.decmialNegative.errors.txt @@ -1,6 +1,6 @@ tests/cases/conformance/parser/ecmascriptnext/numericSeparators/1.ts(1,1): error TS2304: Cannot find name '_10'. tests/cases/conformance/parser/ecmascriptnext/numericSeparators/10.ts(1,4): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/11.ts(1,5): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascriptnext/numericSeparators/11.ts(1,5): error TS6189: Multiple consecutive numeric separators are not permitted. tests/cases/conformance/parser/ecmascriptnext/numericSeparators/12.ts(1,2): error TS6188: Numeric separators are not allowed here. tests/cases/conformance/parser/ecmascriptnext/numericSeparators/13.ts(1,3): error TS6188: Numeric separators are not allowed here. tests/cases/conformance/parser/ecmascriptnext/numericSeparators/14.ts(1,4): error TS6188: Numeric separators are not allowed here. @@ -8,29 +8,29 @@ tests/cases/conformance/parser/ecmascriptnext/numericSeparators/15.ts(1,5): erro tests/cases/conformance/parser/ecmascriptnext/numericSeparators/16.ts(1,1): error TS2304: Cannot find name '_0'. tests/cases/conformance/parser/ecmascriptnext/numericSeparators/16.ts(1,3): error TS1005: ';' expected. tests/cases/conformance/parser/ecmascriptnext/numericSeparators/17.ts(1,6): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/18.ts(1,3): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/19.ts(1,5): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascriptnext/numericSeparators/18.ts(1,3): error TS6189: Multiple consecutive numeric separators are not permitted. +tests/cases/conformance/parser/ecmascriptnext/numericSeparators/19.ts(1,5): error TS6189: Multiple consecutive numeric separators are not permitted. tests/cases/conformance/parser/ecmascriptnext/numericSeparators/2.ts(1,3): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/20.ts(1,8): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascriptnext/numericSeparators/20.ts(1,8): error TS6189: Multiple consecutive numeric separators are not permitted. tests/cases/conformance/parser/ecmascriptnext/numericSeparators/21.ts(1,2): error TS6188: Numeric separators are not allowed here. tests/cases/conformance/parser/ecmascriptnext/numericSeparators/22.ts(1,4): error TS6188: Numeric separators are not allowed here. tests/cases/conformance/parser/ecmascriptnext/numericSeparators/23.ts(1,5): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/24.ts(1,6): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascriptnext/numericSeparators/24.ts(1,6): error TS6189: Multiple consecutive numeric separators are not permitted. tests/cases/conformance/parser/ecmascriptnext/numericSeparators/25.ts(1,2): error TS6188: Numeric separators are not allowed here. tests/cases/conformance/parser/ecmascriptnext/numericSeparators/26.ts(1,3): error TS6188: Numeric separators are not allowed here. tests/cases/conformance/parser/ecmascriptnext/numericSeparators/27.ts(1,4): error TS6188: Numeric separators are not allowed here. tests/cases/conformance/parser/ecmascriptnext/numericSeparators/28.ts(1,6): error TS6188: Numeric separators are not allowed here. tests/cases/conformance/parser/ecmascriptnext/numericSeparators/29.ts(1,1): error TS2304: Cannot find name '_0'. tests/cases/conformance/parser/ecmascriptnext/numericSeparators/29.ts(1,3): error TS1005: ';' expected. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/3.ts(1,3): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascriptnext/numericSeparators/3.ts(1,3): error TS6189: Multiple consecutive numeric separators are not permitted. tests/cases/conformance/parser/ecmascriptnext/numericSeparators/30.ts(1,7): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/31.ts(1,3): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/32.ts(1,5): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/33.ts(1,9): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascriptnext/numericSeparators/31.ts(1,3): error TS6189: Multiple consecutive numeric separators are not permitted. +tests/cases/conformance/parser/ecmascriptnext/numericSeparators/32.ts(1,5): error TS6189: Multiple consecutive numeric separators are not permitted. +tests/cases/conformance/parser/ecmascriptnext/numericSeparators/33.ts(1,9): error TS6189: Multiple consecutive numeric separators are not permitted. tests/cases/conformance/parser/ecmascriptnext/numericSeparators/34.ts(1,2): error TS6188: Numeric separators are not allowed here. tests/cases/conformance/parser/ecmascriptnext/numericSeparators/35.ts(1,4): error TS6188: Numeric separators are not allowed here. tests/cases/conformance/parser/ecmascriptnext/numericSeparators/36.ts(1,5): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/37.ts(1,6): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascriptnext/numericSeparators/37.ts(1,6): error TS6189: Multiple consecutive numeric separators are not permitted. tests/cases/conformance/parser/ecmascriptnext/numericSeparators/38.ts(1,2): error TS6188: Numeric separators are not allowed here. tests/cases/conformance/parser/ecmascriptnext/numericSeparators/39.ts(1,3): error TS6188: Numeric separators are not allowed here. tests/cases/conformance/parser/ecmascriptnext/numericSeparators/4.ts(1,2): error TS6188: Numeric separators are not allowed here. @@ -39,9 +39,9 @@ tests/cases/conformance/parser/ecmascriptnext/numericSeparators/41.ts(1,6): erro tests/cases/conformance/parser/ecmascriptnext/numericSeparators/42.ts(1,1): error TS2304: Cannot find name '_0'. tests/cases/conformance/parser/ecmascriptnext/numericSeparators/42.ts(1,3): error TS1005: ';' expected. tests/cases/conformance/parser/ecmascriptnext/numericSeparators/43.ts(1,7): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/44.ts(1,3): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/45.ts(1,5): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/46.ts(1,9): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascriptnext/numericSeparators/44.ts(1,3): error TS6189: Multiple consecutive numeric separators are not permitted. +tests/cases/conformance/parser/ecmascriptnext/numericSeparators/45.ts(1,5): error TS6189: Multiple consecutive numeric separators are not permitted. +tests/cases/conformance/parser/ecmascriptnext/numericSeparators/46.ts(1,9): error TS6189: Multiple consecutive numeric separators are not permitted. tests/cases/conformance/parser/ecmascriptnext/numericSeparators/47.ts(1,1): error TS1128: Declaration or statement expected. tests/cases/conformance/parser/ecmascriptnext/numericSeparators/47.ts(1,2): error TS2304: Cannot find name '_'. tests/cases/conformance/parser/ecmascriptnext/numericSeparators/48.ts(1,2): error TS1005: ';' expected. @@ -52,8 +52,8 @@ tests/cases/conformance/parser/ecmascriptnext/numericSeparators/5.ts(1,3): error tests/cases/conformance/parser/ecmascriptnext/numericSeparators/50.ts(1,5): error TS6188: Numeric separators are not allowed here. tests/cases/conformance/parser/ecmascriptnext/numericSeparators/50.ts(1,6): error TS1124: Digit expected. tests/cases/conformance/parser/ecmascriptnext/numericSeparators/51.ts(1,3): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/6.ts(1,5): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/7.ts(1,5): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascriptnext/numericSeparators/6.ts(1,5): error TS6189: Multiple consecutive numeric separators are not permitted. +tests/cases/conformance/parser/ecmascriptnext/numericSeparators/7.ts(1,5): error TS6189: Multiple consecutive numeric separators are not permitted. tests/cases/conformance/parser/ecmascriptnext/numericSeparators/8.ts(1,2): error TS6188: Numeric separators are not allowed here. tests/cases/conformance/parser/ecmascriptnext/numericSeparators/9.ts(1,3): error TS6188: Numeric separators are not allowed here. @@ -71,7 +71,7 @@ tests/cases/conformance/parser/ecmascriptnext/numericSeparators/9.ts(1,3): error ==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/3.ts (1 errors) ==== 1__0 ~ -!!! error TS6188: Numeric separators are not allowed here. +!!! error TS6189: Multiple consecutive numeric separators are not permitted. ==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/4.ts (1 errors) ==== 0_.0 @@ -86,12 +86,12 @@ tests/cases/conformance/parser/ecmascriptnext/numericSeparators/9.ts(1,3): error ==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/6.ts (1 errors) ==== 0.0__0 ~ -!!! error TS6188: Numeric separators are not allowed here. +!!! error TS6189: Multiple consecutive numeric separators are not permitted. ==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/7.ts (1 errors) ==== 0.0__ ~ -!!! error TS6188: Numeric separators are not allowed here. +!!! error TS6189: Multiple consecutive numeric separators are not permitted. ==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/8.ts (1 errors) ==== 0_e0 @@ -111,7 +111,7 @@ tests/cases/conformance/parser/ecmascriptnext/numericSeparators/9.ts(1,3): error ==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/11.ts (1 errors) ==== 0e0__0 ~ -!!! error TS6188: Numeric separators are not allowed here. +!!! error TS6189: Multiple consecutive numeric separators are not permitted. ==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/12.ts (1 errors) ==== 0_.0e0 @@ -148,17 +148,17 @@ tests/cases/conformance/parser/ecmascriptnext/numericSeparators/9.ts(1,3): error ==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/18.ts (1 errors) ==== 0__0.0e0 ~ -!!! error TS6188: Numeric separators are not allowed here. +!!! error TS6189: Multiple consecutive numeric separators are not permitted. ==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/19.ts (1 errors) ==== 0.0__0e0 ~ -!!! error TS6188: Numeric separators are not allowed here. +!!! error TS6189: Multiple consecutive numeric separators are not permitted. ==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/20.ts (1 errors) ==== 0.00e0__0 ~ -!!! error TS6188: Numeric separators are not allowed here. +!!! error TS6189: Multiple consecutive numeric separators are not permitted. ==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/21.ts (1 errors) ==== 0_e+0 @@ -178,7 +178,7 @@ tests/cases/conformance/parser/ecmascriptnext/numericSeparators/9.ts(1,3): error ==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/24.ts (1 errors) ==== 0e+0__0 ~ -!!! error TS6188: Numeric separators are not allowed here. +!!! error TS6189: Multiple consecutive numeric separators are not permitted. ==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/25.ts (1 errors) ==== 0_.0e+0 @@ -215,17 +215,17 @@ tests/cases/conformance/parser/ecmascriptnext/numericSeparators/9.ts(1,3): error ==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/31.ts (1 errors) ==== 0__0.0e+0 ~ -!!! error TS6188: Numeric separators are not allowed here. +!!! error TS6189: Multiple consecutive numeric separators are not permitted. ==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/32.ts (1 errors) ==== 0.0__0e+0 ~ -!!! error TS6188: Numeric separators are not allowed here. +!!! error TS6189: Multiple consecutive numeric separators are not permitted. ==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/33.ts (1 errors) ==== 0.00e+0__0 ~ -!!! error TS6188: Numeric separators are not allowed here. +!!! error TS6189: Multiple consecutive numeric separators are not permitted. ==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/34.ts (1 errors) ==== 0_e+0 @@ -245,7 +245,7 @@ tests/cases/conformance/parser/ecmascriptnext/numericSeparators/9.ts(1,3): error ==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/37.ts (1 errors) ==== 0e-0__0 ~ -!!! error TS6188: Numeric separators are not allowed here. +!!! error TS6189: Multiple consecutive numeric separators are not permitted. ==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/38.ts (1 errors) ==== 0_.0e-0 @@ -282,17 +282,17 @@ tests/cases/conformance/parser/ecmascriptnext/numericSeparators/9.ts(1,3): error ==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/44.ts (1 errors) ==== 0__0.0e-0 ~ -!!! error TS6188: Numeric separators are not allowed here. +!!! error TS6189: Multiple consecutive numeric separators are not permitted. ==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/45.ts (1 errors) ==== 0.0__0e-0 ~ -!!! error TS6188: Numeric separators are not allowed here. +!!! error TS6189: Multiple consecutive numeric separators are not permitted. ==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/46.ts (1 errors) ==== 0.00e-0__0 ~ -!!! error TS6188: Numeric separators are not allowed here. +!!! error TS6189: Multiple consecutive numeric separators are not permitted. ==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/47.ts (2 errors) ==== ._ diff --git a/tests/baselines/reference/parser.numericSeparators.hexNegative.errors.txt b/tests/baselines/reference/parser.numericSeparators.hexNegative.errors.txt index 4fff6f288f..2fe62bc06d 100644 --- a/tests/baselines/reference/parser.numericSeparators.hexNegative.errors.txt +++ b/tests/baselines/reference/parser.numericSeparators.hexNegative.errors.txt @@ -3,8 +3,8 @@ tests/cases/conformance/parser/ecmascriptnext/numericSeparators/2.ts(1,3): error tests/cases/conformance/parser/ecmascriptnext/numericSeparators/3.ts(1,2): error TS6188: Numeric separators are not allowed here. tests/cases/conformance/parser/ecmascriptnext/numericSeparators/3.ts(1,3): error TS1005: ';' expected. tests/cases/conformance/parser/ecmascriptnext/numericSeparators/3.ts(1,3): error TS2304: Cannot find name 'X0101'. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/4.ts(1,6): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/5.ts(1,13): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascriptnext/numericSeparators/4.ts(1,6): error TS6189: Multiple consecutive numeric separators are not permitted. +tests/cases/conformance/parser/ecmascriptnext/numericSeparators/5.ts(1,13): error TS6189: Multiple consecutive numeric separators are not permitted. tests/cases/conformance/parser/ecmascriptnext/numericSeparators/6.ts(1,3): error TS6188: Numeric separators are not allowed here. tests/cases/conformance/parser/ecmascriptnext/numericSeparators/6.ts(1,4): error TS6188: Numeric separators are not allowed here. tests/cases/conformance/parser/ecmascriptnext/numericSeparators/6.ts(1,5): error TS6188: Numeric separators are not allowed here. @@ -32,12 +32,12 @@ tests/cases/conformance/parser/ecmascriptnext/numericSeparators/6.ts(1,5): error ==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/4.ts (1 errors) ==== 0x01__11 ~ -!!! error TS6188: Numeric separators are not allowed here. +!!! error TS6189: Multiple consecutive numeric separators are not permitted. ==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/5.ts (1 errors) ==== 0X0110_0110__ ~ -!!! error TS6188: Numeric separators are not allowed here. +!!! error TS6189: Multiple consecutive numeric separators are not permitted. ==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/6.ts (3 errors) ==== 0x___0111010_0101_1 diff --git a/tests/baselines/reference/parser.numericSeparators.octalNegative.errors.txt b/tests/baselines/reference/parser.numericSeparators.octalNegative.errors.txt index 6f877a6c75..e4c0547210 100644 --- a/tests/baselines/reference/parser.numericSeparators.octalNegative.errors.txt +++ b/tests/baselines/reference/parser.numericSeparators.octalNegative.errors.txt @@ -3,8 +3,8 @@ tests/cases/conformance/parser/ecmascriptnext/numericSeparators/2.ts(1,3): error tests/cases/conformance/parser/ecmascriptnext/numericSeparators/3.ts(1,2): error TS6188: Numeric separators are not allowed here. tests/cases/conformance/parser/ecmascriptnext/numericSeparators/3.ts(1,3): error TS1005: ';' expected. tests/cases/conformance/parser/ecmascriptnext/numericSeparators/3.ts(1,3): error TS2304: Cannot find name 'O0101'. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/4.ts(1,6): error TS6188: Numeric separators are not allowed here. -tests/cases/conformance/parser/ecmascriptnext/numericSeparators/5.ts(1,13): error TS6188: Numeric separators are not allowed here. +tests/cases/conformance/parser/ecmascriptnext/numericSeparators/4.ts(1,6): error TS6189: Multiple consecutive numeric separators are not permitted. +tests/cases/conformance/parser/ecmascriptnext/numericSeparators/5.ts(1,13): error TS6189: Multiple consecutive numeric separators are not permitted. tests/cases/conformance/parser/ecmascriptnext/numericSeparators/6.ts(1,3): error TS6188: Numeric separators are not allowed here. tests/cases/conformance/parser/ecmascriptnext/numericSeparators/6.ts(1,4): error TS6188: Numeric separators are not allowed here. tests/cases/conformance/parser/ecmascriptnext/numericSeparators/6.ts(1,5): error TS6188: Numeric separators are not allowed here. @@ -32,12 +32,12 @@ tests/cases/conformance/parser/ecmascriptnext/numericSeparators/6.ts(1,5): error ==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/4.ts (1 errors) ==== 0o01__11 ~ -!!! error TS6188: Numeric separators are not allowed here. +!!! error TS6189: Multiple consecutive numeric separators are not permitted. ==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/5.ts (1 errors) ==== 0O0110_0110__ ~ -!!! error TS6188: Numeric separators are not allowed here. +!!! error TS6189: Multiple consecutive numeric separators are not permitted. ==== tests/cases/conformance/parser/ecmascriptnext/numericSeparators/6.ts (3 errors) ==== 0o___0111010_0101_1