mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-12-27 20:24:52 +03:00
6 lines
1.5 KiB
Plaintext
6 lines
1.5 KiB
Plaintext
---
|
|
namespace: Compile
|
|
expectation: Fail
|
|
outputs:
|
|
- "Error [ETYC0372036]: Cannot use a `finalize` statement without a `finalize` block.\n --> compiler-test:5:9\n |\n 5 | return a + b then finalize(a, b);\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nError [ETYC0372044]: Function must contain a `finalize` statement on all execution paths.\n --> compiler-test:8:5\n |\n 8 | function bar(a: u8, b: u8) -> u8 {\n 9 | return a + b;\n 10 | }\n | ^\nError [ETYC0372031]: Only transition functions can have a `finalize` block.\n --> compiler-test:12:5\n |\n 12 | finalize bar(a: u8, b: u8) -> u8 {\n 13 | return a + b;\n 14 | }\n | ^\n |\n = Remove the `finalize` block or use the keyword `transition` instead of `function`.\nError [ETYC0372031]: Only transition functions can have a `finalize` block.\n --> compiler-test:21:5\n |\n 21 | finalize mint_public(receiver: address, amount: u64) {\n 22 | increment(account, receiver, amount);\n 23 | }\n | ^\n |\n = Remove the `finalize` block or use the keyword `transition` instead of `function`.\nError [ETYC0372005]: Unknown variable `account`\n --> compiler-test:22:19\n |\n 22 | increment(account, receiver, amount);\n | ^^^^^^^\nError [ETYC0372004]: Could not determine the type of `account`\n --> compiler-test:22:19\n |\n 22 | increment(account, receiver, amount);\n | ^^^^^^^\n"
|