finalize_with_return.out
1 Error [ETYC0372106]: An async function is not allowed to return a value. 2 --> compiler-test:10:5 3 | 4 10 | async function finalize_mint_public (public receiver: address, public amount: u64) -> u64 { 5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 6 11 | Mapping::set(account, receiver, amount); 7 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 8 12 | return amount; 9 | ^^^^^^^^^^^^^^ 10 13 | } 11 | ^ 12 | 13 = 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. 14 Error [ETYC0372106]: An async function is not allowed to return a value. 15 --> compiler-test:17:7 16 | 17 17 | } async function finalize_public_adder(a: u8, b: u8) -> public u8 { 18 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 19 18 | return a + b; 20 | ^^^^^^^^^^^^^ 21 19 | } 22 | ^ 23 | 24 = 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.