closure_with_finalize_fail.out
1 Error [ETYC0372110]: Only `async transition` can return a future. 2 --> compiler-test:3:35 3 | 4 3 | function foo(a: u8, b: u8) -> Future { 5 | ^^^^^^ 6 | 7 = Use an `async transition` instead. 8 Error [ETYC0372042]: Only `inline` can be called from a `function`, `inline`, or `constructor`. 9 --> compiler-test:4:16 10 | 11 4 | return finalize_bar(a, b); 12 | ^^^^^^^^^^^^^^^^^^ 13 Error [ETYC0372101]: Can only make an async call from an async transition. 14 --> compiler-test:4:16 15 | 16 4 | return finalize_bar(a, b); 17 | ^^^^^^^^^^^^^^^^^^ 18 | 19 = Move the async call inside of the async transition block. 20 Error [ETYC0372106]: An async function is not allowed to return a value. 21 --> compiler-test:11:5 22 | 23 11 | async function finalize_bar(a: u8, b: u8) -> u8 { 24 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 25 12 | return a + b; 26 | ^^^^^^^^^^^^^ 27 13 | } 28 | ^ 29 | 30 = Remove an output type in the function signature, and remove the return statement from the function. Note that the future returned by async functions is automatically inferred, and must not be explicitly written. 31 Error [ETYC0372110]: Only `async transition` can return a future. 32 --> compiler-test:16:61 33 | 34 16 | function mint_public(receiver: address, amount: u64) -> Future { 35 | ^^^^^^ 36 | 37 = Use an `async transition` instead. 38 Error [ETYC0372042]: Only `inline` can be called from a `function`, `inline`, or `constructor`. 39 --> compiler-test:17:16 40 | 41 17 | return finalize_mint(receiver, amount); 42 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 43 Error [ETYC0372101]: Can only make an async call from an async transition. 44 --> compiler-test:17:16 45 | 46 17 | return finalize_mint(receiver, amount); 47 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 48 | 49 = Move the async call inside of the async transition block. 50 Error [ETYC0372005]: Unknown variable `account` 51 --> compiler-test:21:22 52 | 53 21 | Mapping::set(account, receiver, amount); 54 | ^^^^^^^ 55 Error [ETYC0372083]: A program must have at least one transition function. 56 --> compiler-test:2:9 57 | 58 2 | program test.alpha { 59 | ^^^^^^^^^