TypeScript/tests/baselines/reference/fatarrowfunctionsErrors.errors.txt
Daniel Rosenwasser 5fc2792297 Covered more cases for arrow functions omitting arrows.
Specifically where we have a full signature followed by an open curly brace.
2014-07-23 11:49:51 -07:00

49 lines
1.2 KiB
Plaintext

==== tests/cases/compiler/fatarrowfunctionsErrors.ts (18 errors) ====
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.
var x3 = (a:number) {};
~
!!! '=>' expected.
var x4= (...a: any[]) { };
~
!!! '=>' expected.