mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-04-26 15:32:16 +00:00
Quite similar to #256 and also uses its test, but also fixes the serializer and doesn't try to parse an untyped 'x => x'.
12 lines
332 B
TypeScript
12 lines
332 B
TypeScript
(x): i32 => x;
|
|
(x: i32) => x;
|
|
(x?) => x;
|
|
(x?, y?) => x;
|
|
(x?: i32) => 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
|