mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-12-23 10:12:21 +03:00
Regen expectations
This commit is contained in:
parent
b16926449c
commit
a69c1b4dae
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [ETYC0372046]: Invalid type `u128`\n --> compiler-test:5:41\n |\n 5 | let a: group = Pedersen64::hash(1u128);\n | ^^^^^\nError [ETYC0372003]: Expected type `group` but type `field` was found\n --> compiler-test:5:24\n |\n 5 | let a: group = Pedersen64::hash(1u128);\n | ^^^^^^^^^^^^^^^^^^^^^^^\n"
|
||||
- "Error [ETYC0372047]: Invalid type `u128`\n --> compiler-test:5:41\n |\n 5 | let a: group = Pedersen64::hash(1u128);\n | ^^^^^\nError [ETYC0372003]: Expected type `group` but type `field` was found\n --> compiler-test:5:24\n |\n 5 | let a: group = Pedersen64::hash(1u128);\n | ^^^^^^^^^^^^^^^^^^^^^^^\n"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [ETYC0372036]: Cannot use a `finalize` statement without a `finalize` block.\n --> compiler-test:5:15\n |\n 5 | async finalize(a, b);\n | ^^^^^^^^^^^^^^\nError [ETYC0372044]: Function must contain a `finalize` statement on all execution paths.\n --> compiler-test:9:5\n |\n 9 | function bar(a: u8, b: u8) -> u8 {\n 10 | return a + b;\n 11 | }\n | ^\nError [ETYC0372032]: Only transition functions can have a `finalize` block.\n --> compiler-test:13:5\n |\n 13 | finalize bar(a: u8, b: u8) -> u8 {\n 14 | return a + b;\n 15 | }\n | ^\n |\n = Remove the `finalize` block or use the keyword `transition` instead of `function`.\nError [ETYC0372032]: Only transition functions can have a `finalize` block.\n --> compiler-test:22:5\n |\n 22 | finalize mint_public(receiver: address, amount: u64) {\n 23 | increment(account, receiver, amount);\n 24 | }\n | ^\n |\n = Remove the `finalize` block or use the keyword `transition` instead of `function`.\nError [ETYC0372005]: Unknown variable `account`\n --> compiler-test:23:19\n |\n 23 | increment(account, receiver, amount);\n | ^^^^^^^\nError [ETYC0372004]: Could not determine the type of `account`\n --> compiler-test:23:19\n |\n 23 | increment(account, receiver, amount);\n | ^^^^^^^\n"
|
||||
- "Error [ETYC0372037]: Cannot use a `finalize` statement without a `finalize` block.\n --> compiler-test:5:15\n |\n 5 | async finalize(a, b);\n | ^^^^^^^^^^^^^^\nError [ETYC0372045]: Function must contain a `finalize` statement on all execution paths.\n --> compiler-test:9:5\n |\n 9 | function bar(a: u8, b: u8) -> u8 {\n 10 | return a + b;\n 11 | }\n | ^\nError [ETYC0372032]: Only transition functions can have a `finalize` block.\n --> compiler-test:13:5\n |\n 13 | finalize bar(a: u8, b: u8) -> u8 {\n 14 | return a + b;\n 15 | }\n | ^\n |\n = Remove the `finalize` block or use the keyword `transition` instead of `function`.\nError [ETYC0372032]: Only transition functions can have a `finalize` block.\n --> compiler-test:22:5\n |\n 22 | finalize mint_public(receiver: address, amount: u64) {\n 23 | increment(account, receiver, amount);\n 24 | }\n | ^\n |\n = Remove the `finalize` block or use the keyword `transition` instead of `function`.\nError [ETYC0372005]: Unknown variable `account`\n --> compiler-test:23:19\n |\n 23 | increment(account, receiver, amount);\n | ^^^^^^^\nError [ETYC0372004]: Could not determine the type of `account`\n --> compiler-test:23:19\n |\n 23 | increment(account, receiver, amount);\n | ^^^^^^^\n"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [ETYC0372039]: A finalize block cannot be empty.\n --> compiler-test:9:5\n |\n 9 | finalize mint_public (public receiver: address, public amount: u64) {}\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n"
|
||||
- "Error [ETYC0372040]: A finalize block cannot be empty.\n --> compiler-test:9:5\n |\n 9 | finalize mint_public (public receiver: address, public amount: u64) {}\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [ETYC0372033]: 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 = Add a `public` modifier to the input variable declaration or remove the visibility modifier entirely.\nError [ETYC0372033]: An input to 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 = Add a `public` modifier to the input variable 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 | increment(account, receiver, amount);\n 12 | }\n | ^\n"
|
||||
- "Error [ETYC0372033]: 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 [ETYC0372034]: 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 variable declaration or remove the visibility modifier entirely.\nError [ETYC0372039]: 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 | increment(account, receiver, amount);\n 12 | }\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 | increment(account, receiver, amount);\n 13 | }\n | ^\n"
|
||||
- "Error [ETYC0372039]: 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 | increment(account, receiver, amount);\n 13 | }\n | ^\n"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [ETYC0372045]: `finalize` name `mint_public` does not match function name `mint_private`\n --> compiler-test:11:5\n |\n 11 | finalize mint_private (public receiver: address, public amount: u64) {\n 12 | increment(account, receiver, amount);\n 13 | }\n | ^\n"
|
||||
- "Error [ETYC0372046]: `finalize` name `mint_public` does not match function name `mint_private`\n --> compiler-test:11:5\n |\n 11 | finalize mint_private (public receiver: address, public amount: u64) {\n 12 | increment(account, receiver, amount);\n 13 | }\n | ^\n"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [ETYC0372042]: `finalize` expected `2` args, but got `3`\n --> compiler-test:8:15\n |\n 8 | async finalize(receiver, amount, amount);\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n"
|
||||
- "Error [ETYC0372043]: `finalize` expected `2` args, but got `3`\n --> compiler-test:8:15\n |\n 8 | async finalize(receiver, amount, amount);\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [ETYC0372044]: Function must contain a `finalize` statement on all execution paths.\n --> compiler-test:6:5\n |\n 6 | transition mint_public(public receiver: address, public amount: u64) {\n 7 | \n 8 | }\n | ^\n"
|
||||
- "Error [ETYC0372045]: Function must contain a `finalize` statement on all execution paths.\n --> compiler-test:6:5\n |\n 6 | transition mint_public(public receiver: address, public amount: u64) {\n 7 | \n 8 | }\n | ^\n"
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [ETYC0372033]: An input to a finalize block must be public.\n --> compiler-test:9:26\n |\n 9 | finalize foo(private a: u8) -> u8 {\n | ^\n |\n = Use a `public` modifier to the input variable declaration or remove the visibility modifier entirely.\nError [ETYC0372034]: An output from a finalize block must be public.\n --> compiler-test:18:36\n |\n 18 | finalize bar(a: u8) -> private u8 {\n | ^^\n |\n = Use a `public` modifier to the output variable declaration or remove the visibility modifier entirely.\n"
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [ETYC0372038]: Function must return a value.\n --> compiler-test:4:5\n |\n 4 | transition main() -> u8 {}\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^\n"
|
||||
- "Error [ETYC0372039]: Function must return a value.\n --> compiler-test:4:5\n |\n 4 | transition main() -> u8 {}\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^\n"
|
||||
|
@ -0,0 +1,10 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- output:
|
||||
- initial_input_ast: no input
|
||||
initial_ast: b6a771a6db1b5a973b196821ab49b188a0634b8649f9a5ba0bc3e9441a64c9ad
|
||||
unrolled_ast: b6a771a6db1b5a973b196821ab49b188a0634b8649f9a5ba0bc3e9441a64c9ad
|
||||
ssa_ast: 5ed955521e64a449c4ba62fb64faf60c789d50e7423bb6e37507e28920d1a2f7
|
||||
flattened_ast: 6f997f51d4761d3bb869cf13ad2580e43ba9f3dfd5edf744774eb4fea918ae1d
|
10
tests/expectations/compiler/function/private_inputs.out
Normal file
10
tests/expectations/compiler/function/private_inputs.out
Normal file
@ -0,0 +1,10 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- output:
|
||||
- initial_input_ast: no input
|
||||
initial_ast: b6a771a6db1b5a973b196821ab49b188a0634b8649f9a5ba0bc3e9441a64c9ad
|
||||
unrolled_ast: b6a771a6db1b5a973b196821ab49b188a0634b8649f9a5ba0bc3e9441a64c9ad
|
||||
ssa_ast: 5ed955521e64a449c4ba62fb64faf60c789d50e7423bb6e37507e28920d1a2f7
|
||||
flattened_ast: 6f997f51d4761d3bb869cf13ad2580e43ba9f3dfd5edf744774eb4fea918ae1d
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [ETYC0372043]: The allowed accesses to `self` are `self.caller`.\n --> compiler-test:5:21\n |\n 5 | return self.foo == addr;\n | ^^^\nError [ETYC0372003]: Expected type `address` but type `no type` was found\n --> compiler-test:5:16\n |\n 5 | return self.foo == addr;\n | ^^^^^^^^^^^^^^^^\n"
|
||||
- "Error [ETYC0372044]: The allowed accesses to `self` are `self.caller`.\n --> compiler-test:5:21\n |\n 5 | return self.foo == addr;\n | ^^^\nError [ETYC0372003]: Expected type `address` but type `no type` was found\n --> compiler-test:5:16\n |\n 5 | return self.foo == addr;\n | ^^^^^^^^^^^^^^^^\n"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [ETYC0372047]: Cannot call another function from a standard function.\n --> compiler-test:6:19\n |\n 6 | return adder(a, b);\n | ^^^^^^^^^^^\nError [ETYC0372047]: Cannot call another function from a standard function.\n --> compiler-test:8:20\n |\n 8 | return subber(a, b);\n | ^^^^^^^^^^^^\n"
|
||||
- "Error [ETYC0372048]: Cannot call another function from a standard function.\n --> compiler-test:6:19\n |\n 6 | return adder(a, b);\n | ^^^^^^^^^^^\nError [ETYC0372048]: Cannot call another function from a standard function.\n --> compiler-test:8:20\n |\n 8 | return subber(a, b);\n | ^^^^^^^^^^^^\n"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [ETYC0372047]: Cannot call another function from a standard function.\n --> compiler-test:6:19\n |\n 6 | return adder(a, b);\n | ^^^^^^^^^^^\nError [ETYC0372047]: Cannot call another function from a standard function.\n --> compiler-test:8:20\n |\n 8 | return subber(a, b);\n | ^^^^^^^^^^^^\n"
|
||||
- "Error [ETYC0372048]: Cannot call another function from a standard function.\n --> compiler-test:6:19\n |\n 6 | return adder(a, b);\n | ^^^^^^^^^^^\nError [ETYC0372048]: Cannot call another function from a standard function.\n --> compiler-test:8:20\n |\n 8 | return subber(a, b);\n | ^^^^^^^^^^^^\n"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [ETYC0372048]: Cannot call a local transition function from a transition function.\n --> compiler-test:6:19\n |\n 6 | return adder(a, b);\n | ^^^^^^^^^^^\nError [ETYC0372048]: Cannot call a local transition function from a transition function.\n --> compiler-test:8:20\n |\n 8 | return subber(a, b);\n | ^^^^^^^^^^^^\n"
|
||||
- "Error [ETYC0372049]: Cannot call a local transition function from a transition function.\n --> compiler-test:6:19\n |\n 6 | return adder(a, b);\n | ^^^^^^^^^^^\nError [ETYC0372049]: Cannot call a local transition function from a transition function.\n --> compiler-test:8:20\n |\n 8 | return subber(a, b);\n | ^^^^^^^^^^^^\n"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [ETYC0372003]: Expected type `address` but type `u64` was found\n --> compiler-test:15:20\n |\n 15 | owner: r1, // This variable should be type address.\n | ^^\nError [ETYC0372003]: Expected type `u64` but type `address` was found\n --> compiler-test:17:21\n |\n 17 | amount: r0, // This variable should be type u64.\n | ^^\nError [ETYC0372047]: Cannot call another function from a standard function.\n --> compiler-test:23:24\n |\n 23 | let t: Token = mint(x, c);\n | ^^^^^^^^^^\n"
|
||||
- "Error [ETYC0372003]: Expected type `address` but type `u64` was found\n --> compiler-test:15:20\n |\n 15 | owner: r1, // This variable should be type address.\n | ^^\nError [ETYC0372003]: Expected type `u64` but type `address` was found\n --> compiler-test:17:21\n |\n 17 | amount: r0, // This variable should be type u64.\n | ^^\nError [ETYC0372048]: Cannot call another function from a standard function.\n --> compiler-test:23:24\n |\n 23 | let t: Token = mint(x, c);\n | ^^^^^^^^^^\n"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [ETYC0372013]: Struct initialization expression for `Token` is missing member `owner`.\n --> compiler-test:14:16\n |\n 14 | return Token {\n 15 | sender: r0, // This variable should be named `owner`.\n 16 | gates: 0u64,\n 17 | amount: r1,\n 18 | };\n | ^^^^^^\nError [ETYC0372047]: Cannot call another function from a standard function.\n --> compiler-test:23:24\n |\n 23 | let t: Token = mint(x, c);\n | ^^^^^^^^^^\n"
|
||||
- "Error [ETYC0372013]: Struct initialization expression for `Token` is missing member `owner`.\n --> compiler-test:14:16\n |\n 14 | return Token {\n 15 | sender: r0, // This variable should be named `owner`.\n 16 | gates: 0u64,\n 17 | amount: r1,\n 18 | };\n | ^^^^^^\nError [ETYC0372048]: Cannot call another function from a standard function.\n --> compiler-test:23:24\n |\n 23 | let t: Token = mint(x, c);\n | ^^^^^^^^^^\n"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [ETYC0372049]: Loop bound must be a literal.\n --> compiler-test:12:28\n |\n 12 | for i:u64 in 0u64..amount {\n | ^^^^^^\n"
|
||||
- "Error [ETYC0372050]: Loop bound must be a literal.\n --> compiler-test:12:28\n |\n 12 | for i:u64 in 0u64..amount {\n | ^^^^^^\n"
|
||||
|
File diff suppressed because one or more lines are too long
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [ETYC0372050]: Strings are not yet supported.\n --> compiler-test:6:9\n |\n 6 | let str:string = \"a a a\";\n | ^^^^^^^^^^^^^^^^^^^^^^^^\nError [ETYC0372050]: Strings are not yet supported.\n --> compiler-test:6:26\n |\n 6 | let str:string = \"a a a\";\n | ^^^^^^^\nError [ETYC0372050]: Strings are not yet supported.\n --> compiler-test:7:19\n |\n 7 | if(str == \"b b b\") {\n | ^^^^^^^^\n"
|
||||
- "Error [ETYC0372051]: Strings are not yet supported.\n --> compiler-test:6:9\n |\n 6 | let str:string = \"a a a\";\n | ^^^^^^^^^^^^^^^^^^^^^^^^\nError [ETYC0372051]: Strings are not yet supported.\n --> compiler-test:6:26\n |\n 6 | let str:string = \"a a a\";\n | ^^^^^^^\nError [ETYC0372051]: Strings are not yet supported.\n --> compiler-test:7:19\n |\n 7 | if(str == \"b b b\") {\n | ^^^^^^^^\n"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Parse
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [EPAR0370019]: A parameter cannot be both public and const.\n --> test:4:24\n |\n 4 | function x(x: u32, public const y: i32) {\n | ^^^^^^^^^^^^"
|
||||
- "Error [EPAR0370019]: A parameter cannot have multiple modes.\n --> test:4:24\n |\n 4 | function x(x: u32, public const y: i32) {\n | ^^^^^^^^^^^^\n |\n = Consider using either `constant`, `public`, `private`, or none at all."
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Input
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [EPAR0370019]: A parameter cannot be both public and const.\n --> test:4:1\n |\n 4 | public constant a: bool = true;\n | ^^^^^^^^^^^^^^^"
|
||||
- "Error [EPAR0370019]: A parameter cannot have multiple modes.\n --> test:4:1\n |\n 4 | public constant a: bool = true;\n | ^^^^^^^^^^^^^^^\n |\n = Consider using either `constant`, `public`, `private`, or none at all."
|
||||
|
Loading…
Reference in New Issue
Block a user