mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
40 lines
1.3 KiB
Plaintext
40 lines
1.3 KiB
Plaintext
//// [tests/cases/compiler/fatarrowfunctionsErrors.ts] ////
|
|
|
|
=== fatarrowfunctionsErrors.ts ===
|
|
foo((...Far:any[])=>{return 0;})
|
|
>Far : Symbol(Far, Decl(fatarrowfunctionsErrors.ts, 0, 5))
|
|
|
|
foo((1)=>{return 0;});
|
|
>return : Symbol(return, Decl(fatarrowfunctionsErrors.ts, 1, 10))
|
|
|
|
foo((x?)=>{return x;})
|
|
>x : Symbol(x, Decl(fatarrowfunctionsErrors.ts, 2, 5))
|
|
>x : Symbol(x, Decl(fatarrowfunctionsErrors.ts, 2, 5))
|
|
|
|
foo((x=0)=>{return x;})
|
|
>x : Symbol(x, Decl(fatarrowfunctionsErrors.ts, 3, 5))
|
|
>x : Symbol(x, Decl(fatarrowfunctionsErrors.ts, 3, 5))
|
|
|
|
var y = x:number => x*x;
|
|
>y : Symbol(y, Decl(fatarrowfunctionsErrors.ts, 4, 3))
|
|
>number : Symbol(number, Decl(fatarrowfunctionsErrors.ts, 4, 10))
|
|
|
|
false? (() => null): null;
|
|
|
|
// missing fatarrow
|
|
var x1 = () :void {};
|
|
>x1 : Symbol(x1, Decl(fatarrowfunctionsErrors.ts, 8, 3))
|
|
|
|
var x2 = (a:number) :void {};
|
|
>x2 : Symbol(x2, Decl(fatarrowfunctionsErrors.ts, 9, 3))
|
|
>a : Symbol(a, Decl(fatarrowfunctionsErrors.ts, 9, 10))
|
|
|
|
var x3 = (a:number) {};
|
|
>x3 : Symbol(x3, Decl(fatarrowfunctionsErrors.ts, 10, 3))
|
|
>a : Symbol(a, Decl(fatarrowfunctionsErrors.ts, 10, 10))
|
|
|
|
var x4= (...a: any[]) { };
|
|
>x4 : Symbol(x4, Decl(fatarrowfunctionsErrors.ts, 11, 3))
|
|
>a : Symbol(a, Decl(fatarrowfunctionsErrors.ts, 11, 9))
|
|
|