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.
13 lines
No EOL
421 B
Text
13 lines
No EOL
421 B
Text
tests/cases/compiler/genericCallWithoutArgs.ts(4,17): error TS1005: '(' expected.
|
|
tests/cases/compiler/genericCallWithoutArgs.ts(4,18): error TS1005: ')' expected.
|
|
|
|
|
|
==== tests/cases/compiler/genericCallWithoutArgs.ts (2 errors) ====
|
|
function f<X, Y>(x: X, y: Y) {
|
|
}
|
|
|
|
f<number,string>.
|
|
~
|
|
!!! error TS1005: '(' expected.
|
|
|
|
!!! error TS1005: ')' expected. |