TypeScript/tests/baselines/reference/fatarrowfunctionsErrors.errors.txt

63 lines
2.7 KiB
Plaintext

tests/cases/compiler/fatarrowfunctionsErrors.ts(1,1): error TS2304: Cannot find name 'foo'.
tests/cases/compiler/fatarrowfunctionsErrors.ts(2,1): error TS2304: Cannot find name 'foo'.
tests/cases/compiler/fatarrowfunctionsErrors.ts(2,8): error TS1005: ',' expected.
tests/cases/compiler/fatarrowfunctionsErrors.ts(2,18): error TS1005: ':' expected.
tests/cases/compiler/fatarrowfunctionsErrors.ts(2,19): error TS1005: ',' expected.
tests/cases/compiler/fatarrowfunctionsErrors.ts(3,1): error TS2304: Cannot find name 'foo'.
tests/cases/compiler/fatarrowfunctionsErrors.ts(4,1): error TS2304: Cannot find name 'foo'.
tests/cases/compiler/fatarrowfunctionsErrors.ts(5,9): error TS2304: Cannot find name 'x'.
tests/cases/compiler/fatarrowfunctionsErrors.ts(5,10): error TS1005: ',' expected.
tests/cases/compiler/fatarrowfunctionsErrors.ts(5,18): error TS1005: ';' expected.
tests/cases/compiler/fatarrowfunctionsErrors.ts(5,21): error TS2304: Cannot find name 'x'.
tests/cases/compiler/fatarrowfunctionsErrors.ts(5,23): error TS2304: Cannot find name 'x'.
tests/cases/compiler/fatarrowfunctionsErrors.ts(9,19): error TS1005: '=>' expected.
tests/cases/compiler/fatarrowfunctionsErrors.ts(10,27): error TS1005: '=>' expected.
tests/cases/compiler/fatarrowfunctionsErrors.ts(11,21): error TS1005: '=>' expected.
tests/cases/compiler/fatarrowfunctionsErrors.ts(12,23): error TS1005: '=>' expected.
==== tests/cases/compiler/fatarrowfunctionsErrors.ts (16 errors) ====
foo((...Far:any[])=>{return 0;})
~~~
!!! error TS2304: Cannot find name 'foo'.
foo((1)=>{return 0;});
~~~
!!! error TS2304: Cannot find name 'foo'.
~~
!!! error TS1005: ',' expected.
~
!!! error TS1005: ':' expected.
~
!!! error TS1005: ',' expected.
foo((x?)=>{return x;})
~~~
!!! error TS2304: Cannot find name 'foo'.
foo((x=0)=>{return x;})
~~~
!!! error TS2304: Cannot find name 'foo'.
var y = x:number => x*x;
~
!!! error TS2304: Cannot find name 'x'.
~
!!! error TS1005: ',' expected.
~~
!!! error TS1005: ';' expected.
~
!!! error TS2304: Cannot find name 'x'.
~
!!! error TS2304: Cannot find name 'x'.
false? (() => null): null;
// missing fatarrow
var x1 = () :void {};
~
!!! error TS1005: '=>' expected.
var x2 = (a:number) :void {};
~
!!! error TS1005: '=>' expected.
var x3 = (a:number) {};
~
!!! error TS1005: '=>' expected.
var x4= (...a: any[]) { };
~
!!! error TS1005: '=>' expected.