Regenerate expectations

This commit is contained in:
Pranav Gaddamadugu 2024-06-08 17:42:37 -07:00
parent 1d1d01aeee
commit 7584fa7919

View File

@ -0,0 +1,5 @@
---
namespace: Compile
expectation: Fail
outputs:
- "Error [ETYC0372005]: Unknown variable `caller`\n --> compiler-test:37:44\n |\n 37 | return (self.caller, finalize_init(caller));\n | ^^^^^^\nError [ETYC0372088]: An async transition must call an async function.\n --> compiler-test:36:5\n |\n 36 | async transition init(b: bool) -> (address, Future) {\n 37 | return (self.caller, finalize_init(caller));\n 38 | }\n | ^\n |\n = Example: `async transition foo() -> Future { let a: Future = bar(); return await_futures(a); }`\nError [ETYC0372005]: Unknown variable `account`\n --> compiler-test:54:53\n |\n 54 | let owner_amount: u64 = Mapping::get_or_use(account, caller, 0u64);\n | ^^^^^^^\nError [ETYC0372005]: Unknown variable `account`\n --> compiler-test:56:22\n |\n 56 | Mapping::set(account, caller, owner_amount + admin_token_amt);\n | ^^^^^^^\nWarning [WTYC0372002]: The async function `finalize_init` is never called by an async transition.\n --> compiler-test:40:5\n |\n 40 | async function finalize_init(caller: address) {\n 41 | let gs: GlobalState = Mapping::get_or_use(global_state, true, GlobalState {\n 42 | next_token_id: 0field,\n 43 | admin: aleo1az8p9vlllyqwtj0c2g9svkd0e5v0p3zzdflwwrpa7kpe8xrfxgfqqpru7m,\n 44 | });\n 45 | assert_eq(gs.next_token_id, 0field);\n 46 | assert_eq(caller, gs.admin);\n 47 | Mapping::set(global_state, true, GlobalState {\n 48 | next_token_id: 1field,\n 49 | admin: gs.admin,\n 50 | });\n 51 | \n 52 | let test_supply: u64 = 15000000000000u64;\n 53 | let admin_token_amt: u64 = 60000000u64;\n 54 | let owner_amount: u64 = Mapping::get_or_use(account, caller, 0u64);\n 55 | assert(owner_amount == 0u64);\n 56 | Mapping::set(account, caller, owner_amount + admin_token_amt);\n 57 | \n 58 | Mapping::set(test_token, test_supply, TestToken {\n 59 | name: 4577111110111112111108121field,\n 60 | symbol: 4577111110111112111108121field,\n 61 | decimals: 6u8,\n 62 | circulating_supply: 0u64 + admin_token_amt,\n 63 | total_supply: test_supply,\n 64 | admin: gs.admin,\n 65 | });\n 66 | }\n | ^"