We now no longer fail a speculative parse just because an error was encountered at any point while speculating. instead, we allow the speculative function that is being called to determine if the parse was successful or not. Only if it decides it was not successful is parsing rewound. This improves our error recovery in several cases (esp. around arrow functions). it will also help in a followup refactoring to prevent lookahead/speculative parsing from causing lambda allocations.
16 lines
No EOL
967 B
Text
16 lines
No EOL
967 B
Text
tests/cases/conformance/parser/ecmascript5/Generics/parserMemberAccessOffOfGenericType1.ts(1,21): error TS1005: '(' expected.
|
|
tests/cases/conformance/parser/ecmascript5/Generics/parserMemberAccessOffOfGenericType1.ts(1,33): error TS1005: ')' expected.
|
|
tests/cases/conformance/parser/ecmascript5/Generics/parserMemberAccessOffOfGenericType1.ts(1,9): error TS2304: Cannot find name 'List'.
|
|
tests/cases/conformance/parser/ecmascript5/Generics/parserMemberAccessOffOfGenericType1.ts(1,22): error TS2304: Cannot find name 'makeChild'.
|
|
|
|
|
|
==== tests/cases/conformance/parser/ecmascript5/Generics/parserMemberAccessOffOfGenericType1.ts (4 errors) ====
|
|
var v = List<number>.makeChild();
|
|
~
|
|
!!! error TS1005: '(' expected.
|
|
~
|
|
!!! error TS1005: ')' expected.
|
|
~~~~
|
|
!!! error TS2304: Cannot find name 'List'.
|
|
~~~~~~~~~
|
|
!!! error TS2304: Cannot find name 'makeChild'. |