mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-20 02:11:31 +00:00
Infer function expressions in matching contexts (#514)
* legalizes omitting types on function expressions within function type contexts * legalizes omitting any number of arguments
This commit is contained in:
@ -3,9 +3,6 @@
|
||||
(x?) => x;
|
||||
(x?, y?) => x;
|
||||
(x?: i32) => x;
|
||||
x => x;
|
||||
(b ? x : y);
|
||||
(b ? f : g)();
|
||||
// ERROR 1110: "Type expected." in arrow-functions.ts:3:8
|
||||
// ERROR 1110: "Type expected." in arrow-functions.ts:4:4
|
||||
// ERROR 1110: "Type expected." in arrow-functions.ts:5:8
|
||||
// ERROR 1110: "Type expected." in arrow-functions.ts:6:9
|
||||
|
Reference in New Issue
Block a user