TypeScript/tests/baselines/reference/parser.numericSeparators.decmialNegative.errors.txt
Josh Goldberg 541e553163
Specific diagnostic suggestions for unexpected keyword or identifier (#43005)
Error message improvement for unexpected tokens in the following situations:

* A word was parsed that seems to have a low edit distance from a known common keyword
* A word was parsed that seems to be a known common keyword and a name _without_ a space in-between
* Parsing in a particular type of node (mostly a class property declaration) got a different word or token than expected

___

* Specific diagnostic suggestions for unexpected keywords or identifier

* Don't reach into there, that's not allowed

* Improved error when there is already an initializer

* Specific module error message for invalid template literal strings

* Skip 'unexpected keyword or identifier' diagnostics for declare nodes

* Improve error for function calls in type positions

* Switch class properties to old diagnostic

* Corrected errors in class members and reused existing textToKeywordObj map

* Corrected more baselines from the merge

* Update src/compiler/parser.ts

Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>

* Mostly addressed feedback

* Clarified function call type message

* Split up and clarified parsing vs error functions

* Swap interface name complaints back, and skip new errors on unknown (invalid) tokens

* Used tokenToString, not a raw semicolon

* Inline getExpressionText helper

* Remove remarks in src/compiler/parser.ts

Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
2021-07-14 13:50:55 -07:00

329 lines
17 KiB
Plaintext

tests/cases/conformance/parser/ecmascript2021/numericSeparators/1.ts(1,1): error TS2304: Cannot find name '_10'.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/10.ts(1,4): error TS6188: Numeric separators are not allowed here.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/11.ts(1,5): error TS6189: Multiple consecutive numeric separators are not permitted.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/12.ts(1,2): error TS6188: Numeric separators are not allowed here.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/13.ts(1,3): error TS6188: Numeric separators are not allowed here.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/14.ts(1,4): error TS6188: Numeric separators are not allowed here.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/15.ts(1,5): error TS6188: Numeric separators are not allowed here.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/16.ts(1,1): error TS1434: Unexpected keyword or identifier.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/16.ts(1,1): error TS2304: Cannot find name '_0'.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/17.ts(1,6): error TS6188: Numeric separators are not allowed here.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/18.ts(1,3): error TS6189: Multiple consecutive numeric separators are not permitted.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/19.ts(1,5): error TS6189: Multiple consecutive numeric separators are not permitted.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/2.ts(1,3): error TS6188: Numeric separators are not allowed here.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/20.ts(1,8): error TS6189: Multiple consecutive numeric separators are not permitted.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/21.ts(1,2): error TS6188: Numeric separators are not allowed here.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/22.ts(1,4): error TS6188: Numeric separators are not allowed here.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/23.ts(1,5): error TS6188: Numeric separators are not allowed here.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/24.ts(1,6): error TS6189: Multiple consecutive numeric separators are not permitted.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/25.ts(1,2): error TS6188: Numeric separators are not allowed here.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/26.ts(1,3): error TS6188: Numeric separators are not allowed here.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/27.ts(1,4): error TS6188: Numeric separators are not allowed here.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/28.ts(1,6): error TS6188: Numeric separators are not allowed here.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/29.ts(1,1): error TS1434: Unexpected keyword or identifier.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/29.ts(1,1): error TS2304: Cannot find name '_0'.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/3.ts(1,3): error TS6189: Multiple consecutive numeric separators are not permitted.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/30.ts(1,7): error TS6188: Numeric separators are not allowed here.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/31.ts(1,3): error TS6189: Multiple consecutive numeric separators are not permitted.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/32.ts(1,5): error TS6189: Multiple consecutive numeric separators are not permitted.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/33.ts(1,9): error TS6189: Multiple consecutive numeric separators are not permitted.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/34.ts(1,2): error TS6188: Numeric separators are not allowed here.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/35.ts(1,4): error TS6188: Numeric separators are not allowed here.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/36.ts(1,5): error TS6188: Numeric separators are not allowed here.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/37.ts(1,6): error TS6189: Multiple consecutive numeric separators are not permitted.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/38.ts(1,2): error TS6188: Numeric separators are not allowed here.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/39.ts(1,3): error TS6188: Numeric separators are not allowed here.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/4.ts(1,2): error TS6188: Numeric separators are not allowed here.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/40.ts(1,4): error TS6188: Numeric separators are not allowed here.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/41.ts(1,6): error TS6188: Numeric separators are not allowed here.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/42.ts(1,1): error TS1434: Unexpected keyword or identifier.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/42.ts(1,1): error TS2304: Cannot find name '_0'.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/43.ts(1,7): error TS6188: Numeric separators are not allowed here.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/44.ts(1,3): error TS6189: Multiple consecutive numeric separators are not permitted.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/45.ts(1,5): error TS6189: Multiple consecutive numeric separators are not permitted.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/46.ts(1,9): error TS6189: Multiple consecutive numeric separators are not permitted.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/47.ts(1,1): error TS1128: Declaration or statement expected.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/47.ts(1,2): error TS2304: Cannot find name '_'.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/48.ts(1,2): error TS1005: ';' expected.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/48.ts(1,2): error TS2304: Cannot find name '\u005F01234'.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/49.ts(1,5): error TS6188: Numeric separators are not allowed here.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/49.ts(1,6): error TS1124: Digit expected.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/5.ts(1,3): error TS6188: Numeric separators are not allowed here.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/50.ts(1,5): error TS6188: Numeric separators are not allowed here.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/50.ts(1,6): error TS1124: Digit expected.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/51.ts(1,3): error TS6188: Numeric separators are not allowed here.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/6.ts(1,5): error TS6189: Multiple consecutive numeric separators are not permitted.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/7.ts(1,5): error TS6189: Multiple consecutive numeric separators are not permitted.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/8.ts(1,2): error TS6188: Numeric separators are not allowed here.
tests/cases/conformance/parser/ecmascript2021/numericSeparators/9.ts(1,3): error TS6188: Numeric separators are not allowed here.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/1.ts (1 errors) ====
_10
~~~
!!! error TS2304: Cannot find name '_10'.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/2.ts (1 errors) ====
10_
~
!!! error TS6188: Numeric separators are not allowed here.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/3.ts (1 errors) ====
1__0
~
!!! error TS6189: Multiple consecutive numeric separators are not permitted.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/4.ts (1 errors) ====
0_.0
~
!!! error TS6188: Numeric separators are not allowed here.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/5.ts (1 errors) ====
0._0
~
!!! error TS6188: Numeric separators are not allowed here.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/6.ts (1 errors) ====
0.0__0
~
!!! error TS6189: Multiple consecutive numeric separators are not permitted.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/7.ts (1 errors) ====
0.0__
~
!!! error TS6189: Multiple consecutive numeric separators are not permitted.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/8.ts (1 errors) ====
0_e0
~
!!! error TS6188: Numeric separators are not allowed here.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/9.ts (1 errors) ====
0e_0
~
!!! error TS6188: Numeric separators are not allowed here.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/10.ts (1 errors) ====
0e0_
~
!!! error TS6188: Numeric separators are not allowed here.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/11.ts (1 errors) ====
0e0__0
~
!!! error TS6189: Multiple consecutive numeric separators are not permitted.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/12.ts (1 errors) ====
0_.0e0
~
!!! error TS6188: Numeric separators are not allowed here.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/13.ts (1 errors) ====
0._0e0
~
!!! error TS6188: Numeric separators are not allowed here.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/14.ts (1 errors) ====
0.0_e0
~
!!! error TS6188: Numeric separators are not allowed here.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/15.ts (1 errors) ====
0.0e_0
~
!!! error TS6188: Numeric separators are not allowed here.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/16.ts (2 errors) ====
_0.0e0
~~
!!! error TS1434: Unexpected keyword or identifier.
~~
!!! error TS2304: Cannot find name '_0'.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/17.ts (1 errors) ====
0.0e0_
~
!!! error TS6188: Numeric separators are not allowed here.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/18.ts (1 errors) ====
0__0.0e0
~
!!! error TS6189: Multiple consecutive numeric separators are not permitted.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/19.ts (1 errors) ====
0.0__0e0
~
!!! error TS6189: Multiple consecutive numeric separators are not permitted.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/20.ts (1 errors) ====
0.00e0__0
~
!!! error TS6189: Multiple consecutive numeric separators are not permitted.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/21.ts (1 errors) ====
0_e+0
~
!!! error TS6188: Numeric separators are not allowed here.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/22.ts (1 errors) ====
0e+_0
~
!!! error TS6188: Numeric separators are not allowed here.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/23.ts (1 errors) ====
0e+0_
~
!!! error TS6188: Numeric separators are not allowed here.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/24.ts (1 errors) ====
0e+0__0
~
!!! error TS6189: Multiple consecutive numeric separators are not permitted.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/25.ts (1 errors) ====
0_.0e+0
~
!!! error TS6188: Numeric separators are not allowed here.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/26.ts (1 errors) ====
0._0e+0
~
!!! error TS6188: Numeric separators are not allowed here.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/27.ts (1 errors) ====
0.0_e+0
~
!!! error TS6188: Numeric separators are not allowed here.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/28.ts (1 errors) ====
0.0e+_0
~
!!! error TS6188: Numeric separators are not allowed here.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/29.ts (2 errors) ====
_0.0e+0
~~
!!! error TS1434: Unexpected keyword or identifier.
~~
!!! error TS2304: Cannot find name '_0'.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/30.ts (1 errors) ====
0.0e+0_
~
!!! error TS6188: Numeric separators are not allowed here.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/31.ts (1 errors) ====
0__0.0e+0
~
!!! error TS6189: Multiple consecutive numeric separators are not permitted.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/32.ts (1 errors) ====
0.0__0e+0
~
!!! error TS6189: Multiple consecutive numeric separators are not permitted.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/33.ts (1 errors) ====
0.00e+0__0
~
!!! error TS6189: Multiple consecutive numeric separators are not permitted.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/34.ts (1 errors) ====
0_e+0
~
!!! error TS6188: Numeric separators are not allowed here.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/35.ts (1 errors) ====
0e-_0
~
!!! error TS6188: Numeric separators are not allowed here.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/36.ts (1 errors) ====
0e-0_
~
!!! error TS6188: Numeric separators are not allowed here.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/37.ts (1 errors) ====
0e-0__0
~
!!! error TS6189: Multiple consecutive numeric separators are not permitted.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/38.ts (1 errors) ====
0_.0e-0
~
!!! error TS6188: Numeric separators are not allowed here.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/39.ts (1 errors) ====
0._0e-0
~
!!! error TS6188: Numeric separators are not allowed here.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/40.ts (1 errors) ====
0.0_e-0
~
!!! error TS6188: Numeric separators are not allowed here.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/41.ts (1 errors) ====
0.0e-_0
~
!!! error TS6188: Numeric separators are not allowed here.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/42.ts (2 errors) ====
_0.0e-0
~~
!!! error TS1434: Unexpected keyword or identifier.
~~
!!! error TS2304: Cannot find name '_0'.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/43.ts (1 errors) ====
0.0e-0_
~
!!! error TS6188: Numeric separators are not allowed here.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/44.ts (1 errors) ====
0__0.0e-0
~
!!! error TS6189: Multiple consecutive numeric separators are not permitted.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/45.ts (1 errors) ====
0.0__0e-0
~
!!! error TS6189: Multiple consecutive numeric separators are not permitted.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/46.ts (1 errors) ====
0.00e-0__0
~
!!! error TS6189: Multiple consecutive numeric separators are not permitted.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/47.ts (2 errors) ====
._
~
!!! error TS1128: Declaration or statement expected.
~
!!! error TS2304: Cannot find name '_'.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/48.ts (2 errors) ====
1\u005F01234
~~~~~~~~~~~
!!! error TS1005: ';' expected.
~~~~~~~~~~~
!!! error TS2304: Cannot find name '\u005F01234'.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/49.ts (2 errors) ====
1.0e_+10
~
!!! error TS6188: Numeric separators are not allowed here.
!!! error TS1124: Digit expected.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/50.ts (2 errors) ====
1.0e_-10
~
!!! error TS6188: Numeric separators are not allowed here.
!!! error TS1124: Digit expected.
==== tests/cases/conformance/parser/ecmascript2021/numericSeparators/51.ts (1 errors) ====
0._
~
!!! error TS6188: Numeric separators are not allowed here.