TypeScript/tests/baselines/reference/ArrowFunction3.errors.txt
Cyrus Najmabadi d796bf1e0a Improve the flexibility of speculative parsing.
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.
2014-12-04 08:53:45 -08:00

12 lines
727 B
Plaintext

tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrowFunctions/ArrowFunction3.ts(1,14): error TS1110: Type expected.
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrowFunctions/ArrowFunction3.ts(1,13): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement.
==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrowFunctions/ArrowFunction3.ts (2 errors) ====
var v = (a): => {
~~
!!! error TS1110: Type expected.
!!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement.
};