1
0
mirror of https://github.com/fluencelabs/assemblyscript synced 2025-05-12 07:17:30 +00:00
Daniel Wirtz e8b0767143
Infer function expressions in matching contexts ()
* legalizes omitting types on function expressions within function type contexts
* legalizes omitting any number of arguments
2019-02-27 21:45:36 +01:00

12 lines
152 B
TypeScript

// array function
(x): i32 => x;
(x: i32) => x;
(x?) => x;
(x?, y?) => x;
(x?: i32) => x;
x => x;
// not an array function
(b ? x : y);
(b ? f : g)();