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:
Daniel Wirtz
2019-02-27 21:45:36 +01:00
committed by GitHub
parent 2945af6557
commit e8b0767143
29 changed files with 1349 additions and 701 deletions

View File

@ -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