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

49 lines
1.2 KiB
Plaintext
Raw Normal View History

==== tests/cases/compiler/fatarrowfunctionsErrors.ts (18 errors) ====
2014-07-13 01:04:16 +02:00
foo((...Far:any[])=>{return 0;})
~~~
!!! Cannot find name 'foo'.
foo((1)=>{return 0;});
~~
!!! ',' expected.
~
!!! ':' expected.
~
!!! ',' expected.
~
!!! Declaration or statement expected.
~
!!! Declaration or statement expected.
~~~
!!! Cannot find name 'foo'.
foo((x?)=>{return x;})
~~~
!!! Cannot find name 'foo'.
foo((x=0)=>{return x;})
~~~
!!! Cannot find name 'foo'.
var y = x:number => x*x;
~
!!! ',' expected.
~~
!!! ';' expected.
~
!!! Cannot find name 'x'.
~
!!! Cannot find name 'x'.
~
!!! Cannot find name 'x'.
false? (() => null): null;
// missing fatarrow
var x1 = () :void {};
~
!!! '=>' expected.
var x2 = (a:number) :void {};
~
!!! '=>' expected.
2014-07-13 01:04:16 +02:00
var x3 = (a:number) {};
~
!!! '=>' expected.
2014-07-13 01:04:16 +02:00
var x4= (...a: any[]) { };
~
!!! '=>' expected.