mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-12-27 20:24:52 +03:00
6 lines
1.4 KiB
Plaintext
6 lines
1.4 KiB
Plaintext
---
|
|
namespace: Compile
|
|
expectation: Fail
|
|
outputs:
|
|
- "Error [ETYC0372036]: Cannot use a `finalize` statement without a `finalize` block.\n --> compiler-test:4:11\n |\n 4 | async finalize(a, b);\n | ^^^^^^^^^^^^^^\nError [ETYC0372044]: Function must contain a `finalize` statement on all execution paths.\n --> compiler-test:8:1\n |\n 8 | function bar(a: u8, b: u8) -> u8 {\n 9 | return a + b;\n 10 | }\n | ^\nError [ETYC0372032]: Only program functions can have a `finalize` block.\n --> compiler-test:12:1\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 add a `@program` annotation to the function.\nError [ETYC0372032]: Only program functions can have a `finalize` block.\n --> compiler-test:21:1\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 add a `@program` annotation to the function.\nError [ETYC0372005]: Unknown variable `account`\n --> compiler-test:22:15\n |\n 22 | increment(account, receiver, amount);\n | ^^^^^^^\nError [ETYC0372004]: Could not determine the type of `account`\n --> compiler-test:22:15\n |\n 22 | increment(account, receiver, amount);\n | ^^^^^^^\n"
|