mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-23 11:41:45 +00:00
Fix some array function parsing and serialization issues
Quite similar to #256 and also uses its test, but also fixes the serializer and doesn't try to parse an untyped 'x => x'.
This commit is contained in:
10
tests/parser/arrow-functions.ts
Normal file
10
tests/parser/arrow-functions.ts
Normal file
@ -0,0 +1,10 @@
|
||||
// array function
|
||||
(x): i32 => x;
|
||||
(x: i32) => x;
|
||||
(x?) => x;
|
||||
(x?, y?) => x;
|
||||
(x?: i32) => x;
|
||||
|
||||
// not an array function
|
||||
(b ? x : y);
|
||||
(b ? f : g)();
|
Reference in New Issue
Block a user