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.
38 lines
1.9 KiB
Plaintext
38 lines
1.9 KiB
Plaintext
tests/cases/conformance/parser/ecmascript5/Generics/parserMemberAccessExpression1.ts(3,7): error TS1005: '(' expected.
|
|
tests/cases/conformance/parser/ecmascript5/Generics/parserMemberAccessExpression1.ts(3,13): error TS1005: ')' expected.
|
|
tests/cases/conformance/parser/ecmascript5/Generics/parserMemberAccessExpression1.ts(4,7): error TS1005: '(' expected.
|
|
tests/cases/conformance/parser/ecmascript5/Generics/parserMemberAccessExpression1.ts(4,16): error TS1005: ')' expected.
|
|
tests/cases/conformance/parser/ecmascript5/Generics/parserMemberAccessExpression1.ts(1,1): error TS2304: Cannot find name 'Foo'.
|
|
tests/cases/conformance/parser/ecmascript5/Generics/parserMemberAccessExpression1.ts(2,1): error TS2304: Cannot find name 'Foo'.
|
|
tests/cases/conformance/parser/ecmascript5/Generics/parserMemberAccessExpression1.ts(3,1): error TS2304: Cannot find name 'Foo'.
|
|
tests/cases/conformance/parser/ecmascript5/Generics/parserMemberAccessExpression1.ts(3,8): error TS2304: Cannot find name 'Bar'.
|
|
tests/cases/conformance/parser/ecmascript5/Generics/parserMemberAccessExpression1.ts(4,1): error TS2304: Cannot find name 'Foo'.
|
|
tests/cases/conformance/parser/ecmascript5/Generics/parserMemberAccessExpression1.ts(4,8): error TS2304: Cannot find name 'Bar'.
|
|
|
|
|
|
==== tests/cases/conformance/parser/ecmascript5/Generics/parserMemberAccessExpression1.ts (10 errors) ====
|
|
Foo<T>();
|
|
~~~
|
|
!!! error TS2304: Cannot find name 'Foo'.
|
|
Foo.Bar<T>();
|
|
~~~
|
|
!!! error TS2304: Cannot find name 'Foo'.
|
|
Foo<T>.Bar();
|
|
~
|
|
!!! error TS1005: '(' expected.
|
|
~
|
|
!!! error TS1005: ')' expected.
|
|
~~~
|
|
!!! error TS2304: Cannot find name 'Foo'.
|
|
~~~
|
|
!!! error TS2304: Cannot find name 'Bar'.
|
|
Foo<T>.Bar<T>();
|
|
~
|
|
!!! error TS1005: '(' expected.
|
|
~
|
|
!!! error TS1005: ')' expected.
|
|
~~~
|
|
!!! error TS2304: Cannot find name 'Foo'.
|
|
~~~
|
|
!!! error TS2304: Cannot find name 'Bar'.
|
|
|