mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-09-11 13:56:58 +03:00
Regen expectations
This commit is contained in:
parent
93dbeb77b2
commit
2390d10677
26
Cargo.lock
generated
26
Cargo.lock
generated
@ -152,12 +152,6 @@ version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d"
|
||||
|
||||
[[package]]
|
||||
name = "anstyle"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d"
|
||||
|
||||
[[package]]
|
||||
name = "anyhow"
|
||||
version = "1.0.70"
|
||||
@ -182,7 +176,7 @@ version = "2.0.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "86d6b683edf8d1119fe420a94f8a7e389239666aa72e65495d91c00462510151"
|
||||
dependencies = [
|
||||
"anstyle 1.0.0",
|
||||
"anstyle",
|
||||
"bstr",
|
||||
"doc-comment",
|
||||
"predicates",
|
||||
@ -945,9 +939,9 @@ checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4"
|
||||
|
||||
[[package]]
|
||||
name = "h2"
|
||||
version = "0.3.17"
|
||||
version = "0.3.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "66b91535aa35fea1523ad1b86cb6b53c28e0ae566ba4a460f4457e936cad7c6f"
|
||||
checksum = "17f8a914c2987b688368b5138aa05321db91f4090cf26118185672ad588bce21"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"fnv",
|
||||
@ -1387,9 +1381,9 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f"
|
||||
|
||||
[[package]]
|
||||
name = "linux-raw-sys"
|
||||
version = "0.3.1"
|
||||
version = "0.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d59d8c75012853d2e872fb56bc8a2e53718e2cafe1a4c823143141c6d90c322f"
|
||||
checksum = "3f508063cc7bb32987c71511216bd5a32be15bccb6a80b52df8b9d7f01fc3aa2"
|
||||
|
||||
[[package]]
|
||||
name = "lock_api"
|
||||
@ -1784,7 +1778,7 @@ version = "3.0.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "09963355b9f467184c04017ced4a2ba2d75cbcb4e7462690d388233253d4b1a9"
|
||||
dependencies = [
|
||||
"anstyle 0.3.5",
|
||||
"anstyle",
|
||||
"difflib",
|
||||
"itertools",
|
||||
"predicates-core",
|
||||
@ -2049,9 +2043,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rustc-demangle"
|
||||
version = "0.1.22"
|
||||
version = "0.1.23"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d4a36c42d1873f9a77c53bde094f9664d9891bc604a45b4798fd2c389ed12e5b"
|
||||
checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76"
|
||||
|
||||
[[package]]
|
||||
name = "rustc_version"
|
||||
@ -2064,9 +2058,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rustix"
|
||||
version = "0.37.11"
|
||||
version = "0.37.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "85597d61f83914ddeba6a47b3b8ffe7365107221c2e557ed94426489fefb5f77"
|
||||
checksum = "722529a737f5a942fdbac3a46cee213053196737c5eaa3386d52e85b786f2659"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"errno",
|
||||
|
@ -2,4 +2,4 @@
|
||||
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 | Mapping::set(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:22\n |\n 22 | Mapping::set(account, receiver, amount);\n | ^^^^^^^\n"
|
||||
- "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 [ETYC0372071]: A finalize block cannot return a value.\n --> compiler-test:12:5\n |\n 12 | finalize bar(a: u8, b: u8) -> u8 {\n 13 | return a + b;\n 14 | }\n | ^\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 | Mapping::set(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:22\n |\n 22 | Mapping::set(account, receiver, amount);\n | ^^^^^^^\n"
|
||||
|
@ -2,11 +2,11 @@
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - initial_ast: 3e4e2ff67c68486301d1e03214aa49b6d1344c1cb729da2e79333beee2bd0f8b
|
||||
unrolled_ast: 3e4e2ff67c68486301d1e03214aa49b6d1344c1cb729da2e79333beee2bd0f8b
|
||||
ssa_ast: 4e6f38818d6bfe408249712bb9610a7de7e91ebc3a0ccb2c9cc8de894a7384c7
|
||||
flattened_ast: 5d42fb9c1f58b21ce7ecda908a00a8e32b0da001731ab80b7bc94ee70ec7e52b
|
||||
inlined_ast: 5d42fb9c1f58b21ce7ecda908a00a8e32b0da001731ab80b7bc94ee70ec7e52b
|
||||
dce_ast: 5d42fb9c1f58b21ce7ecda908a00a8e32b0da001731ab80b7bc94ee70ec7e52b
|
||||
bytecode: dce026512275efbc60c1c7a3944b34aafb056955ae7d40d45d7f9f859bc4d54e
|
||||
- - initial_ast: 3e22803ffa4b6e0b59c8ea8841052dfbb7a007c8874b52641593130013031668
|
||||
unrolled_ast: 3e22803ffa4b6e0b59c8ea8841052dfbb7a007c8874b52641593130013031668
|
||||
ssa_ast: ae75694a0d9507b6196155274f3900697147c8e878c672786800e6b7d94f12c8
|
||||
flattened_ast: e076afdbdd27dccbeaf4b9508048119fc1205d3cfee9523e11ec1eedd9d05e8e
|
||||
inlined_ast: e076afdbdd27dccbeaf4b9508048119fc1205d3cfee9523e11ec1eedd9d05e8e
|
||||
dce_ast: e076afdbdd27dccbeaf4b9508048119fc1205d3cfee9523e11ec1eedd9d05e8e
|
||||
bytecode: 6c0d7a2fb3131bdfbaa8706f700ef39dfda0788c26e888a312d64508b8beef1d
|
||||
warnings: ""
|
||||
|
@ -2,11 +2,11 @@
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - initial_ast: 2fc8c24e6c00761178e00ae4ad4a86c91bc6af41bb0e2683a046cb44cf3d2219
|
||||
unrolled_ast: 2fc8c24e6c00761178e00ae4ad4a86c91bc6af41bb0e2683a046cb44cf3d2219
|
||||
ssa_ast: 273ef699118d18e0941366f3e494ee5f6c613494debd6aa3ff96e9c3470dce6a
|
||||
flattened_ast: 8f893e9e4af1c0a63e8ca018b016cf9ff0315aee21c4590acefe704f705b4027
|
||||
inlined_ast: 8f893e9e4af1c0a63e8ca018b016cf9ff0315aee21c4590acefe704f705b4027
|
||||
dce_ast: 8f893e9e4af1c0a63e8ca018b016cf9ff0315aee21c4590acefe704f705b4027
|
||||
bytecode: e33e425c7a594de27ead233582b87e3c5e8de5b32fbf572d8fa34572eebd6d03
|
||||
- - initial_ast: fcd68f96639b0180cab2adaf2bad1baf463e80359676c8abb16c40100018f5c0
|
||||
unrolled_ast: fcd68f96639b0180cab2adaf2bad1baf463e80359676c8abb16c40100018f5c0
|
||||
ssa_ast: e0b9b619abe1a0cbec79d24272d4569d6b1421e49739a5dd4eabb76b73a3e16f
|
||||
flattened_ast: 9f3a96f7d13e1fd03b5386f2da85b010c75f5d4f2a6ceef3ed74a95dd07778b3
|
||||
inlined_ast: 9f3a96f7d13e1fd03b5386f2da85b010c75f5d4f2a6ceef3ed74a95dd07778b3
|
||||
dce_ast: 9f3a96f7d13e1fd03b5386f2da85b010c75f5d4f2a6ceef3ed74a95dd07778b3
|
||||
bytecode: 5d42290d1854d07a43649ef59b4c88d3881bc15af1409706fc2bac2b733125db
|
||||
warnings: ""
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [ETYC0372005]: Unknown function `increment`\n --> compiler-test:12:9\n |\n 12 | increment(account, receiver, amount);\n | ^^^^^^^^^\nError [ETYC0372005]: Unknown function `increment`\n --> compiler-test:28:9\n |\n 28 | increment(values, 0u8, 1u8);\n | ^^^^^^^^^\nError [ETYC0372005]: Unknown function `increment`\n --> compiler-test:29:9\n |\n 29 | increment(account, self.caller, 1u64);\n | ^^^^^^^^^\nWarning [WPAR0370001]: The keyword `increment` is deprecated.\n --> compiler-test:12:9\n |\n 12 | increment(account, receiver, amount);\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = Use `Mapping::{get, get_or, put}` for manipulating on-chain mappings.\nWarning [WPAR0370001]: The keyword `increment` is deprecated.\n --> compiler-test:28:9\n |\n 28 | increment(values, 0u8, 1u8);\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = Use `Mapping::{get, get_or, put}` for manipulating on-chain mappings.\nWarning [WPAR0370001]: The keyword `increment` is deprecated.\n --> compiler-test:29:9\n |\n 29 | increment(account, self.caller, 1u64);\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = Use `Mapping::{get, get_or, put}` for manipulating on-chain mappings."
|
||||
- "Error [ETYC0372005]: Unknown function `increment`\n --> compiler-test:12:9\n |\n 12 | increment(account, receiver, amount);\n | ^^^^^^^^^\nError [ETYC0372071]: A finalize block cannot return a value.\n --> compiler-test:19:5\n |\n 19 | finalize public_adder(a: u8, b: u8) -> public u8 {\n 20 | return a + b;\n 21 | }\n | ^\nError [ETYC0372005]: Unknown function `increment`\n --> compiler-test:28:9\n |\n 28 | increment(values, 0u8, 1u8);\n | ^^^^^^^^^\nError [ETYC0372005]: Unknown function `increment`\n --> compiler-test:29:9\n |\n 29 | increment(account, self.caller, 1u64);\n | ^^^^^^^^^\nWarning [WPAR0370001]: The keyword `increment` is deprecated.\n --> compiler-test:12:9\n |\n 12 | increment(account, receiver, amount);\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = Use `Mapping::{get, get_or, put}` for manipulating on-chain mappings.\nWarning [WPAR0370001]: The keyword `increment` is deprecated.\n --> compiler-test:28:9\n |\n 28 | increment(values, 0u8, 1u8);\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = Use `Mapping::{get, get_or, put}` for manipulating on-chain mappings.\nWarning [WPAR0370001]: The keyword `increment` is deprecated.\n --> compiler-test:29:9\n |\n 29 | increment(account, self.caller, 1u64);\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = Use `Mapping::{get, get_or, put}` for manipulating on-chain mappings."
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [ETYC0372032]: An input to a finalize block must be public.\n --> compiler-test:10:62\n |\n 10 | finalize mint_public (public receiver: address, constant amount: u64) -> constant u64 {\n | ^^^^^^\n |\n = Use a `public` modifier to the input variable declaration or remove the visibility modifier entirely.\nError [ETYC0372033]: An output from a finalize block must be public.\n --> compiler-test:10:87\n |\n 10 | finalize mint_public (public receiver: address, constant amount: u64) -> constant u64 {\n | ^^^\n |\n = Use a `public` modifier to the output type declaration or remove the visibility modifier entirely.\nError [ETYC0372038]: Function must return a value.\n --> compiler-test:10:5\n |\n 10 | finalize mint_public (public receiver: address, constant amount: u64) -> constant u64 {\n 11 | Mapping::set(account, receiver, amount);\n 12 | }\n | ^\n"
|
||||
- "Error [ETYC0372032]: An input to a finalize block must be public.\n --> compiler-test:10:62\n |\n 10 | finalize mint_public (public receiver: address, constant amount: u64) -> constant u64 {\n | ^^^^^^\n |\n = Use a `public` modifier to the input variable declaration or remove the visibility modifier entirely.\nError [ETYC0372071]: A finalize block cannot return a value.\n --> compiler-test:10:5\n |\n 10 | finalize mint_public (public receiver: address, constant amount: u64) -> constant u64 {\n 11 | Mapping::set(account, receiver, amount);\n 12 | }\n | ^\nError [ETYC0372033]: An output from a finalize block must be public.\n --> compiler-test:10:87\n |\n 10 | finalize mint_public (public receiver: address, constant amount: u64) -> constant u64 {\n | ^^^\n |\n = Use a `public` modifier to the output type declaration or remove the visibility modifier entirely.\nError [ETYC0372038]: Function must return a value.\n --> compiler-test:10:5\n |\n 10 | finalize mint_public (public receiver: address, constant amount: u64) -> constant u64 {\n 11 | Mapping::set(account, receiver, amount);\n 12 | }\n | ^\nError [ETYC0372071]: A finalize block cannot return a value.\n --> compiler-test:18:5\n |\n 18 | finalize mint_public2(public receiver: address, amount: u64) -> u64 {\n 19 | Mapping::set(account, receiver, amount);\n 20 | return amount + amount;\n 21 | }\n | ^\n"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [ETYC0372003]: Expected type `u64` but type `u8` was found\n --> compiler-test:12:16\n |\n 12 | return 1u8 + 2u8;\n | ^^^\nError [ETYC0372003]: Expected type `u64` but type `u8` was found\n --> compiler-test:12:22\n |\n 12 | return 1u8 + 2u8;\n | ^^^\n"
|
||||
- "Error [ETYC0372071]: A finalize block cannot return a value.\n --> compiler-test:10:5\n |\n 10 | finalize mint_public(public receiver: address, public amount: u64) -> u64 {\n 11 | Mapping::set(account, receiver, amount);\n 12 | return 1u8 + 2u8;\n 13 | }\n | ^\nError [ETYC0372003]: Expected type `u64` but type `u8` was found\n --> compiler-test:12:16\n |\n 12 | return 1u8 + 2u8;\n | ^^^\nError [ETYC0372003]: Expected type `u64` but type `u8` was found\n --> compiler-test:12:22\n |\n 12 | return 1u8 + 2u8;\n | ^^^\n"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [ETYC0372038]: Function must return a value.\n --> compiler-test:11:5\n |\n 11 | finalize mint_public (public receiver: address, public amount: u64) -> u64 {\n 12 | Mapping::set(account, receiver, amount);\n 13 | }\n | ^\n"
|
||||
- "Error [ETYC0372071]: A finalize block cannot return a value.\n --> compiler-test:11:5\n |\n 11 | finalize mint_public (public receiver: address, public amount: u64) -> u64 {\n 12 | Mapping::set(account, receiver, amount);\n 13 | }\n | ^\nError [ETYC0372038]: Function must return a value.\n --> compiler-test:11:5\n |\n 11 | finalize mint_public (public receiver: address, public amount: u64) -> u64 {\n 12 | Mapping::set(account, receiver, amount);\n 13 | }\n | ^\n"
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [ETYC0372071]: A finalize block cannot return a value.\n --> compiler-test:8:5\n |\n 8 | finalize public_adder(a: u8, b: u8) -> public u8 {\n 9 | return a + b;\n 10 | }\n | ^\n"
|
@ -2,11 +2,11 @@
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- initial_ast: 6d726e9f0d57a6d9dc65a5e6e480a0150909d107dc1298e7a7d7b2ac7a4c56e8
|
||||
unrolled_ast: 6d726e9f0d57a6d9dc65a5e6e480a0150909d107dc1298e7a7d7b2ac7a4c56e8
|
||||
ssa_ast: ee17c0501d3280c3bfb8af90518342997ac194dfbe76c5b89bd82931fb8e44ea
|
||||
flattened_ast: 38f8dcdefe72149bcab8ad37608caefd8f1645d5ad4204b0e37281403e71761e
|
||||
inlined_ast: 38f8dcdefe72149bcab8ad37608caefd8f1645d5ad4204b0e37281403e71761e
|
||||
dce_ast: 38f8dcdefe72149bcab8ad37608caefd8f1645d5ad4204b0e37281403e71761e
|
||||
bytecode: dc1e073d4507d6f2ae9cd766965b42fc473124acbd650370486008bde3c1923f
|
||||
warnings: ""
|
||||
- - initial_ast: 3f1a59f06b2fbb178108e941fa045659525d3aa2f240195b64b5c11c61bc531e
|
||||
unrolled_ast: 3f1a59f06b2fbb178108e941fa045659525d3aa2f240195b64b5c11c61bc531e
|
||||
ssa_ast: 13c427894fa29a6ba0b1b04de888f553dbb973862b826cf89e13e5e660b9d068
|
||||
flattened_ast: 23b5297a87260e4f4fbdb7f70222809207dca126b0bf756ae69ac324341ca621
|
||||
inlined_ast: 23b5297a87260e4f4fbdb7f70222809207dca126b0bf756ae69ac324341ca621
|
||||
dce_ast: 23b5297a87260e4f4fbdb7f70222809207dca126b0bf756ae69ac324341ca621
|
||||
bytecode: 4bd391305131d1a4fccf1012b7831222d6dbb0daae6c0b1ff12af0d17778831c
|
||||
warnings: ""
|
||||
|
@ -1,12 +1,5 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- - initial_ast: 43024d427bca1f7049e951e6b2a381a5181e75ce245a18b06ac66e74443176d7
|
||||
unrolled_ast: 43024d427bca1f7049e951e6b2a381a5181e75ce245a18b06ac66e74443176d7
|
||||
ssa_ast: 3909190f5ae74a27f509a37237d61da69bb9e01476e994e5b89f6375adff8682
|
||||
flattened_ast: acd0429ac96ac54e8bee7712763e1af89e33ade1779e732bdbb4c000cebd5914
|
||||
inlined_ast: acd0429ac96ac54e8bee7712763e1af89e33ade1779e732bdbb4c000cebd5914
|
||||
dce_ast: acd0429ac96ac54e8bee7712763e1af89e33ade1779e732bdbb4c000cebd5914
|
||||
bytecode: b8c8051847df4eb87f28bbb8ec916fc0f01be7ec8ecdfaa54504848a5498d677
|
||||
warnings: ""
|
||||
- "Error [ETYC0372071]: A finalize block cannot return a value.\n --> compiler-test:11:5\n |\n 11 | finalize mint_public (public receiver: address, public amount: u64) -> u64 {\n 12 | Mapping::set(account, receiver, amount);\n 13 | return amount;\n 14 | }\n | ^\nError [ETYC0372071]: A finalize block cannot return a value.\n --> compiler-test:18:7\n |\n 18 | } finalize public_adder(a: u8, b: u8) -> public u8 {\n 19 | return a + b;\n 20 | }\n | ^\n"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [EPAR0370021]: The type of `tokens` has no associated function `get_or` that takes 3 argument(s).\n --> compiler-test:19:9\n |\n 19 | tokens.get_or(addr, amount, 1u128);\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nError [EPAR0370021]: The type of `amounts` has no associated function `get_or` that takes 1 argument(s).\n --> compiler-test:21:9\n |\n 21 | amounts.get_or(1u8);\n | ^^^^^^^^^^^^^^^^^^^\nError [EPAR0370021]: The type of `amounts` has no associated function `get_or` that takes 0 argument(s).\n --> compiler-test:23:9\n |\n 23 | amounts.get_or();\n | ^^^^^^^^^^^^^^^^"
|
||||
- "Error [EPAR0370021]: The type of `tokens` has no associated function `get_or_init` that takes 3 argument(s).\n --> compiler-test:19:9\n |\n 19 | tokens.get_or_init(addr, amount, 1u128);\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nError [EPAR0370021]: The type of `amounts` has no associated function `get_or_init` that takes 1 argument(s).\n --> compiler-test:21:9\n |\n 21 | amounts.get_or_init(1u8);\n | ^^^^^^^^^^^^^^^^^^^^^^^^\nError [EPAR0370021]: The type of `amounts` has no associated function `get_or_init` that takes 0 argument(s).\n --> compiler-test:23:9\n |\n 23 | amounts.get_or_init();\n | ^^^^^^^^^^^^^^^^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [ETYC0372030]: A mapping's value cannot be a record\n --> compiler-test:11:5\n |\n 11 | mapping tokens: address => Token;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nError [ETYC0372007]: Expected one type from `Token`, but got `u128`\n --> compiler-test:18:39\n |\n 18 | Mapping::get_or(tokens, addr, amount);\n | ^^^^^^\nError [ETYC0372007]: Expected one type from `Token`, but got `u128`\n --> compiler-test:19:29\n |\n 19 | tokens.get_or(addr, amount);\n | ^^^^^^\nError [ETYC0372007]: Expected one type from `address`, but got `u8`\n --> compiler-test:20:34\n |\n 20 | Mapping::get_or(amounts, 1u8, amount);\n | ^^^\nError [ETYC0372007]: Expected one type from `address`, but got `u8`\n --> compiler-test:21:24\n |\n 21 | amounts.get_or(1u8, amount);\n | ^^^\nError [ETYC0372007]: Expected one type from `u128`, but got `u8`\n --> compiler-test:22:40\n |\n 22 | Mapping::get_or(amounts, addr, 1u8);\n | ^^^\nError [ETYC0372007]: Expected one type from `u128`, but got `u8`\n --> compiler-test:23:30\n |\n 23 | amounts.get_or(addr, 1u8);\n | ^^^\nError [ETYC0372003]: Expected type `u64` but type `u8` was found\n --> compiler-test:24:67\n |\n 24 | Mapping::get_or(tokens, addr, Token { owner: addr, gates: 1u8, amount: 1u8 });\n | ^^^\nError [ETYC0372003]: Expected type `u128` but type `u8` was found\n --> compiler-test:24:80\n |\n 24 | Mapping::get_or(tokens, addr, Token { owner: addr, gates: 1u8, amount: 1u8 });\n | ^^^\nError [ETYC0372003]: Expected type `u64` but type `u8` was found\n --> compiler-test:25:57\n |\n 25 | tokens.get_or(addr, Token { owner: addr, gates: 1u8, amount: 1u8 });\n | ^^^\nError [ETYC0372003]: Expected type `u128` but type `u8` was found\n --> compiler-test:25:70\n |\n 25 | tokens.get_or(addr, Token { owner: addr, gates: 1u8, amount: 1u8 });\n | ^^^\nError [ETYC0372005]: Unknown variable `foo`\n --> compiler-test:26:25\n |\n 26 | Mapping::get_or(foo, addr, amount);\n | ^^^\nError [ETYC0372005]: Unknown variable `foo`\n --> compiler-test:27:9\n |\n 27 | foo.get_or(addr, amount);\n | ^^^\n"
|
||||
- "Error [ETYC0372030]: A mapping's value cannot be a record\n --> compiler-test:11:5\n |\n 11 | mapping tokens: address => Token;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nError [ETYC0372007]: Expected one type from `Token`, but got `u128`\n --> compiler-test:18:44\n |\n 18 | Mapping::get_or_init(tokens, addr, amount);\n | ^^^^^^\nError [ETYC0372007]: Expected one type from `Token`, but got `u128`\n --> compiler-test:19:34\n |\n 19 | tokens.get_or_init(addr, amount);\n | ^^^^^^\nError [ETYC0372007]: Expected one type from `address`, but got `u8`\n --> compiler-test:20:39\n |\n 20 | Mapping::get_or_init(amounts, 1u8, amount);\n | ^^^\nError [ETYC0372007]: Expected one type from `address`, but got `u8`\n --> compiler-test:21:29\n |\n 21 | amounts.get_or_init(1u8, amount);\n | ^^^\nError [ETYC0372007]: Expected one type from `u128`, but got `u8`\n --> compiler-test:22:45\n |\n 22 | Mapping::get_or_init(amounts, addr, 1u8);\n | ^^^\nError [ETYC0372007]: Expected one type from `u128`, but got `u8`\n --> compiler-test:23:35\n |\n 23 | amounts.get_or_init(addr, 1u8);\n | ^^^\nError [ETYC0372003]: Expected type `u64` but type `u8` was found\n --> compiler-test:24:72\n |\n 24 | Mapping::get_or_init(tokens, addr, Token { owner: addr, gates: 1u8, amount: 1u8 });\n | ^^^\nError [ETYC0372003]: Expected type `u128` but type `u8` was found\n --> compiler-test:24:85\n |\n 24 | Mapping::get_or_init(tokens, addr, Token { owner: addr, gates: 1u8, amount: 1u8 });\n | ^^^\nError [ETYC0372003]: Expected type `u64` but type `u8` was found\n --> compiler-test:25:62\n |\n 25 | tokens.get_or_init(addr, Token { owner: addr, gates: 1u8, amount: 1u8 });\n | ^^^\nError [ETYC0372003]: Expected type `u128` but type `u8` was found\n --> compiler-test:25:75\n |\n 25 | tokens.get_or_init(addr, Token { owner: addr, gates: 1u8, amount: 1u8 });\n | ^^^\nError [ETYC0372005]: Unknown variable `foo`\n --> compiler-test:26:30\n |\n 26 | Mapping::get_or_init(foo, addr, amount);\n | ^^^\nError [ETYC0372005]: Unknown variable `foo`\n --> compiler-test:27:9\n |\n 27 | foo.get_or_init(addr, amount);\n | ^^^\n"
|
||||
|
@ -2,11 +2,11 @@
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - initial_ast: 5a61e7c801f64b521c305ddf08c2f68956483cd3cb595a2d0112bde9904b9078
|
||||
unrolled_ast: 5a61e7c801f64b521c305ddf08c2f68956483cd3cb595a2d0112bde9904b9078
|
||||
ssa_ast: 31b0f59f3e4bfacad7cd274e4796d8b82a2e5d3561e40d8d9f8711e6f3745d66
|
||||
flattened_ast: e9204dffdf98b3b9a143fb50aab49351ce071481ce574939a0d406cc44d727ed
|
||||
inlined_ast: e9204dffdf98b3b9a143fb50aab49351ce071481ce574939a0d406cc44d727ed
|
||||
dce_ast: e9204dffdf98b3b9a143fb50aab49351ce071481ce574939a0d406cc44d727ed
|
||||
bytecode: 7762f38c434bb19378016a6561a0ae4087e336973badd9d0a3fa576cf7186350
|
||||
- - initial_ast: 1fa1805ab763ad1d48c40a68cefd3afec6cfd51bd652dde40f31c19568351b04
|
||||
unrolled_ast: 1fa1805ab763ad1d48c40a68cefd3afec6cfd51bd652dde40f31c19568351b04
|
||||
ssa_ast: 8d608145548c0fff4016772a969bbbeb4d761f78f4893200462649d163d501b4
|
||||
flattened_ast: 0ad36a07c16792a97cc1e13a2ecc6adffaa1c4d0bfede4161e8328c2deb509d4
|
||||
inlined_ast: 0ad36a07c16792a97cc1e13a2ecc6adffaa1c4d0bfede4161e8328c2deb509d4
|
||||
dce_ast: 0ad36a07c16792a97cc1e13a2ecc6adffaa1c4d0bfede4161e8328c2deb509d4
|
||||
bytecode: 1594fae22250347f7dd1b8b6ddd346c0b510138efa17be448b9b98a93e030d21
|
||||
warnings: ""
|
||||
|
@ -2,11 +2,11 @@
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - initial_ast: 66c08e3fa6b22b7663e949d6ea72455bca2c26a573ba094f084310a086a4cf0b
|
||||
unrolled_ast: 66c08e3fa6b22b7663e949d6ea72455bca2c26a573ba094f084310a086a4cf0b
|
||||
ssa_ast: b86f0471ac1a09039a4ce147e87b0c41b9c3378dba0cb560b4a2fe41533781c2
|
||||
flattened_ast: 52f744a6cf805739c77995f73c2f626ad2403301c5dc6e007b9c2092869f5224
|
||||
inlined_ast: 7624599cd1c4e1dbd47fd1a649f1451e94fe0c38b1796f0a88d0061d160dcf3a
|
||||
dce_ast: 7624599cd1c4e1dbd47fd1a649f1451e94fe0c38b1796f0a88d0061d160dcf3a
|
||||
bytecode: 944f96542f64b4abe14db108cdb87d69eeb48a1c58c85508a1a88f15d6340407
|
||||
- - initial_ast: 0eb7e9770ef5053cbe244a40e8537df6ea4398ac2591e4fb8daad5c7df2ee8c8
|
||||
unrolled_ast: 0eb7e9770ef5053cbe244a40e8537df6ea4398ac2591e4fb8daad5c7df2ee8c8
|
||||
ssa_ast: 275c27ab04b5dc48b3ba158dd0eada91b466df9ebeabf80952de2ac14cf99532
|
||||
flattened_ast: d6351f5be76b92159950149b3460fbf6e8145049ad884d23429f04c74a51c524
|
||||
inlined_ast: 4b86d95a9c4e7a086ba2cfb002ab027fdfb31e96ef67f50cf08116323eec3ba6
|
||||
dce_ast: 4b86d95a9c4e7a086ba2cfb002ab027fdfb31e96ef67f50cf08116323eec3ba6
|
||||
bytecode: d57d4b2a7ad5a81ba9bac91b5ac94c8bcd6862d3da1a4728f81fbc05c1d2f281
|
||||
warnings: ""
|
||||
|
@ -2,11 +2,11 @@
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - initial_ast: ac852a67842b1054112f21181808134b2b33eddedeacb263d3965fa92155deea
|
||||
unrolled_ast: ac852a67842b1054112f21181808134b2b33eddedeacb263d3965fa92155deea
|
||||
ssa_ast: 4c717c5610854b3ae84c09bc97997984e55d590620fbae8ed060c259b0b8c674
|
||||
flattened_ast: 900fbee1813c51d4859f4bd2276459d7cfcccef8447c26b9d16b6f00aab5455c
|
||||
inlined_ast: 900fbee1813c51d4859f4bd2276459d7cfcccef8447c26b9d16b6f00aab5455c
|
||||
dce_ast: 900fbee1813c51d4859f4bd2276459d7cfcccef8447c26b9d16b6f00aab5455c
|
||||
bytecode: 5cf417bf9db15d8c0addd8e4b7f033d744b931056504da9ab07bbe5151fa36c3
|
||||
- - initial_ast: d62e60befc1c29c854d5a8cb8780b2e5ae28c84d70b2dffebb062c25e6bab718
|
||||
unrolled_ast: d62e60befc1c29c854d5a8cb8780b2e5ae28c84d70b2dffebb062c25e6bab718
|
||||
ssa_ast: 00be381c41860b94a1ea310ab3a2c9f8cfdf95e63e3ac73c7a17385d4ba5bd7a
|
||||
flattened_ast: e593285247cd8e1eb978bc8757180fa9354d03b2319e7eda03b05709d27e3d11
|
||||
inlined_ast: e593285247cd8e1eb978bc8757180fa9354d03b2319e7eda03b05709d27e3d11
|
||||
dce_ast: e593285247cd8e1eb978bc8757180fa9354d03b2319e7eda03b05709d27e3d11
|
||||
bytecode: 3252a839820ec4b72248f23507600486375cd3d7702b5b6c980b031be5a7f80c
|
||||
warnings: ""
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [ETYC0372035]: `Mapping::set` must be inside a finalize block.\n --> compiler-test:8:9\n |\n 8 | Mapping::set(values, 0u8, 1u8);\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nError [ETYC0372035]: `Mapping::get_or` must be inside a finalize block.\n --> compiler-test:9:9\n |\n 9 | Mapping::get_or(account, self.caller, 1u64);\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nError [ETYC0372035]: `Mapping::get` must be inside a finalize block.\n --> compiler-test:10:9\n |\n 10 | Mapping::get(values, 1u8);\n | ^^^^^^^^^^^^^^^^^^^^^^^^^\nError [ETYC0372035]: `Mapping::set` must be inside a finalize block.\n --> compiler-test:14:9\n |\n 14 | Mapping::set(values, 0u8, 1u8);\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nError [ETYC0372035]: `Mapping::get_or` must be inside a finalize block.\n --> compiler-test:15:9\n |\n 15 | Mapping::get_or(account, self.caller, 1u64);\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nError [ETYC0372035]: `Mapping::get` must be inside a finalize block.\n --> compiler-test:16:9\n |\n 16 | Mapping::get(values, 0u8);\n | ^^^^^^^^^^^^^^^^^^^^^^^^^\nError [ETYC0372044]: Function must contain a `finalize` statement on all execution paths.\n --> compiler-test:13:5\n |\n 13 | inline bar() {\n 14 | Mapping::set(values, 0u8, 1u8);\n 15 | Mapping::get_or(account, self.caller, 1u64);\n 16 | Mapping::get(values, 0u8);\n 17 | }\n | ^\nError [ETYC0372031]: Only transition functions can have a `finalize` block.\n --> compiler-test:19:5\n |\n 19 | finalize finalize_no_params() {\n 20 | foo();\n 21 | bar();\n 22 | }\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:19:5\n |\n 19 | finalize finalize_no_params() {\n 20 | foo();\n 21 | bar();\n 22 | }\n | ^\nError [ETYC0372066]: Cyclic dependency between functions: `bar` --> `bar`\n"
|
||||
- "Error [ETYC0372035]: `Mapping::set` must be inside a finalize block.\n --> compiler-test:8:9\n |\n 8 | Mapping::set(values, 0u8, 1u8);\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nError [ETYC0372035]: `Mapping::get_or` must be inside a finalize block.\n --> compiler-test:9:9\n |\n 9 | Mapping::get_or_init(account, self.caller, 1u64);\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nError [ETYC0372035]: `Mapping::get` must be inside a finalize block.\n --> compiler-test:10:9\n |\n 10 | Mapping::get(values, 1u8);\n | ^^^^^^^^^^^^^^^^^^^^^^^^^\nError [ETYC0372035]: `Mapping::set` must be inside a finalize block.\n --> compiler-test:14:9\n |\n 14 | Mapping::set(values, 0u8, 1u8);\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nError [ETYC0372035]: `Mapping::get_or` must be inside a finalize block.\n --> compiler-test:15:9\n |\n 15 | Mapping::get_or_init(account, self.caller, 1u64);\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nError [ETYC0372035]: `Mapping::get` must be inside a finalize block.\n --> compiler-test:16:9\n |\n 16 | Mapping::get(values, 0u8);\n | ^^^^^^^^^^^^^^^^^^^^^^^^^\nError [ETYC0372044]: Function must contain a `finalize` statement on all execution paths.\n --> compiler-test:13:5\n |\n 13 | inline bar() {\n 14 | Mapping::set(values, 0u8, 1u8);\n 15 | Mapping::get_or_init(account, self.caller, 1u64);\n 16 | Mapping::get(values, 0u8);\n 17 | }\n | ^\nError [ETYC0372031]: Only transition functions can have a `finalize` block.\n --> compiler-test:19:5\n |\n 19 | finalize finalize_no_params() {\n 20 | foo();\n 21 | bar();\n 22 | }\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:19:5\n |\n 19 | finalize finalize_no_params() {\n 20 | foo();\n 21 | bar();\n 22 | }\n | ^\nError [ETYC0372066]: Cyclic dependency between functions: `bar` --> `bar`\n"
|
||||
|
@ -2,11 +2,11 @@
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - initial_ast: a1273726570fc7a7cc2a27f2689258df5f6fb26964aab84c89f5a771d4841ea3
|
||||
unrolled_ast: a1273726570fc7a7cc2a27f2689258df5f6fb26964aab84c89f5a771d4841ea3
|
||||
ssa_ast: 028b589972bfceff9fb375e832f0595848ec7b7ec7a791995c7d360f0397e68a
|
||||
flattened_ast: ef3ca55705d6cf89c60d2f7b62a11bb6aef71a03dc92f86ddd7ea61ff8faca72
|
||||
inlined_ast: ef3ca55705d6cf89c60d2f7b62a11bb6aef71a03dc92f86ddd7ea61ff8faca72
|
||||
dce_ast: ef3ca55705d6cf89c60d2f7b62a11bb6aef71a03dc92f86ddd7ea61ff8faca72
|
||||
bytecode: 781e4b7698065453244c0e3b9601be91d8fc6edec21f0284c9e4a59d844eb052
|
||||
- - initial_ast: 9e1963624341febedf39c1886c601f88a3ef9a455eca386cacbb991440004a0d
|
||||
unrolled_ast: 9e1963624341febedf39c1886c601f88a3ef9a455eca386cacbb991440004a0d
|
||||
ssa_ast: 97bb6b19efae0e8c6d60bba99e242b2200eef22e2d6444609bf00d2055518d9b
|
||||
flattened_ast: 8e1babbb4770550865b91b328d22c5f993b3eae7d8948a78f9a81c6a289e0a47
|
||||
inlined_ast: 8e1babbb4770550865b91b328d22c5f993b3eae7d8948a78f9a81c6a289e0a47
|
||||
dce_ast: 8e1babbb4770550865b91b328d22c5f993b3eae7d8948a78f9a81c6a289e0a47
|
||||
bytecode: ffc96b269bc9ccd3647ec647c3a9d7867a9efd93bcdddaaaaafca9253218f5f2
|
||||
warnings: ""
|
||||
|
@ -2,13 +2,13 @@
|
||||
namespace: Finalize
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - initial_ast: 84038e78e5860a9373916c96a5c1ed68f374f2d4b49dc2164430a651b0dc2648
|
||||
unrolled_ast: 84038e78e5860a9373916c96a5c1ed68f374f2d4b49dc2164430a651b0dc2648
|
||||
ssa_ast: 268eec2aaa591e6525c1cff34fe848a43976c23b0a0ea0d785e0560c9b16e762
|
||||
flattened_ast: 13b3d968f30d531def7fa0919a9de9a4e5e6bba0e751eb7eb3200807cea046db
|
||||
inlined_ast: 13b3d968f30d531def7fa0919a9de9a4e5e6bba0e751eb7eb3200807cea046db
|
||||
dce_ast: 13b3d968f30d531def7fa0919a9de9a4e5e6bba0e751eb7eb3200807cea046db
|
||||
bytecode: 91529a093203dc3fa72a3aabf0cf1d5d4cf36b5dffc46ff2d4b57e077526318a
|
||||
- - initial_ast: 26abbb0ef61c47bd69f82f4ed0357583bad2ba031ee028400504bfc1f856e0bb
|
||||
unrolled_ast: 26abbb0ef61c47bd69f82f4ed0357583bad2ba031ee028400504bfc1f856e0bb
|
||||
ssa_ast: 8458015258bcc66300b90e61050dad3175ca46babfd3e35205cabc61fa6c34a8
|
||||
flattened_ast: 5cef23d00b994c5f0dc715ede94edae006730bebec809d1425d83418b287a811
|
||||
inlined_ast: 5cef23d00b994c5f0dc715ede94edae006730bebec809d1425d83418b287a811
|
||||
dce_ast: 5cef23d00b994c5f0dc715ede94edae006730bebec809d1425d83418b287a811
|
||||
bytecode: 2f96ec3248782d1a90f9b223eb25bce3770fb9894ecd8ee89d685936ba1ea86b
|
||||
warnings: ""
|
||||
initial_state: c9ec5ff008d56bc287af2e780cc50f7132cc8c1feea397a90f86ed825e782454
|
||||
results:
|
||||
|
Loading…
Reference in New Issue
Block a user