leo/tests/expectations/compiler/finalize/increment_decrement_in_inline.out
2023-02-10 16:26:25 -08:00

6 lines
1.9 KiB
Plaintext

---
namespace: Compile
expectation: Fail
outputs:
- "Error [ETYC0372035]: `increment` or `decrement` statements must be inside a finalize block.\n --> compiler-test:8:9\n |\n 8 | increment(values, 0u8, 1u8);\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^\nError [ETYC0372035]: `increment` or `decrement` statements must be inside a finalize block.\n --> compiler-test:9:9\n |\n 9 | increment(account, self.caller, 1u64);\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nError [ETYC0372035]: `increment` or `decrement` statements must be inside a finalize block.\n --> compiler-test:13:9\n |\n 13 | decrement(values, 0u8, 1u8);\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^\nError [ETYC0372035]: `increment` or `decrement` statements must be inside a finalize block.\n --> compiler-test:14:9\n |\n 14 | decrement(account, self.caller, 1u64);\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nError [ETYC0372044]: Function must contain a `finalize` statement on all execution paths.\n --> compiler-test:12:5\n |\n 12 | inline bar() {\n 13 | decrement(values, 0u8, 1u8);\n 14 | decrement(account, self.caller, 1u64);\n 15 | }\n | ^\nError [ETYC0372031]: Only transition functions can have a `finalize` block.\n --> compiler-test:17:5\n |\n 17 | finalize finalize_no_params() {\n 18 | foo();\n 19 | bar();\n 20 | }\n | ^\n |\n = Remove the `finalize` block or use the keyword `transition` instead of `function`.\nError [ETYC0372045]: `finalize` name `bar` does not match function name `finalize_no_params`\n --> compiler-test:17:5\n |\n 17 | finalize finalize_no_params() {\n 18 | foo();\n 19 | bar();\n 20 | }\n | ^\nError [ETYC0372066]: Cyclic dependency between functions: `bar` --> `bar`\n"