TypeScript/tests/baselines/reference/genericCallsWithoutParens.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

18 lines
531 B
Plaintext

tests/cases/compiler/genericCallsWithoutParens.ts(2,18): error TS1005: '(' expected.
tests/cases/compiler/genericCallsWithoutParens.ts(7,22): error TS1005: '(' expected.
==== tests/cases/compiler/genericCallsWithoutParens.ts (2 errors) ====
function f<T>() { }
var r = f<number>; // parse error
~
!!! error TS1005: '(' expected.
class C<T> {
foo: T;
}
var c = new C<number>; // parse error
~
!!! error TS1005: '(' expected.