diff --git a/tests/expectations/compiler/finalize/shadow_mapping_fail.out b/tests/expectations/compiler/finalize/shadow_mapping_fail.out index e5eac30199..ae1c7a10b9 100644 --- a/tests/expectations/compiler/finalize/shadow_mapping_fail.out +++ b/tests/expectations/compiler/finalize/shadow_mapping_fail.out @@ -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" diff --git a/tests/expectations/compiler/function/program_function_no_constant_mode_fail.out b/tests/expectations/compiler/function/program_function_no_constant_mode_fail.out index 4d71cddee4..2905d10355 100644 --- a/tests/expectations/compiler/function/program_function_no_constant_mode_fail.out +++ b/tests/expectations/compiler/function/program_function_no_constant_mode_fail.out @@ -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" diff --git a/tests/expectations/compiler/function/shadow_function_with_input_fail.out b/tests/expectations/compiler/function/shadow_function_with_input_fail.out index e122add535..e89def5647 100644 --- a/tests/expectations/compiler/function/shadow_function_with_input_fail.out +++ b/tests/expectations/compiler/function/shadow_function_with_input_fail.out @@ -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" diff --git a/tests/expectations/compiler/records/duplicate_circuit_name_fail.out b/tests/expectations/compiler/records/duplicate_circuit_name_fail.out index b0859ca90a..f62bfcfcd3 100644 --- a/tests/expectations/compiler/records/duplicate_circuit_name_fail.out +++ b/tests/expectations/compiler/records/duplicate_circuit_name_fail.out @@ -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" diff --git a/tests/expectations/compiler/records/nested_record_2_fail.out b/tests/expectations/compiler/records/nested_record_2_fail.out index 39a03bf3f8..27405208d7 100644 --- a/tests/expectations/compiler/records/nested_record_2_fail.out +++ b/tests/expectations/compiler/records/nested_record_2_fail.out @@ -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" diff --git a/tests/expectations/compiler/records/nested_record_4_fail.out b/tests/expectations/compiler/records/nested_record_4_fail.out index 0260a3ff3a..602ea8c2dd 100644 --- a/tests/expectations/compiler/records/nested_record_4_fail.out +++ b/tests/expectations/compiler/records/nested_record_4_fail.out @@ -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" diff --git a/tests/expectations/compiler/statements/assign_ternary.out b/tests/expectations/compiler/statements/assign_ternary.out index fd75bd9aa0..0b965c1356 100644 --- a/tests/expectations/compiler/statements/assign_ternary.out +++ b/tests/expectations/compiler/statements/assign_ternary.out @@ -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" diff --git a/tests/expectations/compiler/statements/duplicate_variable.out b/tests/expectations/compiler/statements/duplicate_variable.out index b34ca29059..de88f74650 100644 --- a/tests/expectations/compiler/statements/duplicate_variable.out +++ b/tests/expectations/compiler/statements/duplicate_variable.out @@ -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" diff --git a/tests/expectations/compiler/structs/duplicate_name_context.out b/tests/expectations/compiler/structs/duplicate_name_context.out index 6a82c5466c..4fd598a3d8 100644 --- a/tests/expectations/compiler/structs/duplicate_name_context.out +++ b/tests/expectations/compiler/structs/duplicate_name_context.out @@ -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" diff --git a/tests/expectations/compiler/structs/struct_function_namespace_conflict_fail.out b/tests/expectations/compiler/structs/struct_function_namespace_conflict_fail.out index 52649d8ca5..7905e3ca05 100644 --- a/tests/expectations/compiler/structs/struct_function_namespace_conflict_fail.out +++ b/tests/expectations/compiler/structs/struct_function_namespace_conflict_fail.out @@ -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" diff --git a/tests/expectations/compiler/tuple/assign_unit_fail.out b/tests/expectations/compiler/tuple/assign_unit_fail.out index 9bac1aa965..a23efd62c8 100644 --- a/tests/expectations/compiler/tuple/assign_unit_fail.out +++ b/tests/expectations/compiler/tuple/assign_unit_fail.out @@ -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" diff --git a/tests/expectations/compiler/tuple/singleton_tuple_fail.out b/tests/expectations/compiler/tuple/singleton_tuple_fail.out index 57921b9eea..902c23ac65 100644 --- a/tests/expectations/compiler/tuple/singleton_tuple_fail.out +++ b/tests/expectations/compiler/tuple/singleton_tuple_fail.out @@ -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 | ^^^^" diff --git a/tests/expectations/compiler/tuple/tuple_in_function_param.out b/tests/expectations/compiler/tuple/tuple_in_function_param.out index 79c6c4f39c..37ba4e505a 100644 --- a/tests/expectations/compiler/tuple/tuple_in_function_param.out +++ b/tests/expectations/compiler/tuple/tuple_in_function_param.out @@ -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" diff --git a/tests/expectations/compiler/tuple/tuple_in_record_fail.out b/tests/expectations/compiler/tuple/tuple_in_record_fail.out index 68e78aa0db..117f83383e 100644 --- a/tests/expectations/compiler/tuple/tuple_in_record_fail.out +++ b/tests/expectations/compiler/tuple/tuple_in_record_fail.out @@ -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" diff --git a/tests/expectations/compiler/tuple/tuple_in_return_type.out b/tests/expectations/compiler/tuple/tuple_in_return_type.out index 69954ec205..5fbbc7188d 100644 --- a/tests/expectations/compiler/tuple/tuple_in_return_type.out +++ b/tests/expectations/compiler/tuple/tuple_in_return_type.out @@ -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" diff --git a/tests/expectations/compiler/tuple/tuple_in_struct_fail.out b/tests/expectations/compiler/tuple/tuple_in_struct_fail.out index d90cbe1425..08cfaa00f1 100644 --- a/tests/expectations/compiler/tuple/tuple_in_struct_fail.out +++ b/tests/expectations/compiler/tuple/tuple_in_struct_fail.out @@ -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" diff --git a/tests/expectations/compiler/tuple/tuple_not_allowed_fail.out b/tests/expectations/compiler/tuple/tuple_not_allowed_fail.out index aadca1ff81..80bf433fc0 100644 --- a/tests/expectations/compiler/tuple/tuple_not_allowed_fail.out +++ b/tests/expectations/compiler/tuple/tuple_not_allowed_fail.out @@ -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" diff --git a/tests/expectations/parser/statement/definition_fail.out b/tests/expectations/parser/statement/definition_fail.out index 9d4f696f74..8b1d177348 100644 --- a/tests/expectations/parser/statement/definition_fail.out +++ b/tests/expectations/parser/statement/definition_fail.out @@ -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 | ^^^^"