mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-11-26 16:37:30 +03:00
Regen expectations
This commit is contained in:
parent
f606a8b74a
commit
91db5c3b8a
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [EAST0372009]: struct `bar` shadowed by\n --> compiler-test:5:5\n |\n 5 | mapping bar: u8 => u8;\n | ^^^^^^^^^^^^^^^^^^^^^^\nError [EAST0372009]: struct `bar` shadowed by\n --> compiler-test:7:5\n |\n 7 | transition bar(a: u8) -> u8 {\n 8 | return a + 1u8;\n 9 | }\n | ^\n"
|
||||
- "Error [EAST0372007]: struct `bar` shadowed by\n --> compiler-test:5:5\n |\n 5 | mapping bar: u8 => u8;\n | ^^^^^^^^^^^^^^^^^^^^^^\nError [EAST0372007]: struct `bar` shadowed by\n --> compiler-test:7:5\n |\n 7 | transition bar(a: u8) -> u8 {\n 8 | return a + 1u8;\n 9 | }\n | ^\n"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [EAST0372008]: function `foo` shadowed by\n --> compiler-test:7:5\n |\n 7 | transition foo(a: u8) -> constant u8 {\n 8 | return a + a;\n 9 | }\n | ^\n"
|
||||
- "Error [EAST0372006]: function `foo` shadowed by\n --> compiler-test:7:5\n |\n 7 | transition foo(a: u8) -> constant u8 {\n 8 | return a + a;\n 9 | }\n | ^\n"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [EAST0372008]: function `hi` shadowed by\n --> compiler-test:8:21\n |\n 8 | function tester(hi: u8) -> u8 {\n | ^^\n"
|
||||
- "Error [EAST0372006]: function `hi` shadowed by\n --> compiler-test:8:21\n |\n 8 | function tester(hi: u8) -> u8 {\n | ^^\n"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [EAST0372010]: record `Token` shadowed by\n --> compiler-test:13:5\n |\n 13 | struct Token { // This struct cannot have the same name as the record defined above it.\n 14 | x: u32,\n 15 | }\n | ^\n"
|
||||
- "Error [EAST0372008]: record `Token` shadowed by\n --> compiler-test:13:5\n |\n 13 | struct Token { // This struct cannot have the same name as the record defined above it.\n 14 | x: u32,\n 15 | }\n | ^\n"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [ETYC0372056]: A record cannot contain a tuple.\n --> compiler-test:8:9\n |\n 8 | foo: (Foo, Foo),\n | ^^^\nError [ETYC0372029]: A struct or record cannot contain another record.\n --> compiler-test:8:9\n |\n 8 | foo: (Foo, Foo),\n | ^^^\n |\n = Remove the record `Foo` from `Token2`.\nError [ETYC0372029]: A struct or record cannot contain another record.\n --> compiler-test:8:9\n |\n 8 | foo: (Foo, Foo),\n | ^^^\n |\n = Remove the record `Foo` from `Token2`.\n"
|
||||
- "Error [ETYC0372054]: A record cannot contain a tuple.\n --> compiler-test:8:9\n |\n 8 | foo: (Foo, Foo),\n | ^^^\nError [ETYC0372029]: A struct or record cannot contain another record.\n --> compiler-test:8:9\n |\n 8 | foo: (Foo, Foo),\n | ^^^\n |\n = Remove the record `Foo` from `Token2`.\nError [ETYC0372029]: A struct or record cannot contain another record.\n --> compiler-test:8:9\n |\n 8 | foo: (Foo, Foo),\n | ^^^\n |\n = Remove the record `Foo` from `Token2`.\n"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [ETYC0372056]: A record cannot contain a tuple.\n --> compiler-test:7:9\n |\n 7 | bar: (Bar, Bar),\n | ^^^\nError [ETYC0372056]: A struct cannot contain a tuple.\n --> compiler-test:11:9\n |\n 11 | bar: (Token, Token),\n | ^^^\nError [ETYC0372029]: A struct or record cannot contain another record.\n --> compiler-test:11:9\n |\n 11 | bar: (Token, Token),\n | ^^^\n |\n = Remove the record `Token` from `Bar`.\nError [ETYC0372029]: A struct or record cannot contain another record.\n --> compiler-test:11:9\n |\n 11 | bar: (Token, Token),\n | ^^^\n |\n = Remove the record `Token` from `Bar`.\n"
|
||||
- "Error [ETYC0372054]: A record cannot contain a tuple.\n --> compiler-test:7:9\n |\n 7 | bar: (Bar, Bar),\n | ^^^\nError [ETYC0372054]: A struct cannot contain a tuple.\n --> compiler-test:11:9\n |\n 11 | bar: (Token, Token),\n | ^^^\nError [ETYC0372029]: A struct or record cannot contain another record.\n --> compiler-test:11:9\n |\n 11 | bar: (Token, Token),\n | ^^^\n |\n = Remove the record `Token` from `Bar`.\nError [ETYC0372029]: A struct or record cannot contain another record.\n --> compiler-test:11:9\n |\n 11 | bar: (Token, Token),\n | ^^^\n |\n = Remove the record `Token` from `Bar`.\n"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [ETYC0372003]: Expected type `boolean` but type `u32` was found\n --> compiler-test:5:30\n |\n 5 | let x: bool = true ? x: true;\n | ^\nError [EAST0372011]: variable `x` shadowed by\n --> compiler-test:5:13\n |\n 5 | let x: bool = true ? x: true;\n | ^\n"
|
||||
- "Error [ETYC0372003]: Expected type `boolean` but type `u32` was found\n --> compiler-test:5:30\n |\n 5 | let x: bool = true ? x: true;\n | ^\nError [EAST0372009]: variable `x` shadowed by\n --> compiler-test:5:13\n |\n 5 | let x: bool = true ? x: true;\n | ^\n"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [EAST0372011]: variable `x` shadowed by\n --> compiler-test:6:12\n |\n 6 | \tlet x: bool = true;\n | ^\n"
|
||||
- "Error [EAST0372009]: variable `x` shadowed by\n --> compiler-test:6:12\n |\n 6 | \tlet x: bool = true;\n | ^\n"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [EAST0372009]: struct `Bar` shadowed by\n --> compiler-test:9:15\n |\n 9 | const Bar: u32 = 66u32;\n | ^^^\n"
|
||||
- "Error [EAST0372007]: struct `Bar` shadowed by\n --> compiler-test:9:15\n |\n 9 | const Bar: u32 = 66u32;\n | ^^^\n"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [EAST0372009]: struct `Foo` shadowed by\n --> compiler-test:8:5\n |\n 8 | function Foo() {}\n | ^^^^^^^^^^^^^^^^^\n"
|
||||
- "Error [EAST0372007]: struct `Foo` shadowed by\n --> compiler-test:8:5\n |\n 8 | function Foo() {}\n | ^^^^^^^^^^^^^^^^^\n"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [ETYC0372054]: Empty tuple expressions and tuple types are not allowed.\n --> compiler-test:6:9\n |\n 6 | let b: () = ();\n | ^^^^^^^^^^^^^^\nError [ETYC0372054]: Empty tuple expressions and tuple types are not allowed.\n --> compiler-test:6:21\n |\n 6 | let b: () = ();\n | ^^\nError [ETYC0372054]: Empty tuple expressions and tuple types are not allowed.\n --> compiler-test:11:9\n |\n 11 | let b: () = bar();\n | ^^^^^^^^^^^^^^^^^\nError [ETYC0372048]: Cannot call a local transition function from a transition function.\n --> compiler-test:11:21\n |\n 11 | let b: () = bar();\n | ^^^^^\nError [ETYC0372006]: Call expected `1` args, but got `0`\n --> compiler-test:11:21\n |\n 11 | let b: () = bar();\n | ^^^^^\n"
|
||||
- "Error [ETYC0372061]: The left-hand side of a `DefinitionStatement` can only be an identifier or tuple. Note that a tuple must contain at least two elements.\n --> compiler-test:6:9\n |\n 6 | let b: () = ();\n | ^^^^^^^^^^^^^^\nError [ETYC0372062]: Unit expressions can only be used in return statements.\n --> compiler-test:6:21\n |\n 6 | let b: () = ();\n | ^^\nError [ETYC0372061]: The left-hand side of a `DefinitionStatement` can only be an identifier or tuple. Note that a tuple must contain at least two elements.\n --> compiler-test:11:9\n |\n 11 | let b: () = bar();\n | ^^^^^^^^^^^^^^^^^\nError [ETYC0372048]: Cannot call a local transition function from a transition function.\n --> compiler-test:11:21\n |\n 11 | let b: () = bar();\n | ^^^^^\nError [ETYC0372006]: Call expected `1` args, but got `0`\n --> compiler-test:11:21\n |\n 11 | let b: () = bar();\n | ^^^^^\n"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [ETYC0372053]: Singleton tuple expressions and tuple types are not allowed.\n --> compiler-test:7:9\n |\n 7 | let c: (u8) = (a);\n | ^^^^^^^^^^^^^^^^\nError [ETYC0372003]: Expected type `(u8)` but type `u8` was found\n --> compiler-test:7:24\n |\n 7 | let c: (u8) = (a);\n | ^\nError [ETYC0372053]: Singleton tuple expressions and tuple types are not allowed.\n --> compiler-test:8:9\n |\n 8 | let d: (u8) = (3u8 + 4u8);\n | ^^^^^^^^^^^^^^^^^^^^^^^^\nError [ETYC0372007]: Expected one type from `field, group, scalar, i8, i16, i32, i64, i128, u8, u16, u32, u64, u128`, but got `(u8)`\n --> compiler-test:8:24\n |\n 8 | let d: (u8) = (3u8 + 4u8);\n | ^^^^^^^^^\nError [ETYC0372003]: Expected type `(u8)` but type `u8` was found\n --> compiler-test:8:24\n |\n 8 | let d: (u8) = (3u8 + 4u8);\n | ^^^\nError [ETYC0372003]: Expected type `(u8)` but type `u8` was found\n --> compiler-test:8:30\n |\n 8 | let d: (u8) = (3u8 + 4u8);\n | ^^^\n"
|
||||
- "Error [EPAR0370030]: A tuple type must have at least two elements.\n --> compiler-test:7:16\n |\n 7 | let c: (u8) = (a);\n | ^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [ETYC0372057]: A function cannot take in tuples as input.\n --> compiler-test:4:20\n |\n 4 | transition foo(a: (u8, u16)) -> (u8, u16) {\n | ^\n"
|
||||
- "Error [ETYC0372055]: A function cannot take in a tuple as input.\n --> compiler-test:4:20\n |\n 4 | transition foo(a: (u8, u16)) -> (u8, u16) {\n | ^\n"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [ETYC0372056]: A record cannot contain a tuple.\n --> compiler-test:7:9\n |\n 7 | amounts: (u64, u64),\n | ^^^^^^^\n"
|
||||
- "Error [ETYC0372054]: A record cannot contain a tuple.\n --> compiler-test:7:9\n |\n 7 | amounts: (u64, u64),\n | ^^^^^^^\n"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [ETYC0372055]: A tuple type cannot contain a tuple.\n --> compiler-test:4:35\n |\n 4 | transition bar(a: u8) -> (u8, (u8, u8)) {\n | ^^^^^^^^\nError [ETYC0372059]: A tuple expression cannot contain another tuple expression.\n --> compiler-test:5:20\n |\n 5 | return (a, (a + a, a * a));\n | ^^^^^^^^^^^^^^\nError [ETYC0372059]: A tuple expression cannot contain another tuple expression.\n --> compiler-test:5:20\n |\n 5 | return (a, (a + a, a * a));\n | ^^^^^^^^^^^^^^\n"
|
||||
- "Error [ETYC0372053]: A tuple type cannot contain a tuple.\n --> compiler-test:4:35\n |\n 4 | transition bar(a: u8) -> (u8, (u8, u8)) {\n | ^^^^^^^^\nError [ETYC0372057]: A tuple expression cannot contain another tuple expression.\n --> compiler-test:5:20\n |\n 5 | return (a, (a + a, a * a));\n | ^^^^^^^^^^^^^^\nError [ETYC0372057]: A tuple expression cannot contain another tuple expression.\n --> compiler-test:5:20\n |\n 5 | return (a, (a + a, a * a));\n | ^^^^^^^^^^^^^^\n"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [ETYC0372056]: A struct cannot contain a tuple.\n --> compiler-test:5:9\n |\n 5 | mem: (u8, u16)\n | ^^^\nError [ETYC0372056]: A struct cannot contain a tuple.\n --> compiler-test:9:9\n |\n 9 | mems: (A, A)\n | ^^^^\n"
|
||||
- "Error [ETYC0372054]: A struct cannot contain a tuple.\n --> compiler-test:5:9\n |\n 5 | mem: (u8, u16)\n | ^^^\nError [ETYC0372054]: A struct cannot contain a tuple.\n --> compiler-test:9:9\n |\n 9 | mems: (A, A)\n | ^^^^\n"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [ETYC0372056]: A struct cannot contain a tuple.\n --> compiler-test:22:9\n |\n 22 | mem: (u8, u16)\n | ^^^\nError [ETYC0372057]: A function cannot take in tuples as input.\n --> compiler-test:8:18\n |\n 8 | function foo(a: (u8, u16)) -> (u8, u16) {\n | ^\nError [ETYC0372055]: A tuple type cannot contain a tuple.\n --> compiler-test:12:28\n |\n 12 | function bar() -> (u8, (u16, u32)) {\n | ^^^^^^^^^^\nError [ETYC0372059]: A tuple expression cannot contain another tuple expression.\n --> compiler-test:13:22\n |\n 13 | return (1u8, (2u16, 3u32));\n | ^^^^^^^^^^^^\nError [ETYC0372059]: A tuple expression cannot contain another tuple expression.\n --> compiler-test:13:22\n |\n 13 | return (1u8, (2u16, 3u32));\n | ^^^^^^^^^^^^\nError [ETYC0372007]: Expected one type from `i8, i16, i32, i64, i128, u8, u16, u32, u64, u128`, but got `(u8,u16)`\n --> compiler-test:17:13\n |\n 17 | for i: (u8, u16) in 0u8..2u8 {}\n | ^\nError [ETYC0372003]: Expected type `(u8,u16)` but type `u8` was found\n --> compiler-test:17:29\n |\n 17 | for i: (u8, u16) in 0u8..2u8 {}\n | ^^^\nError [ETYC0372003]: Expected type `(u8,u16)` but type `u8` was found\n --> compiler-test:17:34\n |\n 17 | for i: (u8, u16) in 0u8..2u8 {}\n | ^^^\n"
|
||||
- "Error [ETYC0372054]: A struct cannot contain a tuple.\n --> compiler-test:22:9\n |\n 22 | mem: (u8, u16)\n | ^^^\nError [ETYC0372055]: A function cannot take in a tuple as input.\n --> compiler-test:8:18\n |\n 8 | function foo(a: (u8, u16)) -> (u8, u16) {\n | ^\nError [ETYC0372053]: A tuple type cannot contain a tuple.\n --> compiler-test:12:28\n |\n 12 | function bar() -> (u8, (u16, u32)) {\n | ^^^^^^^^^^\nError [ETYC0372057]: A tuple expression cannot contain another tuple expression.\n --> compiler-test:13:22\n |\n 13 | return (1u8, (2u16, 3u32));\n | ^^^^^^^^^^^^\nError [ETYC0372057]: A tuple expression cannot contain another tuple expression.\n --> compiler-test:13:22\n |\n 13 | return (1u8, (2u16, 3u32));\n | ^^^^^^^^^^^^\nError [ETYC0372007]: Expected one type from `i8, i16, i32, i64, i128, u8, u16, u32, u64, u128`, but got `(u8,u16)`\n --> compiler-test:17:13\n |\n 17 | for i: (u8, u16) in 0u8..2u8 {}\n | ^\nError [ETYC0372003]: Expected type `(u8,u16)` but type `u8` was found\n --> compiler-test:17:29\n |\n 17 | for i: (u8, u16) in 0u8..2u8 {}\n | ^^^\nError [ETYC0372003]: Expected type `(u8,u16)` but type `u8` was found\n --> compiler-test:17:34\n |\n 17 | for i: (u8, u16) in 0u8..2u8 {}\n | ^^^\n"
|
||||
|
@ -44,4 +44,4 @@ outputs:
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'expression', found ']'\n --> test:1:15\n |\n 1 | let dbg: u8 = ];\n | ^"
|
||||
- "Error [EPAR0370016]: Could not lex the following content: `🦀:`.\n"
|
||||
- "Error [EPAR0370005]: expected : -- found '='\n --> test:1:9\n |\n 1 | let (x) = ...;\n | ^"
|
||||
- "Error [EPAR0370005]: expected : -- found '='\n --> test:1:10\n |\n 1 | let (x,) = ...;\n | ^"
|
||||
- "Error [EPAR0370030]: A tuple expression must have at least two elements.\n --> test:1:5\n |\n 1 | let (x,) = ...;\n | ^^^^"
|
||||
|
Loading…
Reference in New Issue
Block a user