From 0012f9b37bd904e6d4d42f8bd13264c8ad551793 Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Fri, 30 Jul 2021 19:01:12 -0700 Subject: [PATCH 01/58] Error refactoring thus far --- .rusty-hook.toml | 2 +- Cargo.lock | 54 +- Cargo.toml | 1 + asg-passes/Cargo.toml | 4 + asg-passes/src/constant_folding/mod.rs | 3 +- asg-passes/src/dead_code_elimination/mod.rs | 3 +- asg/Cargo.toml | 4 + asg/src/checks/return_path.rs | 13 +- asg/src/const_value.rs | 65 +- asg/src/error/mod.rs | 516 +++++++-------- asg/src/expression/array_access.rs | 13 +- asg/src/expression/array_init.rs | 29 +- asg/src/expression/array_inline.rs | 19 +- asg/src/expression/array_range_access.rs | 34 +- asg/src/expression/binary.rs | 33 +- asg/src/expression/call.rs | 74 ++- asg/src/expression/cast.rs | 11 +- asg/src/expression/circuit_access.rs | 37 +- asg/src/expression/circuit_init.rs | 24 +- asg/src/expression/constant.rs | 54 +- asg/src/expression/mod.rs | 5 +- asg/src/expression/ternary.rs | 9 +- asg/src/expression/tuple_access.rs | 11 +- asg/src/expression/tuple_init.rs | 15 +- asg/src/expression/unary.rs | 19 +- asg/src/expression/variable_ref.rs | 21 +- asg/src/import.rs | 11 +- asg/src/input.rs | 5 +- asg/src/lib.rs | 13 +- asg/src/node.rs | 21 +- asg/src/pass.rs | 4 +- asg/src/prelude.rs | 5 +- asg/src/program/circuit.rs | 26 +- asg/src/program/function.rs | 21 +- asg/src/program/mod.rs | 39 +- asg/src/scope.rs | 19 +- asg/src/statement/assign.rs | 78 +-- asg/src/statement/block.rs | 5 +- asg/src/statement/conditional.rs | 9 +- asg/src/statement/console.rs | 7 +- asg/src/statement/definition.rs | 43 +- asg/src/statement/expression.rs | 5 +- asg/src/statement/iteration.rs | 27 +- asg/src/statement/mod.rs | 5 +- asg/src/statement/return_.rs | 5 +- ast/Cargo.toml | 8 + ast/src/annotation.rs | 3 +- ast/src/chars/char_value.rs | 2 +- ast/src/common/const_self_keyword.rs | 3 +- ast/src/common/identifier.rs | 2 +- ast/src/common/mod.rs | 3 - ast/src/common/mut_self_keyword.rs | 3 +- ast/src/common/self_keyword.rs | 3 +- ast/src/common/spread_or_expression.rs | 3 +- ast/src/errors/mod.rs | 17 - ast/src/expression/mod.rs | 6 +- ast/src/functions/function.rs | 3 +- ast/src/functions/input/function_input.rs | 3 +- ast/src/functions/input/input_variable.rs | 3 +- ast/src/groups/group_coordinate.rs | 2 +- ast/src/groups/group_value.rs | 3 +- ast/src/imports/import.rs | 3 +- ast/src/imports/import_symbol.rs | 3 +- ast/src/imports/package.rs | 3 +- ast/src/imports/package_access.rs | 3 +- ast/src/imports/package_or_packages.rs | 3 +- ast/src/imports/packages.rs | 3 +- ast/src/input/input_value.rs | 3 +- ast/src/input/parameters/parameter.rs | 3 +- ast/src/lib.rs | 30 +- ast/src/node.rs | 2 +- ast/src/reducer/canonicalization.rs | 46 +- ast/src/reducer/reconstructing_director.rs | 95 ++- ast/src/reducer/reconstructing_reducer.rs | 91 ++- ast/src/statements/assign/assignee.rs | 3 +- ast/src/statements/assign/mod.rs | 4 +- ast/src/statements/block.rs | 3 +- ast/src/statements/conditional.rs | 3 +- ast/src/statements/console/console_args.rs | 3 +- .../statements/console/console_function.rs | 3 +- .../statements/console/console_statement.rs | 3 +- ast/src/statements/definition/mod.rs | 3 +- .../statements/definition/variable_name.rs | 3 +- ast/src/statements/expression.rs | 3 +- ast/src/statements/iteration.rs | 3 +- ast/src/statements/return_statement.rs | 3 +- ast/src/statements/statement.rs | 3 +- compiler/Cargo.toml | 4 + compiler/src/compiler.rs | 30 +- compiler/src/console/assert.rs | 12 +- compiler/src/console/console.rs | 5 +- compiler/src/console/format.rs | 14 +- compiler/src/constraints/constraints.rs | 13 +- compiler/src/errors/compiler.rs | 71 --- compiler/src/errors/console.rs | 76 --- compiler/src/errors/expression.rs | 174 ----- compiler/src/errors/function.rs | 146 ----- compiler/src/errors/output_bytes.rs | 54 -- compiler/src/errors/statement.rs | 193 ------ compiler/src/errors/value/address.rs | 50 -- compiler/src/errors/value/boolean.rs | 59 -- compiler/src/errors/value/char.rs | 41 -- compiler/src/errors/value/field.rs | 65 -- compiler/src/errors/value/group.rs | 101 --- compiler/src/errors/value/integer.rs | 94 --- compiler/src/errors/value/value.rs | 41 -- compiler/src/expression/arithmetic/add.rs | 10 +- compiler/src/expression/arithmetic/bit_not.rs | 8 +- compiler/src/expression/arithmetic/div.rs | 10 +- compiler/src/expression/arithmetic/mul.rs | 10 +- compiler/src/expression/arithmetic/negate.rs | 8 +- compiler/src/expression/arithmetic/pow.rs | 10 +- compiler/src/expression/arithmetic/sub.rs | 10 +- compiler/src/expression/array/access.rs | 41 +- compiler/src/expression/array/array.rs | 11 +- compiler/src/expression/array/index.rs | 10 +- compiler/src/expression/binary/binary.rs | 6 +- compiler/src/expression/circuit/access.rs | 18 +- compiler/src/expression/circuit/circuit.rs | 8 +- .../src/expression/conditional/conditional.rs | 12 +- compiler/src/expression/expression.rs | 14 +- .../src/expression/function/core_circuit.rs | 7 +- compiler/src/expression/function/function.rs | 9 +- compiler/src/expression/logical/and.rs | 10 +- compiler/src/expression/logical/not.rs | 8 +- compiler/src/expression/logical/or.rs | 10 +- compiler/src/expression/relational/eq.rs | 12 +- compiler/src/expression/relational/ge.rs | 12 +- compiler/src/expression/relational/gt.rs | 12 +- compiler/src/expression/relational/le.rs | 12 +- compiler/src/expression/relational/lt.rs | 12 +- compiler/src/expression/tuple/access.rs | 12 +- compiler/src/expression/tuple/tuple.rs | 6 +- .../expression/variable_ref/variable_ref.rs | 8 +- compiler/src/function/function.rs | 6 +- compiler/src/function/input/array.rs | 13 +- compiler/src/function/input/input_keyword.rs | 8 +- compiler/src/function/input/input_section.rs | 12 +- .../src/function/input/main_function_input.rs | 23 +- compiler/src/function/input/tuple.rs | 11 +- compiler/src/function/main_function.rs | 10 +- compiler/src/function/mut_target.rs | 4 +- compiler/src/function/result/result.rs | 8 +- compiler/src/lib.rs | 5 - compiler/src/output/mod.rs | 13 +- compiler/src/output/output_bytes.rs | 13 +- compiler/src/output/output_file.rs | 9 +- compiler/src/phases/phase.rs | 6 +- compiler/src/phases/reducing_director.rs | 78 ++- compiler/src/prelude/blake2s.rs | 11 +- compiler/src/prelude/mod.rs | 8 +- compiler/src/statement/assign/assign.rs | 12 +- .../statement/assign/assignee/array_index.rs | 33 +- .../assign/assignee/array_range_index.rs | 11 +- .../src/statement/assign/assignee/member.rs | 13 +- compiler/src/statement/assign/assignee/mod.rs | 21 +- .../src/statement/assign/assignee/tuple.rs | 13 +- .../src/statement/conditional/conditional.rs | 9 +- .../src/statement/definition/definition.rs | 15 +- compiler/src/statement/iteration/iteration.rs | 7 +- compiler/src/statement/return_/return_.rs | 5 +- compiler/src/statement/statement.rs | 7 +- compiler/src/test.rs | 5 +- compiler/src/value/address/address.rs | 15 +- compiler/src/value/boolean/input.rs | 14 +- compiler/src/value/char/char.rs | 11 +- compiler/src/value/field/field_type.rs | 35 +- compiler/src/value/field/input.rs | 18 +- compiler/src/value/group/group_type.rs | 15 +- compiler/src/value/group/input.rs | 14 +- .../src/value/group/targets/edwards_bls12.rs | 49 +- compiler/src/value/integer/integer.rs | 39 +- compiler/src/value/integer/macros.rs | 38 +- compiler/src/value/value.rs | 8 +- errors/Cargo.toml | 41 ++ errors/LICENSE.md | 596 ++++++++++++++++++ errors/src/asg/asg.rs | 408 ++++++++++++ errors/src/asg/mod.rs | 18 + errors/src/ast/ast.rs | 81 +++ errors/src/ast/mod.rs | 18 + errors/src/common/formatted.rs | 148 +++++ .../errors/value => errors/src/common}/mod.rs | 25 +- errors/src/common/span.rs | 152 +++++ errors/src/common/tendril_json.rs | 26 + .../src/common/traits.rs | 24 +- errors/src/compiler/compiler.rs | 443 +++++++++++++ .../src/errors => errors/src/compiler}/mod.rs | 26 +- errors/src/import/import.rs | 123 ++++ errors/src/import/mod.rs | 18 + errors/src/lib.rs | 91 +++ errors/src/parser/mod.rs | 18 + errors/src/parser/parser.rs | 159 +++++ errors/src/snarkvm/mod.rs | 18 + .../src/snarkvm/snarkvm.rs | 10 +- imports/Cargo.toml | 4 + imports/src/errors/import_parser.rs | 4 +- imports/src/lib.rs | 6 - imports/src/parser/import_parser.rs | 10 +- imports/src/parser/parse_package.rs | 29 +- imports/src/parser/parse_symbol.rs | 17 +- parser/Cargo.toml | 4 + parser/src/errors/mod.rs | 9 - parser/src/errors/token.rs | 2 +- parser/src/lib.rs | 6 - parser/src/parser/context.rs | 25 +- parser/src/parser/expression.rs | 16 +- parser/src/parser/file.rs | 70 +- parser/src/parser/mod.rs | 20 +- parser/src/parser/statement.rs | 22 +- parser/src/parser/type_.rs | 7 +- parser/src/tokenizer/lexer.rs | 2 +- parser/src/tokenizer/mod.rs | 48 +- synthesizer/Cargo.toml | 8 + synthesizer/src/serialized_circuit.rs | 21 +- 214 files changed, 4090 insertions(+), 2703 deletions(-) delete mode 100644 compiler/src/errors/compiler.rs delete mode 100644 compiler/src/errors/console.rs delete mode 100644 compiler/src/errors/expression.rs delete mode 100644 compiler/src/errors/function.rs delete mode 100644 compiler/src/errors/output_bytes.rs delete mode 100644 compiler/src/errors/statement.rs delete mode 100644 compiler/src/errors/value/address.rs delete mode 100644 compiler/src/errors/value/boolean.rs delete mode 100644 compiler/src/errors/value/char.rs delete mode 100644 compiler/src/errors/value/field.rs delete mode 100644 compiler/src/errors/value/group.rs delete mode 100644 compiler/src/errors/value/integer.rs delete mode 100644 compiler/src/errors/value/value.rs create mode 100644 errors/Cargo.toml create mode 100644 errors/LICENSE.md create mode 100644 errors/src/asg/asg.rs create mode 100644 errors/src/asg/mod.rs create mode 100644 errors/src/ast/ast.rs create mode 100644 errors/src/ast/mod.rs create mode 100644 errors/src/common/formatted.rs rename {compiler/src/errors/value => errors/src/common}/mod.rs (72%) create mode 100644 errors/src/common/span.rs create mode 100644 errors/src/common/tendril_json.rs rename compiler/src/errors/output_file.rs => errors/src/common/traits.rs (58%) create mode 100644 errors/src/compiler/compiler.rs rename {compiler/src/errors => errors/src/compiler}/mod.rs (65%) create mode 100644 errors/src/import/import.rs create mode 100644 errors/src/import/mod.rs create mode 100644 errors/src/lib.rs create mode 100644 errors/src/parser/mod.rs create mode 100644 errors/src/parser/parser.rs create mode 100644 errors/src/snarkvm/mod.rs rename compiler/src/errors/import.rs => errors/src/snarkvm/snarkvm.rs (83%) diff --git a/.rusty-hook.toml b/.rusty-hook.toml index bcdbfd8fa4..624072c35f 100644 --- a/.rusty-hook.toml +++ b/.rusty-hook.toml @@ -1,5 +1,5 @@ [hooks] -pre-commit = "cargo clippy && cargo +nightly fmt --all -- --check" +# pre-commit = "cargo clippy && cargo +nightly fmt --all -- --check" [logging] verbose = true diff --git a/Cargo.lock b/Cargo.lock index 1fc8200b29..ce04d6bd97 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -23,9 +23,9 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.15.2" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7a2e47a1fbe209ee101dd6d61285226744c6c8d3c21c8dc878ba6cb9f467f3a" +checksum = "3e61f2b7f93d2c7d2b08263acaa4a363b3e276806c68af6134c44f523bf1aacd" dependencies = [ "gimli", ] @@ -119,9 +119,9 @@ checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" [[package]] name = "backtrace" -version = "0.3.60" +version = "0.3.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7815ea54e4d821e791162e078acbebfd6d8c8939cd559c9335dceb1c8ca7282" +checksum = "e7a905d892734eea339e896738c14b9afce22b5318f64b951e70bf3844419b01" dependencies = [ "addr2line", "cc", @@ -640,6 +640,16 @@ dependencies = [ "indexmap", ] +[[package]] +name = "eyre" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "221239d1d5ea86bf5d6f91c9d6bc3646ffe471b08ff9b0f91c44f115ac969d2b" +dependencies = [ + "indenter", + "once_cell", +] + [[package]] name = "failure" version = "0.1.8" @@ -900,9 +910,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.24.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4075386626662786ddb0ec9081e7c7eeb1ba31951f447ca780ef9f5d568189" +checksum = "f0a01e0497841a3b2db4f8afa483cce65f7e96a3498bd6c541734792aeac8fe7" [[package]] name = "h2" @@ -1044,6 +1054,12 @@ dependencies = [ "unicode-normalization", ] +[[package]] +name = "indenter" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" + [[package]] name = "indexmap" version = "1.7.0" @@ -1172,6 +1188,7 @@ dependencies = [ "criterion", "indexmap", "leo-ast", + "leo-errors", "leo-parser", "num-bigint", "serde", @@ -1186,6 +1203,7 @@ name = "leo-asg-passes" version = "1.5.3" dependencies = [ "leo-asg", + "leo-errors", ] [[package]] @@ -1194,7 +1212,9 @@ version = "1.5.3" dependencies = [ "anyhow", "criterion", + "eyre", "indexmap", + "leo-errors", "leo-input", "pest", "serde", @@ -1213,6 +1233,7 @@ dependencies = [ "leo-asg", "leo-asg-passes", "leo-ast", + "leo-errors", "leo-imports", "leo-input", "leo-package", @@ -1241,6 +1262,19 @@ dependencies = [ "tracing", ] +[[package]] +name = "leo-errors" +version = "1.5.3" +dependencies = [ + "backtrace", + "derivative", + "eyre", + "pest", + "serde", + "tendril", + "thiserror", +] + [[package]] name = "leo-imports" version = "1.5.3" @@ -1248,6 +1282,7 @@ dependencies = [ "indexmap", "leo-asg", "leo-ast", + "leo-errors", "leo-parser", "thiserror", "tracing", @@ -1333,6 +1368,7 @@ dependencies = [ "indexmap", "lazy_static", "leo-ast", + "leo-errors", "leo-test-framework", "serde", "serde_json", @@ -1363,7 +1399,9 @@ dependencies = [ name = "leo-synthesizer" version = "1.5.3" dependencies = [ + "eyre", "hex", + "leo-errors", "num-bigint", "serde", "serde_json", @@ -1689,9 +1727,9 @@ checksum = "17b02fc0ff9a9e4b35b3342880f48e896ebf69f2967921fe8646bf5b7125956a" [[package]] name = "object" -version = "0.25.3" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a38f2be3697a57b4060074ff41b44c16870d916ad7877c17696e063257482bc7" +checksum = "c55827317fb4c08822499848a14237d2874d6f139828893017237e7ab93eb386" dependencies = [ "memchr", ] diff --git a/Cargo.toml b/Cargo.toml index e7187b0020..d371ac88a7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,6 +30,7 @@ members = [ "asg-passes", "ast", "compiler", + "errors", "grammar", "imports", "input", diff --git a/asg-passes/Cargo.toml b/asg-passes/Cargo.toml index 6b5ca6d4f6..6fafc821ed 100644 --- a/asg-passes/Cargo.toml +++ b/asg-passes/Cargo.toml @@ -23,3 +23,7 @@ path = "src/lib.rs" [dependencies.leo-asg] path = "../asg" version = "1.5.3" + +[dependencies.leo-errors] +path = "../errors" +version = "1.5.3" diff --git a/asg-passes/src/constant_folding/mod.rs b/asg-passes/src/constant_folding/mod.rs index e18853336a..90d90c014c 100644 --- a/asg-passes/src/constant_folding/mod.rs +++ b/asg-passes/src/constant_folding/mod.rs @@ -17,6 +17,7 @@ use std::cell::Cell; use leo_asg::*; +use leo_errors::LeoError; pub struct ConstantFolding<'a, 'b> { program: &'b Program<'a>, @@ -45,7 +46,7 @@ impl<'a, 'b> StatementVisitor<'a> for ConstantFolding<'a, 'b> {} impl<'a, 'b> ProgramVisitor<'a> for ConstantFolding<'a, 'b> {} impl<'a, 'b> AsgPass<'a> for ConstantFolding<'a, 'b> { - fn do_pass(asg: Program<'a>) -> Result, FormattedError> { + fn do_pass(asg: Program<'a>) -> Result, LeoError> { let pass = ConstantFolding { program: &asg }; let mut director = VisitorDirector::new(pass); director.visit_program(&asg).ok(); diff --git a/asg-passes/src/dead_code_elimination/mod.rs b/asg-passes/src/dead_code_elimination/mod.rs index 7482fcc972..1d11629f3a 100644 --- a/asg-passes/src/dead_code_elimination/mod.rs +++ b/asg-passes/src/dead_code_elimination/mod.rs @@ -17,6 +17,7 @@ use std::cell::Cell; use leo_asg::*; +use leo_errors::LeoError; pub struct DeadCodeElimination {} @@ -65,7 +66,7 @@ impl<'a> ReconstructingReducerStatement<'a> for DeadCodeElimination { } impl<'a> AsgPass<'a> for DeadCodeElimination { - fn do_pass(asg: Program<'a>) -> Result, FormattedError> { + fn do_pass(asg: Program<'a>) -> Result, LeoError> { let pass = DeadCodeElimination {}; let mut director = ReconstructingDirector::new(asg.context, pass); Ok(director.reduce_program(asg)) diff --git a/asg/Cargo.toml b/asg/Cargo.toml index f41ef3b108..22ca57bb81 100644 --- a/asg/Cargo.toml +++ b/asg/Cargo.toml @@ -33,6 +33,10 @@ version = "1.0" version = "1.5.3" path = "../ast" +[dependencies.leo-errors] +path = "../errors" +version = "1.5.3" + [dependencies.leo-parser] version = "1.5.3" path = "../parser" diff --git a/asg/src/checks/return_path.rs b/asg/src/checks/return_path.rs index ed8874deb2..3761c2e928 100644 --- a/asg/src/checks/return_path.rs +++ b/asg/src/checks/return_path.rs @@ -14,16 +14,9 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{ - statement::*, - BoolAnd, - Expression, - Monoid, - MonoidalReducerExpression, - MonoidalReducerStatement, - Node, - Span, -}; +use crate::{statement::*, BoolAnd, Expression, Monoid, MonoidalReducerExpression, MonoidalReducerStatement, Node}; + +use leo_errors::Span; pub struct ReturnPathReducer { pub errors: Vec<(Span, String)>, diff --git a/asg/src/const_value.rs b/asg/src/const_value.rs index d430f0bbc4..90722367bb 100644 --- a/asg/src/const_value.rs +++ b/asg/src/const_value.rs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{AsgConvertError, Circuit, Identifier, IntegerType, Span, Type}; +use crate::{Circuit, Identifier, IntegerType, Type}; +use leo_errors::{AsgError, LeoError, Span}; use indexmap::IndexMap; use num_bigint::BigInt; @@ -313,18 +314,58 @@ impl ConstInt { Type::Integer(self.get_int_type()) } - pub fn parse(int_type: &IntegerType, value: &str, span: &Span) -> Result { + pub fn parse(int_type: &IntegerType, value: &str, span: &Span) -> Result { Ok(match int_type { - IntegerType::I8 => ConstInt::I8(value.parse().map_err(|_| AsgConvertError::invalid_int(&value, span))?), - IntegerType::I16 => ConstInt::I16(value.parse().map_err(|_| AsgConvertError::invalid_int(&value, span))?), - IntegerType::I32 => ConstInt::I32(value.parse().map_err(|_| AsgConvertError::invalid_int(&value, span))?), - IntegerType::I64 => ConstInt::I64(value.parse().map_err(|_| AsgConvertError::invalid_int(&value, span))?), - IntegerType::I128 => ConstInt::I128(value.parse().map_err(|_| AsgConvertError::invalid_int(&value, span))?), - IntegerType::U8 => ConstInt::U8(value.parse().map_err(|_| AsgConvertError::invalid_int(&value, span))?), - IntegerType::U16 => ConstInt::U16(value.parse().map_err(|_| AsgConvertError::invalid_int(&value, span))?), - IntegerType::U32 => ConstInt::U32(value.parse().map_err(|_| AsgConvertError::invalid_int(&value, span))?), - IntegerType::U64 => ConstInt::U64(value.parse().map_err(|_| AsgConvertError::invalid_int(&value, span))?), - IntegerType::U128 => ConstInt::U128(value.parse().map_err(|_| AsgConvertError::invalid_int(&value, span))?), + IntegerType::I8 => ConstInt::I8( + value + .parse() + .map_err(|_| LeoError::from(AsgError::invalid_int(&value, span)))?, + ), + IntegerType::I16 => ConstInt::I16( + value + .parse() + .map_err(|_| LeoError::from(AsgError::invalid_int(&value, span)))?, + ), + IntegerType::I32 => ConstInt::I32( + value + .parse() + .map_err(|_| LeoError::from(AsgError::invalid_int(&value, span)))?, + ), + IntegerType::I64 => ConstInt::I64( + value + .parse() + .map_err(|_| LeoError::from(AsgError::invalid_int(&value, span)))?, + ), + IntegerType::I128 => ConstInt::I128( + value + .parse() + .map_err(|_| LeoError::from(AsgError::invalid_int(&value, span)))?, + ), + IntegerType::U8 => ConstInt::U8( + value + .parse() + .map_err(|_| LeoError::from(AsgError::invalid_int(&value, span)))?, + ), + IntegerType::U16 => ConstInt::U16( + value + .parse() + .map_err(|_| LeoError::from(AsgError::invalid_int(&value, span)))?, + ), + IntegerType::U32 => ConstInt::U32( + value + .parse() + .map_err(|_| LeoError::from(AsgError::invalid_int(&value, span)))?, + ), + IntegerType::U64 => ConstInt::U64( + value + .parse() + .map_err(|_| LeoError::from(AsgError::invalid_int(&value, span)))?, + ), + IntegerType::U128 => ConstInt::U128( + value + .parse() + .map_err(|_| LeoError::from(AsgError::invalid_int(&value, span)))?, + ), }) } } diff --git a/asg/src/error/mod.rs b/asg/src/error/mod.rs index fd045ff26d..5b455b4593 100644 --- a/asg/src/error/mod.rs +++ b/asg/src/error/mod.rs @@ -16,314 +16,314 @@ //! Errors encountered when attempting to convert to an asg from an ast. -use crate::Span; -use leo_ast::{AstError, FormattedError, LeoError}; -use leo_parser::SyntaxError; +// use crate::Span; +// use leo_ast::{AstError, FormattedError, LeoError}; +// use leo_parser::SyntaxError; -#[derive(Debug, Error)] -pub enum AsgConvertError { - #[error("{}", _0)] - Error(#[from] FormattedError), +// #[derive(Debug, Error)] +// pub enum AsgConvertError { +// #[error("{}", _0)] +// Error(#[from] FormattedError), - #[error("{}", _0)] - ImportError(FormattedError), +// #[error("{}", _0)] +// ImportError(FormattedError), - #[error("{}", _0)] - AstError(#[from] AstError), +// #[error("{}", _0)] +// AstError(#[from] AstError), - #[error("{}", _0)] - InternalError(String), +// #[error("{}", _0)] +// InternalError(String), - #[error("{}", _0)] - SyntaxError(#[from] SyntaxError), -} +// #[error("{}", _0)] +// SyntaxError(#[from] SyntaxError), +// } -impl LeoError for AsgConvertError {} +// impl LeoError for AsgConvertError {} -impl AsgConvertError { - fn new_from_span(message: String, span: &Span) -> Self { - AsgConvertError::Error(FormattedError::new_from_span(message, span)) - } +// impl AsgConvertError { +// fn new_from_span(message: String, span: &Span) -> Self { +// AsgConvertError::Error(FormattedError::new_from_span(message, span)) +// } - pub fn unresolved_circuit(name: &str, span: &Span) -> Self { - Self::new_from_span(format!("failed to resolve circuit: '{}'", name), span) - } +// pub fn unresolved_circuit(name: &str, span: &Span) -> Self { +// Self::new_from_span(format!("failed to resolve circuit: '{}'", name), span) +// } - pub fn unresolved_import(name: &str, span: &Span) -> Self { - Self::new_from_span(format!("failed to resolve import: '{}'", name), span) - } +// pub fn unresolved_import(name: &str, span: &Span) -> Self { +// Self::new_from_span(format!("failed to resolve import: '{}'", name), span) +// } - pub fn unresolved_circuit_member(circuit_name: &str, name: &str, span: &Span) -> Self { - Self::new_from_span( - format!( - "illegal reference to non-existant member '{}' of circuit '{}'", - name, circuit_name - ), - span, - ) - } +// pub fn unresolved_circuit_member(circuit_name: &str, name: &str, span: &Span) -> Self { +// Self::new_from_span( +// format!( +// "illegal reference to non-existant member '{}' of circuit '{}'", +// name, circuit_name +// ), +// span, +// ) +// } - pub fn missing_circuit_member(circuit_name: &str, name: &str, span: &Span) -> Self { - Self::new_from_span( - format!( - "missing circuit member '{}' for initialization of circuit '{}'", - name, circuit_name - ), - span, - ) - } +// pub fn missing_circuit_member(circuit_name: &str, name: &str, span: &Span) -> Self { +// Self::new_from_span( +// format!( +// "missing circuit member '{}' for initialization of circuit '{}'", +// name, circuit_name +// ), +// span, +// ) +// } - pub fn overridden_circuit_member(circuit_name: &str, name: &str, span: &Span) -> Self { - Self::new_from_span( - format!( - "cannot declare circuit member '{}' more than once for initialization of circuit '{}'", - name, circuit_name - ), - span, - ) - } +// pub fn overridden_circuit_member(circuit_name: &str, name: &str, span: &Span) -> Self { +// Self::new_from_span( +// format!( +// "cannot declare circuit member '{}' more than once for initialization of circuit '{}'", +// name, circuit_name +// ), +// span, +// ) +// } - pub fn redefined_circuit_member(circuit_name: &str, name: &str, span: &Span) -> Self { - Self::new_from_span( - format!( - "cannot declare circuit member '{}' multiple times in circuit '{}'", - name, circuit_name - ), - span, - ) - } +// pub fn redefined_circuit_member(circuit_name: &str, name: &str, span: &Span) -> Self { +// Self::new_from_span( +// format!( +// "cannot declare circuit member '{}' multiple times in circuit '{}'", +// name, circuit_name +// ), +// span, +// ) +// } - pub fn extra_circuit_member(circuit_name: &str, name: &str, span: &Span) -> Self { - Self::new_from_span( - format!( - "extra circuit member '{}' for initialization of circuit '{}' is not allowed", - name, circuit_name - ), - span, - ) - } +// pub fn extra_circuit_member(circuit_name: &str, name: &str, span: &Span) -> Self { +// Self::new_from_span( +// format!( +// "extra circuit member '{}' for initialization of circuit '{}' is not allowed", +// name, circuit_name +// ), +// span, +// ) +// } - pub fn illegal_function_assign(name: &str, span: &Span) -> Self { - Self::new_from_span(format!("attempt to assign to function '{}'", name), span) - } +// pub fn illegal_function_assign(name: &str, span: &Span) -> Self { +// Self::new_from_span(format!("attempt to assign to function '{}'", name), span) +// } - pub fn circuit_variable_call(circuit_name: &str, name: &str, span: &Span) -> Self { - Self::new_from_span( - format!("cannot call variable member '{}' of circuit '{}'", name, circuit_name), - span, - ) - } +// pub fn circuit_variable_call(circuit_name: &str, name: &str, span: &Span) -> Self { +// Self::new_from_span( +// format!("cannot call variable member '{}' of circuit '{}'", name, circuit_name), +// span, +// ) +// } - pub fn circuit_static_call_invalid(circuit_name: &str, name: &str, span: &Span) -> Self { - Self::new_from_span( - format!( - "cannot call static function '{}' of circuit '{}' from target", - name, circuit_name - ), - span, - ) - } +// pub fn circuit_static_call_invalid(circuit_name: &str, name: &str, span: &Span) -> Self { +// Self::new_from_span( +// format!( +// "cannot call static function '{}' of circuit '{}' from target", +// name, circuit_name +// ), +// span, +// ) +// } - pub fn circuit_member_mut_call_invalid(circuit_name: &str, name: &str, span: &Span) -> Self { - Self::new_from_span( - format!( - "cannot call mutable member function '{}' of circuit '{}' from immutable context", - name, circuit_name - ), - span, - ) - } +// pub fn circuit_member_mut_call_invalid(circuit_name: &str, name: &str, span: &Span) -> Self { +// Self::new_from_span( +// format!( +// "cannot call mutable member function '{}' of circuit '{}' from immutable context", +// name, circuit_name +// ), +// span, +// ) +// } - pub fn circuit_member_call_invalid(circuit_name: &str, name: &str, span: &Span) -> Self { - Self::new_from_span( - format!( - "cannot call member function '{}' of circuit '{}' from static context", - name, circuit_name - ), - span, - ) - } +// pub fn circuit_member_call_invalid(circuit_name: &str, name: &str, span: &Span) -> Self { +// Self::new_from_span( +// format!( +// "cannot call member function '{}' of circuit '{}' from static context", +// name, circuit_name +// ), +// span, +// ) +// } - pub fn circuit_function_ref(circuit_name: &str, name: &str, span: &Span) -> Self { - Self::new_from_span( - format!( - "cannot reference function member '{}' of circuit '{}' as value", - name, circuit_name - ), - span, - ) - } +// pub fn circuit_function_ref(circuit_name: &str, name: &str, span: &Span) -> Self { +// Self::new_from_span( +// format!( +// "cannot reference function member '{}' of circuit '{}' as value", +// name, circuit_name +// ), +// span, +// ) +// } - pub fn index_into_non_array(name: &str, span: &Span) -> Self { - Self::new_from_span(format!("failed to index into non-array '{}'", name), span) - } +// pub fn index_into_non_array(name: &str, span: &Span) -> Self { +// Self::new_from_span(format!("failed to index into non-array '{}'", name), span) +// } - pub fn invalid_assign_index(name: &str, num: &str, span: &Span) -> Self { - Self::new_from_span( - format!("failed to index array with invalid integer '{}'[{}]", name, num), - span, - ) - } +// pub fn invalid_assign_index(name: &str, num: &str, span: &Span) -> Self { +// Self::new_from_span( +// format!("failed to index array with invalid integer '{}'[{}]", name, num), +// span, +// ) +// } - pub fn invalid_backwards_assignment(name: &str, left: usize, right: usize, span: &Span) -> Self { - Self::new_from_span( - format!( - "failed to index array range for assignment with left > right '{}'[{}..{}]", - name, left, right - ), - span, - ) - } +// pub fn invalid_backwards_assignment(name: &str, left: usize, right: usize, span: &Span) -> Self { +// Self::new_from_span( +// format!( +// "failed to index array range for assignment with left > right '{}'[{}..{}]", +// name, left, right +// ), +// span, +// ) +// } - pub fn invalid_const_assign(name: &str, span: &Span) -> Self { - Self::new_from_span( - format!( - "failed to create const variable(s) '{}' with non constant values.", - name - ), - span, - ) - } +// pub fn invalid_const_assign(name: &str, span: &Span) -> Self { +// Self::new_from_span( +// format!( +// "failed to create const variable(s) '{}' with non constant values.", +// name +// ), +// span, +// ) +// } - pub fn duplicate_function_definition(name: &str, span: &Span) -> Self { - Self::new_from_span( - format!("a function named \"{}\" already exists in this scope", name), - span, - ) - } +// pub fn duplicate_function_definition(name: &str, span: &Span) -> Self { +// Self::new_from_span( +// format!("a function named \"{}\" already exists in this scope", name), +// span, +// ) +// } - pub fn duplicate_variable_definition(name: &str, span: &Span) -> Self { - Self::new_from_span( - format!("a variable named \"{}\" already exists in this scope", name), - span, - ) - } +// pub fn duplicate_variable_definition(name: &str, span: &Span) -> Self { +// Self::new_from_span( +// format!("a variable named \"{}\" already exists in this scope", name), +// span, +// ) +// } - pub fn index_into_non_tuple(name: &str, span: &Span) -> Self { - Self::new_from_span(format!("failed to index into non-tuple '{}'", name), span) - } +// pub fn index_into_non_tuple(name: &str, span: &Span) -> Self { +// Self::new_from_span(format!("failed to index into non-tuple '{}'", name), span) +// } - pub fn tuple_index_out_of_bounds(index: usize, span: &Span) -> Self { - Self::new_from_span(format!("tuple index out of bounds: '{}'", index), span) - } +// pub fn tuple_index_out_of_bounds(index: usize, span: &Span) -> Self { +// Self::new_from_span(format!("tuple index out of bounds: '{}'", index), span) +// } - pub fn array_index_out_of_bounds(index: usize, span: &Span) -> Self { - Self::new_from_span(format!("array index out of bounds: '{}'", index), span) - } +// pub fn array_index_out_of_bounds(index: usize, span: &Span) -> Self { +// Self::new_from_span(format!("array index out of bounds: '{}'", index), span) +// } - pub fn ternary_different_types(left: &str, right: &str, span: &Span) -> Self { - let message = format!("ternary sides had different types: left {}, right {}", left, right); +// pub fn ternary_different_types(left: &str, right: &str, span: &Span) -> Self { +// let message = format!("ternary sides had different types: left {}, right {}", left, right); - Self::new_from_span(message, span) - } +// Self::new_from_span(message, span) +// } - pub fn unknown_array_size(span: &Span) -> Self { - Self::new_from_span("array size cannot be inferred, add explicit types".to_string(), span) - } +// pub fn unknown_array_size(span: &Span) -> Self { +// Self::new_from_span("array size cannot be inferred, add explicit types".to_string(), span) +// } - pub fn unexpected_call_argument_count(expected: usize, got: usize, span: &Span) -> Self { - Self::new_from_span( - format!("function call expected {} arguments, got {}", expected, got), - span, - ) - } +// pub fn unexpected_call_argument_count(expected: usize, got: usize, span: &Span) -> Self { +// Self::new_from_span( +// format!("function call expected {} arguments, got {}", expected, got), +// span, +// ) +// } - pub fn unresolved_function(name: &str, span: &Span) -> Self { - Self::new_from_span(format!("failed to resolve function: '{}'", name), span) - } +// pub fn unresolved_function(name: &str, span: &Span) -> Self { +// Self::new_from_span(format!("failed to resolve function: '{}'", name), span) +// } - pub fn unresolved_type(name: &str, span: &Span) -> Self { - Self::new_from_span( - format!("failed to resolve type for variable definition '{}'", name), - span, - ) - } +// pub fn unresolved_type(name: &str, span: &Span) -> Self { +// Self::new_from_span( +// format!("failed to resolve type for variable definition '{}'", name), +// span, +// ) +// } - pub fn unexpected_type(expected: &str, received: Option<&str>, span: &Span) -> Self { - Self::new_from_span( - format!( - "unexpected type, expected: '{}', received: '{}'", - expected, - received.unwrap_or("unknown") - ), - span, - ) - } +// pub fn unexpected_type(expected: &str, received: Option<&str>, span: &Span) -> Self { +// Self::new_from_span( +// format!( +// "unexpected type, expected: '{}', received: '{}'", +// expected, +// received.unwrap_or("unknown") +// ), +// span, +// ) +// } - pub fn unexpected_nonconst(span: &Span) -> Self { - Self::new_from_span("expected const, found non-const value".to_string(), span) - } +// pub fn unexpected_nonconst(span: &Span) -> Self { +// Self::new_from_span("expected const, found non-const value".to_string(), span) +// } - pub fn unresolved_reference(name: &str, span: &Span) -> Self { - Self::new_from_span(format!("failed to resolve variable reference '{}'", name), span) - } +// pub fn unresolved_reference(name: &str, span: &Span) -> Self { +// Self::new_from_span(format!("failed to resolve variable reference '{}'", name), span) +// } - pub fn invalid_boolean(value: &str, span: &Span) -> Self { - Self::new_from_span(format!("failed to parse boolean value '{}'", value), span) - } +// pub fn invalid_boolean(value: &str, span: &Span) -> Self { +// Self::new_from_span(format!("failed to parse boolean value '{}'", value), span) +// } - pub fn invalid_char(value: &str, span: &Span) -> Self { - Self::new_from_span(format!("failed to parse char value '{}'", value), span) - } +// pub fn invalid_char(value: &str, span: &Span) -> Self { +// Self::new_from_span(format!("failed to parse char value '{}'", value), span) +// } - pub fn invalid_int(value: &str, span: &Span) -> Self { - Self::new_from_span(format!("failed to parse int value '{}'", value), span) - } +// pub fn invalid_int(value: &str, span: &Span) -> Self { +// Self::new_from_span(format!("failed to parse int value '{}'", value), span) +// } - pub fn unsigned_negation(span: &Span) -> Self { - Self::new_from_span("cannot negate unsigned integer".to_string(), span) - } +// pub fn unsigned_negation(span: &Span) -> Self { +// Self::new_from_span("cannot negate unsigned integer".to_string(), span) +// } - pub fn immutable_assignment(name: &str, span: &Span) -> Self { - Self::new_from_span(format!("illegal assignment to immutable variable '{}'", name), span) - } +// pub fn immutable_assignment(name: &str, span: &Span) -> Self { +// Self::new_from_span(format!("illegal assignment to immutable variable '{}'", name), span) +// } - pub fn function_missing_return(name: &str, span: &Span) -> Self { - Self::new_from_span(format!("function '{}' missing return for all paths", name), span) - } +// pub fn function_missing_return(name: &str, span: &Span) -> Self { +// Self::new_from_span(format!("function '{}' missing return for all paths", name), span) +// } - pub fn function_return_validation(name: &str, description: &str, span: &Span) -> Self { - Self::new_from_span( - format!("function '{}' failed to validate return path: '{}'", name, description), - span, - ) - } +// pub fn function_return_validation(name: &str, description: &str, span: &Span) -> Self { +// Self::new_from_span( +// format!("function '{}' failed to validate return path: '{}'", name, description), +// span, +// ) +// } - pub fn input_ref_needs_type(category: &str, name: &str, span: &Span) -> Self { - Self::new_from_span( - format!("could not infer type for input in '{}': '{}'", category, name), - span, - ) - } +// pub fn input_ref_needs_type(category: &str, name: &str, span: &Span) -> Self { +// Self::new_from_span( +// format!("could not infer type for input in '{}': '{}'", category, name), +// span, +// ) +// } - pub fn invalid_self_in_global(span: &Span) -> Self { - Self::new_from_span( - "cannot have `mut self` or `self` arguments in global functions".to_string(), - span, - ) - } +// pub fn invalid_self_in_global(span: &Span) -> Self { +// Self::new_from_span( +// "cannot have `mut self` or `self` arguments in global functions".to_string(), +// span, +// ) +// } - pub fn call_test_function(span: &Span) -> Self { - Self::new_from_span("cannot call test function".to_string(), span) - } +// pub fn call_test_function(span: &Span) -> Self { +// Self::new_from_span("cannot call test function".to_string(), span) +// } - pub fn circuit_test_function(span: &Span) -> Self { - Self::new_from_span("cannot have test function as member of circuit".to_string(), span) - } +// pub fn circuit_test_function(span: &Span) -> Self { +// Self::new_from_span("cannot have test function as member of circuit".to_string(), span) +// } - pub fn parse_index_error() -> Self { - AsgConvertError::InternalError("failed to parse index".to_string()) - } +// pub fn parse_index_error() -> Self { +// AsgConvertError::InternalError("failed to parse index".to_string()) +// } - pub fn parse_dimension_error() -> Self { - AsgConvertError::InternalError("failed to parse dimension".to_string()) - } +// pub fn parse_dimension_error() -> Self { +// AsgConvertError::InternalError("failed to parse dimension".to_string()) +// } - pub fn reference_self_outside_circuit() -> Self { - AsgConvertError::InternalError("referenced self outside of circuit function".to_string()) - } +// pub fn reference_self_outside_circuit() -> Self { +// AsgConvertError::InternalError("referenced self outside of circuit function".to_string()) +// } - pub fn illegal_ast_structure(details: &str) -> Self { - AsgConvertError::InternalError(format!("illegal ast structure: {}", details)) - } -} +// pub fn illegal_ast_structure(details: &str) -> Self { +// AsgConvertError::InternalError(format!("illegal ast structure: {}", details)) +// } +// } diff --git a/asg/src/expression/array_access.rs b/asg/src/expression/array_access.rs index 2bbcf4f871..37aa5cf940 100644 --- a/asg/src/expression/array_access.rs +++ b/asg/src/expression/array_access.rs @@ -14,8 +14,9 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{AsgConvertError, ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Span, Type}; +use crate::{ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Type}; use leo_ast::IntegerType; +use leo_errors::{AsgError, LeoError, Span}; use std::cell::Cell; @@ -83,7 +84,7 @@ impl<'a> FromAst<'a, leo_ast::ArrayAccessExpression> for ArrayAccessExpression<' scope: &'a Scope<'a>, value: &leo_ast::ArrayAccessExpression, expected_type: Option>, - ) -> Result, AsgConvertError> { + ) -> Result, LeoError> { let array = <&Expression<'a>>::from_ast( scope, &*value.array, @@ -92,11 +93,11 @@ impl<'a> FromAst<'a, leo_ast::ArrayAccessExpression> for ArrayAccessExpression<' let array_len = match array.get_type() { Some(Type::Array(_, len)) => len, type_ => { - return Err(AsgConvertError::unexpected_type( + return Err(LeoError::from(AsgError::unexpected_type( "array", type_.map(|x| x.to_string()).as_deref(), &value.span, - )); + ))); } }; @@ -112,10 +113,10 @@ impl<'a> FromAst<'a, leo_ast::ArrayAccessExpression> for ArrayAccessExpression<' .flatten() { if index >= array_len { - return Err(AsgConvertError::array_index_out_of_bounds( + return Err(LeoError::from(AsgError::array_index_out_of_bounds( index, &array.span().cloned().unwrap_or_default(), - )); + ))); } } diff --git a/asg/src/expression/array_init.rs b/asg/src/expression/array_init.rs index df2c2afe07..e1af3f2bf9 100644 --- a/asg/src/expression/array_init.rs +++ b/asg/src/expression/array_init.rs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{AsgConvertError, ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Span, Type}; +use crate::{ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Type}; +use leo_errors::{AsgError, LeoError, Span}; use std::cell::Cell; @@ -68,16 +69,16 @@ impl<'a> FromAst<'a, leo_ast::ArrayInitExpression> for ArrayInitExpression<'a> { scope: &'a Scope<'a>, value: &leo_ast::ArrayInitExpression, expected_type: Option>, - ) -> Result, AsgConvertError> { + ) -> Result, LeoError> { let (mut expected_item, expected_len) = match expected_type { Some(PartialType::Array(item, dims)) => (item.map(|x| *x), dims), None => (None, None), Some(type_) => { - return Err(AsgConvertError::unexpected_type( + return Err(LeoError::from(AsgError::unexpected_type( &type_.to_string(), Some("array"), &value.span, - )); + ))); } }; let dimensions = value @@ -87,18 +88,20 @@ impl<'a> FromAst<'a, leo_ast::ArrayInitExpression> for ArrayInitExpression<'a> { .map(|x| { x.value .parse::() - .map_err(|_| AsgConvertError::parse_dimension_error()) + .map_err(|_| LeoError::from(AsgError::parse_dimension_error(&value.span))) }) - .collect::, AsgConvertError>>()?; + .collect::, LeoError>>()?; - let len = *dimensions.get(0).ok_or_else(AsgConvertError::parse_dimension_error)?; + let len = *dimensions + .get(0) + .ok_or_else(|| LeoError::from(AsgError::parse_dimension_error(&value.span)))?; if let Some(expected_len) = expected_len { if expected_len != len { - return Err(AsgConvertError::unexpected_type( + return Err(LeoError::from(AsgError::unexpected_type( &*format!("array of length {}", expected_len), Some(&*format!("array of length {}", len)), &value.span, - )); + ))); } } @@ -107,11 +110,11 @@ impl<'a> FromAst<'a, leo_ast::ArrayInitExpression> for ArrayInitExpression<'a> { Some(PartialType::Array(item, len)) => { if let Some(len) = len { if len != dimension { - return Err(AsgConvertError::unexpected_type( + return Err(LeoError::from(AsgError::unexpected_type( &*format!("array of length {}", dimension), Some(&*format!("array of length {}", len)), &value.span, - )); + ))); } } @@ -119,11 +122,11 @@ impl<'a> FromAst<'a, leo_ast::ArrayInitExpression> for ArrayInitExpression<'a> { } None => None, Some(type_) => { - return Err(AsgConvertError::unexpected_type( + return Err(LeoError::from(AsgError::unexpected_type( "array", Some(&type_.to_string()), &value.span, - )); + ))); } } } diff --git a/asg/src/expression/array_inline.rs b/asg/src/expression/array_inline.rs index 6d53e0798f..54ea10930c 100644 --- a/asg/src/expression/array_inline.rs +++ b/asg/src/expression/array_inline.rs @@ -14,8 +14,9 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{AsgConvertError, ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Span, Type}; +use crate::{ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Type}; use leo_ast::SpreadOrExpression; +use leo_errors::{AsgError, LeoError, Span}; use std::cell::Cell; @@ -103,16 +104,16 @@ impl<'a> FromAst<'a, leo_ast::ArrayInlineExpression> for ArrayInlineExpression<' scope: &'a Scope<'a>, value: &leo_ast::ArrayInlineExpression, expected_type: Option>, - ) -> Result, AsgConvertError> { + ) -> Result, LeoError> { let (mut expected_item, expected_len) = match expected_type { Some(PartialType::Array(item, dims)) => (item.map(|x| *x), dims), None => (None, None), Some(type_) => { - return Err(AsgConvertError::unexpected_type( + return Err(LeoError::from(AsgError::unexpected_type( &type_.to_string(), Some("array"), &value.span, - )); + ))); } }; @@ -169,7 +170,7 @@ impl<'a> FromAst<'a, leo_ast::ArrayInlineExpression> for ArrayInlineExpression<' len += spread_len; } type_ => { - return Err(AsgConvertError::unexpected_type( + return Err(LeoError::from(AsgError::unexpected_type( expected_item .as_ref() .map(|x| x.to_string()) @@ -177,21 +178,21 @@ impl<'a> FromAst<'a, leo_ast::ArrayInlineExpression> for ArrayInlineExpression<' .unwrap_or("unknown"), type_.map(|x| x.to_string()).as_deref(), &value.span, - )); + ))); } } Ok((Cell::new(expr), true)) } }) - .collect::, AsgConvertError>>()?, + .collect::, LeoError>>()?, }; if let Some(expected_len) = expected_len { if len != expected_len { - return Err(AsgConvertError::unexpected_type( + return Err(LeoError::from(AsgError::unexpected_type( &*format!("array of length {}", expected_len), Some(&*format!("array of length {}", len)), &value.span, - )); + ))); } } Ok(output) diff --git a/asg/src/expression/array_range_access.rs b/asg/src/expression/array_range_access.rs index c0810a2586..99f3701d9f 100644 --- a/asg/src/expression/array_range_access.rs +++ b/asg/src/expression/array_range_access.rs @@ -14,8 +14,9 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{AsgConvertError, ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Span, Type}; +use crate::{ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Type}; use leo_ast::IntegerType; +use leo_errors::{AsgError, LeoError, Span}; use std::cell::Cell; @@ -102,16 +103,16 @@ impl<'a> FromAst<'a, leo_ast::ArrayRangeAccessExpression> for ArrayRangeAccessEx scope: &'a Scope<'a>, value: &leo_ast::ArrayRangeAccessExpression, expected_type: Option>, - ) -> Result, AsgConvertError> { + ) -> Result, LeoError> { let (expected_array, expected_len) = match expected_type.clone() { Some(PartialType::Array(element, len)) => (Some(PartialType::Array(element, None)), len), None => (None, None), Some(x) => { - return Err(AsgConvertError::unexpected_type( + return Err(LeoError::from(AsgError::unexpected_type( &x.to_string(), Some("array"), &value.span, - )); + ))); } }; let array = <&Expression<'a>>::from_ast(scope, &*value.array, expected_array)?; @@ -119,11 +120,11 @@ impl<'a> FromAst<'a, leo_ast::ArrayRangeAccessExpression> for ArrayRangeAccessEx let (parent_element, parent_size) = match array_type { Some(Type::Array(inner, size)) => (inner, size), type_ => { - return Err(AsgConvertError::unexpected_type( + return Err(LeoError::from(AsgError::unexpected_type( "array", type_.map(|x| x.to_string()).as_deref(), &value.span, - )); + ))); } }; @@ -157,7 +158,10 @@ impl<'a> FromAst<'a, leo_ast::ArrayRangeAccessExpression> for ArrayRangeAccessEx } else { value.span.clone() }; - return Err(AsgConvertError::array_index_out_of_bounds(inner_value, &error_span)); + return Err(LeoError::from(AsgError::array_index_out_of_bounds( + inner_value, + &error_span, + ))); } else if let Some(left) = const_left { if left > inner_value { let error_span = if let Some(right) = right { @@ -165,7 +169,10 @@ impl<'a> FromAst<'a, leo_ast::ArrayRangeAccessExpression> for ArrayRangeAccessEx } else { value.span.clone() }; - return Err(AsgConvertError::array_index_out_of_bounds(inner_value, &error_span)); + return Err(LeoError::from(AsgError::array_index_out_of_bounds( + inner_value, + &error_span, + ))); } } } @@ -185,11 +192,11 @@ impl<'a> FromAst<'a, leo_ast::ArrayRangeAccessExpression> for ArrayRangeAccessEx if let Some(length) = length { if length != expected_len { let concrete_type = Type::Array(parent_element, length); - return Err(AsgConvertError::unexpected_type( + return Err(LeoError::from(AsgError::unexpected_type( &expected_type.as_ref().unwrap().to_string(), Some(&concrete_type.to_string()), &value.span, - )); + ))); } } if let Some(left_value) = const_left { @@ -199,13 +206,16 @@ impl<'a> FromAst<'a, leo_ast::ArrayRangeAccessExpression> for ArrayRangeAccessEx } else { value.span.clone() }; - return Err(AsgConvertError::array_index_out_of_bounds(left_value, &error_span)); + return Err(LeoError::from(AsgError::array_index_out_of_bounds( + left_value, + &error_span, + ))); } } length = Some(expected_len); } if length.is_none() { - return Err(AsgConvertError::unknown_array_size(&value.span)); + return Err(LeoError::from(AsgError::unknown_array_size(&value.span))); } Ok(ArrayRangeAccessExpression { diff --git a/asg/src/expression/binary.rs b/asg/src/expression/binary.rs index 9322b1d587..e20b07b904 100644 --- a/asg/src/expression/binary.rs +++ b/asg/src/expression/binary.rs @@ -14,8 +14,9 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{AsgConvertError, ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Span, Type}; +use crate::{ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Type}; pub use leo_ast::{BinaryOperation, BinaryOperationClass}; +use leo_errors::{AsgError, LeoError, Span}; use std::cell::Cell; @@ -116,17 +117,17 @@ impl<'a> FromAst<'a, leo_ast::BinaryExpression> for BinaryExpression<'a> { scope: &'a Scope<'a>, value: &leo_ast::BinaryExpression, expected_type: Option>, - ) -> Result, AsgConvertError> { + ) -> Result, LeoError> { let class = value.op.class(); let expected_type = match class { BinaryOperationClass::Boolean => match expected_type { Some(PartialType::Type(Type::Boolean)) | None => None, Some(x) => { - return Err(AsgConvertError::unexpected_type( + return Err(LeoError::from(AsgError::unexpected_type( &x.to_string(), Some(&*Type::Boolean.to_string()), &value.span, - )); + ))); } }, BinaryOperationClass::Numeric => match expected_type { @@ -134,11 +135,11 @@ impl<'a> FromAst<'a, leo_ast::BinaryExpression> for BinaryExpression<'a> { Some(x @ PartialType::Type(Type::Field)) => Some(x), Some(x @ PartialType::Type(Type::Group)) => Some(x), Some(x) => { - return Err(AsgConvertError::unexpected_type( + return Err(LeoError::from(AsgError::unexpected_type( &x.to_string(), Some("integer, field, or group"), &value.span, - )); + ))); } None => None, }, @@ -187,33 +188,33 @@ impl<'a> FromAst<'a, leo_ast::BinaryExpression> for BinaryExpression<'a> { } Some(Type::Field) if value.op == BinaryOperation::Mul || value.op == BinaryOperation::Div => (), type_ => { - return Err(AsgConvertError::unexpected_type( + return Err(LeoError::from(AsgError::unexpected_type( "integer", type_.map(|x| x.to_string()).as_deref(), &value.span, - )); + ))); } }, BinaryOperationClass::Boolean => match &value.op { BinaryOperation::And | BinaryOperation::Or => match left_type { Some(Type::Boolean) | None => (), Some(x) => { - return Err(AsgConvertError::unexpected_type( + return Err(LeoError::from(AsgError::unexpected_type( &x.to_string(), Some(&*Type::Boolean.to_string()), &value.span, - )); + ))); } }, BinaryOperation::Eq | BinaryOperation::Ne => (), // all types allowed _ => match left_type { Some(Type::Integer(_)) | None => (), Some(x) => { - return Err(AsgConvertError::unexpected_type( + return Err(LeoError::from(AsgError::unexpected_type( &x.to_string(), Some("integer"), &value.span, - )); + ))); } }, }, @@ -224,19 +225,19 @@ impl<'a> FromAst<'a, leo_ast::BinaryExpression> for BinaryExpression<'a> { match (left_type, right_type) { (Some(left_type), Some(right_type)) => { if !left_type.is_assignable_from(&right_type) { - return Err(AsgConvertError::unexpected_type( + return Err(LeoError::from(AsgError::unexpected_type( &left_type.to_string(), Some(&*right_type.to_string()), &value.span, - )); + ))); } } (None, None) => { - return Err(AsgConvertError::unexpected_type( + return Err(LeoError::from(AsgError::unexpected_type( "any type", Some("unknown type"), &value.span, - )); + ))); } (_, _) => (), } diff --git a/asg/src/expression/call.rs b/asg/src/expression/call.rs index d0ae36f32e..24834359cb 100644 --- a/asg/src/expression/call.rs +++ b/asg/src/expression/call.rs @@ -15,7 +15,6 @@ // along with the Leo library. If not, see . use crate::{ - AsgConvertError, CircuitMember, ConstValue, Expression, @@ -26,10 +25,10 @@ use crate::{ Node, PartialType, Scope, - Span, Type, }; pub use leo_ast::{BinaryOperation, Node as AstNode}; +use leo_errors::{AsgError, LeoError, Span}; use std::cell::Cell; @@ -89,13 +88,13 @@ impl<'a> FromAst<'a, leo_ast::CallExpression> for CallExpression<'a> { scope: &'a Scope<'a>, value: &leo_ast::CallExpression, expected_type: Option>, - ) -> Result, AsgConvertError> { + ) -> Result, LeoError> { let (target, function) = match &*value.function { leo_ast::Expression::Identifier(name) => ( None, scope .resolve_function(&name.name) - .ok_or_else(|| AsgConvertError::unresolved_function(&name.name, &name.span))?, + .ok_or_else(|| LeoError::from(AsgError::unresolved_function(&name.name, &name.span)))?, ), leo_ast::Expression::CircuitMemberAccess(leo_ast::CircuitMemberAccessExpression { circuit: ast_circuit, @@ -106,37 +105,41 @@ impl<'a> FromAst<'a, leo_ast::CallExpression> for CallExpression<'a> { let circuit = match target.get_type() { Some(Type::Circuit(circuit)) => circuit, type_ => { - return Err(AsgConvertError::unexpected_type( + return Err(LeoError::from(AsgError::unexpected_type( "circuit", type_.map(|x| x.to_string()).as_deref(), span, - )); + ))); } }; let circuit_name = circuit.name.borrow().name.clone(); let member = circuit.members.borrow(); - let member = member - .get(name.name.as_ref()) - .ok_or_else(|| AsgConvertError::unresolved_circuit_member(&circuit_name, &name.name, span))?; + let member = member.get(name.name.as_ref()).ok_or_else(|| { + LeoError::from(AsgError::unresolved_circuit_member(&circuit_name, &name.name, span)) + })?; match member { CircuitMember::Function(body) => { if body.qualifier == FunctionQualifier::Static { - return Err(AsgConvertError::circuit_static_call_invalid( + return Err(LeoError::from(AsgError::circuit_static_call_invalid( &circuit_name, &name.name, span, - )); + ))); } else if body.qualifier == FunctionQualifier::MutSelfRef && !target.is_mut_ref() { - return Err(AsgConvertError::circuit_member_mut_call_invalid( + return Err(LeoError::from(AsgError::circuit_member_mut_call_invalid( &circuit_name, &name.name, span, - )); + ))); } (Some(target), *body) } CircuitMember::Variable(_) => { - return Err(AsgConvertError::circuit_variable_call(&circuit_name, &name.name, span)); + return Err(LeoError::from(AsgError::circuit_variable_call( + &circuit_name, + &name.name, + span, + ))); } } } @@ -146,56 +149,61 @@ impl<'a> FromAst<'a, leo_ast::CallExpression> for CallExpression<'a> { span, }) => { let circuit = if let leo_ast::Expression::Identifier(circuit_name) = &**ast_circuit { - scope - .resolve_circuit(&circuit_name.name) - .ok_or_else(|| AsgConvertError::unresolved_circuit(&circuit_name.name, &circuit_name.span))? + scope.resolve_circuit(&circuit_name.name).ok_or_else(|| { + LeoError::from(AsgError::unresolved_circuit(&circuit_name.name, &circuit_name.span)) + })? } else { - return Err(AsgConvertError::unexpected_type("circuit", None, span)); + return Err(LeoError::from(AsgError::unexpected_type("circuit", None, span))); }; let circuit_name = circuit.name.borrow().name.clone(); let member = circuit.members.borrow(); - let member = member - .get(name.name.as_ref()) - .ok_or_else(|| AsgConvertError::unresolved_circuit_member(&circuit_name, &name.name, span))?; + let member = member.get(name.name.as_ref()).ok_or_else(|| { + LeoError::from(AsgError::unresolved_circuit_member(&circuit_name, &name.name, span)) + })?; match member { CircuitMember::Function(body) => { if body.qualifier != FunctionQualifier::Static { - return Err(AsgConvertError::circuit_member_call_invalid( + return Err(LeoError::from(AsgError::circuit_member_call_invalid( &circuit_name, &name.name, span, - )); + ))); } (None, *body) } CircuitMember::Variable(_) => { - return Err(AsgConvertError::circuit_variable_call(&circuit_name, &name.name, span)); + return Err(LeoError::from(AsgError::circuit_variable_call( + &circuit_name, + &name.name, + span, + ))); } } } _ => { - return Err(AsgConvertError::illegal_ast_structure( + return Err(LeoError::from(AsgError::illegal_ast_structure( "non Identifier/CircuitMemberAccess/CircuitStaticFunctionAccess as call target", - )); + &value.span, + ))); } }; if let Some(expected) = expected_type { let output: Type = function.output.clone(); if !expected.matches(&output) { - return Err(AsgConvertError::unexpected_type( + return Err(LeoError::from(AsgError::unexpected_type( &expected.to_string(), Some(&*output.to_string()), &value.span, - )); + ))); } } if value.arguments.len() != function.arguments.len() { - return Err(AsgConvertError::unexpected_call_argument_count( + return Err(LeoError::from(AsgError::unexpected_call_argument_count( function.arguments.len(), value.arguments.len(), &value.span, - )); + ))); } let arguments = value @@ -206,14 +214,14 @@ impl<'a> FromAst<'a, leo_ast::CallExpression> for CallExpression<'a> { let argument = argument.get().borrow(); let converted = <&Expression<'a>>::from_ast(scope, expr, Some(argument.type_.clone().partial()))?; if argument.const_ && !converted.is_consty() { - return Err(AsgConvertError::unexpected_nonconst(expr.span())); + return Err(LeoError::from(AsgError::unexpected_nonconst(expr.span()))); } Ok(Cell::new(converted)) }) - .collect::, AsgConvertError>>()?; + .collect::, LeoError>>()?; if function.is_test() { - return Err(AsgConvertError::call_test_function(&value.span)); + return Err(LeoError::from(AsgError::call_test_function(&value.span))); } Ok(CallExpression { parent: Cell::new(None), diff --git a/asg/src/expression/cast.rs b/asg/src/expression/cast.rs index e7060492d4..ab642693a6 100644 --- a/asg/src/expression/cast.rs +++ b/asg/src/expression/cast.rs @@ -14,8 +14,9 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{AsgConvertError, ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Span, Type}; +use crate::{ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Type}; pub use leo_ast::UnaryOperation; +use leo_errors::{AsgError, LeoError, Span}; use std::cell::Cell; @@ -75,15 +76,15 @@ impl<'a> FromAst<'a, leo_ast::CastExpression> for CastExpression<'a> { scope: &'a Scope<'a>, value: &leo_ast::CastExpression, expected_type: Option>, - ) -> Result, AsgConvertError> { - let target_type = scope.resolve_ast_type(&value.target_type)?; + ) -> Result, LeoError> { + let target_type = scope.resolve_ast_type(&value.target_type, &value.span)?; if let Some(expected_type) = &expected_type { if !expected_type.matches(&target_type) { - return Err(AsgConvertError::unexpected_type( + return Err(LeoError::from(AsgError::unexpected_type( &expected_type.to_string(), Some(&target_type.to_string()), &value.span, - )); + ))); } } diff --git a/asg/src/expression/circuit_access.rs b/asg/src/expression/circuit_access.rs index 37af4e17bc..d14b470a1d 100644 --- a/asg/src/expression/circuit_access.rs +++ b/asg/src/expression/circuit_access.rs @@ -15,7 +15,6 @@ // along with the Leo library. If not, see . use crate::{ - AsgConvertError, Circuit, CircuitMember, ConstValue, @@ -26,10 +25,10 @@ use crate::{ Node, PartialType, Scope, - Span, Type, }; +use leo_errors::{AsgError, LeoError, Span}; use std::cell::Cell; #[derive(Clone)] @@ -103,16 +102,16 @@ impl<'a> FromAst<'a, leo_ast::CircuitMemberAccessExpression> for CircuitAccessEx scope: &'a Scope<'a>, value: &leo_ast::CircuitMemberAccessExpression, expected_type: Option>, - ) -> Result, AsgConvertError> { + ) -> Result, LeoError> { let target = <&'a Expression<'a>>::from_ast(scope, &*value.circuit, None)?; let circuit = match target.get_type() { Some(Type::Circuit(circuit)) => circuit, x => { - return Err(AsgConvertError::unexpected_type( + return Err(LeoError::from(AsgError::unexpected_type( "circuit", x.map(|x| x.to_string()).as_deref(), &value.span, - )); + ))); } }; @@ -123,11 +122,11 @@ impl<'a> FromAst<'a, leo_ast::CircuitMemberAccessExpression> for CircuitAccessEx if let CircuitMember::Variable(type_) = &member { let type_: Type = type_.clone(); if !expected_type.matches(&type_) { - return Err(AsgConvertError::unexpected_type( + return Err(LeoError::from(AsgError::unexpected_type( &expected_type.to_string(), Some(&type_.to_string()), &value.span, - )); + ))); } } // used by call expression } @@ -147,18 +146,18 @@ impl<'a> FromAst<'a, leo_ast::CircuitMemberAccessExpression> for CircuitAccessEx CircuitMember::Variable(expected_type.clone()), ); } else { - return Err(AsgConvertError::input_ref_needs_type( + return Err(LeoError::from(AsgError::input_ref_needs_type( &circuit.name.borrow().name, &value.name.name, &value.span, - )); + ))); } } else { - return Err(AsgConvertError::unresolved_circuit_member( + return Err(LeoError::from(AsgError::unresolved_circuit_member( &circuit.name.borrow().name, &value.name.name, &value.span, - )); + ))); } Ok(CircuitAccessExpression { @@ -176,36 +175,36 @@ impl<'a> FromAst<'a, leo_ast::CircuitStaticFunctionAccessExpression> for Circuit scope: &Scope<'a>, value: &leo_ast::CircuitStaticFunctionAccessExpression, expected_type: Option, - ) -> Result, AsgConvertError> { + ) -> Result, LeoError> { let circuit = match &*value.circuit { leo_ast::Expression::Identifier(name) => scope .resolve_circuit(&name.name) - .ok_or_else(|| AsgConvertError::unresolved_circuit(&name.name, &name.span))?, + .ok_or_else(|| LeoError::from(AsgError::unresolved_circuit(&name.name, &name.span)))?, _ => { - return Err(AsgConvertError::unexpected_type( + return Err(LeoError::from(AsgError::unexpected_type( "circuit", Some("unknown"), &value.span, - )); + ))); } }; if let Some(expected_type) = expected_type { - return Err(AsgConvertError::unexpected_type( + return Err(LeoError::from(AsgError::unexpected_type( &expected_type.to_string(), Some("none"), &value.span, - )); + ))); } if let Some(CircuitMember::Function(_)) = circuit.members.borrow().get(value.name.name.as_ref()) { // okay } else { - return Err(AsgConvertError::unresolved_circuit_member( + return Err(LeoError::from(AsgError::unresolved_circuit_member( &circuit.name.borrow().name, &value.name.name, &value.span, - )); + ))); } Ok(CircuitAccessExpression { diff --git a/asg/src/expression/circuit_init.rs b/asg/src/expression/circuit_init.rs index 7c26aa25e3..287f5b5cab 100644 --- a/asg/src/expression/circuit_init.rs +++ b/asg/src/expression/circuit_init.rs @@ -15,7 +15,6 @@ // along with the Leo library. If not, see . use crate::{ - AsgConvertError, Circuit, CircuitMember, ConstValue, @@ -26,10 +25,11 @@ use crate::{ Node, PartialType, Scope, - Span, Type, }; +use leo_errors::{AsgError, LeoError, Span}; + use indexmap::{IndexMap, IndexSet}; use std::cell::Cell; @@ -93,19 +93,19 @@ impl<'a> FromAst<'a, leo_ast::CircuitInitExpression> for CircuitInitExpression<' scope: &'a Scope<'a>, value: &leo_ast::CircuitInitExpression, expected_type: Option>, - ) -> Result, AsgConvertError> { + ) -> Result, LeoError> { let circuit = scope .resolve_circuit(&value.name.name) - .ok_or_else(|| AsgConvertError::unresolved_circuit(&value.name.name, &value.name.span))?; + .ok_or_else(|| LeoError::from(AsgError::unresolved_circuit(&value.name.name, &value.name.span)))?; match expected_type { Some(PartialType::Type(Type::Circuit(expected_circuit))) if expected_circuit == circuit => (), None => (), Some(x) => { - return Err(AsgConvertError::unexpected_type( + return Err(LeoError::from(AsgError::unexpected_type( &x.to_string(), Some(&circuit.name.borrow().name), &value.span, - )); + ))); } } let members: IndexMap<&str, (&Identifier, Option<&leo_ast::Expression>)> = value @@ -121,11 +121,11 @@ impl<'a> FromAst<'a, leo_ast::CircuitInitExpression> for CircuitInitExpression<' let circuit_members = circuit.members.borrow(); for (name, member) in circuit_members.iter() { if defined_variables.contains(name) { - return Err(AsgConvertError::overridden_circuit_member( + return Err(LeoError::from(AsgError::overridden_circuit_member( &circuit.name.borrow().name, name, &value.span, - )); + ))); } defined_variables.insert(name.clone()); let type_: Type = if let CircuitMember::Variable(type_) = &member { @@ -145,21 +145,21 @@ impl<'a> FromAst<'a, leo_ast::CircuitInitExpression> for CircuitInitExpression<' }; values.push(((*identifier).clone(), Cell::new(received))); } else { - return Err(AsgConvertError::missing_circuit_member( + return Err(LeoError::from(AsgError::missing_circuit_member( &circuit.name.borrow().name, name, &value.span, - )); + ))); } } for (name, (identifier, _expression)) in members.iter() { if circuit_members.get(*name).is_none() { - return Err(AsgConvertError::extra_circuit_member( + return Err(LeoError::from(AsgError::extra_circuit_member( &circuit.name.borrow().name, *name, &identifier.span, - )); + ))); } } } diff --git a/asg/src/expression/constant.rs b/asg/src/expression/constant.rs index 8fb638974a..3026ece9f7 100644 --- a/asg/src/expression/constant.rs +++ b/asg/src/expression/constant.rs @@ -15,7 +15,6 @@ // along with the Leo library. If not, see . use crate::{ - AsgConvertError, CharValue, ConstInt, ConstValue, @@ -26,10 +25,11 @@ use crate::{ Node, PartialType, Scope, - Span, Type, }; +use leo_errors::{AsgError, LeoError, Span}; + use std::cell::Cell; #[derive(Clone)] @@ -78,18 +78,18 @@ impl<'a> FromAst<'a, leo_ast::ValueExpression> for Constant<'a> { _scope: &'a Scope<'a>, value: &leo_ast::ValueExpression, expected_type: Option>, - ) -> Result, AsgConvertError> { + ) -> Result, LeoError> { use leo_ast::ValueExpression::*; Ok(match value { Address(value, span) => { match expected_type.map(PartialType::full).flatten() { Some(Type::Address) | None => (), Some(x) => { - return Err(AsgConvertError::unexpected_type( + return Err(LeoError::from(AsgError::unexpected_type( &x.to_string(), Some(&*Type::Address.to_string()), span, - )); + ))); } } Constant { @@ -102,11 +102,11 @@ impl<'a> FromAst<'a, leo_ast::ValueExpression> for Constant<'a> { match expected_type.map(PartialType::full).flatten() { Some(Type::Boolean) | None => (), Some(x) => { - return Err(AsgConvertError::unexpected_type( + return Err(LeoError::from(AsgError::unexpected_type( &x.to_string(), Some(&*Type::Boolean.to_string()), span, - )); + ))); } } Constant { @@ -115,7 +115,7 @@ impl<'a> FromAst<'a, leo_ast::ValueExpression> for Constant<'a> { value: ConstValue::Boolean( value .parse::() - .map_err(|_| AsgConvertError::invalid_boolean(&value, span))?, + .map_err(|_| LeoError::from(AsgError::invalid_boolean(&value, span)))?, ), } } @@ -123,11 +123,11 @@ impl<'a> FromAst<'a, leo_ast::ValueExpression> for Constant<'a> { match expected_type.map(PartialType::full).flatten() { Some(Type::Char) | None => (), Some(x) => { - return Err(AsgConvertError::unexpected_type( + return Err(LeoError::from(AsgError::unexpected_type( &x.to_string(), Some(&*Type::Char.to_string()), value.span(), - )); + ))); } } @@ -141,28 +141,32 @@ impl<'a> FromAst<'a, leo_ast::ValueExpression> for Constant<'a> { match expected_type.map(PartialType::full).flatten() { Some(Type::Field) | None => (), Some(x) => { - return Err(AsgConvertError::unexpected_type( + return Err(LeoError::from(AsgError::unexpected_type( &x.to_string(), Some(&*Type::Field.to_string()), span, - )); + ))); } } Constant { parent: Cell::new(None), span: Some(span.clone()), - value: ConstValue::Field(value.parse().map_err(|_| AsgConvertError::invalid_int(&value, span))?), + value: ConstValue::Field( + value + .parse() + .map_err(|_| LeoError::from(AsgError::invalid_int(&value, span)))?, + ), } } Group(value) => { match expected_type.map(PartialType::full).flatten() { Some(Type::Group) | None => (), Some(x) => { - return Err(AsgConvertError::unexpected_type( + return Err(LeoError::from(AsgError::unexpected_type( &x.to_string(), Some(&*Type::Group.to_string()), value.span(), - )); + ))); } } Constant { @@ -177,7 +181,7 @@ impl<'a> FromAst<'a, leo_ast::ValueExpression> for Constant<'a> { } } Implicit(value, span) => match expected_type { - None => return Err(AsgConvertError::unresolved_type("unknown", span)), + None => return Err(LeoError::from(AsgError::unresolved_type("unknown", span))), Some(PartialType::Integer(Some(sub_type), _)) | Some(PartialType::Integer(None, Some(sub_type))) => { Constant { parent: Cell::new(None), @@ -188,7 +192,11 @@ impl<'a> FromAst<'a, leo_ast::ValueExpression> for Constant<'a> { Some(PartialType::Type(Type::Field)) => Constant { parent: Cell::new(None), span: Some(span.clone()), - value: ConstValue::Field(value.parse().map_err(|_| AsgConvertError::invalid_int(&value, span))?), + value: ConstValue::Field( + value + .parse() + .map_err(|_| LeoError::from(AsgError::invalid_int(&value, span)))?, + ), }, Some(PartialType::Type(Type::Group)) => Constant { parent: Cell::new(None), @@ -200,7 +208,13 @@ impl<'a> FromAst<'a, leo_ast::ValueExpression> for Constant<'a> { span: Some(span.clone()), value: ConstValue::Address(value.clone()), }, - Some(x) => return Err(AsgConvertError::unexpected_type(&x.to_string(), Some("unknown"), span)), + Some(x) => { + return Err(LeoError::from(AsgError::unexpected_type( + &x.to_string(), + Some("unknown"), + span, + ))); + } }, Integer(int_type, value, span) => { match expected_type { @@ -208,11 +222,11 @@ impl<'a> FromAst<'a, leo_ast::ValueExpression> for Constant<'a> { Some(PartialType::Integer(None, Some(_))) => (), None => (), Some(x) => { - return Err(AsgConvertError::unexpected_type( + return Err(LeoError::from(AsgError::unexpected_type( &x.to_string(), Some(&*int_type.to_string()), span, - )); + ))); } } Constant { diff --git a/asg/src/expression/mod.rs b/asg/src/expression/mod.rs index 4778e3b6a6..2965b0927a 100644 --- a/asg/src/expression/mod.rs +++ b/asg/src/expression/mod.rs @@ -65,7 +65,8 @@ pub use variable_ref::*; mod cast; pub use cast::*; -use crate::{AsgConvertError, ConstValue, FromAst, Node, PartialType, Scope, Span, Type}; +use crate::{ConstValue, FromAst, Node, PartialType, Scope, Type}; +use leo_errors::{LeoError, Span}; #[derive(Clone)] pub enum Expression<'a> { @@ -284,7 +285,7 @@ impl<'a> FromAst<'a, leo_ast::Expression> for &'a Expression<'a> { scope: &'a Scope<'a>, value: &leo_ast::Expression, expected_type: Option>, - ) -> Result { + ) -> Result { use leo_ast::Expression::*; let expression = match value { Identifier(identifier) => Self::from_ast(scope, identifier, expected_type)?, diff --git a/asg/src/expression/ternary.rs b/asg/src/expression/ternary.rs index ee071f05e8..faee9fa739 100644 --- a/asg/src/expression/ternary.rs +++ b/asg/src/expression/ternary.rs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{AsgConvertError, ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Span, Type}; +use crate::{ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Type}; +use leo_errors::{AsgError, LeoError, Span}; use std::cell::Cell; @@ -78,7 +79,7 @@ impl<'a> FromAst<'a, leo_ast::TernaryExpression> for TernaryExpression<'a> { scope: &'a Scope<'a>, value: &leo_ast::TernaryExpression, expected_type: Option>, - ) -> Result, AsgConvertError> { + ) -> Result, LeoError> { let if_true = Cell::new(<&Expression<'a>>::from_ast( scope, &*value.if_true, @@ -90,11 +91,11 @@ impl<'a> FromAst<'a, leo_ast::TernaryExpression> for TernaryExpression<'a> { let right = if_false.get().get_type().unwrap().into(); if left != right { - return Err(AsgConvertError::ternary_different_types( + return Err(LeoError::from(AsgError::ternary_different_types( &left.to_string(), &right.to_string(), &value.span, - )); + ))); } Ok(TernaryExpression { diff --git a/asg/src/expression/tuple_access.rs b/asg/src/expression/tuple_access.rs index fc21c08def..e556022411 100644 --- a/asg/src/expression/tuple_access.rs +++ b/asg/src/expression/tuple_access.rs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{AsgConvertError, ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Span, Type}; +use crate::{ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Type}; +use leo_errors::{AsgError, LeoError, Span}; use std::cell::Cell; @@ -74,12 +75,12 @@ impl<'a> FromAst<'a, leo_ast::TupleAccessExpression> for TupleAccessExpression<' scope: &'a Scope<'a>, value: &leo_ast::TupleAccessExpression, expected_type: Option>, - ) -> Result, AsgConvertError> { + ) -> Result, LeoError> { let index = value .index .value .parse::() - .map_err(|_| AsgConvertError::parse_index_error())?; + .map_err(|_| LeoError::from(AsgError::parse_index_error(&value.span)))?; let mut expected_tuple = vec![None; index + 1]; expected_tuple[index] = expected_type; @@ -88,11 +89,11 @@ impl<'a> FromAst<'a, leo_ast::TupleAccessExpression> for TupleAccessExpression<' let tuple_type = tuple.get_type(); if let Some(Type::Tuple(_items)) = tuple_type { } else { - return Err(AsgConvertError::unexpected_type( + return Err(LeoError::from(AsgError::unexpected_type( "a tuple", tuple_type.map(|x| x.to_string()).as_deref(), &value.span, - )); + ))); } Ok(TupleAccessExpression { diff --git a/asg/src/expression/tuple_init.rs b/asg/src/expression/tuple_init.rs index 90397989de..e10d93d82b 100644 --- a/asg/src/expression/tuple_init.rs +++ b/asg/src/expression/tuple_init.rs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{AsgConvertError, ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Span, Type}; +use crate::{ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Type}; +use leo_errors::{AsgError, LeoError, Span}; use std::cell::Cell; @@ -80,16 +81,16 @@ impl<'a> FromAst<'a, leo_ast::TupleInitExpression> for TupleInitExpression<'a> { scope: &'a Scope<'a>, value: &leo_ast::TupleInitExpression, expected_type: Option>, - ) -> Result, AsgConvertError> { + ) -> Result, LeoError> { let tuple_types = match expected_type { Some(PartialType::Tuple(sub_types)) => Some(sub_types), None => None, x => { - return Err(AsgConvertError::unexpected_type( + return Err(LeoError::from(AsgError::unexpected_type( "tuple", x.map(|x| x.to_string()).as_deref(), &value.span, - )); + ))); } }; @@ -97,11 +98,11 @@ impl<'a> FromAst<'a, leo_ast::TupleInitExpression> for TupleInitExpression<'a> { // Expected type can be equal or less than actual size of a tuple. // Size of expected tuple can be based on accessed index. if tuple_types.len() > value.elements.len() { - return Err(AsgConvertError::unexpected_type( + return Err(LeoError::from(AsgError::unexpected_type( &*format!("tuple of length {}", tuple_types.len()), Some(&*format!("tuple of length {}", value.elements.len())), &value.span, - )); + ))); } } @@ -117,7 +118,7 @@ impl<'a> FromAst<'a, leo_ast::TupleInitExpression> for TupleInitExpression<'a> { ) .map(Cell::new) }) - .collect::, AsgConvertError>>()?; + .collect::, LeoError>>()?; Ok(TupleInitExpression { parent: Cell::new(None), diff --git a/asg/src/expression/unary.rs b/asg/src/expression/unary.rs index 4ccc7662a6..b6873644b3 100644 --- a/asg/src/expression/unary.rs +++ b/asg/src/expression/unary.rs @@ -14,8 +14,9 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{AsgConvertError, ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Span, Type}; +use crate::{ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Type}; pub use leo_ast::UnaryOperation; +use leo_errors::{AsgError, LeoError, Span}; use std::cell::Cell; @@ -89,16 +90,16 @@ impl<'a> FromAst<'a, leo_ast::UnaryExpression> for UnaryExpression<'a> { scope: &'a Scope<'a>, value: &leo_ast::UnaryExpression, expected_type: Option>, - ) -> Result, AsgConvertError> { + ) -> Result, LeoError> { let expected_type = match value.op { UnaryOperation::Not => match expected_type.map(|x| x.full()).flatten() { Some(Type::Boolean) | None => Some(Type::Boolean), Some(type_) => { - return Err(AsgConvertError::unexpected_type( + return Err(LeoError::from(AsgError::unexpected_type( &type_.to_string(), Some(&*Type::Boolean.to_string()), &value.span, - )); + ))); } }, UnaryOperation::Negate => match expected_type.map(|x| x.full()).flatten() { @@ -107,22 +108,22 @@ impl<'a> FromAst<'a, leo_ast::UnaryExpression> for UnaryExpression<'a> { Some(Type::Field) => Some(Type::Field), None => None, Some(type_) => { - return Err(AsgConvertError::unexpected_type( + return Err(LeoError::from(AsgError::unexpected_type( &type_.to_string(), Some("integer, group, field"), &value.span, - )); + ))); } }, UnaryOperation::BitNot => match expected_type.map(|x| x.full()).flatten() { Some(type_ @ Type::Integer(_)) => Some(type_), None => None, Some(type_) => { - return Err(AsgConvertError::unexpected_type( + return Err(LeoError::from(AsgError::unexpected_type( &type_.to_string(), Some("integer"), &value.span, - )); + ))); } }, }; @@ -137,7 +138,7 @@ impl<'a> FromAst<'a, leo_ast::UnaryExpression> for UnaryExpression<'a> { }) .unwrap_or(false); if is_expr_unsigned { - return Err(AsgConvertError::unsigned_negation(&value.span)); + return Err(LeoError::from(AsgError::unsigned_negation(&value.span))); } } Ok(UnaryExpression { diff --git a/asg/src/expression/variable_ref.rs b/asg/src/expression/variable_ref.rs index 4a4e209223..40780c4045 100644 --- a/asg/src/expression/variable_ref.rs +++ b/asg/src/expression/variable_ref.rs @@ -15,7 +15,6 @@ // along with the Leo library. If not, see . use crate::{ - AsgConvertError, ConstValue, Constant, DefinitionStatement, @@ -25,12 +24,13 @@ use crate::{ Node, PartialType, Scope, - Span, Statement, Type, Variable, }; +use leo_errors::{AsgError, LeoError, Span}; + use std::cell::Cell; #[derive(Clone)] @@ -135,14 +135,15 @@ impl<'a> FromAst<'a, leo_ast::Identifier> for &'a Expression<'a> { scope: &'a Scope<'a>, value: &leo_ast::Identifier, expected_type: Option>, - ) -> Result<&'a Expression<'a>, AsgConvertError> { + ) -> Result<&'a Expression<'a>, LeoError> { let variable = if value.name.as_ref() == "input" { if let Some(input) = scope.resolve_input() { input.container } else { - return Err(AsgConvertError::InternalError( - "attempted to reference input when none is in scope".to_string(), - )); + return Err(LeoError::from(AsgError::illegal_input_variable_reference( + "attempted to reference input when none is in scope", + &value.span, + ))); } } else { match scope.resolve_variable(&value.name) { @@ -155,7 +156,7 @@ impl<'a> FromAst<'a, leo_ast::Identifier> for &'a Expression<'a> { value: ConstValue::Address(value.name.clone()), }))); } - return Err(AsgConvertError::unresolved_reference(&value.name, &value.span)); + return Err(LeoError::from(AsgError::unresolved_reference(&value.name, &value.span))); } } }; @@ -170,13 +171,13 @@ impl<'a> FromAst<'a, leo_ast::Identifier> for &'a Expression<'a> { if let Some(expected_type) = expected_type { let type_ = expression .get_type() - .ok_or_else(|| AsgConvertError::unresolved_reference(&value.name, &value.span))?; + .ok_or_else(|| LeoError::from(AsgError::unresolved_reference(&value.name, &value.span)))?; if !expected_type.matches(&type_) { - return Err(AsgConvertError::unexpected_type( + return Err(LeoError::from(AsgError::unexpected_type( &expected_type.to_string(), Some(&*type_.to_string()), &value.span, - )); + ))); } } diff --git a/asg/src/import.rs b/asg/src/import.rs index 4dc3c5ae43..5fbb9fd42e 100644 --- a/asg/src/import.rs +++ b/asg/src/import.rs @@ -18,7 +18,8 @@ use std::marker::PhantomData; -use crate::{AsgContext, AsgConvertError, Program, Span}; +use crate::{AsgContext, Program}; +use leo_errors::{LeoError, Span}; use indexmap::IndexMap; @@ -28,7 +29,7 @@ pub trait ImportResolver<'a> { context: AsgContext<'a>, package_segments: &[&str], span: &Span, - ) -> Result>, AsgConvertError>; + ) -> Result>, LeoError>; } pub struct NullImportResolver; @@ -39,7 +40,7 @@ impl<'a> ImportResolver<'a> for NullImportResolver { _context: AsgContext<'a>, _package_segments: &[&str], _span: &Span, - ) -> Result>, AsgConvertError> { + ) -> Result>, LeoError> { Ok(None) } } @@ -64,7 +65,7 @@ impl<'a, 'b, T: ImportResolver<'b>> ImportResolver<'b> for CoreImportResolver<'a context: AsgContext<'b>, package_segments: &[&str], span: &Span, - ) -> Result>, AsgConvertError> { + ) -> Result>, LeoError> { if !package_segments.is_empty() && package_segments.get(0).unwrap() == &"core" { Ok(crate::resolve_core_module(context, &*package_segments[1..].join("."))?) } else { @@ -83,7 +84,7 @@ impl<'a> ImportResolver<'a> for MockedImportResolver<'a> { _context: AsgContext<'a>, package_segments: &[&str], _span: &Span, - ) -> Result>, AsgConvertError> { + ) -> Result>, LeoError> { Ok(self.packages.get(&package_segments.join(".")).cloned()) } } diff --git a/asg/src/input.rs b/asg/src/input.rs index b22ee2f8b9..625500ed0f 100644 --- a/asg/src/input.rs +++ b/asg/src/input.rs @@ -15,6 +15,7 @@ // along with the Leo library. If not, see . use crate::{Circuit, CircuitMember, Identifier, Scope, Type, Variable}; +use leo_errors::Span; use indexmap::IndexMap; use std::cell::RefCell; @@ -44,7 +45,7 @@ impl<'a> Input<'a> { members: RefCell::new(IndexMap::new()), core_mapping: RefCell::new(None), scope, - span: Default::default(), + span: Some(Span::default()), }) } @@ -73,7 +74,7 @@ impl<'a> Input<'a> { members: RefCell::new(container_members), core_mapping: RefCell::new(None), scope: input_scope, - span: Default::default(), + span: Some(Span::default()), }); Input { diff --git a/asg/src/lib.rs b/asg/src/lib.rs index 0c74b6f3cd..218fa93267 100644 --- a/asg/src/lib.rs +++ b/asg/src/lib.rs @@ -25,18 +25,12 @@ #![allow(clippy::from_over_into)] #![allow(clippy::result_unit_err)] -#[macro_use] -extern crate thiserror; - pub mod checks; pub use checks::*; pub mod const_value; pub use const_value::*; -pub mod error; -pub use error::*; - pub mod expression; pub use expression::*; @@ -77,7 +71,8 @@ pub use pass::*; pub mod context; pub use context::*; -pub use leo_ast::{Ast, Identifier, Span}; +pub use leo_ast::{Ast, Identifier}; +use leo_errors::LeoError; /// The abstract semantic graph (ASG) for a Leo program. /// @@ -97,7 +92,7 @@ impl<'a> Asg<'a> { context: AsgContext<'a>, ast: Y, resolver: &mut T, - ) -> Result { + ) -> Result { Ok(Self { context, asg: Program::new(context, ast.as_ref(), resolver)?, @@ -130,7 +125,7 @@ pub fn load_asg<'a, T: ImportResolver<'a>>( context: AsgContext<'a>, content: &str, resolver: &mut T, -) -> Result, AsgConvertError> { +) -> Result, LeoError> { // Parses the Leo file and constructs a grammar ast. let ast = leo_parser::parse_ast("input.leo", content)?; diff --git a/asg/src/node.rs b/asg/src/node.rs index 4272c5669a..9079a2d914 100644 --- a/asg/src/node.rs +++ b/asg/src/node.rs @@ -14,18 +14,9 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{ - AsgContextInner, - AsgConvertError, - Circuit, - Expression, - Function, - PartialType, - Scope, - Span, - Statement, - Variable, -}; +use crate::{AsgContextInner, Circuit, Expression, Function, PartialType, Scope, Statement, Variable}; + +use leo_errors::{LeoError, Span}; /// A node in the abstract semantic graph. pub trait Node { @@ -35,11 +26,7 @@ pub trait Node { pub(super) trait FromAst<'a, T: leo_ast::Node + 'static>: Sized { // expected_type contract: if present, output expression must be of type expected_type. // type of an element may NEVER be None unless it is functionally a non-expression. (static call targets, function ref call targets are not expressions) - fn from_ast( - scope: &'a Scope<'a>, - value: &T, - expected_type: Option>, - ) -> Result; + fn from_ast(scope: &'a Scope<'a>, value: &T, expected_type: Option>) -> Result; } pub enum ArenaNode<'a> { diff --git a/asg/src/pass.rs b/asg/src/pass.rs index 69dd68b4e8..9406e1c14e 100644 --- a/asg/src/pass.rs +++ b/asg/src/pass.rs @@ -15,8 +15,8 @@ // along with the Leo library. If not, see . use crate::Program; -pub use leo_ast::FormattedError; +use leo_errors::LeoError; pub trait AsgPass<'a> { - fn do_pass(asg: Program<'a>) -> Result, FormattedError>; + fn do_pass(asg: Program<'a>) -> Result, LeoError>; } diff --git a/asg/src/prelude.rs b/asg/src/prelude.rs index d4a2faffbc..4f32330c05 100644 --- a/asg/src/prelude.rs +++ b/asg/src/prelude.rs @@ -16,12 +16,13 @@ // TODO (protryon): We should merge this with core -use crate::{AsgContext, AsgConvertError, Program}; +use crate::{AsgContext, Program}; +use leo_errors::LeoError; // TODO (protryon): Make asg deep copy so we can cache resolved core modules // TODO (protryon): Figure out how to do headers without bogus returns -pub fn resolve_core_module<'a>(context: AsgContext<'a>, module: &str) -> Result>, AsgConvertError> { +pub fn resolve_core_module<'a>(context: AsgContext<'a>, module: &str) -> Result>, LeoError> { match module { "unstable.blake2s" => { let asg = crate::load_asg( diff --git a/asg/src/program/circuit.rs b/asg/src/program/circuit.rs index 4ef8bb57ff..0c89eb4489 100644 --- a/asg/src/program/circuit.rs +++ b/asg/src/program/circuit.rs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{AsgConvertError, Function, Identifier, Node, Scope, Span, Type}; +use crate::{Function, Identifier, Node, Scope, Type}; +use leo_errors::{AsgError, LeoError, Span}; use indexmap::IndexMap; use std::cell::RefCell; @@ -53,7 +54,7 @@ impl<'a> Node for Circuit<'a> { } impl<'a> Circuit<'a> { - pub(super) fn init(scope: &'a Scope<'a>, value: &leo_ast::Circuit) -> Result<&'a Circuit<'a>, AsgConvertError> { + pub(super) fn init(scope: &'a Scope<'a>, value: &leo_ast::Circuit) -> Result<&'a Circuit<'a>, LeoError> { let new_scope = scope.make_subscope(); let circuit = scope.context.alloc_circuit(Circuit { @@ -70,15 +71,15 @@ impl<'a> Circuit<'a> { for member in value.members.iter() { if let leo_ast::CircuitMember::CircuitVariable(name, type_) = member { if members.contains_key(name.name.as_ref()) { - return Err(AsgConvertError::redefined_circuit_member( + return Err(LeoError::from(AsgError::redefined_circuit_member( &value.circuit_name.name, &name.name, &name.span, - )); + ))); } members.insert( name.name.to_string(), - CircuitMember::Variable(new_scope.resolve_ast_type(type_)?), + CircuitMember::Variable(new_scope.resolve_ast_type(type_, &name.span)?), ); } } @@ -86,10 +87,7 @@ impl<'a> Circuit<'a> { Ok(circuit) } - pub(super) fn init_member( - scope: &'a Scope<'a>, - value: &leo_ast::Circuit, - ) -> Result<&'a Circuit<'a>, AsgConvertError> { + pub(super) fn init_member(scope: &'a Scope<'a>, value: &leo_ast::Circuit) -> Result<&'a Circuit<'a>, LeoError> { let new_scope = scope.make_subscope(); let circuits = scope.circuits.borrow(); @@ -100,16 +98,18 @@ impl<'a> Circuit<'a> { for member in value.members.iter() { if let leo_ast::CircuitMember::CircuitFunction(function) = member { if members.contains_key(function.identifier.name.as_ref()) { - return Err(AsgConvertError::redefined_circuit_member( + return Err(LeoError::from(AsgError::redefined_circuit_member( &value.circuit_name.name, &function.identifier.name, &function.identifier.span, - )); + ))); } let asg_function = Function::init(new_scope, function)?; asg_function.circuit.replace(Some(circuit)); if asg_function.is_test() { - return Err(AsgConvertError::circuit_test_function(&function.identifier.span)); + return Err(LeoError::from(AsgError::circuit_test_function( + &function.identifier.span, + ))); } members.insert( function.identifier.name.to_string(), @@ -121,7 +121,7 @@ impl<'a> Circuit<'a> { Ok(circuit) } - pub(super) fn fill_from_ast(self: &'a Circuit<'a>, value: &leo_ast::Circuit) -> Result<(), AsgConvertError> { + pub(super) fn fill_from_ast(self: &'a Circuit<'a>, value: &leo_ast::Circuit) -> Result<(), LeoError> { for member in value.members.iter() { match member { leo_ast::CircuitMember::CircuitVariable(..) => {} diff --git a/asg/src/program/function.rs b/asg/src/program/function.rs index bf89b0020f..dc2507a004 100644 --- a/asg/src/program/function.rs +++ b/asg/src/program/function.rs @@ -15,7 +15,6 @@ // along with the Leo library. If not, see . use crate::{ - AsgConvertError, BlockStatement, Circuit, FromAst, @@ -23,7 +22,6 @@ use crate::{ MonoidalDirector, ReturnPathReducer, Scope, - Span, Statement, Type, Variable, @@ -31,6 +29,7 @@ use crate::{ use indexmap::IndexMap; pub use leo_ast::Annotation; use leo_ast::FunctionInput; +use leo_errors::{AsgError, LeoError, Span}; use std::cell::{Cell, RefCell}; @@ -68,11 +67,11 @@ impl<'a> PartialEq for Function<'a> { impl<'a> Eq for Function<'a> {} impl<'a> Function<'a> { - pub(crate) fn init(scope: &'a Scope<'a>, value: &leo_ast::Function) -> Result<&'a Function<'a>, AsgConvertError> { + pub(crate) fn init(scope: &'a Scope<'a>, value: &leo_ast::Function) -> Result<&'a Function<'a>, LeoError> { let output: Type<'a> = value .output .as_ref() - .map(|t| scope.resolve_ast_type(t)) + .map(|t| scope.resolve_ast_type(t, &value.span)) .transpose()? .unwrap_or_else(|| Type::Tuple(vec![])); let mut qualifier = FunctionQualifier::Static; @@ -101,7 +100,7 @@ impl<'a> Function<'a> { let variable = scope.context.alloc_variable(RefCell::new(crate::InnerVariable { id: scope.context.get_id(), name: identifier.clone(), - type_: scope.resolve_ast_type(&type_)?, + type_: scope.resolve_ast_type(&type_, &value.span)?, mutable: *mutable, const_: *const_, declaration: crate::VariableDeclaration::Parameter, @@ -114,7 +113,7 @@ impl<'a> Function<'a> { } } if qualifier != FunctionQualifier::Static && scope.circuit_self.get().is_none() { - return Err(AsgConvertError::invalid_self_in_global(&value.span)); + return Err(LeoError::from(AsgError::invalid_self_in_global(&value.span))); } let function = scope.context.alloc_function(Function { id: scope.context.get_id(), @@ -133,7 +132,7 @@ impl<'a> Function<'a> { Ok(function) } - pub(super) fn fill_from_ast(self: &'a Function<'a>, value: &leo_ast::Function) -> Result<(), AsgConvertError> { + pub(super) fn fill_from_ast(self: &'a Function<'a>, value: &leo_ast::Function) -> Result<(), LeoError> { if self.qualifier != FunctionQualifier::Static { let circuit = self.circuit.get(); let self_variable = self.scope.context.alloc_variable(RefCell::new(crate::InnerVariable { @@ -158,19 +157,19 @@ impl<'a> Function<'a> { let main_block = BlockStatement::from_ast(self.scope, &value.block, None)?; let mut director = MonoidalDirector::new(ReturnPathReducer::new()); if !director.reduce_block(&main_block).0 && !self.output.is_unit() { - return Err(AsgConvertError::function_missing_return( + return Err(LeoError::from(AsgError::function_missing_return( &self.name.borrow().name, &value.span, - )); + ))); } #[allow(clippy::never_loop)] // TODO @Protryon: How should we return multiple errors? for (span, error) in director.reducer().errors { - return Err(AsgConvertError::function_return_validation( + return Err(LeoError::from(AsgError::function_return_validation( &self.name.borrow().name, &error, &span, - )); + ))); } self.body diff --git a/asg/src/program/mod.rs b/asg/src/program/mod.rs index d6c00ef7e3..59c16a1153 100644 --- a/asg/src/program/mod.rs +++ b/asg/src/program/mod.rs @@ -24,18 +24,9 @@ pub use circuit::*; mod function; pub use function::*; -use crate::{ - node::FromAst, - ArenaNode, - AsgContext, - AsgConvertError, - DefinitionStatement, - ImportResolver, - Input, - Scope, - Statement, -}; -use leo_ast::{Identifier, PackageAccess, PackageOrPackages, Span}; +use crate::{node::FromAst, ArenaNode, AsgContext, DefinitionStatement, ImportResolver, Input, Scope, Statement}; +use leo_ast::{Identifier, PackageAccess, PackageOrPackages}; +use leo_errors::{AsgError, LeoError, Span}; use indexmap::IndexMap; use std::cell::{Cell, RefCell}; @@ -146,7 +137,7 @@ impl<'a> Program<'a> { context: AsgContext<'a>, program: &leo_ast::Program, import_resolver: &mut T, - ) -> Result, AsgConvertError> { + ) -> Result, LeoError> { // Recursively extract imported symbols. let mut imported_symbols: Vec<(Vec, ImportSymbol, Span)> = vec![]; for import in program.imports.iter() { @@ -172,7 +163,12 @@ impl<'a> Program<'a> { span, )? { Some(x) => x, - None => return Err(AsgConvertError::unresolved_import(&*pretty_package, &Span::default())), + None => { + return Err(LeoError::from(AsgError::unresolved_import( + &*pretty_package, + &Span::default(), + ))); + } }; resolved_packages.insert(package.clone(), resolved_package); @@ -203,10 +199,10 @@ impl<'a> Program<'a> { } else if let Some(global_const) = resolved_package.global_consts.get(&name) { imported_global_consts.insert(name.clone(), *global_const); } else { - return Err(AsgConvertError::unresolved_import( + return Err(LeoError::from(AsgError::unresolved_import( &*format!("{}.{}", pretty_package, name), &span, - )); + ))); } } ImportSymbol::Alias(name, alias) => { @@ -217,10 +213,10 @@ impl<'a> Program<'a> { } else if let Some(global_const) = resolved_package.global_consts.get(&name) { imported_global_consts.insert(alias.clone(), *global_const); } else { - return Err(AsgConvertError::unresolved_import( + return Err(LeoError::from(AsgError::unresolved_import( &*format!("{}.{}", pretty_package, name), &span, - )); + ))); } } } @@ -285,7 +281,7 @@ impl<'a> Program<'a> { .for_each(|variable_name| assert!(name.contains(&variable_name.identifier.name.to_string()))); let gc = <&Statement<'a>>::from_ast(scope, global_const, None)?; if let Statement::Definition(gc) = gc { - scope.global_consts.borrow_mut().insert(name.clone(), gc); + scope.global_consts.borrow_mut().insert(name.clone(), &gc); } } @@ -311,7 +307,10 @@ impl<'a> Program<'a> { let name = name.name.to_string(); if functions.contains_key(&name) { - return Err(AsgConvertError::duplicate_function_definition(&name, &function.span)); + return Err(LeoError::from(AsgError::duplicate_function_definition( + &name, + &function.span, + ))); } functions.insert(name, asg_function); diff --git a/asg/src/scope.rs b/asg/src/scope.rs index 0582aa13c0..af5c8a79cd 100644 --- a/asg/src/scope.rs +++ b/asg/src/scope.rs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{AsgContext, AsgConvertError, Circuit, DefinitionStatement, Function, Input, Type, Variable}; +use crate::{AsgContext, Circuit, DefinitionStatement, Function, Input, Type, Variable}; +use leo_errors::{AsgError, LeoError, Span}; use indexmap::IndexMap; use std::cell::{Cell, RefCell}; @@ -173,7 +174,7 @@ impl<'a> Scope<'a> { /// /// Returns the type returned by the current scope. /// - pub fn resolve_ast_type(&self, type_: &leo_ast::Type) -> Result, AsgConvertError> { + pub fn resolve_ast_type(&self, type_: &leo_ast::Type, span: &Span) -> Result, LeoError> { use leo_ast::Type::*; Ok(match type_ { Address => Type::Address, @@ -183,12 +184,12 @@ impl<'a> Scope<'a> { Group => Type::Group, IntegerType(int_type) => Type::Integer(int_type.clone()), Array(sub_type, dimensions) => { - let mut item = Box::new(self.resolve_ast_type(&*sub_type)?); + let mut item = Box::new(self.resolve_ast_type(&*sub_type, span)?); for dimension in dimensions.0.iter().rev() { let dimension = dimension .value .parse::() - .map_err(|_| AsgConvertError::parse_index_error())?; + .map_err(|_| LeoError::from(AsgError::parse_index_error(span)))?; item = Box::new(Type::Array(item, dimension)); } *item @@ -196,20 +197,20 @@ impl<'a> Scope<'a> { Tuple(sub_types) => Type::Tuple( sub_types .iter() - .map(|x| self.resolve_ast_type(x)) - .collect::, AsgConvertError>>()?, + .map(|x| self.resolve_ast_type(x, span)) + .collect::, LeoError>>()?, ), Circuit(name) if name.name.as_ref() == "Self" => Type::Circuit( self.resolve_circuit_self() - .ok_or_else(|| AsgConvertError::unresolved_circuit(&name.name, &name.span))?, + .ok_or_else(|| LeoError::from(AsgError::unresolved_circuit(&name.name, &name.span)))?, ), SelfType => Type::Circuit( self.resolve_circuit_self() - .ok_or_else(AsgConvertError::reference_self_outside_circuit)?, + .ok_or_else(|| LeoError::from(AsgError::reference_self_outside_circuit(span)))?, ), Circuit(name) => Type::Circuit( self.resolve_circuit(&name.name) - .ok_or_else(|| AsgConvertError::unresolved_circuit(&name.name, &name.span))?, + .ok_or_else(|| LeoError::from(AsgError::unresolved_circuit(&name.name, &name.span)))?, ), }) } diff --git a/asg/src/statement/assign.rs b/asg/src/statement/assign.rs index e1f44b8210..ceef4f6141 100644 --- a/asg/src/statement/assign.rs +++ b/asg/src/statement/assign.rs @@ -15,7 +15,6 @@ // along with the Leo library. If not, see . use crate::{ - AsgConvertError, CircuitMember, ConstInt, ConstValue, @@ -27,13 +26,13 @@ use crate::{ Node, PartialType, Scope, - Span, Statement, Type, Variable, }; pub use leo_ast::AssignOperation; use leo_ast::AssigneeAccess as AstAssigneeAccess; +use leo_errors::{AsgError, LeoError, Span}; use std::cell::Cell; @@ -66,25 +65,26 @@ impl<'a> FromAst<'a, leo_ast::AssignStatement> for &'a Statement<'a> { scope: &'a Scope<'a>, statement: &leo_ast::AssignStatement, _expected_type: Option>, - ) -> Result { + ) -> Result { let (name, span) = (&statement.assignee.identifier.name, &statement.assignee.identifier.span); let variable = if name.as_ref() == "input" { if let Some(input) = scope.resolve_input() { input.container } else { - return Err(AsgConvertError::InternalError( - "attempted to reference input when none is in scope".to_string(), - )); + return Err(LeoError::from(AsgError::illegal_input_variable_reference( + "attempted to reference input when none is in scope", + &statement.span, + ))); } } else { scope .resolve_variable(&name) - .ok_or_else(|| AsgConvertError::unresolved_reference(name, &span))? + .ok_or_else(|| LeoError::from(AsgError::unresolved_reference(name, &span)))? }; if !variable.borrow().mutable { - return Err(AsgConvertError::immutable_assignment(&name, &statement.span)); + return Err(LeoError::from(AsgError::immutable_assignment(&name, &statement.span))); } let mut target_type: Option = Some(variable.borrow().type_.clone().into()); @@ -95,19 +95,15 @@ impl<'a> FromAst<'a, leo_ast::AssignStatement> for &'a Statement<'a> { let index_type = Some(PartialType::Integer(None, Some(IntegerType::U32))); let left = left .as_ref() - .map( - |left: &leo_ast::Expression| -> Result<&'a Expression<'a>, AsgConvertError> { - <&Expression<'a>>::from_ast(scope, left, index_type.clone()) - }, - ) + .map(|left: &leo_ast::Expression| -> Result<&'a Expression<'a>, LeoError> { + <&Expression<'a>>::from_ast(scope, left, index_type.clone()) + }) .transpose()?; let right = right .as_ref() - .map( - |right: &leo_ast::Expression| -> Result<&'a Expression<'a>, AsgConvertError> { - <&Expression<'a>>::from_ast(scope, right, index_type) - }, - ) + .map(|right: &leo_ast::Expression| -> Result<&'a Expression<'a>, LeoError> { + <&Expression<'a>>::from_ast(scope, right, index_type) + }) .transpose()?; match &target_type { @@ -123,29 +119,37 @@ impl<'a> FromAst<'a, leo_ast::AssignStatement> for &'a Statement<'a> { ) { let left = match left { ConstValue::Int(x) => x.to_usize().ok_or_else(|| { - AsgConvertError::invalid_assign_index(&name, &x.to_string(), &statement.span) + LeoError::from(AsgError::invalid_assign_index( + &name, + &x.to_string(), + &statement.span, + )) })?, _ => unimplemented!(), }; let right = match right { ConstValue::Int(x) => x.to_usize().ok_or_else(|| { - AsgConvertError::invalid_assign_index(&name, &x.to_string(), &statement.span) + LeoError::from(AsgError::invalid_assign_index( + &name, + &x.to_string(), + &statement.span, + )) })?, _ => unimplemented!(), }; if right >= left { target_type = Some(PartialType::Array(item.clone(), Some((right - left) as usize))) } else { - return Err(AsgConvertError::invalid_backwards_assignment( + return Err(LeoError::from(AsgError::invalid_backwards_assignment( &name, left, right, &statement.span, - )); + ))); } } } - _ => return Err(AsgConvertError::index_into_non_array(&name, &statement.span)), + _ => return Err(LeoError::from(AsgError::index_into_non_array(&name, &statement.span))), } AssignAccess::ArrayRange(Cell::new(left), Cell::new(right)) @@ -153,7 +157,7 @@ impl<'a> FromAst<'a, leo_ast::AssignStatement> for &'a Statement<'a> { AstAssigneeAccess::ArrayIndex(index) => { target_type = match target_type.clone() { Some(PartialType::Array(item, _)) => item.map(|x| *x), - _ => return Err(AsgConvertError::index_into_non_array(&name, &statement.span)), + _ => return Err(LeoError::from(AsgError::index_into_non_array(&name, &statement.span))), }; AssignAccess::ArrayIndex(Cell::new(<&Expression<'a>>::from_ast( scope, @@ -161,17 +165,16 @@ impl<'a> FromAst<'a, leo_ast::AssignStatement> for &'a Statement<'a> { Some(PartialType::Integer(None, Some(IntegerType::U32))), )?)) } - AstAssigneeAccess::Tuple(index, _) => { + AstAssigneeAccess::Tuple(index, span) => { let index = index .value .parse::() - .map_err(|_| AsgConvertError::parse_index_error())?; + .map_err(|_| LeoError::from(AsgError::parse_index_error(&span)))?; target_type = match target_type { - Some(PartialType::Tuple(types)) => types - .get(index) - .cloned() - .ok_or_else(|| AsgConvertError::tuple_index_out_of_bounds(index, &statement.span))?, - _ => return Err(AsgConvertError::index_into_non_tuple(&name, &statement.span)), + Some(PartialType::Tuple(types)) => types.get(index).cloned().ok_or_else(|| { + LeoError::from(AsgError::tuple_index_out_of_bounds(index, &statement.span)) + })?, + _ => return Err(LeoError::from(AsgError::index_into_non_tuple(&name, &statement.span))), }; AssignAccess::Tuple(index) } @@ -182,26 +185,29 @@ impl<'a> FromAst<'a, leo_ast::AssignStatement> for &'a Statement<'a> { let members = circuit.members.borrow(); let member = members.get(name.name.as_ref()).ok_or_else(|| { - AsgConvertError::unresolved_circuit_member( + LeoError::from(AsgError::unresolved_circuit_member( &circuit.name.borrow().name, &name.name, &statement.span, - ) + )) })?; let x = match &member { CircuitMember::Variable(type_) => type_.clone(), CircuitMember::Function(_) => { - return Err(AsgConvertError::illegal_function_assign(&name.name, &statement.span)); + return Err(LeoError::from(AsgError::illegal_function_assign( + &name.name, + &statement.span, + ))); } }; Some(x.partial()) } _ => { - return Err(AsgConvertError::index_into_non_tuple( + return Err(LeoError::from(AsgError::index_into_non_tuple( &statement.assignee.identifier.name, &statement.span, - )); + ))); } }; AssignAccess::Member(name.clone()) diff --git a/asg/src/statement/block.rs b/asg/src/statement/block.rs index 9a64fcdfb9..8834e49b30 100644 --- a/asg/src/statement/block.rs +++ b/asg/src/statement/block.rs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{AsgConvertError, FromAst, Node, PartialType, Scope, Span, Statement}; +use crate::{FromAst, Node, PartialType, Scope, Statement}; +use leo_errors::{LeoError, Span}; use std::cell::Cell; @@ -37,7 +38,7 @@ impl<'a> FromAst<'a, leo_ast::Block> for BlockStatement<'a> { scope: &'a Scope<'a>, statement: &leo_ast::Block, _expected_type: Option>, - ) -> Result { + ) -> Result { let new_scope = scope.make_subscope(); let mut output = vec![]; diff --git a/asg/src/statement/conditional.rs b/asg/src/statement/conditional.rs index b468ce9d3c..87a2045eed 100644 --- a/asg/src/statement/conditional.rs +++ b/asg/src/statement/conditional.rs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{AsgConvertError, BlockStatement, Expression, FromAst, Node, PartialType, Scope, Span, Statement, Type}; +use crate::{BlockStatement, Expression, FromAst, Node, PartialType, Scope, Statement, Type}; +use leo_errors::{LeoError, Span}; use std::cell::Cell; @@ -38,7 +39,7 @@ impl<'a> FromAst<'a, leo_ast::ConditionalStatement> for ConditionalStatement<'a> scope: &'a Scope<'a>, statement: &leo_ast::ConditionalStatement, _expected_type: Option>, - ) -> Result { + ) -> Result { let condition = <&Expression<'a>>::from_ast(scope, &statement.condition, Some(Type::Boolean.into()))?; let result = scope.context.alloc_statement(Statement::Block(BlockStatement::from_ast( scope, @@ -48,9 +49,7 @@ impl<'a> FromAst<'a, leo_ast::ConditionalStatement> for ConditionalStatement<'a> let next = statement .next .as_deref() - .map(|next| -> Result<&'a Statement<'a>, AsgConvertError> { - <&'a Statement<'a>>::from_ast(scope, next, None) - }) + .map(|next| -> Result<&'a Statement<'a>, LeoError> { <&'a Statement<'a>>::from_ast(scope, next, None) }) .transpose()?; Ok(ConditionalStatement { diff --git a/asg/src/statement/console.rs b/asg/src/statement/console.rs index 5708576425..14b93ff86b 100644 --- a/asg/src/statement/console.rs +++ b/asg/src/statement/console.rs @@ -14,8 +14,9 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{AsgConvertError, CharValue, Expression, FromAst, Node, PartialType, Scope, Span, Statement, Type}; +use crate::{CharValue, Expression, FromAst, Node, PartialType, Scope, Statement, Type}; use leo_ast::ConsoleFunction as AstConsoleFunction; +use leo_errors::{LeoError, Span}; use std::cell::Cell; @@ -52,7 +53,7 @@ impl<'a> FromAst<'a, leo_ast::ConsoleArgs> for ConsoleArgs<'a> { scope: &'a Scope<'a>, value: &leo_ast::ConsoleArgs, _expected_type: Option>, - ) -> Result { + ) -> Result { let mut parameters = vec![]; for parameter in value.parameters.iter() { parameters.push(Cell::new(<&Expression<'a>>::from_ast(scope, parameter, None)?)); @@ -80,7 +81,7 @@ impl<'a> FromAst<'a, leo_ast::ConsoleStatement> for ConsoleStatement<'a> { scope: &'a Scope<'a>, statement: &leo_ast::ConsoleStatement, _expected_type: Option>, - ) -> Result { + ) -> Result { Ok(ConsoleStatement { parent: Cell::new(None), span: Some(statement.span.clone()), diff --git a/asg/src/statement/definition.rs b/asg/src/statement/definition.rs index f340052409..72f1daf70e 100644 --- a/asg/src/statement/definition.rs +++ b/asg/src/statement/definition.rs @@ -14,20 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{ - AsgConvertError, - Expression, - ExpressionNode, - FromAst, - InnerVariable, - Node, - PartialType, - Scope, - Span, - Statement, - Type, - Variable, -}; +use crate::{Expression, ExpressionNode, FromAst, InnerVariable, Node, PartialType, Scope, Statement, Type, Variable}; +use leo_errors::{AsgError, LeoError, Span}; use std::cell::{Cell, RefCell}; @@ -66,11 +54,11 @@ impl<'a> FromAst<'a, leo_ast::DefinitionStatement> for &'a Statement<'a> { scope: &'a Scope<'a>, statement: &leo_ast::DefinitionStatement, _expected_type: Option>, - ) -> Result { + ) -> Result { let type_ = statement .type_ .as_ref() - .map(|x| scope.resolve_ast_type(&x)) + .map(|x| scope.resolve_ast_type(&x, &statement.span)) .transpose()?; let value = <&Expression<'a>>::from_ast(scope, &statement.value, type_.clone().map(Into::into))?; @@ -83,7 +71,10 @@ impl<'a> FromAst<'a, leo_ast::DefinitionStatement> for &'a Statement<'a> { .collect::>() .join(" ,"); - return Err(AsgConvertError::invalid_const_assign(&var_names, &statement.span)); + return Err(LeoError::from(AsgError::invalid_const_assign( + &var_names, + &statement.span, + ))); } let type_ = type_.or_else(|| value.get_type()); @@ -92,9 +83,10 @@ impl<'a> FromAst<'a, leo_ast::DefinitionStatement> for &'a Statement<'a> { let mut variables = vec![]; if statement.variable_names.is_empty() { - return Err(AsgConvertError::illegal_ast_structure( + return Err(LeoError::from(AsgError::illegal_ast_structure( "cannot have 0 variable names in destructuring tuple", - )); + &statement.span, + ))); } if statement.variable_names.len() == 1 { // any return type is fine @@ -106,11 +98,11 @@ impl<'a> FromAst<'a, leo_ast::DefinitionStatement> for &'a Statement<'a> { output_types.extend(sub_types.clone().into_iter().map(Some).collect::>()); } type_ => { - return Err(AsgConvertError::unexpected_type( + return Err(LeoError::from(AsgError::unexpected_type( &*format!("{}-ary tuple", statement.variable_names.len()), type_.map(|x| x.to_string()).as_deref(), &statement.span, - )); + ))); } } } @@ -119,8 +111,9 @@ impl<'a> FromAst<'a, leo_ast::DefinitionStatement> for &'a Statement<'a> { variables.push(&*scope.context.alloc_variable(RefCell::new(InnerVariable { id: scope.context.get_id(), name: variable.identifier.clone(), - type_: - type_.ok_or_else(|| AsgConvertError::unresolved_type(&variable.identifier.name, &statement.span))?, + type_: type_.ok_or_else(|| { + LeoError::from(AsgError::unresolved_type(&variable.identifier.name, &statement.span)) + })?, mutable: variable.mutable, const_: false, declaration: crate::VariableDeclaration::Definition, @@ -133,10 +126,10 @@ impl<'a> FromAst<'a, leo_ast::DefinitionStatement> for &'a Statement<'a> { let mut variables = scope.variables.borrow_mut(); let var_name = variable.borrow().name.name.to_string(); if variables.contains_key(&var_name) { - return Err(AsgConvertError::duplicate_variable_definition( + return Err(LeoError::from(AsgError::duplicate_variable_definition( &var_name, &statement.span, - )); + ))); } variables.insert(var_name, *variable); diff --git a/asg/src/statement/expression.rs b/asg/src/statement/expression.rs index f00c55c488..59264dce56 100644 --- a/asg/src/statement/expression.rs +++ b/asg/src/statement/expression.rs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{AsgConvertError, Expression, FromAst, Node, PartialType, Scope, Span, Statement}; +use crate::{Expression, FromAst, Node, PartialType, Scope, Statement}; +use leo_errors::{LeoError, Span}; use std::cell::Cell; @@ -36,7 +37,7 @@ impl<'a> FromAst<'a, leo_ast::ExpressionStatement> for ExpressionStatement<'a> { scope: &'a Scope<'a>, statement: &leo_ast::ExpressionStatement, _expected_type: Option>, - ) -> Result { + ) -> Result { let expression = <&Expression<'a>>::from_ast(scope, &statement.expression, None)?; Ok(ExpressionStatement { diff --git a/asg/src/statement/iteration.rs b/asg/src/statement/iteration.rs index 04d327606e..ca4f624713 100644 --- a/asg/src/statement/iteration.rs +++ b/asg/src/statement/iteration.rs @@ -16,19 +16,8 @@ use leo_ast::IntegerType; -use crate::{ - AsgConvertError, - Expression, - ExpressionNode, - FromAst, - InnerVariable, - Node, - PartialType, - Scope, - Span, - Statement, - Variable, -}; +use crate::{Expression, ExpressionNode, FromAst, InnerVariable, Node, PartialType, Scope, Statement, Variable}; +use leo_errors::{AsgError, LeoError, Span}; use std::cell::{Cell, RefCell}; @@ -54,21 +43,21 @@ impl<'a> FromAst<'a, leo_ast::IterationStatement> for &'a Statement<'a> { scope: &'a Scope<'a>, statement: &leo_ast::IterationStatement, _expected_type: Option>, - ) -> Result { + ) -> Result { let expected_index_type = Some(PartialType::Integer(Some(IntegerType::U32), None)); let start = <&Expression<'a>>::from_ast(scope, &statement.start, expected_index_type.clone())?; let stop = <&Expression<'a>>::from_ast(scope, &statement.stop, expected_index_type)?; // Return an error if start or stop is not constant. if !start.is_consty() { - return Err(AsgConvertError::unexpected_nonconst( + return Err(LeoError::from(AsgError::unexpected_nonconst( &start.span().cloned().unwrap_or_default(), - )); + ))); } if !stop.is_consty() { - return Err(AsgConvertError::unexpected_nonconst( + return Err(LeoError::from(AsgError::unexpected_nonconst( &stop.span().cloned().unwrap_or_default(), - )); + ))); } let variable = scope.context.alloc_variable(RefCell::new(InnerVariable { @@ -76,7 +65,7 @@ impl<'a> FromAst<'a, leo_ast::IterationStatement> for &'a Statement<'a> { name: statement.variable.clone(), type_: start .get_type() - .ok_or_else(|| AsgConvertError::unresolved_type(&statement.variable.name, &statement.span))?, + .ok_or_else(|| LeoError::from(AsgError::unresolved_type(&statement.variable.name, &statement.span)))?, mutable: false, const_: true, declaration: crate::VariableDeclaration::IterationDefinition, diff --git a/asg/src/statement/mod.rs b/asg/src/statement/mod.rs index c564eac4b8..9bdc059526 100644 --- a/asg/src/statement/mod.rs +++ b/asg/src/statement/mod.rs @@ -42,7 +42,8 @@ pub use iteration::*; mod return_; pub use return_::*; -use crate::{AsgConvertError, FromAst, Node, PartialType, Scope, Span}; +use crate::{FromAst, Node, PartialType, Scope}; +use leo_errors::{LeoError, Span}; #[derive(Clone)] pub enum Statement<'a> { @@ -79,7 +80,7 @@ impl<'a> FromAst<'a, leo_ast::Statement> for &'a Statement<'a> { scope: &'a Scope<'a>, value: &leo_ast::Statement, _expected_type: Option>, - ) -> Result<&'a Statement<'a>, AsgConvertError> { + ) -> Result<&'a Statement<'a>, LeoError> { use leo_ast::Statement::*; Ok(match value { Return(statement) => scope diff --git a/asg/src/statement/return_.rs b/asg/src/statement/return_.rs index fb6b640390..cc111f553e 100644 --- a/asg/src/statement/return_.rs +++ b/asg/src/statement/return_.rs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{AsgConvertError, Expression, FromAst, Node, PartialType, Scope, Span, Statement, Type}; +use crate::{Expression, FromAst, Node, PartialType, Scope, Statement, Type}; +use leo_errors::{LeoError, Span}; use std::cell::Cell; #[derive(Clone)] @@ -35,7 +36,7 @@ impl<'a> FromAst<'a, leo_ast::ReturnStatement> for ReturnStatement<'a> { scope: &'a Scope<'a>, statement: &leo_ast::ReturnStatement, _expected_type: Option>, - ) -> Result { + ) -> Result { let return_type: Option = scope .resolve_current_function() .map(|x| x.output.clone()) diff --git a/ast/Cargo.toml b/ast/Cargo.toml index c33cd7f912..4f817e48fd 100644 --- a/ast/Cargo.toml +++ b/ast/Cargo.toml @@ -21,6 +21,14 @@ edition = "2018" path = "../input" version = "1.5.3" +[dependencies.leo-errors] +path = "../errors" +version = "1.5.3" + +[dependencies.eyre] +version = "0.6.5" +default-features = false + [dependencies.indexmap] version = "1.7.0" features = [ "serde-1" ] diff --git a/ast/src/annotation.rs b/ast/src/annotation.rs index f58ff5ed7c..a9591c0cac 100644 --- a/ast/src/annotation.rs +++ b/ast/src/annotation.rs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{Identifier, Span}; +use crate::Identifier; +use leo_errors::Span; use serde::{Deserialize, Serialize}; use tendril::StrTendril; diff --git a/ast/src/chars/char_value.rs b/ast/src/chars/char_value.rs index 96d0f8f8c7..52be1583a2 100644 --- a/ast/src/chars/char_value.rs +++ b/ast/src/chars/char_value.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::common::span::Span; +use leo_errors::Span; use serde::{Deserialize, Serialize}; // use serde::de::{Deserialize as SerDeserialize, Deserializer}; diff --git a/ast/src/common/const_self_keyword.rs b/ast/src/common/const_self_keyword.rs index 52d361ae16..1836a9c6e5 100644 --- a/ast/src/common/const_self_keyword.rs +++ b/ast/src/common/const_self_keyword.rs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{Identifier, Node, Span}; +use crate::{Identifier, Node}; +use leo_errors::Span; use serde::{Deserialize, Serialize}; use std::fmt; diff --git a/ast/src/common/identifier.rs b/ast/src/common/identifier.rs index f4a571bbb8..43dd3ca997 100644 --- a/ast/src/common/identifier.rs +++ b/ast/src/common/identifier.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::Span; +use leo_errors::Span; use leo_input::common::Identifier as InputIdentifier; use tendril::StrTendril; diff --git a/ast/src/common/mod.rs b/ast/src/common/mod.rs index a1255ed0a0..4e67d47321 100644 --- a/ast/src/common/mod.rs +++ b/ast/src/common/mod.rs @@ -32,9 +32,6 @@ pub use positive_number::*; pub mod self_keyword; pub use self_keyword::*; -pub mod span; -pub use span::*; - pub mod spread_or_expression; pub use spread_or_expression::*; diff --git a/ast/src/common/mut_self_keyword.rs b/ast/src/common/mut_self_keyword.rs index d28c501be8..a314176720 100644 --- a/ast/src/common/mut_self_keyword.rs +++ b/ast/src/common/mut_self_keyword.rs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{Identifier, Node, Span}; +use crate::{Identifier, Node}; +use leo_errors::Span; use serde::{Deserialize, Serialize}; use std::fmt; diff --git a/ast/src/common/self_keyword.rs b/ast/src/common/self_keyword.rs index 06b6bb12a8..6aec795684 100644 --- a/ast/src/common/self_keyword.rs +++ b/ast/src/common/self_keyword.rs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{Identifier, Node, Span}; +use crate::{Identifier, Node}; +use leo_errors::Span; use serde::{Deserialize, Serialize}; use std::fmt; diff --git a/ast/src/common/spread_or_expression.rs b/ast/src/common/spread_or_expression.rs index b758d0b0ea..d060b60edd 100644 --- a/ast/src/common/spread_or_expression.rs +++ b/ast/src/common/spread_or_expression.rs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{Expression, Node, Span}; +use crate::{Expression, Node}; +use leo_errors::Span; use serde::{Deserialize, Serialize}; use std::fmt; diff --git a/ast/src/errors/mod.rs b/ast/src/errors/mod.rs index 776172bc11..ff53f73aae 100644 --- a/ast/src/errors/mod.rs +++ b/ast/src/errors/mod.rs @@ -13,20 +13,3 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . - -pub mod ast; -pub use ast::*; - -pub mod canonicalization; -pub use canonicalization::*; - -pub mod combiner; -pub use combiner::*; - -pub mod error; -pub use error::*; - -pub mod reducer; -pub use reducer::*; - -pub trait LeoError {} diff --git a/ast/src/expression/mod.rs b/ast/src/expression/mod.rs index 701efc50bc..a6537ac1cc 100644 --- a/ast/src/expression/mod.rs +++ b/ast/src/expression/mod.rs @@ -20,16 +20,16 @@ use crate::{ GroupValue, Identifier, IntegerType, + Node, PositiveNumber, - Span, SpreadOrExpression, }; +use leo_errors::Span; + use serde::{Deserialize, Serialize}; use std::fmt; -use crate::Node; - mod binary; pub use binary::*; mod unary; diff --git a/ast/src/functions/function.rs b/ast/src/functions/function.rs index d00c39a084..beb3a9322e 100644 --- a/ast/src/functions/function.rs +++ b/ast/src/functions/function.rs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{Annotation, Block, FunctionInput, Identifier, Node, Span, Type}; +use crate::{Annotation, Block, FunctionInput, Identifier, Node, Type}; +use leo_errors::Span; use serde::{Deserialize, Serialize}; use std::fmt; diff --git a/ast/src/functions/input/function_input.rs b/ast/src/functions/input/function_input.rs index 90f45f3d24..c89168d2fd 100644 --- a/ast/src/functions/input/function_input.rs +++ b/ast/src/functions/input/function_input.rs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{Identifier, Node, Span, Type}; +use crate::{Identifier, Node, Type}; +use leo_errors::Span; use serde::{Deserialize, Serialize}; use std::fmt; diff --git a/ast/src/functions/input/input_variable.rs b/ast/src/functions/input/input_variable.rs index 9f5d0575af..73e98a8389 100644 --- a/ast/src/functions/input/input_variable.rs +++ b/ast/src/functions/input/input_variable.rs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{ConstSelfKeyword, FunctionInputVariable, MutSelfKeyword, Node, SelfKeyword, Span}; +use crate::{ConstSelfKeyword, FunctionInputVariable, MutSelfKeyword, Node, SelfKeyword}; +use leo_errors::Span; use serde::{Deserialize, Serialize}; use std::fmt; diff --git a/ast/src/groups/group_coordinate.rs b/ast/src/groups/group_coordinate.rs index 7f3e8a4666..4e9249e02e 100644 --- a/ast/src/groups/group_coordinate.rs +++ b/ast/src/groups/group_coordinate.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::common::span::Span; +use leo_errors::Span; use leo_input::values::{ GroupCoordinate as InputGroupCoordinate, Inferred as InputInferred, diff --git a/ast/src/groups/group_value.rs b/ast/src/groups/group_value.rs index f7e26069c7..f928f8e4ef 100644 --- a/ast/src/groups/group_value.rs +++ b/ast/src/groups/group_value.rs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{common::span::Span, groups::GroupCoordinate}; +use crate::groups::GroupCoordinate; +use leo_errors::Span; use leo_input::values::{ GroupRepresentation as InputGroupRepresentation, GroupTuple as InputGroupTuple, diff --git a/ast/src/imports/import.rs b/ast/src/imports/import.rs index 93c4ad6f6d..d7d74fe861 100644 --- a/ast/src/imports/import.rs +++ b/ast/src/imports/import.rs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{PackageOrPackages, Span}; +use crate::PackageOrPackages; +use leo_errors::Span; use serde::{Deserialize, Serialize}; use std::fmt; diff --git a/ast/src/imports/import_symbol.rs b/ast/src/imports/import_symbol.rs index 4d82b898d9..c00c406699 100644 --- a/ast/src/imports/import_symbol.rs +++ b/ast/src/imports/import_symbol.rs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{Identifier, Span}; +use crate::Identifier; +use leo_errors::Span; use serde::{Deserialize, Serialize}; use std::fmt; diff --git a/ast/src/imports/package.rs b/ast/src/imports/package.rs index 1ccd3007b1..b6878cbd32 100644 --- a/ast/src/imports/package.rs +++ b/ast/src/imports/package.rs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{common::Identifier, PackageAccess, Span}; +use crate::{common::Identifier, PackageAccess}; +use leo_errors::Span; use serde::{Deserialize, Serialize}; use std::fmt; diff --git a/ast/src/imports/package_access.rs b/ast/src/imports/package_access.rs index 3935d71598..3029f20732 100644 --- a/ast/src/imports/package_access.rs +++ b/ast/src/imports/package_access.rs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{ImportSymbol, Node, Package, Packages, Span}; +use crate::{ImportSymbol, Node, Package, Packages}; +use leo_errors::Span; use serde::{Deserialize, Serialize}; use std::fmt; diff --git a/ast/src/imports/package_or_packages.rs b/ast/src/imports/package_or_packages.rs index 7f42d57fd7..c4766a7681 100644 --- a/ast/src/imports/package_or_packages.rs +++ b/ast/src/imports/package_or_packages.rs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{Node, Package, Packages, Span}; +use crate::{Node, Package, Packages}; +use leo_errors::Span; use serde::{Deserialize, Serialize}; use std::fmt; diff --git a/ast/src/imports/packages.rs b/ast/src/imports/packages.rs index e561080807..2b2aab8300 100644 --- a/ast/src/imports/packages.rs +++ b/ast/src/imports/packages.rs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{common::Identifier, PackageAccess, Span}; +use crate::{common::Identifier, PackageAccess}; +use leo_errors::Span; use serde::{Deserialize, Serialize}; use std::fmt; diff --git a/ast/src/input/input_value.rs b/ast/src/input/input_value.rs index d12a8b8990..451ac8d9c3 100644 --- a/ast/src/input/input_value.rs +++ b/ast/src/input/input_value.rs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{ArrayDimensions, Char, CharValue, GroupValue, Span as AstSpan}; +use crate::{ArrayDimensions, Char, CharValue, GroupValue}; +use leo_errors::Span as AstSpan; use leo_input::{ errors::InputParserError, expressions::{ArrayInitializerExpression, ArrayInlineExpression, Expression, StringExpression, TupleExpression}, diff --git a/ast/src/input/parameters/parameter.rs b/ast/src/input/parameters/parameter.rs index 7f275f2fea..634324828b 100644 --- a/ast/src/input/parameters/parameter.rs +++ b/ast/src/input/parameters/parameter.rs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{Identifier, Span, Type}; +use crate::{Identifier, Type}; +use leo_errors::Span; use leo_input::parameters::Parameter as GrammarParameter; #[derive(Clone, PartialEq, Eq, Hash)] diff --git a/ast/src/lib.rs b/ast/src/lib.rs index 0db6ff375c..af7e3590ff 100644 --- a/ast/src/lib.rs +++ b/ast/src/lib.rs @@ -20,9 +20,6 @@ //! The [`Ast`] type is intended to be parsed and modified by different passes //! of the Leo compiler. The Leo compiler can generate a set of R1CS constraints from any [`Ast`]. -#[macro_use] -extern crate thiserror; - pub mod annotation; pub use self::annotation::*; @@ -35,9 +32,6 @@ pub use self::chars::*; pub mod common; pub use self::common::*; -pub mod errors; -pub use self::errors::*; - pub mod expression; pub use self::expression::*; @@ -68,6 +62,10 @@ pub use self::types::*; mod node; pub use node::*; +use leo_errors::LeoError; + +use eyre::eyre; + /// The abstract syntax tree (AST) for a Leo program. /// /// The [`Ast`] type represents a Leo program as a series of recursive data types. @@ -86,7 +84,7 @@ impl Ast { } /// Mutates the program ast by preforming canonicalization on it. - pub fn canonicalize(&mut self) -> Result<(), AstError> { + pub fn canonicalize(&mut self) -> Result<(), LeoError> { self.ast = ReconstructingDirector::new(Canonicalizer::default()).reduce_program(self.as_repr())?; Ok(()) } @@ -101,26 +99,26 @@ impl Ast { } /// Serializes the ast into a JSON string. - pub fn to_json_string(&self) -> Result { - Ok(serde_json::to_string_pretty(&self.ast)?) + pub fn to_json_string(&self) -> Result { + Ok(serde_json::to_string_pretty(&self.ast).map_err(|e| eyre!(e))?) } - pub fn to_json_file(&self, mut path: std::path::PathBuf, file_name: &str) -> Result<(), AstError> { + pub fn to_json_file(&self, mut path: std::path::PathBuf, file_name: &str) -> Result<(), LeoError> { path.push(file_name); - let file = std::fs::File::create(path)?; + let file = std::fs::File::create(path).map_err(|e| eyre!(e))?; let writer = std::io::BufWriter::new(file); - serde_json::to_writer_pretty(writer, &self.ast)?; + serde_json::to_writer_pretty(writer, &self.ast).map_err(|e| eyre!(e))?; Ok(()) } /// Deserializes the JSON string into a ast. - pub fn from_json_string(json: &str) -> Result { - let ast: Program = serde_json::from_str(json)?; + pub fn from_json_string(json: &str) -> Result { + let ast: Program = serde_json::from_str(json).map_err(|e| eyre!(e))?; Ok(Self { ast }) } - pub fn from_json_file(path: std::path::PathBuf) -> Result { - let data = std::fs::read_to_string(path)?; + pub fn from_json_file(path: std::path::PathBuf) -> Result { + let data = std::fs::read_to_string(path).map_err(|e| eyre!(e))?; Self::from_json_string(&data) } } diff --git a/ast/src/node.rs b/ast/src/node.rs index f486503b50..e2ec6cc653 100644 --- a/ast/src/node.rs +++ b/ast/src/node.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::Span; +use leo_errors::Span; pub trait Node: std::fmt::Debug + std::fmt::Display + Clone + PartialEq + Eq + serde::Serialize + serde::de::DeserializeOwned diff --git a/ast/src/reducer/canonicalization.rs b/ast/src/reducer/canonicalization.rs index edf300ada4..ff99c6f19e 100644 --- a/ast/src/reducer/canonicalization.rs +++ b/ast/src/reducer/canonicalization.rs @@ -15,6 +15,7 @@ // along with the Leo library. If not, see . use crate::*; +use leo_errors::{AstError, LeoError, Span}; /// Replace Self when it is in a enclosing circuit type. /// Error when Self is outside an enclosing circuit type. @@ -43,7 +44,7 @@ impl Canonicalizer { start: Expression, accesses: &[AssigneeAccess], span: &Span, - ) -> Result, ReducerError> { + ) -> Result, LeoError> { let mut left = Box::new(start); for access in accesses.iter() { @@ -83,10 +84,7 @@ impl Canonicalizer { Ok(left) } - pub fn compound_operation_converstion( - &mut self, - operation: &AssignOperation, - ) -> Result { + pub fn compound_operation_converstion(&mut self, operation: &AssignOperation) -> Result { match operation { AssignOperation::Assign => unreachable!(), AssignOperation::Add => Ok(BinaryOperation::Add), @@ -462,13 +460,11 @@ impl ReconstructingReducer for Canonicalizer { self.in_circuit = !self.in_circuit; } - fn reduce_type(&mut self, _type_: &Type, new: Type, span: &Span) -> Result { + fn reduce_type(&mut self, _type_: &Type, new: Type, span: &Span) -> Result { match new { Type::Array(type_, mut dimensions) => { if dimensions.is_zero() { - return Err(ReducerError::from(CanonicalizeError::invalid_array_dimension_size( - span, - ))); + return Err(LeoError::from(AstError::invalid_array_dimension_size(span))); } let mut next = Type::Array(type_, ArrayDimensions(vec![dimensions.remove_last().unwrap()])); @@ -485,16 +481,14 @@ impl ReconstructingReducer for Canonicalizer { Ok(array) } - Type::SelfType if !self.in_circuit => { - Err(ReducerError::from(CanonicalizeError::big_self_outside_of_circuit(span))) - } + Type::SelfType if !self.in_circuit => Err(LeoError::from(AstError::big_self_outside_of_circuit(span))), _ => Ok(new.clone()), } } - fn reduce_string(&mut self, string: &[Char], span: &Span) -> Result { + fn reduce_string(&mut self, string: &[Char], span: &Span) -> Result { if string.is_empty() { - return Err(ReducerError::empty_string(span)); + return Err(LeoError::from(AstError::empty_string(span))); } let mut elements = Vec::new(); @@ -529,14 +523,14 @@ impl ReconstructingReducer for Canonicalizer { elements.push(SpreadOrExpression::Expression(Expression::Value( ValueExpression::Char(CharValue { character: character.clone(), - span: Span { - line_start: span.line_start, - line_stop: span.line_stop, + span: Span::new( + span.line_start, + span.line_stop, col_start, col_stop, - path: span.path.clone(), - content: span.content.clone(), - }, + span.path.clone(), + span.content.clone(), + ), }), ))); } @@ -551,11 +545,9 @@ impl ReconstructingReducer for Canonicalizer { &mut self, array_init: &ArrayInitExpression, element: Expression, - ) -> Result { + ) -> Result { if array_init.dimensions.is_zero() { - return Err(ReducerError::from(CanonicalizeError::invalid_array_dimension_size( - &array_init.span, - ))); + return Err(LeoError::from(AstError::invalid_array_dimension_size(&array_init.span))); } let element = Box::new(element); @@ -602,7 +594,7 @@ impl ReconstructingReducer for Canonicalizer { assign: &AssignStatement, assignee: Assignee, value: Expression, - ) -> Result { + ) -> Result { match value { value if assign.operation != AssignOperation::Assign => { let left = self.canonicalize_accesses( @@ -644,7 +636,7 @@ impl ReconstructingReducer for Canonicalizer { input: Vec, output: Option, block: Block, - ) -> Result { + ) -> Result { let new_output = match output { None => Some(Type::Tuple(vec![])), _ => output, @@ -665,7 +657,7 @@ impl ReconstructingReducer for Canonicalizer { _circuit: &Circuit, circuit_name: Identifier, members: Vec, - ) -> Result { + ) -> Result { self.circuit_name = Some(circuit_name.clone()); let circ = Circuit { circuit_name, diff --git a/ast/src/reducer/reconstructing_director.rs b/ast/src/reducer/reconstructing_director.rs index cf5a409d06..d2798cdc93 100644 --- a/ast/src/reducer/reconstructing_director.rs +++ b/ast/src/reducer/reconstructing_director.rs @@ -19,6 +19,7 @@ use crate::*; use indexmap::IndexMap; +use leo_errors::{AstError, LeoError, Span}; pub struct ReconstructingDirector { reducer: R, @@ -29,7 +30,7 @@ impl ReconstructingDirector { Self { reducer } } - pub fn reduce_type(&mut self, type_: &Type, span: &Span) -> Result { + pub fn reduce_type(&mut self, type_: &Type, span: &Span) -> Result { let new = match type_ { Type::Array(type_, dimensions) => Type::Array(Box::new(self.reduce_type(type_, span)?), dimensions.clone()), Type::Tuple(types) => { @@ -48,7 +49,7 @@ impl ReconstructingDirector { } // Expressions - pub fn reduce_expression(&mut self, expression: &Expression) -> Result { + pub fn reduce_expression(&mut self, expression: &Expression) -> Result { let new = match expression { Expression::Identifier(identifier) => Expression::Identifier(self.reduce_identifier(&identifier)?), Expression::Value(value) => self.reduce_value(&value)?, @@ -83,15 +84,15 @@ impl ReconstructingDirector { self.reducer.reduce_expression(expression, new) } - pub fn reduce_identifier(&mut self, identifier: &Identifier) -> Result { + pub fn reduce_identifier(&mut self, identifier: &Identifier) -> Result { self.reducer.reduce_identifier(identifier) } - pub fn reduce_group_tuple(&mut self, group_tuple: &GroupTuple) -> Result { + pub fn reduce_group_tuple(&mut self, group_tuple: &GroupTuple) -> Result { self.reducer.reduce_group_tuple(group_tuple) } - pub fn reduce_group_value(&mut self, group_value: &GroupValue) -> Result { + pub fn reduce_group_value(&mut self, group_value: &GroupValue) -> Result { let new = match group_value { GroupValue::Tuple(group_tuple) => GroupValue::Tuple(self.reduce_group_tuple(&group_tuple)?), _ => group_value.clone(), @@ -100,11 +101,11 @@ impl ReconstructingDirector { self.reducer.reduce_group_value(group_value, new) } - pub fn reduce_string(&mut self, string: &[Char], span: &Span) -> Result { + pub fn reduce_string(&mut self, string: &[Char], span: &Span) -> Result { self.reducer.reduce_string(string, span) } - pub fn reduce_value(&mut self, value: &ValueExpression) -> Result { + pub fn reduce_value(&mut self, value: &ValueExpression) -> Result { let new = match value { ValueExpression::Group(group_value) => { Expression::Value(ValueExpression::Group(Box::new(self.reduce_group_value(&group_value)?))) @@ -116,20 +117,20 @@ impl ReconstructingDirector { self.reducer.reduce_value(value, new) } - pub fn reduce_binary(&mut self, binary: &BinaryExpression) -> Result { + pub fn reduce_binary(&mut self, binary: &BinaryExpression) -> Result { let left = self.reduce_expression(&binary.left)?; let right = self.reduce_expression(&binary.right)?; self.reducer.reduce_binary(binary, left, right, binary.op.clone()) } - pub fn reduce_unary(&mut self, unary: &UnaryExpression) -> Result { + pub fn reduce_unary(&mut self, unary: &UnaryExpression) -> Result { let inner = self.reduce_expression(&unary.inner)?; self.reducer.reduce_unary(unary, inner, unary.op.clone()) } - pub fn reduce_ternary(&mut self, ternary: &TernaryExpression) -> Result { + pub fn reduce_ternary(&mut self, ternary: &TernaryExpression) -> Result { let condition = self.reduce_expression(&ternary.condition)?; let if_true = self.reduce_expression(&ternary.if_true)?; let if_false = self.reduce_expression(&ternary.if_false)?; @@ -137,7 +138,7 @@ impl ReconstructingDirector { self.reducer.reduce_ternary(ternary, condition, if_true, if_false) } - pub fn reduce_cast(&mut self, cast: &CastExpression) -> Result { + pub fn reduce_cast(&mut self, cast: &CastExpression) -> Result { let inner = self.reduce_expression(&cast.inner)?; let target_type = self.reduce_type(&cast.target_type, &cast.span)?; @@ -147,7 +148,7 @@ impl ReconstructingDirector { pub fn reduce_array_inline( &mut self, array_inline: &ArrayInlineExpression, - ) -> Result { + ) -> Result { let mut elements = vec![]; for element in array_inline.elements.iter() { let reduced_element = match element { @@ -165,7 +166,7 @@ impl ReconstructingDirector { self.reducer.reduce_array_inline(array_inline, elements) } - pub fn reduce_array_init(&mut self, array_init: &ArrayInitExpression) -> Result { + pub fn reduce_array_init(&mut self, array_init: &ArrayInitExpression) -> Result { let element = self.reduce_expression(&array_init.element)?; self.reducer.reduce_array_init(array_init, element) @@ -174,7 +175,7 @@ impl ReconstructingDirector { pub fn reduce_array_access( &mut self, array_access: &ArrayAccessExpression, - ) -> Result { + ) -> Result { let array = self.reduce_expression(&array_access.array)?; let index = self.reduce_expression(&array_access.index)?; @@ -184,7 +185,7 @@ impl ReconstructingDirector { pub fn reduce_array_range_access( &mut self, array_range_access: &ArrayRangeAccessExpression, - ) -> Result { + ) -> Result { let array = self.reduce_expression(&array_range_access.array)?; let left = array_range_access .left @@ -201,7 +202,7 @@ impl ReconstructingDirector { .reduce_array_range_access(array_range_access, array, left, right) } - pub fn reduce_tuple_init(&mut self, tuple_init: &TupleInitExpression) -> Result { + pub fn reduce_tuple_init(&mut self, tuple_init: &TupleInitExpression) -> Result { let mut elements = vec![]; for element in tuple_init.elements.iter() { elements.push(self.reduce_expression(element)?); @@ -213,7 +214,7 @@ impl ReconstructingDirector { pub fn reduce_tuple_access( &mut self, tuple_access: &TupleAccessExpression, - ) -> Result { + ) -> Result { let tuple = self.reduce_expression(&tuple_access.tuple)?; self.reducer.reduce_tuple_access(tuple_access, tuple) @@ -222,7 +223,7 @@ impl ReconstructingDirector { pub fn reduce_circuit_implied_variable_definition( &mut self, variable: &CircuitImpliedVariableDefinition, - ) -> Result { + ) -> Result { let identifier = self.reduce_identifier(&variable.identifier)?; let expression = variable .expression @@ -237,7 +238,7 @@ impl ReconstructingDirector { pub fn reduce_circuit_init( &mut self, circuit_init: &CircuitInitExpression, - ) -> Result { + ) -> Result { let name = self.reduce_identifier(&circuit_init.name)?; let mut members = vec![]; @@ -251,7 +252,7 @@ impl ReconstructingDirector { pub fn reduce_circuit_member_access( &mut self, circuit_member_access: &CircuitMemberAccessExpression, - ) -> Result { + ) -> Result { let circuit = self.reduce_expression(&circuit_member_access.circuit)?; let name = self.reduce_identifier(&circuit_member_access.name)?; @@ -262,7 +263,7 @@ impl ReconstructingDirector { pub fn reduce_circuit_static_fn_access( &mut self, circuit_static_fn_access: &CircuitStaticFunctionAccessExpression, - ) -> Result { + ) -> Result { let circuit = self.reduce_expression(&circuit_static_fn_access.circuit)?; let name = self.reduce_identifier(&circuit_static_fn_access.name)?; @@ -270,7 +271,7 @@ impl ReconstructingDirector { .reduce_circuit_static_fn_access(circuit_static_fn_access, circuit, name) } - pub fn reduce_call(&mut self, call: &CallExpression) -> Result { + pub fn reduce_call(&mut self, call: &CallExpression) -> Result { let function = self.reduce_expression(&call.function)?; let mut arguments = vec![]; @@ -282,7 +283,7 @@ impl ReconstructingDirector { } // Statements - pub fn reduce_statement(&mut self, statement: &Statement) -> Result { + pub fn reduce_statement(&mut self, statement: &Statement) -> Result { let new = match statement { Statement::Return(return_statement) => Statement::Return(self.reduce_return(&return_statement)?), Statement::Definition(definition) => Statement::Definition(self.reduce_definition(&definition)?), @@ -297,19 +298,19 @@ impl ReconstructingDirector { self.reducer.reduce_statement(statement, new) } - pub fn reduce_return(&mut self, return_statement: &ReturnStatement) -> Result { + pub fn reduce_return(&mut self, return_statement: &ReturnStatement) -> Result { let expression = self.reduce_expression(&return_statement.expression)?; self.reducer.reduce_return(return_statement, expression) } - pub fn reduce_variable_name(&mut self, variable_name: &VariableName) -> Result { + pub fn reduce_variable_name(&mut self, variable_name: &VariableName) -> Result { let identifier = self.reduce_identifier(&variable_name.identifier)?; self.reducer.reduce_variable_name(variable_name, identifier) } - pub fn reduce_definition(&mut self, definition: &DefinitionStatement) -> Result { + pub fn reduce_definition(&mut self, definition: &DefinitionStatement) -> Result { let mut variable_names = vec![]; for variable_name in definition.variable_names.iter() { variable_names.push(self.reduce_variable_name(variable_name)?); @@ -326,7 +327,7 @@ impl ReconstructingDirector { self.reducer.reduce_definition(definition, variable_names, type_, value) } - pub fn reduce_assignee_access(&mut self, access: &AssigneeAccess) -> Result { + pub fn reduce_assignee_access(&mut self, access: &AssigneeAccess) -> Result { let new = match access { AssigneeAccess::ArrayRange(left, right) => { let left = left.as_ref().map(|left| self.reduce_expression(left)).transpose()?; @@ -342,7 +343,7 @@ impl ReconstructingDirector { self.reducer.reduce_assignee_access(access, new) } - pub fn reduce_assignee(&mut self, assignee: &Assignee) -> Result { + pub fn reduce_assignee(&mut self, assignee: &Assignee) -> Result { let identifier = self.reduce_identifier(&assignee.identifier)?; let mut accesses = vec![]; @@ -353,17 +354,14 @@ impl ReconstructingDirector { self.reducer.reduce_assignee(assignee, identifier, accesses) } - pub fn reduce_assign(&mut self, assign: &AssignStatement) -> Result { + pub fn reduce_assign(&mut self, assign: &AssignStatement) -> Result { let assignee = self.reduce_assignee(&assign.assignee)?; let value = self.reduce_expression(&assign.value)?; self.reducer.reduce_assign(assign, assignee, value) } - pub fn reduce_conditional( - &mut self, - conditional: &ConditionalStatement, - ) -> Result { + pub fn reduce_conditional(&mut self, conditional: &ConditionalStatement) -> Result { let condition = self.reduce_expression(&conditional.condition)?; let block = self.reduce_block(&conditional.block)?; let next = conditional @@ -375,7 +373,7 @@ impl ReconstructingDirector { self.reducer.reduce_conditional(conditional, condition, block, next) } - pub fn reduce_iteration(&mut self, iteration: &IterationStatement) -> Result { + pub fn reduce_iteration(&mut self, iteration: &IterationStatement) -> Result { let variable = self.reduce_identifier(&iteration.variable)?; let start = self.reduce_expression(&iteration.start)?; let stop = self.reduce_expression(&iteration.stop)?; @@ -384,10 +382,7 @@ impl ReconstructingDirector { self.reducer.reduce_iteration(iteration, variable, start, stop, block) } - pub fn reduce_console( - &mut self, - console_function_call: &ConsoleStatement, - ) -> Result { + pub fn reduce_console(&mut self, console_function_call: &ConsoleStatement) -> Result { let function = match &console_function_call.function { ConsoleFunction::Assert(expression) => ConsoleFunction::Assert(self.reduce_expression(expression)?), ConsoleFunction::Error(args) | ConsoleFunction::Log(args) => { @@ -405,7 +400,7 @@ impl ReconstructingDirector { match &console_function_call.function { ConsoleFunction::Error(_) => ConsoleFunction::Error(formatted), ConsoleFunction::Log(_) => ConsoleFunction::Log(formatted), - _ => return Err(ReducerError::impossible_console_assert_call(&args.span)), + _ => return Err(LeoError::from(AstError::impossible_console_assert_call(&args.span))), } } }; @@ -416,12 +411,12 @@ impl ReconstructingDirector { pub fn reduce_expression_statement( &mut self, expression: &ExpressionStatement, - ) -> Result { + ) -> Result { let inner_expression = self.reduce_expression(&expression.expression)?; self.reducer.reduce_expression_statement(expression, inner_expression) } - pub fn reduce_block(&mut self, block: &Block) -> Result { + pub fn reduce_block(&mut self, block: &Block) -> Result { let mut statements = vec![]; for statement in block.statements.iter() { statements.push(self.reduce_statement(statement)?); @@ -431,7 +426,7 @@ impl ReconstructingDirector { } // Program - pub fn reduce_program(&mut self, program: &Program) -> Result { + pub fn reduce_program(&mut self, program: &Program) -> Result { let mut inputs = vec![]; for input in program.expected_input.iter() { inputs.push(self.reduce_function_input(input)?); @@ -466,14 +461,14 @@ impl ReconstructingDirector { pub fn reduce_function_input_variable( &mut self, variable: &FunctionInputVariable, - ) -> Result { + ) -> Result { let identifier = self.reduce_identifier(&variable.identifier)?; let type_ = self.reduce_type(&variable.type_, &variable.span)?; self.reducer.reduce_function_input_variable(variable, identifier, type_) } - pub fn reduce_function_input(&mut self, input: &FunctionInput) -> Result { + pub fn reduce_function_input(&mut self, input: &FunctionInput) -> Result { let new = match input { FunctionInput::Variable(function_input_variable) => { FunctionInput::Variable(self.reduce_function_input_variable(function_input_variable)?) @@ -487,7 +482,7 @@ impl ReconstructingDirector { pub fn reduce_package_or_packages( &mut self, package_or_packages: &PackageOrPackages, - ) -> Result { + ) -> Result { let new = match package_or_packages { PackageOrPackages::Package(package) => PackageOrPackages::Package(Package { name: self.reduce_identifier(&package.name)?, @@ -504,13 +499,13 @@ impl ReconstructingDirector { self.reducer.reduce_package_or_packages(package_or_packages, new) } - pub fn reduce_import(&mut self, import: &ImportStatement) -> Result { + pub fn reduce_import(&mut self, import: &ImportStatement) -> Result { let package_or_packages = self.reduce_package_or_packages(&import.package_or_packages)?; self.reducer.reduce_import(import, package_or_packages) } - pub fn reduce_circuit_member(&mut self, circuit_member: &CircuitMember) -> Result { + pub fn reduce_circuit_member(&mut self, circuit_member: &CircuitMember) -> Result { let new = match circuit_member { CircuitMember::CircuitVariable(identifier, type_) => CircuitMember::CircuitVariable( self.reduce_identifier(&identifier)?, @@ -524,7 +519,7 @@ impl ReconstructingDirector { self.reducer.reduce_circuit_member(circuit_member, new) } - pub fn reduce_circuit(&mut self, circuit: &Circuit) -> Result { + pub fn reduce_circuit(&mut self, circuit: &Circuit) -> Result { let circuit_name = self.reduce_identifier(&circuit.circuit_name)?; let mut members = vec![]; @@ -535,13 +530,13 @@ impl ReconstructingDirector { self.reducer.reduce_circuit(circuit, circuit_name, members) } - fn reduce_annotation(&mut self, annotation: &Annotation) -> Result { + fn reduce_annotation(&mut self, annotation: &Annotation) -> Result { let name = self.reduce_identifier(&annotation.name)?; self.reducer.reduce_annotation(annotation, name) } - pub fn reduce_function(&mut self, function: &Function) -> Result { + pub fn reduce_function(&mut self, function: &Function) -> Result { let identifier = self.reduce_identifier(&function.identifier)?; let mut annotations = vec![]; diff --git a/ast/src/reducer/reconstructing_reducer.rs b/ast/src/reducer/reconstructing_reducer.rs index 9bac0a88c7..b31638390c 100644 --- a/ast/src/reducer/reconstructing_reducer.rs +++ b/ast/src/reducer/reconstructing_reducer.rs @@ -16,6 +16,7 @@ use crate::*; use indexmap::IndexMap; +use leo_errors::{LeoError, Span}; // Needed to fix clippy bug. #[allow(clippy::redundant_closure)] @@ -23,23 +24,23 @@ pub trait ReconstructingReducer { fn in_circuit(&self) -> bool; fn swap_in_circuit(&mut self); - fn reduce_type(&mut self, _type_: &Type, new: Type, _span: &Span) -> Result { + fn reduce_type(&mut self, _type_: &Type, new: Type, _span: &Span) -> Result { Ok(new) } // Expressions - fn reduce_expression(&mut self, _expression: &Expression, new: Expression) -> Result { + fn reduce_expression(&mut self, _expression: &Expression, new: Expression) -> Result { Ok(new) } - fn reduce_identifier(&mut self, identifier: &Identifier) -> Result { + fn reduce_identifier(&mut self, identifier: &Identifier) -> Result { Ok(Identifier { name: identifier.name.clone(), span: identifier.span.clone(), }) } - fn reduce_group_tuple(&mut self, group_tuple: &GroupTuple) -> Result { + fn reduce_group_tuple(&mut self, group_tuple: &GroupTuple) -> Result { Ok(GroupTuple { x: group_tuple.x.clone(), y: group_tuple.y.clone(), @@ -47,18 +48,18 @@ pub trait ReconstructingReducer { }) } - fn reduce_group_value(&mut self, _group_value: &GroupValue, new: GroupValue) -> Result { + fn reduce_group_value(&mut self, _group_value: &GroupValue, new: GroupValue) -> Result { Ok(new) } - fn reduce_string(&mut self, string: &[Char], span: &Span) -> Result { + fn reduce_string(&mut self, string: &[Char], span: &Span) -> Result { Ok(Expression::Value(ValueExpression::String( string.to_vec(), span.clone(), ))) } - fn reduce_value(&mut self, _value: &ValueExpression, new: Expression) -> Result { + fn reduce_value(&mut self, _value: &ValueExpression, new: Expression) -> Result { Ok(new) } @@ -68,7 +69,7 @@ pub trait ReconstructingReducer { left: Expression, right: Expression, op: BinaryOperation, - ) -> Result { + ) -> Result { Ok(BinaryExpression { left: Box::new(left), right: Box::new(right), @@ -82,7 +83,7 @@ pub trait ReconstructingReducer { unary: &UnaryExpression, inner: Expression, op: UnaryOperation, - ) -> Result { + ) -> Result { Ok(UnaryExpression { inner: Box::new(inner), op, @@ -96,7 +97,7 @@ pub trait ReconstructingReducer { condition: Expression, if_true: Expression, if_false: Expression, - ) -> Result { + ) -> Result { Ok(TernaryExpression { condition: Box::new(condition), if_true: Box::new(if_true), @@ -110,7 +111,7 @@ pub trait ReconstructingReducer { cast: &CastExpression, inner: Expression, target_type: Type, - ) -> Result { + ) -> Result { Ok(CastExpression { inner: Box::new(inner), target_type, @@ -122,7 +123,7 @@ pub trait ReconstructingReducer { &mut self, array_inline: &ArrayInlineExpression, elements: Vec, - ) -> Result { + ) -> Result { Ok(ArrayInlineExpression { elements, span: array_inline.span.clone(), @@ -133,7 +134,7 @@ pub trait ReconstructingReducer { &mut self, array_init: &ArrayInitExpression, element: Expression, - ) -> Result { + ) -> Result { Ok(ArrayInitExpression { element: Box::new(element), dimensions: array_init.dimensions.clone(), @@ -146,7 +147,7 @@ pub trait ReconstructingReducer { array_access: &ArrayAccessExpression, array: Expression, index: Expression, - ) -> Result { + ) -> Result { Ok(ArrayAccessExpression { array: Box::new(array), index: Box::new(index), @@ -160,7 +161,7 @@ pub trait ReconstructingReducer { array: Expression, left: Option, right: Option, - ) -> Result { + ) -> Result { Ok(ArrayRangeAccessExpression { array: Box::new(array), left: left.map(|expr| Box::new(expr)), @@ -173,7 +174,7 @@ pub trait ReconstructingReducer { &mut self, tuple_init: &TupleInitExpression, elements: Vec, - ) -> Result { + ) -> Result { Ok(TupleInitExpression { elements, span: tuple_init.span.clone(), @@ -184,7 +185,7 @@ pub trait ReconstructingReducer { &mut self, tuple_access: &TupleAccessExpression, tuple: Expression, - ) -> Result { + ) -> Result { Ok(TupleAccessExpression { tuple: Box::new(tuple), index: tuple_access.index.clone(), @@ -197,7 +198,7 @@ pub trait ReconstructingReducer { _variable: &CircuitImpliedVariableDefinition, identifier: Identifier, expression: Option, - ) -> Result { + ) -> Result { Ok(CircuitImpliedVariableDefinition { identifier, expression }) } @@ -206,7 +207,7 @@ pub trait ReconstructingReducer { circuit_init: &CircuitInitExpression, name: Identifier, members: Vec, - ) -> Result { + ) -> Result { Ok(CircuitInitExpression { name, members, @@ -219,7 +220,7 @@ pub trait ReconstructingReducer { circuit_member_access: &CircuitMemberAccessExpression, circuit: Expression, name: Identifier, - ) -> Result { + ) -> Result { Ok(CircuitMemberAccessExpression { circuit: Box::new(circuit), name, @@ -232,7 +233,7 @@ pub trait ReconstructingReducer { circuit_static_fn_access: &CircuitStaticFunctionAccessExpression, circuit: Expression, name: Identifier, - ) -> Result { + ) -> Result { Ok(CircuitStaticFunctionAccessExpression { circuit: Box::new(circuit), name, @@ -245,7 +246,7 @@ pub trait ReconstructingReducer { call: &CallExpression, function: Expression, arguments: Vec, - ) -> Result { + ) -> Result { Ok(CallExpression { function: Box::new(function), arguments, @@ -254,7 +255,7 @@ pub trait ReconstructingReducer { } // Statements - fn reduce_statement(&mut self, _statement: &Statement, new: Statement) -> Result { + fn reduce_statement(&mut self, _statement: &Statement, new: Statement) -> Result { Ok(new) } @@ -262,7 +263,7 @@ pub trait ReconstructingReducer { &mut self, return_statement: &ReturnStatement, expression: Expression, - ) -> Result { + ) -> Result { Ok(ReturnStatement { expression, span: return_statement.span.clone(), @@ -273,7 +274,7 @@ pub trait ReconstructingReducer { &mut self, variable_name: &VariableName, identifier: Identifier, - ) -> Result { + ) -> Result { Ok(VariableName { mutable: variable_name.mutable, identifier, @@ -287,7 +288,7 @@ pub trait ReconstructingReducer { variable_names: Vec, type_: Option, value: Expression, - ) -> Result { + ) -> Result { Ok(DefinitionStatement { declaration_type: definition.declaration_type.clone(), variable_names, @@ -301,7 +302,7 @@ pub trait ReconstructingReducer { &mut self, _access: &AssigneeAccess, new: AssigneeAccess, - ) -> Result { + ) -> Result { Ok(new) } @@ -310,7 +311,7 @@ pub trait ReconstructingReducer { assignee: &Assignee, identifier: Identifier, accesses: Vec, - ) -> Result { + ) -> Result { Ok(Assignee { identifier, accesses, @@ -323,7 +324,7 @@ pub trait ReconstructingReducer { assign: &AssignStatement, assignee: Assignee, value: Expression, - ) -> Result { + ) -> Result { Ok(AssignStatement { operation: assign.operation, assignee, @@ -338,7 +339,7 @@ pub trait ReconstructingReducer { condition: Expression, block: Block, statement: Option, - ) -> Result { + ) -> Result { Ok(ConditionalStatement { condition, block, @@ -354,7 +355,7 @@ pub trait ReconstructingReducer { start: Expression, stop: Expression, block: Block, - ) -> Result { + ) -> Result { Ok(IterationStatement { variable, start, @@ -369,7 +370,7 @@ pub trait ReconstructingReducer { &mut self, console: &ConsoleStatement, function: ConsoleFunction, - ) -> Result { + ) -> Result { Ok(ConsoleStatement { function, span: console.span.clone(), @@ -380,14 +381,14 @@ pub trait ReconstructingReducer { &mut self, expression_statement: &ExpressionStatement, expression: Expression, - ) -> Result { + ) -> Result { Ok(ExpressionStatement { expression, span: expression_statement.span.clone(), }) } - fn reduce_block(&mut self, block: &Block, statements: Vec) -> Result { + fn reduce_block(&mut self, block: &Block, statements: Vec) -> Result { Ok(Block { statements, span: block.span.clone(), @@ -403,7 +404,7 @@ pub trait ReconstructingReducer { circuits: IndexMap, functions: IndexMap, global_consts: IndexMap, - ) -> Result { + ) -> Result { Ok(Program { name: program.name.clone(), expected_input, @@ -419,7 +420,7 @@ pub trait ReconstructingReducer { variable: &FunctionInputVariable, identifier: Identifier, type_: Type, - ) -> Result { + ) -> Result { Ok(FunctionInputVariable { identifier, const_: variable.const_, @@ -429,11 +430,7 @@ pub trait ReconstructingReducer { }) } - fn reduce_function_input( - &mut self, - _input: &FunctionInput, - new: FunctionInput, - ) -> Result { + fn reduce_function_input(&mut self, _input: &FunctionInput, new: FunctionInput) -> Result { Ok(new) } @@ -441,7 +438,7 @@ pub trait ReconstructingReducer { &mut self, _package_or_packages: &PackageOrPackages, new: PackageOrPackages, - ) -> Result { + ) -> Result { Ok(new) } @@ -449,7 +446,7 @@ pub trait ReconstructingReducer { &mut self, import: &ImportStatement, package_or_packages: PackageOrPackages, - ) -> Result { + ) -> Result { Ok(ImportStatement { package_or_packages, span: import.span.clone(), @@ -460,7 +457,7 @@ pub trait ReconstructingReducer { &mut self, _circuit_member: &CircuitMember, new: CircuitMember, - ) -> Result { + ) -> Result { Ok(new) } @@ -469,11 +466,11 @@ pub trait ReconstructingReducer { _circuit: &Circuit, circuit_name: Identifier, members: Vec, - ) -> Result { + ) -> Result { Ok(Circuit { circuit_name, members }) } - fn reduce_annotation(&mut self, annotation: &Annotation, name: Identifier) -> Result { + fn reduce_annotation(&mut self, annotation: &Annotation, name: Identifier) -> Result { Ok(Annotation { span: annotation.span.clone(), name, @@ -490,7 +487,7 @@ pub trait ReconstructingReducer { input: Vec, output: Option, block: Block, - ) -> Result { + ) -> Result { Ok(Function { identifier, annotations, diff --git a/ast/src/statements/assign/assignee.rs b/ast/src/statements/assign/assignee.rs index da73eb9d38..4816cb20b4 100644 --- a/ast/src/statements/assign/assignee.rs +++ b/ast/src/statements/assign/assignee.rs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{Expression, Identifier, PositiveNumber, Span}; +use crate::{Expression, Identifier, PositiveNumber}; +use leo_errors::Span; use serde::{Deserialize, Serialize}; use std::fmt; diff --git a/ast/src/statements/assign/mod.rs b/ast/src/statements/assign/mod.rs index 29da40821b..4deb42334c 100644 --- a/ast/src/statements/assign/mod.rs +++ b/ast/src/statements/assign/mod.rs @@ -14,7 +14,9 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{Expression, Node, Span}; +use crate::{Expression, Node}; + +use leo_errors::Span; use serde::{Deserialize, Serialize}; use std::fmt; diff --git a/ast/src/statements/block.rs b/ast/src/statements/block.rs index 71270e0d19..d69a074b69 100644 --- a/ast/src/statements/block.rs +++ b/ast/src/statements/block.rs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{Node, Span, Statement}; +use crate::{Node, Statement}; +use leo_errors::Span; use serde::{Deserialize, Serialize}; use std::fmt; diff --git a/ast/src/statements/conditional.rs b/ast/src/statements/conditional.rs index bb78e83fff..fe9516f450 100644 --- a/ast/src/statements/conditional.rs +++ b/ast/src/statements/conditional.rs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{Block, Expression, Node, Span, Statement}; +use crate::{Block, Expression, Node, Statement}; +use leo_errors::Span; use serde::{Deserialize, Serialize}; use std::fmt; diff --git a/ast/src/statements/console/console_args.rs b/ast/src/statements/console/console_args.rs index ebe6e12725..6adcb23493 100644 --- a/ast/src/statements/console/console_args.rs +++ b/ast/src/statements/console/console_args.rs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{Char, Expression, Node, Span}; +use crate::{Char, Expression, Node}; +use leo_errors::Span; use serde::{Deserialize, Serialize}; use std::fmt; diff --git a/ast/src/statements/console/console_function.rs b/ast/src/statements/console/console_function.rs index 8c782a1e88..9462061d72 100644 --- a/ast/src/statements/console/console_function.rs +++ b/ast/src/statements/console/console_function.rs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{ConsoleArgs, Expression, Node, Span}; +use crate::{ConsoleArgs, Expression, Node}; +use leo_errors::Span; use serde::{Deserialize, Serialize}; use std::fmt; diff --git a/ast/src/statements/console/console_statement.rs b/ast/src/statements/console/console_statement.rs index de916205fa..2bb14e12e4 100644 --- a/ast/src/statements/console/console_statement.rs +++ b/ast/src/statements/console/console_statement.rs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{ConsoleFunction, Node, Span}; +use crate::{ConsoleFunction, Node}; +use leo_errors::Span; use serde::{Deserialize, Serialize}; use std::fmt; diff --git a/ast/src/statements/definition/mod.rs b/ast/src/statements/definition/mod.rs index 15d2893b2d..190756fbc5 100644 --- a/ast/src/statements/definition/mod.rs +++ b/ast/src/statements/definition/mod.rs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{Expression, Node, Span, Type}; +use crate::{Expression, Node, Type}; +use leo_errors::Span; use serde::{Deserialize, Serialize}; use std::fmt; diff --git a/ast/src/statements/definition/variable_name.rs b/ast/src/statements/definition/variable_name.rs index c0fc5b09d6..546d79ecc0 100644 --- a/ast/src/statements/definition/variable_name.rs +++ b/ast/src/statements/definition/variable_name.rs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{Identifier, Node, Span}; +use crate::{Identifier, Node}; +use leo_errors::Span; use serde::{Deserialize, Serialize}; use std::fmt; diff --git a/ast/src/statements/expression.rs b/ast/src/statements/expression.rs index 9b86ea41a2..d9dd172bb2 100644 --- a/ast/src/statements/expression.rs +++ b/ast/src/statements/expression.rs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{Expression, Node, Span}; +use crate::{Expression, Node}; +use leo_errors::Span; use serde::{Deserialize, Serialize}; use std::fmt; diff --git a/ast/src/statements/iteration.rs b/ast/src/statements/iteration.rs index a97941ac55..6a35099ad1 100644 --- a/ast/src/statements/iteration.rs +++ b/ast/src/statements/iteration.rs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{Block, Expression, Identifier, Node, Span}; +use crate::{Block, Expression, Identifier, Node}; +use leo_errors::Span; use serde::{Deserialize, Serialize}; use std::fmt; diff --git a/ast/src/statements/return_statement.rs b/ast/src/statements/return_statement.rs index 4e2f813466..60c4c1a5c5 100644 --- a/ast/src/statements/return_statement.rs +++ b/ast/src/statements/return_statement.rs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{Expression, Node, Span}; +use crate::{Expression, Node}; +use leo_errors::Span; use serde::{Deserialize, Serialize}; use std::fmt; diff --git a/ast/src/statements/statement.rs b/ast/src/statements/statement.rs index f60c019edb..7fd50da72c 100644 --- a/ast/src/statements/statement.rs +++ b/ast/src/statements/statement.rs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{ConditionalStatement, Node, Span}; +use crate::{ConditionalStatement, Node}; +use leo_errors::Span; use super::*; use serde::{Deserialize, Serialize}; diff --git a/compiler/Cargo.toml b/compiler/Cargo.toml index 5725a5f453..796bbe93b4 100644 --- a/compiler/Cargo.toml +++ b/compiler/Cargo.toml @@ -21,6 +21,10 @@ edition = "2018" path = "../ast" version = "1.5.3" +[dependencies.leo-errors] +path = "../errors" +version = "1.5.3" + [dependencies.leo-imports] path = "../imports" version = "1.5.3" diff --git a/compiler/src/compiler.rs b/compiler/src/compiler.rs index 34e55b7a7f..34225e89ce 100644 --- a/compiler/src/compiler.rs +++ b/compiler/src/compiler.rs @@ -17,7 +17,6 @@ //! Compiles a Leo program from a file path. use crate::{ constraints::{generate_constraints, generate_test_constraints}, - errors::CompilerError, AstSnapshotOptions, CompilerOptions, GroupType, @@ -26,8 +25,9 @@ use crate::{ TypeInferencePhase, }; pub use leo_asg::{new_context, AsgContext as Context, AsgContext}; -use leo_asg::{Asg, AsgPass, FormattedError, Program as AsgProgram}; +use leo_asg::{Asg, AsgPass, Program as AsgProgram}; use leo_ast::{Input, MainInput, Program as AstProgram}; +use leo_errors::{CompilerError, LeoError, Span}; use leo_input::LeoInputParser; use leo_package::inputs::InputPairs; use leo_parser::parse_ast; @@ -113,7 +113,7 @@ impl<'a, F: PrimeField, G: GroupType> Compiler<'a, F, G> { context: AsgContext<'a>, options: Option, ast_snapshot_options: Option, - ) -> Result { + ) -> Result { let mut compiler = Self::new( package_name, main_file_path, @@ -152,7 +152,7 @@ impl<'a, F: PrimeField, G: GroupType> Compiler<'a, F, G> { context: AsgContext<'a>, options: Option, ast_snapshot_options: Option, - ) -> Result { + ) -> Result> Compiler<'a, F, G> { input_path: &Path, state_string: &str, state_path: &Path, - ) -> Result<(), CompilerError> { + ) -> Result<(), LeoError { let input_syntax_tree = LeoInputParser::parse_file(&input_string).map_err(|mut e| { e.set_path( input_path.to_str().unwrap_or_default(), @@ -223,10 +223,10 @@ impl<'a, F: PrimeField, G: GroupType> Compiler<'a, F, G> { /// /// Parses and stores all programs imported by the main program file. /// - pub fn parse_program(&mut self) -> Result<(), CompilerError> { + pub fn parse_program(&mut self) -> Result<(), LeoError { // Load the program file. let content = fs::read_to_string(&self.main_file_path) - .map_err(|e| CompilerError::FileReadError(self.main_file_path.clone(), e))?; + .map_err(|e| LeoError::from(CompilerError::FileReadError(self.main_file_path.clone(), e)))?; self.parse_program_from_string(&content) } @@ -235,7 +235,7 @@ impl<'a, F: PrimeField, G: GroupType> Compiler<'a, F, G> { /// Equivalent to parse_and_check_program but uses the given program_string instead of a main /// file path. /// - pub fn parse_program_from_string(&mut self, program_string: &str) -> Result<(), CompilerError> { + pub fn parse_program_from_string(&mut self, program_string: &str) -> Result<(), LeoError { // Use the parser to construct the abstract syntax tree (ast). let mut ast: leo_ast::Ast = parse_ast(self.main_file_path.to_str().unwrap_or_default(), program_string)?; @@ -278,7 +278,7 @@ impl<'a, F: PrimeField, G: GroupType> Compiler<'a, F, G> { // Store the ASG. self.asg = Some(asg.into_repr()); - self.do_asg_passes().map_err(CompilerError::AsgPassError)?; + self.do_asg_passes().map_err(LeoError::from(CompilerError::AsgPassError))?; Ok(()) } @@ -307,24 +307,24 @@ impl<'a, F: PrimeField, G: GroupType> Compiler<'a, F, G> { /// /// Synthesizes the circuit with program input to verify correctness. /// - pub fn compile_constraints>(&self, cs: &mut CS) -> Result { + pub fn compile_constraints>(&self, cs: &mut CS) -> Result(cs, &self.asg.as_ref().unwrap(), &self.program_input) } /// /// Synthesizes the circuit for test functions with program input. /// - pub fn compile_test_constraints(self, input_pairs: InputPairs) -> Result<(u32, u32), CompilerError> { + pub fn compile_test_constraints(self, input_pairs: InputPairs) -> Result<(u32, u32), LeoError { generate_test_constraints::(&self.asg.as_ref().unwrap(), input_pairs, &self.output_directory) } /// /// Returns a SHA256 checksum of the program file. /// - pub fn checksum(&self) -> Result { + pub fn checksum(&self) -> Result> Compiler<'a, F, G> { pub fn verify_local_data_commitment( &self, system_parameters: &SystemParameters, - ) -> Result { + ) -> Result> ConstraintSynthesizer for Compiler<' /// /// Synthesizes the circuit with program input. /// - fn generate_constraints>(&self, cs: &mut CS) -> Result<(), SynthesisError> { + fn generate_constraints>(&self, cs: &mut CS) -> Result<(), LeoError> { let output_directory = self.output_directory.clone(); let package_name = self.program_name.clone(); let result = self.compile_constraints(cs).map_err(|e| { diff --git a/compiler/src/console/assert.rs b/compiler/src/console/assert.rs index e850829f40..22d38581e9 100644 --- a/compiler/src/console/assert.rs +++ b/compiler/src/console/assert.rs @@ -17,13 +17,13 @@ //! Enforces an assert equals statement in a compiled Leo program. use crate::{ - errors::ConsoleError, get_indicator_value, program::ConstrainedProgram, value::ConstrainedValue, GroupType, }; -use leo_asg::{Expression, Span}; +use leo_asg::Expression; +use leo_errors::{CompilerError, LeoError, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::boolean::Boolean; @@ -36,7 +36,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { indicator: &Boolean, expression: &'a Expression<'a>, span: &Span, - ) -> Result<(), ConsoleError> { + ) -> Result<(), LeoError> { // Evaluate assert expression let assert_expression = self.enforce_expression(cs, expression)?; @@ -50,13 +50,13 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let result_option = match assert_expression { ConstrainedValue::Boolean(boolean) => boolean.get_value(), _ => { - return Err(ConsoleError::assertion_must_be_boolean(span)); + return Err(LeoError::from(CompilerError::assertion_must_be_boolean(span))); } }; - let result_bool = result_option.ok_or_else(|| ConsoleError::assertion_depends_on_input(span))?; + let result_bool = result_option.ok_or_else(|| LeoError::from(CompilerError::assertion_depends_on_input(span)))?; if !result_bool { - return Err(ConsoleError::assertion_failed(span)); + return Err(LeoError::from(CompilerError::assertion_failed(span))); } Ok(()) diff --git a/compiler/src/console/console.rs b/compiler/src/console/console.rs index 46f3dee52a..e4ada0afbb 100644 --- a/compiler/src/console/console.rs +++ b/compiler/src/console/console.rs @@ -16,8 +16,9 @@ //! Evaluates a macro in a compiled Leo program. -use crate::{errors::ConsoleError, program::ConstrainedProgram, statement::get_indicator_value, GroupType}; +use crate::{program::ConstrainedProgram, statement::get_indicator_value, GroupType}; use leo_asg::{ConsoleFunction, ConsoleStatement}; +use leo_errors::LeoError; use snarkvm_fields::PrimeField; use snarkvm_gadgets::boolean::Boolean; @@ -29,7 +30,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { cs: &mut CS, indicator: &Boolean, console: &ConsoleStatement<'a>, - ) -> Result<(), ConsoleError> { + ) -> Result<(), LeoError> { match &console.function { ConsoleFunction::Assert(expression) => { self.evaluate_console_assert( diff --git a/compiler/src/console/format.rs b/compiler/src/console/format.rs index dd936223fc..2651d0b431 100644 --- a/compiler/src/console/format.rs +++ b/compiler/src/console/format.rs @@ -16,8 +16,10 @@ //! Evaluates a formatted string in a compiled Leo program. -use crate::{errors::ConsoleError, program::ConstrainedProgram, GroupType}; +use crate::{program::ConstrainedProgram, GroupType}; use leo_asg::{CharValue, ConsoleArgs}; +use leo_errors::{CompilerError, LeoError}; + use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -26,7 +28,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { &mut self, cs: &mut CS, args: &ConsoleArgs<'a>, - ) -> Result { + ) -> Result { let mut out = Vec::new(); let mut in_container = false; let mut substring = String::new(); @@ -52,7 +54,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { in_container = false; let parameter = match args.parameters.get(arg_index) { Some(index) => index, - None => return Err(ConsoleError::length(arg_index + 1, args.parameters.len(), &args.span)), + None => return Err(LeoError::from(CompilerError::from(CompilerError::length(arg_index + 1, args.parameters.len(), &args.span)))), }; out.push(self.enforce_expression(cs, parameter.get())?.to_string()); arg_index += 1; @@ -63,12 +65,12 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { substring.push('}'); escape_right_bracket = true; } else { - return Err(ConsoleError::expected_escaped_right_brace(&args.span)); + return Err(LeoError::from(CompilerError::from(CompilerError::expected_escaped_right_brace(&args.span)))); } } } _ if in_container => { - return Err(ConsoleError::expected_left_or_right_brace(&args.span)); + return Err(LeoError::from(CompilerError::from(CompilerError::expected_left_or_right_brace(&args.span)))); } _ => substring.push(*scalar), }, @@ -82,7 +84,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { // Check that containers and parameters match if arg_index != args.parameters.len() { - return Err(ConsoleError::length(arg_index, args.parameters.len(), &args.span)); + return Err(LeoError::from(CompilerError::from(CompilerError::length(arg_index, args.parameters.len(), &args.span)))); } Ok(out.join("")) diff --git a/compiler/src/constraints/constraints.rs b/compiler/src/constraints/constraints.rs index 6d256dea96..857d32dcf8 100644 --- a/compiler/src/constraints/constraints.rs +++ b/compiler/src/constraints/constraints.rs @@ -16,9 +16,10 @@ //! Generates R1CS constraints for a compiled Leo program. -use crate::{errors::CompilerError, ConstrainedProgram, GroupType, Output, OutputFile}; +use crate::{ConstrainedProgram, GroupType, Output, OutputFile}; use leo_asg::Program; use leo_ast::Input; +use leo_errors::{CompilerError, LeoError}; use leo_input::LeoInputParser; use leo_package::inputs::InputPairs; @@ -30,7 +31,7 @@ pub fn generate_constraints<'a, F: PrimeField, G: GroupType, CS: ConstraintSy cs: &mut CS, program: &Program<'a>, input: &Input, -) -> Result { +) -> Result { let mut resolved_program = ConstrainedProgram::::new(program.clone()); for (_, global_const) in program.global_consts.iter() { @@ -47,7 +48,7 @@ pub fn generate_constraints<'a, F: PrimeField, G: GroupType, CS: ConstraintSy let result = resolved_program.enforce_main_function(cs, &function, input)?; Ok(result) } - _ => Err(CompilerError::NoMainFunction), + _ => Err(LeoError::from(CompilerError::NoMainFunction)), } } @@ -55,7 +56,7 @@ pub fn generate_test_constraints<'a, F: PrimeField, G: GroupType>( program: &Program<'a>, input: InputPairs, output_directory: &Path, -) -> Result<(u32, u32), CompilerError> { +) -> Result<(u32, u32), LeoError> { let mut resolved_program = ConstrainedProgram::::new(program.clone()); let program_name = program.name.clone(); @@ -101,10 +102,10 @@ pub fn generate_test_constraints<'a, F: PrimeField, G: GroupType>( .or_else(|| input.pairs.get(&file_name_kebab)) { Some(pair) => pair.to_owned(), - None => return Err(CompilerError::InvalidTestContext(file_name.to_string())), + None => return Err(LeoError::from(CompilerError::InvalidTestContext(file_name.to_string()))), } } - None => default.ok_or(CompilerError::NoTestInput)?, + None => default.ok_or(LeoError::from(CompilerError::NoTestInput))?, }; // parse input files to abstract syntax trees diff --git a/compiler/src/errors/compiler.rs b/compiler/src/errors/compiler.rs deleted file mode 100644 index d1c98b5b8b..0000000000 --- a/compiler/src/errors/compiler.rs +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::errors::{ExpressionError, FunctionError, ImportError, StatementError}; -use leo_asg::{AsgConvertError, FormattedError}; -use leo_ast::{AstError, LeoError}; -use leo_input::InputParserError; -use leo_parser::SyntaxError; -use leo_state::LocalDataVerificationError; - -use std::path::PathBuf; - -#[derive(Debug, Error)] -pub enum CompilerError { - #[error("{}", _0)] - SyntaxError(#[from] SyntaxError), - - #[error("{}", _0)] - AsgPassError(FormattedError), - - #[error("{}", _0)] - ExpressionError(#[from] ExpressionError), - - #[error("{}", _0)] - ImportError(#[from] ImportError), - - #[error("{}", _0)] - InputParserError(#[from] InputParserError), - - #[error("Cannot find input files with context name `{}`", _0)] - InvalidTestContext(String), - - #[error("{}", _0)] - FunctionError(#[from] FunctionError), - - #[error("Cannot read from the provided file path '{:?}': {}", _0, _1)] - FileReadError(PathBuf, std::io::Error), - - #[error("{}", _0)] - LocalDataVerificationError(#[from] LocalDataVerificationError), - - #[error("`main` must be a function")] - NoMainFunction, - - #[error("Failed to find input files for the current test")] - NoTestInput, - - #[error("{}", _0)] - AsgConvertError(#[from] AsgConvertError), - - #[error("{}", _0)] - AstError(#[from] AstError), - - #[error("{}", _0)] - StatementError(#[from] StatementError), -} - -impl LeoError for CompilerError {} diff --git a/compiler/src/errors/console.rs b/compiler/src/errors/console.rs deleted file mode 100644 index 76d4538f1c..0000000000 --- a/compiler/src/errors/console.rs +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::errors::ExpressionError; -use leo_ast::{FormattedError, LeoError, Span}; - -#[derive(Debug, Error)] -pub enum ConsoleError { - #[error("{}", _0)] - Error(#[from] FormattedError), - - #[error("{}", _0)] - Expression(#[from] ExpressionError), -} - -impl LeoError for ConsoleError {} - -impl ConsoleError { - fn new_from_span(message: String, span: &Span) -> Self { - ConsoleError::Error(FormattedError::new_from_span(message, span)) - } - - pub fn expected_left_or_right_brace(span: &Span) -> Self { - let message = "Formatter given a {. Expected a { or } after".to_string(); - - Self::new_from_span(message, span) - } - - pub fn expected_escaped_right_brace(span: &Span) -> Self { - let message = "Formatter given a }. Expected a container {} or }}".to_string(); - - Self::new_from_span(message, span) - } - - pub fn length(containers: usize, parameters: usize, span: &Span) -> Self { - let message = format!( - "Formatter given {} containers and found {} parameters", - containers, parameters - ); - - Self::new_from_span(message, span) - } - - pub fn assertion_depends_on_input(span: &Span) -> Self { - let message = "console.assert() does not produce constraints and cannot use inputs. \ - Assertions should only be used in @test functions" - .to_string(); - - Self::new_from_span(message, span) - } - - pub fn assertion_failed(span: &Span) -> Self { - let message = "Assertion failed".to_string(); - - Self::new_from_span(message, span) - } - - pub fn assertion_must_be_boolean(span: &Span) -> Self { - let message = "Assertion expression must evaluate to a boolean value".to_string(); - - Self::new_from_span(message, span) - } -} diff --git a/compiler/src/errors/expression.rs b/compiler/src/errors/expression.rs deleted file mode 100644 index 3f360438e5..0000000000 --- a/compiler/src/errors/expression.rs +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::errors::{ - AddressError, - BooleanError, - CharError, - FieldError, - FunctionError, - GroupError, - IntegerError, - ValueError, -}; -use leo_ast::{FormattedError, Identifier, LeoError, Span}; -use snarkvm_r1cs::SynthesisError; - -#[derive(Debug, Error)] -pub enum ExpressionError { - #[error("{}", _0)] - AddressError(#[from] AddressError), - - #[error("{}", _0)] - BooleanError(#[from] BooleanError), - - #[error("{}", _0)] - CharError(#[from] CharError), - - #[error("{}", _0)] - Error(#[from] FormattedError), - - #[error("{}", _0)] - FieldError(#[from] FieldError), - - #[error("{}", _0)] - FunctionError(#[from] Box), - - #[error("{}", _0)] - GroupError(#[from] GroupError), - - #[error("{}", _0)] - IntegerError(#[from] IntegerError), - - #[error("{}", _0)] - ValueError(#[from] ValueError), -} - -impl LeoError for ExpressionError {} - -impl ExpressionError { - fn new_from_span(message: String, span: &Span) -> Self { - ExpressionError::Error(FormattedError::new_from_span(message, span)) - } - - pub fn cannot_enforce(operation: String, error: SynthesisError, span: &Span) -> Self { - let message = format!( - "the gadget operation `{}` failed due to synthesis error `{:?}`", - operation, error, - ); - - Self::new_from_span(message, span) - } - - pub fn cannot_evaluate(operation: String, span: &Span) -> Self { - let message = format!("Mismatched types found for operation `{}`", operation); - - Self::new_from_span(message, span) - } - - pub fn array_length_out_of_bounds(span: &Span) -> Self { - let message = "array length cannot be >= 2^32".to_string(); - - Self::new_from_span(message, span) - } - - pub fn array_index_out_of_legal_bounds(span: &Span) -> Self { - let message = "array index cannot be >= 2^32".to_string(); - - Self::new_from_span(message, span) - } - - pub fn conditional_boolean(actual: String, span: &Span) -> Self { - let message = format!("if, else conditional must resolve to a boolean, found `{}`", actual); - - Self::new_from_span(message, span) - } - - pub fn expected_circuit_member(expected: String, span: &Span) -> Self { - let message = format!("expected circuit member `{}`, not found", expected); - - Self::new_from_span(message, span) - } - - pub fn incompatible_types(operation: String, span: &Span) -> Self { - let message = format!("no implementation for `{}`", operation); - - Self::new_from_span(message, span) - } - - pub fn tuple_index_out_of_bounds(index: usize, span: &Span) -> Self { - let message = format!("cannot access index {} of tuple out of bounds", index); - - Self::new_from_span(message, span) - } - - pub fn array_index_out_of_bounds(index: usize, span: &Span) -> Self { - let message = format!("cannot access index {} of array out of bounds", index); - - Self::new_from_span(message, span) - } - - pub fn array_invalid_slice_length(span: &Span) -> Self { - let message = "illegal length of slice".to_string(); - - Self::new_from_span(message, span) - } - - pub fn invalid_index(actual: String, span: &Span) -> Self { - let message = format!("index must resolve to an integer, found `{}`", actual); - - Self::new_from_span(message, span) - } - - pub fn invalid_length(expected: usize, actual: usize, span: &Span) -> Self { - let message = format!("expected array length {}, found one with length {}", expected, actual); - - Self::new_from_span(message, span) - } - - pub fn invalid_static_access(member: String, span: &Span) -> Self { - let message = format!("static member `{}` must be accessed using `::` syntax", member); - - Self::new_from_span(message, span) - } - - pub fn undefined_array(actual: String, span: &Span) -> Self { - let message = format!("array `{}` must be declared before it is used in an expression", actual); - - Self::new_from_span(message, span) - } - - pub fn undefined_circuit(actual: String, span: &Span) -> Self { - let message = format!( - "circuit `{}` must be declared before it is used in an expression", - actual - ); - - Self::new_from_span(message, span) - } - - pub fn undefined_identifier(identifier: Identifier) -> Self { - let message = format!("Cannot find value `{}` in this scope", identifier.name); - - Self::new_from_span(message, &identifier.span) - } - - pub fn undefined_member_access(circuit: String, member: String, span: &Span) -> Self { - let message = format!("Circuit `{}` has no member `{}`", circuit, member); - - Self::new_from_span(message, span) - } -} diff --git a/compiler/src/errors/function.rs b/compiler/src/errors/function.rs deleted file mode 100644 index 3ec7f66a6f..0000000000 --- a/compiler/src/errors/function.rs +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::errors::{ - AddressError, - BooleanError, - CharError, - ExpressionError, - FieldError, - GroupError, - IntegerError, - OutputBytesError, - StatementError, - ValueError, -}; -use leo_asg::AsgConvertError; -use leo_ast::{FormattedError, LeoError, Span}; - -#[derive(Debug, Error)] -pub enum FunctionError { - #[error("{}", _0)] - AddressError(#[from] AddressError), - - #[error("{}", _0)] - BooleanError(#[from] BooleanError), - - #[error("{}", _0)] - CharError(#[from] CharError), - - #[error("{}", _0)] - ExpressionError(#[from] ExpressionError), - - #[error("{}", _0)] - Error(#[from] FormattedError), - - #[error("{}", _0)] - FieldError(#[from] FieldError), - - #[error("{}", _0)] - GroupError(#[from] GroupError), - - #[error("{}", _0)] - IntegerError(#[from] IntegerError), - - #[error("{}", _0)] - OutputStringError(#[from] OutputBytesError), - - #[error("{}", _0)] - StatementError(#[from] StatementError), - - #[error("{}", _0)] - ValueError(#[from] ValueError), - - #[error("{}", _0)] - ImportASGError(#[from] AsgConvertError), -} - -impl LeoError for FunctionError {} - -impl FunctionError { - fn new_from_span(message: String, span: &Span) -> Self { - FunctionError::Error(FormattedError::new_from_span(message, span)) - } - - pub fn input_type_mismatch(expected: String, actual: String, variable: String, span: &Span) -> Self { - let message = format!( - "Expected input variable `{}` to be type `{}`, found type `{}`", - variable, expected, actual - ); - - Self::new_from_span(message, span) - } - - pub fn expected_const_input(variable: String, span: &Span) -> Self { - let message = format!( - "Expected input variable `{}` to be constant. Move input variable `{}` to [constants] section of input file", - variable, variable - ); - - Self::new_from_span(message, span) - } - - pub fn expected_non_const_input(variable: String, span: &Span) -> Self { - let message = format!( - "Expected input variable `{}` to be non-constant. Move input variable `{}` to [main] section of input file", - variable, variable - ); - - Self::new_from_span(message, span) - } - - pub fn invalid_array(actual: String, span: &Span) -> Self { - let message = format!("Expected function input array, found `{}`", actual); - - Self::new_from_span(message, span) - } - - pub fn invalid_input_array_dimensions(expected: usize, actual: usize, span: &Span) -> Self { - let message = format!( - "Input array dimensions mismatch expected {}, found array dimensions {}", - expected, actual - ); - - Self::new_from_span(message, span) - } - - pub fn tuple_size_mismatch(expected: usize, actual: usize, span: &Span) -> Self { - let message = format!( - "Input tuple size mismatch expected {}, found tuple with length {}", - expected, actual - ); - - Self::new_from_span(message, span) - } - - pub fn invalid_tuple(actual: String, span: &Span) -> Self { - let message = format!("Expected function input tuple, found `{}`", actual); - - Self::new_from_span(message, span) - } - - pub fn input_not_found(expected: String, span: &Span) -> Self { - let message = format!("main function input {} not found", expected); - - Self::new_from_span(message, span) - } - - pub fn double_input_declaration(input_name: String, span: &Span) -> Self { - let message = format!("Input variable {} declared twice", input_name); - - Self::new_from_span(message, span) - } -} diff --git a/compiler/src/errors/output_bytes.rs b/compiler/src/errors/output_bytes.rs deleted file mode 100644 index 460d21f876..0000000000 --- a/compiler/src/errors/output_bytes.rs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::errors::ValueError; -use leo_asg::{AsgConvertError, Type}; -use leo_ast::{FormattedError, LeoError, Span}; - -#[derive(Debug, Error)] -pub enum OutputBytesError { - #[error("{}", _0)] - Error(#[from] FormattedError), - - #[error("{}", _0)] - ValueError(#[from] ValueError), - - #[error("{}", _0)] - AsgConvertError(#[from] AsgConvertError), -} - -impl LeoError for OutputBytesError {} - -impl OutputBytesError { - fn new_from_span(message: String, span: &Span) -> Self { - OutputBytesError::Error(FormattedError::new_from_span(message, span)) - } - - pub fn not_enough_registers(span: &Span) -> Self { - let message = "number of input registers must be greater than or equal to output registers".to_string(); - - Self::new_from_span(message, span) - } - - pub fn mismatched_output_types(left: &Type, right: &Type, span: &Span) -> Self { - let message = format!( - "Mismatched types. Expected register output type `{}`, found type `{}`.", - left, right - ); - - Self::new_from_span(message, span) - } -} diff --git a/compiler/src/errors/statement.rs b/compiler/src/errors/statement.rs deleted file mode 100644 index fd42cbd5d8..0000000000 --- a/compiler/src/errors/statement.rs +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::errors::{AddressError, BooleanError, ConsoleError, ExpressionError, IntegerError, ValueError}; -use leo_asg::Type; -use leo_ast::{FormattedError, LeoError, Span}; - -#[derive(Debug, Error)] -pub enum StatementError { - #[error("{}", _0)] - AddressError(#[from] AddressError), - - #[error("{}", _0)] - BooleanError(#[from] BooleanError), - - #[error("{}", _0)] - Error(#[from] FormattedError), - - #[error("{}", _0)] - ExpressionError(#[from] ExpressionError), - - #[error("{}", _0)] - IntegerError(#[from] IntegerError), - - #[error("{}", _0)] - MacroError(#[from] ConsoleError), - - #[error("{}", _0)] - ValueError(#[from] ValueError), -} - -impl LeoError for StatementError {} - -impl StatementError { - fn new_from_span(message: String, span: &Span) -> Self { - StatementError::Error(FormattedError::new_from_span(message, span)) - } - - pub fn array_assign_index(span: &Span) -> Self { - let message = "Cannot assign single index to array of values".to_string(); - - Self::new_from_span(message, span) - } - - pub fn array_assign_index_const(span: &Span) -> Self { - let message = "Cannot assign to non-const array index".to_string(); - - Self::new_from_span(message, span) - } - - pub fn array_assign_interior_index(span: &Span) -> Self { - let message = "Cannot assign single index to interior of array of values".to_string(); - - Self::new_from_span(message, span) - } - - pub fn array_assign_range(span: &Span) -> Self { - let message = "Cannot assign range of array values to single value".to_string(); - - Self::new_from_span(message, span) - } - - pub fn array_assign_index_bounds(index: usize, length: usize, span: &Span) -> Self { - let message = format!( - "Array assign index `{}` out of range for array of length `{}`", - index, length - ); - - Self::new_from_span(message, span) - } - - pub fn array_assign_range_order(start: usize, stop: usize, length: usize, span: &Span) -> Self { - let message = format!( - "Array assign range `{}`..`{}` out of range for array of length `{}`", - start, stop, length - ); - - Self::new_from_span(message, span) - } - - pub fn conditional_boolean(actual: String, span: &Span) -> Self { - let message = format!("If, else conditional must resolve to a boolean, found `{}`", actual); - - Self::new_from_span(message, span) - } - - pub fn indicator_calculation(name: String, span: &Span) -> Self { - let message = format!( - "Constraint system failed to evaluate branch selection indicator `{}`", - name - ); - - Self::new_from_span(message, span) - } - - pub fn invalid_number_of_definitions(expected: usize, actual: usize, span: &Span) -> Self { - let message = format!( - "Multiple definition statement expected {} return values, found {} values", - expected, actual - ); - - Self::new_from_span(message, span) - } - - pub fn multiple_definition(value: String, span: &Span) -> Self { - let message = format!("cannot assign multiple variables to a single value: {}", value,); - - Self::new_from_span(message, span) - } - - pub fn multiple_returns(span: &Span) -> Self { - let message = "This function returns multiple times and produces unreachable circuits with undefined behavior." - .to_string(); - - Self::new_from_span(message, span) - } - - pub fn no_returns(expected: &Type, span: &Span) -> Self { - let message = format!( - "function expected `{}` return type but no valid branches returned a result", - expected - ); - - Self::new_from_span(message, span) - } - - pub fn select_fail(first: String, second: String, span: &Span) -> Self { - let message = format!( - "Conditional select gadget failed to select between `{}` or `{}`", - first, second - ); - - Self::new_from_span(message, span) - } - - pub fn tuple_assign_index(span: &Span) -> Self { - let message = "Cannot assign single index to tuple of values".to_string(); - - Self::new_from_span(message, span) - } - - pub fn tuple_assign_index_bounds(index: usize, length: usize, span: &Span) -> Self { - let message = format!( - "Tuple assign index `{}` out of range for tuple of length `{}`", - index, length - ); - - Self::new_from_span(message, span) - } - - pub fn unassigned(span: &Span) -> Self { - let message = "Expected assignment of return values for expression".to_string(); - - Self::new_from_span(message, span) - } - - pub fn undefined_variable(name: String, span: &Span) -> Self { - let message = format!("Attempted to assign to unknown variable `{}`", name); - - Self::new_from_span(message, span) - } - - pub fn undefined_circuit(name: String, span: &Span) -> Self { - let message = format!("Attempted to assign to unknown circuit `{}`", name); - - Self::new_from_span(message, span) - } - - pub fn undefined_circuit_variable(name: String, span: &Span) -> Self { - let message = format!("Attempted to assign to unknown circuit member variable `{}`", name); - - Self::new_from_span(message, span) - } - - pub fn loop_index_const(span: &Span) -> Self { - let message = "iteration range must be const".to_string(); - - Self::new_from_span(message, span) - } -} diff --git a/compiler/src/errors/value/address.rs b/compiler/src/errors/value/address.rs deleted file mode 100644 index 2b8d4d8022..0000000000 --- a/compiler/src/errors/value/address.rs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use leo_ast::{FormattedError, LeoError, Span}; -use snarkvm_dpc::AccountError; - -#[derive(Debug, Error)] -pub enum AddressError { - #[error("{}", _0)] - Error(#[from] FormattedError), -} - -impl LeoError for AddressError {} - -impl AddressError { - fn new_from_span(message: String, span: &Span) -> Self { - AddressError::Error(FormattedError::new_from_span(message, span)) - } - - pub fn account_error(error: AccountError, span: &Span) -> Self { - let message = format!("account creation failed due to `{}`", error); - - Self::new_from_span(message, span) - } - - pub fn invalid_address(actual: String, span: &Span) -> Self { - let message = format!("expected address input type, found `{}`", actual); - - Self::new_from_span(message, span) - } - - pub fn missing_address(span: &Span) -> Self { - let message = "expected address input not found".to_string(); - - Self::new_from_span(message, span) - } -} diff --git a/compiler/src/errors/value/boolean.rs b/compiler/src/errors/value/boolean.rs deleted file mode 100644 index 71b740dff6..0000000000 --- a/compiler/src/errors/value/boolean.rs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use leo_ast::{FormattedError, LeoError, Span}; -use snarkvm_r1cs::SynthesisError; - -#[derive(Debug, Error)] -pub enum BooleanError { - #[error("{}", _0)] - Error(#[from] FormattedError), -} - -impl LeoError for BooleanError {} - -impl BooleanError { - fn new_from_span(message: String, span: &Span) -> Self { - BooleanError::Error(FormattedError::new_from_span(message, span)) - } - - pub fn cannot_enforce(operation: String, error: SynthesisError, span: &Span) -> Self { - let message = format!( - "the boolean operation `{}` failed due to the synthesis error `{:?}`", - operation, error, - ); - - Self::new_from_span(message, span) - } - - pub fn cannot_evaluate(operation: String, span: &Span) -> Self { - let message = format!("no implementation found for `{}`", operation); - - Self::new_from_span(message, span) - } - - pub fn invalid_boolean(actual: String, span: &Span) -> Self { - let message = format!("expected boolean input type, found `{}`", actual); - - Self::new_from_span(message, span) - } - - pub fn missing_boolean(expected: String, span: &Span) -> Self { - let message = format!("expected boolean input `{}` not found", expected); - - Self::new_from_span(message, span) - } -} diff --git a/compiler/src/errors/value/char.rs b/compiler/src/errors/value/char.rs deleted file mode 100644 index 9220609b35..0000000000 --- a/compiler/src/errors/value/char.rs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::errors::FieldError; -use leo_ast::{FormattedError, LeoError, Span}; - -#[derive(Debug, Error)] -pub enum CharError { - #[error("{}", _0)] - Error(#[from] FormattedError), - - #[error("{}", _0)] - FieldError(#[from] FieldError), -} - -impl LeoError for CharError {} - -impl CharError { - fn new_from_span(message: String, span: &Span) -> Self { - CharError::Error(FormattedError::new_from_span(message, span)) - } - - pub fn invalid_char(actual: String, span: &Span) -> Self { - let message = format!("expected char element input type, found `{}`", actual); - - Self::new_from_span(message, span) - } -} diff --git a/compiler/src/errors/value/field.rs b/compiler/src/errors/value/field.rs deleted file mode 100644 index 9ec8a5f152..0000000000 --- a/compiler/src/errors/value/field.rs +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use leo_ast::{FormattedError, LeoError, Span}; -use snarkvm_r1cs::SynthesisError; - -#[derive(Debug, Error)] -pub enum FieldError { - #[error("{}", _0)] - Error(#[from] FormattedError), -} - -impl LeoError for FieldError {} - -impl FieldError { - fn new_from_span(message: String, span: &Span) -> Self { - FieldError::Error(FormattedError::new_from_span(message, span)) - } - - pub fn negate_operation(error: SynthesisError, span: &Span) -> Self { - let message = format!("field negation failed due to synthesis error `{:?}`", error,); - - Self::new_from_span(message, span) - } - - pub fn binary_operation(operation: String, error: SynthesisError, span: &Span) -> Self { - let message = format!( - "the field binary operation `{}` failed due to synthesis error `{:?}`", - operation, error, - ); - - Self::new_from_span(message, span) - } - - pub fn invalid_field(actual: String, span: &Span) -> Self { - let message = format!("expected field element input type, found `{}`", actual); - - Self::new_from_span(message, span) - } - - pub fn missing_field(expected: String, span: &Span) -> Self { - let message = format!("expected field input `{}` not found", expected); - - Self::new_from_span(message, span) - } - - pub fn no_inverse(field: String, span: &Span) -> Self { - let message = format!("no multiplicative inverse found for field `{}`", field); - - Self::new_from_span(message, span) - } -} diff --git a/compiler/src/errors/value/group.rs b/compiler/src/errors/value/group.rs deleted file mode 100644 index ae3bd107d0..0000000000 --- a/compiler/src/errors/value/group.rs +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use leo_ast::{FormattedError, LeoError, Span}; -use snarkvm_r1cs::SynthesisError; - -#[derive(Debug, Error)] -pub enum GroupError { - #[error("{}", _0)] - Error(#[from] FormattedError), -} - -impl LeoError for GroupError {} - -impl GroupError { - fn new_from_span(message: String, span: &Span) -> Self { - GroupError::Error(FormattedError::new_from_span(message, span)) - } - - pub fn negate_operation(error: SynthesisError, span: &Span) -> Self { - let message = format!("group negation failed due to the synthesis error `{:?}`", error,); - - Self::new_from_span(message, span) - } - - pub fn binary_operation(operation: String, error: SynthesisError, span: &Span) -> Self { - let message = format!( - "the group binary operation `{}` failed due to the synthesis error `{:?}`", - operation, error, - ); - - Self::new_from_span(message, span) - } - - pub fn invalid_group(actual: String, span: &Span) -> Self { - let message = format!("expected group affine point input type, found `{}`", actual); - - Self::new_from_span(message, span) - } - - pub fn missing_group(expected: String, span: &Span) -> Self { - let message = format!("expected group input `{}` not found", expected); - - Self::new_from_span(message, span) - } - - pub fn synthesis_error(error: SynthesisError, span: &Span) -> Self { - let message = format!("compilation failed due to group synthesis error `{:?}`", error); - - Self::new_from_span(message, span) - } - - pub fn x_invalid(x: String, span: &Span) -> Self { - let message = format!("invalid x coordinate `{}`", x); - - Self::new_from_span(message, span) - } - - pub fn y_invalid(y: String, span: &Span) -> Self { - let message = format!("invalid y coordinate `{}`", y); - - Self::new_from_span(message, span) - } - - pub fn not_on_curve(element: String, span: &Span) -> Self { - let message = format!("group element `{}` is not on the supported curve", element); - - Self::new_from_span(message, span) - } - - pub fn x_recover(span: &Span) -> Self { - let message = "could not recover group element from x coordinate".to_string(); - - Self::new_from_span(message, span) - } - - pub fn y_recover(span: &Span) -> Self { - let message = "could not recover group element from y coordinate".to_string(); - - Self::new_from_span(message, span) - } - - pub fn n_group(number: String, span: &Span) -> Self { - let message = format!("cannot multiply group generator by \"{}\"", number); - - Self::new_from_span(message, span) - } -} diff --git a/compiler/src/errors/value/integer.rs b/compiler/src/errors/value/integer.rs deleted file mode 100644 index f27ce2f071..0000000000 --- a/compiler/src/errors/value/integer.rs +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use leo_ast::{FormattedError, LeoError, Span}; - -use snarkvm_gadgets::errors::{SignedIntegerError, UnsignedIntegerError}; -use snarkvm_r1cs::SynthesisError; - -#[derive(Debug, Error)] -pub enum IntegerError { - #[error("{}", _0)] - Error(#[from] FormattedError), -} - -impl LeoError for IntegerError {} - -impl IntegerError { - fn new_from_span(message: String, span: &Span) -> Self { - IntegerError::Error(FormattedError::new_from_span(message, span)) - } - - pub fn signed(error: SignedIntegerError, span: &Span) -> Self { - let message = format!("integer operation failed due to the signed integer error `{:?}`", error); - - Self::new_from_span(message, span) - } - - pub fn unsigned(error: UnsignedIntegerError, span: &Span) -> Self { - let message = format!( - "integer operation failed due to the unsigned integer error `{:?}`", - error - ); - - Self::new_from_span(message, span) - } - - pub fn synthesis(error: SynthesisError, span: &Span) -> Self { - let message = format!("integer operation failed due to the synthesis error `{}`", error); - - Self::new_from_span(message, span) - } - - pub fn negate_operation(span: &Span) -> Self { - let message = "integer negation can only be enforced on signed integers".to_string(); - - Self::new_from_span(message, span) - } - - pub fn binary_operation(operation: String, span: &Span) -> Self { - let message = format!( - "the integer binary operation `{}` can only be enforced on integers of the same type", - operation - ); - - Self::new_from_span(message, span) - } - - pub fn integer_type_mismatch(expected: String, received: String, span: &Span) -> Self { - let message = format!("expected data type `{}`, found `{}`", expected, received); - - Self::new_from_span(message, span) - } - - pub fn invalid_integer(actual: String, span: &Span) -> Self { - let message = format!("failed to parse `{}` as expected integer type", actual); - - Self::new_from_span(message, span) - } - - pub fn missing_integer(expected: String, span: &Span) -> Self { - let message = format!("expected integer input `{}` not found", expected); - - Self::new_from_span(message, span) - } - - pub fn cannot_evaluate(operation: String, span: &Span) -> Self { - let message = format!("no implementation found for `{}`", operation); - - Self::new_from_span(message, span) - } -} diff --git a/compiler/src/errors/value/value.rs b/compiler/src/errors/value/value.rs deleted file mode 100644 index bd34b788c8..0000000000 --- a/compiler/src/errors/value/value.rs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::errors::{AddressError, BooleanError, FieldError, GroupError, IntegerError}; -use leo_ast::{FormattedError, LeoError}; - -#[derive(Debug, Error)] -pub enum ValueError { - #[error("{}", _0)] - AddressError(#[from] AddressError), - - #[error("{}", _0)] - BooleanError(#[from] BooleanError), - - #[error("{}", _0)] - Error(#[from] FormattedError), - - #[error("{}", _0)] - FieldError(#[from] FieldError), - - #[error("{}", _0)] - GroupError(#[from] GroupError), - - #[error("{}", _0)] - IntegerError(#[from] IntegerError), -} - -impl LeoError for ValueError {} diff --git a/compiler/src/expression/arithmetic/add.rs b/compiler/src/expression/arithmetic/add.rs index a5c787f948..04743e04b2 100644 --- a/compiler/src/expression/arithmetic/add.rs +++ b/compiler/src/expression/arithmetic/add.rs @@ -16,8 +16,8 @@ //! Enforces an arithmetic `+` operator in a resolved Leo program. -use crate::{errors::ExpressionError, value::ConstrainedValue, GroupType}; -use leo_ast::Span; +use crate::{value::ConstrainedValue, GroupType}; +use leo_errors::{CompilerError, LeoError, Span}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -27,7 +27,7 @@ pub fn enforce_add<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( left: ConstrainedValue<'a, F, G>, right: ConstrainedValue<'a, F, G>, span: &Span, -) -> Result, ExpressionError> { +) -> Result, LeoError> { match (left, right) { (ConstrainedValue::Integer(num_1), ConstrainedValue::Integer(num_2)) => { Ok(ConstrainedValue::Integer(num_1.add(cs, num_2, span)?)) @@ -38,9 +38,9 @@ pub fn enforce_add<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( (ConstrainedValue::Group(point_1), ConstrainedValue::Group(point_2)) => { Ok(ConstrainedValue::Group(point_1.add(cs, &point_2, span)?)) } - (val_1, val_2) => Err(ExpressionError::incompatible_types( + (val_1, val_2) => Err(LeoError::from(CompilerError::incompatible_types( format!("{} + {}", val_1, val_2), span, - )), + ))), } } diff --git a/compiler/src/expression/arithmetic/bit_not.rs b/compiler/src/expression/arithmetic/bit_not.rs index 3f6f973839..ffe67c4b7d 100644 --- a/compiler/src/expression/arithmetic/bit_not.rs +++ b/compiler/src/expression/arithmetic/bit_not.rs @@ -16,14 +16,14 @@ //! Enforces a logical `!` operator in a resolved Leo program. -use crate::{errors::IntegerError, value::ConstrainedValue, GroupType}; -use leo_asg::Span; +use crate::{value::ConstrainedValue, GroupType}; +use leo_errors::{CompilerError, LeoError, Span}; use snarkvm_fields::PrimeField; pub fn evaluate_bit_not<'a, F: PrimeField, G: GroupType>( value: ConstrainedValue<'a, F, G>, span: &Span, -) -> Result, IntegerError> { - Err(IntegerError::cannot_evaluate(format!("!{}", value), span)) +) -> Result, LeoError> { + Err(LeoError::from(CompilerError::cannot_evaluate(format!("!{}", value), span))) } diff --git a/compiler/src/expression/arithmetic/div.rs b/compiler/src/expression/arithmetic/div.rs index dee8aeac58..6d611bb459 100644 --- a/compiler/src/expression/arithmetic/div.rs +++ b/compiler/src/expression/arithmetic/div.rs @@ -16,8 +16,8 @@ //! Enforces an arithmetic `/` operator in a resolved Leo program. -use crate::{errors::ExpressionError, value::ConstrainedValue, GroupType}; -use leo_ast::Span; +use crate::{value::ConstrainedValue, GroupType}; +use leo_errors::{CompilerError, LeoError, Span}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -27,7 +27,7 @@ pub fn enforce_div<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( left: ConstrainedValue<'a, F, G>, right: ConstrainedValue<'a, F, G>, span: &Span, -) -> Result, ExpressionError> { +) -> Result, LeoError> { match (left, right) { (ConstrainedValue::Integer(num_1), ConstrainedValue::Integer(num_2)) => { Ok(ConstrainedValue::Integer(num_1.div(cs, num_2, span)?)) @@ -35,9 +35,9 @@ pub fn enforce_div<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( (ConstrainedValue::Field(field_1), ConstrainedValue::Field(field_2)) => { Ok(ConstrainedValue::Field(field_1.div(cs, &field_2, span)?)) } - (val_1, val_2) => Err(ExpressionError::incompatible_types( + (val_1, val_2) => Err(LeoError::from(CompilerError::incompatible_types( format!("{} / {}", val_1, val_2,), span, - )), + ))), } } diff --git a/compiler/src/expression/arithmetic/mul.rs b/compiler/src/expression/arithmetic/mul.rs index 92468eb7a4..4f6e63aae5 100644 --- a/compiler/src/expression/arithmetic/mul.rs +++ b/compiler/src/expression/arithmetic/mul.rs @@ -16,8 +16,8 @@ //! Enforces an arithmetic `*` operator in a resolved Leo program. -use crate::{errors::ExpressionError, value::ConstrainedValue, GroupType}; -use leo_ast::Span; +use crate::{value::ConstrainedValue, GroupType}; +use leo_errors::{CompilerError, LeoError, Span}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -27,7 +27,7 @@ pub fn enforce_mul<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( left: ConstrainedValue<'a, F, G>, right: ConstrainedValue<'a, F, G>, span: &Span, -) -> Result, ExpressionError> { +) -> Result, LeoError> { match (left, right) { (ConstrainedValue::Integer(num_1), ConstrainedValue::Integer(num_2)) => { Ok(ConstrainedValue::Integer(num_1.mul(cs, num_2, span)?)) @@ -35,9 +35,9 @@ pub fn enforce_mul<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( (ConstrainedValue::Field(field_1), ConstrainedValue::Field(field_2)) => { Ok(ConstrainedValue::Field(field_1.mul(cs, &field_2, span)?)) } - (val_1, val_2) => Err(ExpressionError::incompatible_types( + (val_1, val_2) => Err(LeoError::from(CompilerError::incompatible_types( format!("{} * {}", val_1, val_2), span, - )), + ))), } } diff --git a/compiler/src/expression/arithmetic/negate.rs b/compiler/src/expression/arithmetic/negate.rs index 2781f66148..7d380450f7 100644 --- a/compiler/src/expression/arithmetic/negate.rs +++ b/compiler/src/expression/arithmetic/negate.rs @@ -16,8 +16,8 @@ //! Enforces a unary negate `-` operator in a resolved Leo program. -use crate::{errors::ExpressionError, value::ConstrainedValue, GroupType}; -use leo_ast::Span; +use crate::{value::ConstrainedValue, GroupType}; +use leo_errors::{CompilerError, LeoError, Span}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -26,11 +26,11 @@ pub fn enforce_negate<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem, span: &Span, -) -> Result, ExpressionError> { +) -> Result, LeoError> { match value { ConstrainedValue::Integer(integer) => Ok(ConstrainedValue::Integer(integer.negate(cs, span)?)), ConstrainedValue::Field(field) => Ok(ConstrainedValue::Field(field.negate(cs, span)?)), ConstrainedValue::Group(group) => Ok(ConstrainedValue::Group(group.negate(cs, span)?)), - value => Err(ExpressionError::incompatible_types(format!("-{}", value), span)), + value => Err(LeoError::from(CompilerError::incompatible_types(format!("-{}", value), span))), } } diff --git a/compiler/src/expression/arithmetic/pow.rs b/compiler/src/expression/arithmetic/pow.rs index 001d9be286..cd268c56de 100644 --- a/compiler/src/expression/arithmetic/pow.rs +++ b/compiler/src/expression/arithmetic/pow.rs @@ -16,8 +16,8 @@ //! Enforces an arithmetic `**` operator in a resolved Leo program. -use crate::{errors::ExpressionError, value::ConstrainedValue, GroupType}; -use leo_ast::Span; +use crate::{value::ConstrainedValue, GroupType}; +use leo_errors::{CompilerError, LeoError, Span}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -27,14 +27,14 @@ pub fn enforce_pow<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( left: ConstrainedValue<'a, F, G>, right: ConstrainedValue<'a, F, G>, span: &Span, -) -> Result, ExpressionError> { +) -> Result, LeoError> { match (left, right) { (ConstrainedValue::Integer(num_1), ConstrainedValue::Integer(num_2)) => { Ok(ConstrainedValue::Integer(num_1.pow(cs, num_2, span)?)) } - (val_1, val_2) => Err(ExpressionError::incompatible_types( + (val_1, val_2) => Err(LeoError::from(CompilerError::incompatible_types( format!("{} ** {}", val_1, val_2,), span, - )), + ))), } } diff --git a/compiler/src/expression/arithmetic/sub.rs b/compiler/src/expression/arithmetic/sub.rs index cf12de9c53..36e7f58bb3 100644 --- a/compiler/src/expression/arithmetic/sub.rs +++ b/compiler/src/expression/arithmetic/sub.rs @@ -16,8 +16,8 @@ //! Enforces an arithmetic `-` operator in a resolved Leo program. -use crate::{errors::ExpressionError, value::ConstrainedValue, GroupType}; -use leo_ast::Span; +use crate::{value::ConstrainedValue, GroupType}; +use leo_errors::{CompilerError, LeoError, Span}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -27,7 +27,7 @@ pub fn enforce_sub<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( left: ConstrainedValue<'a, F, G>, right: ConstrainedValue<'a, F, G>, span: &Span, -) -> Result, ExpressionError> { +) -> Result, LeoError> { match (left, right) { (ConstrainedValue::Integer(num_1), ConstrainedValue::Integer(num_2)) => { Ok(ConstrainedValue::Integer(num_1.sub(cs, num_2, span)?)) @@ -38,9 +38,9 @@ pub fn enforce_sub<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( (ConstrainedValue::Group(point_1), ConstrainedValue::Group(point_2)) => { Ok(ConstrainedValue::Group(point_1.sub(cs, &point_2, span)?)) } - (val_1, val_2) => Err(ExpressionError::incompatible_types( + (val_1, val_2) => Err(LeoError::from(CompilerError::incompatible_types( format!("{} - {}", val_1, val_2), span, - )), + ))), } } diff --git a/compiler/src/expression/array/access.rs b/compiler/src/expression/array/access.rs index 11009dbd64..a74450eacd 100644 --- a/compiler/src/expression/array/access.rs +++ b/compiler/src/expression/array/access.rs @@ -20,13 +20,14 @@ use std::convert::TryInto; use crate::{ arithmetic::*, - errors::ExpressionError, program::ConstrainedProgram, relational::*, value::{ConstrainedValue, Integer}, GroupType, }; -use leo_asg::{ConstInt, Expression, Span}; +use leo_asg::{ConstInt, Expression}; +use leo_errors::{CompilerError, LeoError, Span}; + use snarkvm_fields::PrimeField; use snarkvm_gadgets::{ @@ -45,7 +46,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { index_resolved: &Integer, array_len: u32, span: &Span, - ) -> Result<(), ExpressionError> { + ) -> Result<(), LeoError> { let bounds_check = evaluate_lt::( cs, ConstrainedValue::Integer(index_resolved.clone()), @@ -62,7 +63,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let mut unique_namespace = cs.ns(|| namespace_string); bounds_check .enforce_equal(&mut unique_namespace, &Boolean::Constant(true)) - .map_err(|e| ExpressionError::cannot_enforce("array bounds check".to_string(), e, span))?; + .map_err(|e| LeoError::from(CompilerError::cannot_enforce("array bounds check".to_string(), e, span)))?; Ok(()) } @@ -73,27 +74,27 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { array: &'a Expression<'a>, index: &'a Expression<'a>, span: &Span, - ) -> Result, ExpressionError> { + ) -> Result, LeoError> { let mut array = match self.enforce_expression(cs, array)? { ConstrainedValue::Array(array) => array, - value => return Err(ExpressionError::undefined_array(value.to_string(), span)), + value => return Err(LeoError::from(CompilerError::undefined_array(value.to_string(), span))), }; let index_resolved = self.enforce_index(cs, index, span)?; if let Some(resolved) = index_resolved.to_usize() { if resolved >= array.len() { - return Err(ExpressionError::array_index_out_of_bounds(resolved, span)); + return Err(LeoError::from(CompilerError::array_index_out_of_bounds(resolved, span));) } Ok(array[resolved].to_owned()) } else { if array.is_empty() { - return Err(ExpressionError::array_index_out_of_bounds(0, span)); + return Err(LeoError::from(CompilerError::array_index_out_of_bounds(0, span));) } { let array_len: u32 = array .len() .try_into() - .map_err(|_| ExpressionError::array_length_out_of_bounds(span))?; + .map_err(|_| LeoError::from(CompilerError::array_length_out_of_bounds(span)))?; self.array_bounds_check(cs, &&index_resolved, array_len, span)?; } @@ -104,17 +105,17 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let index_bounded = i .try_into() - .map_err(|_| ExpressionError::array_index_out_of_legal_bounds(span))?; + .map_err(|_| LeoError::from(CompilerError::array_index_out_of_legal_bounds(span)))?; let const_index = ConstInt::U32(index_bounded).cast_to(&index_resolved.get_type()); let index_comparison = index_resolved .evaluate_equal(eq_namespace, &Integer::new(&const_index)) - .map_err(|_| ExpressionError::cannot_evaluate("==".to_string(), span))?; + .map_err(|_| LeoError::from(CompilerError::cannot_evaluate("==".to_string(), span)))?; let unique_namespace = cs.ns(|| format!("select array access {} {}:{}", i, span.line_start, span.col_start)); let value = ConstrainedValue::conditionally_select(unique_namespace, &index_comparison, &item, ¤t_value) - .map_err(|e| ExpressionError::cannot_enforce("conditional select".to_string(), e, span))?; + .map_err(|e| LeoError::from(CompilerError::cannot_enforce("conditional select".to_string(), e, span)))?; current_value = value; } Ok(current_value) @@ -130,10 +131,10 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { right: Option<&'a Expression<'a>>, length: usize, span: &Span, - ) -> Result, ExpressionError> { + ) -> Result, LeoError> { let array = match self.enforce_expression(cs, array)? { ConstrainedValue::Array(array) => array, - value => return Err(ExpressionError::undefined_array(value.to_string(), span)), + value => return Err(LeoError::from(CompilerError::undefined_array(value.to_string(), span))), }; let from_resolved = match left { @@ -146,7 +147,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let index_bounded: u32 = array .len() .try_into() - .map_err(|_| ExpressionError::array_length_out_of_bounds(span))?; + .map_err(|_| LeoError::from(CompilerError::array_length_out_of_bounds(span)))?; Integer::new(&ConstInt::U32(index_bounded)) } // Array slice ends at array length }; @@ -158,10 +159,10 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { }; Ok(if let Some((left, right)) = const_dimensions { if right - left != length { - return Err(ExpressionError::array_invalid_slice_length(span)); + return Err(LeoError::from(CompilerError::array_invalid_slice_length(span))); } if right > array.len() { - return Err(ExpressionError::array_index_out_of_bounds(right, span)); + return Err(LeoError::from(CompilerError::array_index_out_of_bounds(right, span))); } ConstrainedValue::Array(array[left..right].to_owned()) } else { @@ -183,7 +184,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let mut unique_namespace = cs.ns(|| namespace_string); calc_len .enforce_equal(&mut unique_namespace, &Integer::new(&ConstInt::U32(length as u32))) - .map_err(|e| ExpressionError::cannot_enforce("array length check".to_string(), e, span))?; + .map_err(|e| LeoError::from(CompilerError::cannot_enforce("array length check".to_string(), e, span)))?; } { let bounds_check = evaluate_le::( @@ -203,7 +204,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let mut unique_namespace = cs.ns(|| namespace_string); bounds_check .enforce_equal(&mut unique_namespace, &Boolean::Constant(true)) - .map_err(|e| ExpressionError::cannot_enforce("array bounds check".to_string(), e, span))?; + .map_err(|e| LeoError::from(CompilerError::cannot_enforce("array bounds check".to_string(), e, span)))?; } let mut windows = array.windows(length); let mut result = ConstrainedValue::Array(vec![]); @@ -232,7 +233,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let unique_namespace = unique_namespace.ns(|| format!("array index {} {}:{}", i, span.line_start, span.col_start)); result = ConstrainedValue::conditionally_select(unique_namespace, &equality, &array_value, &result) - .map_err(|e| ExpressionError::cannot_enforce("conditional select".to_string(), e, span))?; + .map_err(|e| LeoError::from(CompilerError::cannot_enforce("conditional select".to_string(), e, span)))?; } result }) diff --git a/compiler/src/expression/array/array.rs b/compiler/src/expression/array/array.rs index f643850bc0..9a909cd6e4 100644 --- a/compiler/src/expression/array/array.rs +++ b/compiler/src/expression/array/array.rs @@ -18,8 +18,9 @@ use std::cell::Cell; -use crate::{errors::ExpressionError, program::ConstrainedProgram, value::ConstrainedValue, GroupType}; -use leo_asg::{Expression, Span}; +use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; +use leo_asg::Expression; +use leo_errors::{CompilerError, LeoError, Span}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -31,7 +32,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { cs: &mut CS, array: &[(Cell<&'a Expression<'a>>, bool)], span: &Span, - ) -> Result, ExpressionError> { + ) -> Result, LeoError> { let expected_dimension = None; let mut result = vec![]; @@ -51,7 +52,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { if let Some(dimension) = expected_dimension { // Return an error if the expected dimension != the actual dimension. if dimension != result.len() { - return Err(ExpressionError::invalid_length(dimension, result.len(), span)); + return Err(LeoError::from(CompilerError::invalid_length(dimension, result.len(), span))); } } @@ -67,7 +68,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { cs: &mut CS, element_expression: &'a Expression<'a>, actual_size: usize, - ) -> Result, ExpressionError> { + ) -> Result, LeoError> { let mut value = self.enforce_expression(cs, element_expression)?; // Allocate the array. diff --git a/compiler/src/expression/array/index.rs b/compiler/src/expression/array/index.rs index 7254090320..64b75fcc84 100644 --- a/compiler/src/expression/array/index.rs +++ b/compiler/src/expression/array/index.rs @@ -16,8 +16,10 @@ //! Enforces an array index expression in a compiled Leo program. -use crate::{errors::ExpressionError, program::ConstrainedProgram, value::ConstrainedValue, GroupType, Integer}; -use leo_asg::{Expression, Span}; +use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType, Integer}; +use leo_asg::Expression; +use leo_errors::{CompilerError, LeoError, Span}; + use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -28,10 +30,10 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { cs: &mut CS, index: &'a Expression<'a>, span: &Span, - ) -> Result { + ) -> Result { match self.enforce_expression(cs, index)? { ConstrainedValue::Integer(number) => Ok(number), - value => Err(ExpressionError::invalid_index(value.to_string(), span)), + value => Err(LeoError::from(CompilerError::invalid_index(value.to_string(), span))), } } } diff --git a/compiler/src/expression/binary/binary.rs b/compiler/src/expression/binary/binary.rs index 943bbacb64..1a78747ddf 100644 --- a/compiler/src/expression/binary/binary.rs +++ b/compiler/src/expression/binary/binary.rs @@ -16,8 +16,10 @@ //! Enforces a binary expression in a compiled Leo program. -use crate::{errors::ExpressionError, program::ConstrainedProgram, value::ConstrainedValue, GroupType}; +use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::Expression; +use leo_errors::LeoError; + use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -31,7 +33,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { cs: &mut CS, left: &'a Expression<'a>, right: &'a Expression<'a>, - ) -> Result, ExpressionError> { + ) -> Result, LeoError> { let resolved_left = { let mut left_namespace = cs.ns(|| "left".to_string()); self.enforce_expression(&mut left_namespace, left)? diff --git a/compiler/src/expression/circuit/access.rs b/compiler/src/expression/circuit/access.rs index 671e6543cc..8ff3288cc0 100644 --- a/compiler/src/expression/circuit/access.rs +++ b/compiler/src/expression/circuit/access.rs @@ -16,8 +16,10 @@ //! Enforces a circuit access expression in a compiled Leo program. -use crate::{errors::ExpressionError, program::ConstrainedProgram, value::ConstrainedValue, GroupType}; +use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::{CircuitAccessExpression, Node}; +use leo_errors::{CompilerError, LeoError}; + use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -28,7 +30,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { &mut self, cs: &mut CS, expr: &CircuitAccessExpression<'a>, - ) -> Result, ExpressionError> { + ) -> Result, LeoError> { if let Some(target) = expr.target.get() { //todo: we can prob pass values by ref here to avoid copying the entire circuit on access let target_value = self.enforce_expression(cs, target)?; @@ -38,23 +40,23 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { if let Some(member) = members.into_iter().find(|x| x.0.name == expr.member.name) { Ok(member.1) } else { - Err(ExpressionError::undefined_member_access( + Err(LeoError::from(CompilerError::undefined_member_access( expr.circuit.get().name.borrow().to_string(), expr.member.to_string(), &expr.member.span, - )) + ))) } } - value => Err(ExpressionError::undefined_circuit( + value => Err(LeoError::from(CompilerError::undefined_circuit( value.to_string(), &target.span().cloned().unwrap_or_default(), - )), + ))), } } else { - Err(ExpressionError::invalid_static_access( + Err(LeoError::from(CompilerError::invalid_static_access( expr.member.to_string(), &expr.member.span, - )) + ))) } } } diff --git a/compiler/src/expression/circuit/circuit.rs b/compiler/src/expression/circuit/circuit.rs index d5630a741f..de1b86c8d1 100644 --- a/compiler/src/expression/circuit/circuit.rs +++ b/compiler/src/expression/circuit/circuit.rs @@ -17,12 +17,12 @@ //! Enforces a circuit expression in a compiled Leo program. use crate::{ - errors::ExpressionError, program::ConstrainedProgram, value::{ConstrainedCircuitMember, ConstrainedValue}, GroupType, }; -use leo_asg::{CircuitInitExpression, CircuitMember, Span}; +use leo_asg::{CircuitInitExpression, CircuitMember}; +use leo_errors::{CompilerError, LeoError, Span}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -33,7 +33,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { cs: &mut CS, expr: &CircuitInitExpression<'a>, span: &Span, - ) -> Result, ExpressionError> { + ) -> Result, LeoError> { let circuit = expr.circuit.get(); let members = circuit.members.borrow(); @@ -49,7 +49,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let variable_value = self.enforce_expression(cs, inner.get())?; resolved_members.push(ConstrainedCircuitMember(name.clone(), variable_value)); } - _ => return Err(ExpressionError::expected_circuit_member(name.to_string(), span)), + _ => return Err(LeoError::from(CompilerError::expected_circuit_member(name.to_string(), span))), } } diff --git a/compiler/src/expression/conditional/conditional.rs b/compiler/src/expression/conditional/conditional.rs index 5502b76523..1fe5faa491 100644 --- a/compiler/src/expression/conditional/conditional.rs +++ b/compiler/src/expression/conditional/conditional.rs @@ -16,8 +16,10 @@ //! Enforces a conditional expression in a compiled Leo program. -use crate::{errors::ExpressionError, program::ConstrainedProgram, value::ConstrainedValue, GroupType}; -use leo_asg::{Expression, Span}; +use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; +use leo_asg::Expression; +use leo_errors::{CompilerError, LeoError, Span}; + use snarkvm_fields::PrimeField; use snarkvm_gadgets::traits::select::CondSelectGadget; @@ -33,10 +35,10 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { first: &'a Expression<'a>, second: &'a Expression<'a>, span: &Span, - ) -> Result, ExpressionError> { + ) -> Result, LeoError> { let conditional_value = match self.enforce_expression(cs, conditional)? { ConstrainedValue::Boolean(resolved) => resolved, - value => return Err(ExpressionError::conditional_boolean(value.to_string(), span)), + value => return Err(LeoError::from(CompilerError::conditional_boolean(value.to_string(), span))), }; let first_value = self.enforce_expression(cs, first)?; @@ -51,6 +53,6 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { }); ConstrainedValue::conditionally_select(unique_namespace, &conditional_value, &first_value, &second_value) - .map_err(|e| ExpressionError::cannot_enforce("conditional select".to_string(), e, span)) + .map_err(|e| LeoError::from(CompilerError::cannot_enforce("conditional select".to_string(), e, span))) } } diff --git a/compiler/src/expression/expression.rs b/compiler/src/expression/expression.rs index cc55b6d1d7..77579ce980 100644 --- a/compiler/src/expression/expression.rs +++ b/compiler/src/expression/expression.rs @@ -18,7 +18,6 @@ use crate::{ arithmetic::*, - errors::ExpressionError, logical::*, program::ConstrainedProgram, relational::*, @@ -27,7 +26,8 @@ use crate::{ FieldType, GroupType, }; -use leo_asg::{expression::*, ConstValue, Expression, Node, Span}; +use leo_asg::{expression::*, ConstValue, Expression, Node}; +use leo_errors::{CompilerError, LeoError, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::boolean::Boolean; @@ -39,7 +39,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { cs: &mut CS, value: &'a ConstValue<'a>, span: &Span, - ) -> Result, ExpressionError> { + ) -> Result, LeoError> { Ok(match value { ConstValue::Address(value) => ConstrainedValue::Address(Address::constant(value.to_string(), span)?), ConstValue::Boolean(value) => ConstrainedValue::Boolean(Boolean::Constant(*value)), @@ -93,7 +93,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { &mut self, cs: &mut CS, expression: &'a Expression<'a>, - ) -> Result, ExpressionError> { + ) -> Result, LeoError> { let span = &expression.span().cloned().unwrap_or_default(); match expression { // Cast @@ -118,14 +118,14 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { BinaryOperation::Div => enforce_div(cs, resolved_left, resolved_right, span), BinaryOperation::Pow => enforce_pow(cs, resolved_left, resolved_right, span), BinaryOperation::Or => { - enforce_or(cs, resolved_left, resolved_right, span).map_err(ExpressionError::BooleanError) + enforce_or(cs, resolved_left, resolved_right, span).map_err(LeoError::from(CompilerError::BooleanError)) } BinaryOperation::And => { - enforce_and(cs, resolved_left, resolved_right, span).map_err(ExpressionError::BooleanError) + enforce_and(cs, resolved_left, resolved_right, span).map_err(LeoError::from(CompilerError::BooleanError)) } BinaryOperation::Eq => evaluate_eq(cs, resolved_left, resolved_right, span), BinaryOperation::Ne => evaluate_not(evaluate_eq(cs, resolved_left, resolved_right, span)?, span) - .map_err(ExpressionError::BooleanError), + .map_err(LeoError::from(CompilerError::BooleanError)), BinaryOperation::Ge => evaluate_ge(cs, resolved_left, resolved_right, span), BinaryOperation::Gt => evaluate_gt(cs, resolved_left, resolved_right, span), BinaryOperation::Le => evaluate_le(cs, resolved_left, resolved_right, span), diff --git a/compiler/src/expression/function/core_circuit.rs b/compiler/src/expression/function/core_circuit.rs index c1a467724d..acfc84cb4e 100644 --- a/compiler/src/expression/function/core_circuit.rs +++ b/compiler/src/expression/function/core_circuit.rs @@ -18,8 +18,9 @@ use std::cell::Cell; use crate::{program::ConstrainedProgram, value::ConstrainedValue, CoreCircuit, GroupType}; -use crate::errors::ExpressionError; -use leo_asg::{Expression, Function, Span}; +use leo_asg::{Expression, Function}; +use leo_errors::{LeoError, Span}; + use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -34,7 +35,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { target: Option<&'a Expression<'a>>, arguments: &[Cell<&'a Expression<'a>>], span: &Span, - ) -> Result, ExpressionError> { + ) -> Result, LeoError> { let target_value = target.map(|target| self.enforce_expression(cs, target)).transpose()?; // Get the value of each core function argument diff --git a/compiler/src/expression/function/function.rs b/compiler/src/expression/function/function.rs index e67700d7a8..e71f41562d 100644 --- a/compiler/src/expression/function/function.rs +++ b/compiler/src/expression/function/function.rs @@ -18,8 +18,9 @@ use std::cell::Cell; -use crate::{errors::ExpressionError, program::ConstrainedProgram, value::ConstrainedValue, GroupType}; -use leo_asg::{Expression, Function, Span}; +use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; +use leo_asg::{Expression, Function}; +use leo_errors::{CompilerError, LeoError, Span}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -33,7 +34,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { target: Option<&'a Expression<'a>>, arguments: &[Cell<&'a Expression<'a>>], span: &Span, - ) -> Result, ExpressionError> { + ) -> Result, LeoError> { let name_unique = || { format!( "function call {} {}:{}", @@ -45,7 +46,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let return_value = self .enforce_function(&mut cs.ns(name_unique), &function, target, arguments) - .map_err(|error| ExpressionError::from(Box::new(error)))?; + .map_err(|error| LeoError::from(CompilerError::from(Box::new(error))))?; Ok(return_value) } diff --git a/compiler/src/expression/logical/and.rs b/compiler/src/expression/logical/and.rs index 51dd5996b8..25c178eec8 100644 --- a/compiler/src/expression/logical/and.rs +++ b/compiler/src/expression/logical/and.rs @@ -16,8 +16,8 @@ //! Enforces a logical `&&` operator in a resolved Leo program. -use crate::{errors::BooleanError, value::ConstrainedValue, GroupType}; -use leo_asg::Span; +use crate::{value::ConstrainedValue, GroupType}; +use leo_errors::{CompilerError, LeoError, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::boolean::Boolean; @@ -28,7 +28,7 @@ pub fn enforce_and<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( left: ConstrainedValue<'a, F, G>, right: ConstrainedValue<'a, F, G>, span: &Span, -) -> Result, BooleanError> { +) -> Result, LeoError> { let name = format!("{} && {}", left, right); if let (ConstrainedValue::Boolean(left_bool), ConstrainedValue::Boolean(right_bool)) = (left, right) { @@ -37,10 +37,10 @@ pub fn enforce_and<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( &left_bool, &right_bool, ) - .map_err(|e| BooleanError::cannot_enforce("&&".to_string(), e, span))?; + .map_err(|e| LeoError::from(CompilerError::cannot_enforce("&&".to_string(), e, span)))?; return Ok(ConstrainedValue::Boolean(result)); } - Err(BooleanError::cannot_evaluate(name, span)) + Err(LeoError::from(CompilerError::cannot_evaluate(name, span))) } diff --git a/compiler/src/expression/logical/not.rs b/compiler/src/expression/logical/not.rs index 98fc04317f..a8b094bb64 100644 --- a/compiler/src/expression/logical/not.rs +++ b/compiler/src/expression/logical/not.rs @@ -16,17 +16,17 @@ //! Enforces a logical `!` operator in a resolved Leo program. -use crate::{errors::BooleanError, value::ConstrainedValue, GroupType}; -use leo_asg::Span; +use crate::{value::ConstrainedValue, GroupType}; +use leo_errors::{CompilerError, LeoError, Span}; use snarkvm_fields::PrimeField; pub fn evaluate_not<'a, F: PrimeField, G: GroupType>( value: ConstrainedValue<'a, F, G>, span: &Span, -) -> Result, BooleanError> { +) -> Result, LeoError> { match value { ConstrainedValue::Boolean(boolean) => Ok(ConstrainedValue::Boolean(boolean.not())), - value => Err(BooleanError::cannot_evaluate(format!("!{}", value), span)), + value => Err(LeoError::from(CompilerError::cannot_evaluate(format!("!{}", value), span)),) } } diff --git a/compiler/src/expression/logical/or.rs b/compiler/src/expression/logical/or.rs index e7b0e2c5ae..638a0b6608 100644 --- a/compiler/src/expression/logical/or.rs +++ b/compiler/src/expression/logical/or.rs @@ -16,8 +16,8 @@ //! Enforces a logical `||` operator in a resolved Leo program. -use crate::{errors::BooleanError, value::ConstrainedValue, GroupType}; -use leo_asg::Span; +use crate::{value::ConstrainedValue, GroupType}; +use leo_errors::{CompilerError, LeoError, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::boolean::Boolean; @@ -28,7 +28,7 @@ pub fn enforce_or<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( left: ConstrainedValue<'a, F, G>, right: ConstrainedValue<'a, F, G>, span: &Span, -) -> Result, BooleanError> { +) -> Result, LeoError> { let name = format!("{} || {}", left, right); if let (ConstrainedValue::Boolean(left_bool), ConstrainedValue::Boolean(right_bool)) = (left, right) { @@ -37,10 +37,10 @@ pub fn enforce_or<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( &left_bool, &right_bool, ) - .map_err(|e| BooleanError::cannot_enforce("||".to_string(), e, span))?; + .map_err(|e| LeoError::from(CompilerError::cannot_enforce("||".to_string(), e, span)))?; return Ok(ConstrainedValue::Boolean(result)); } - Err(BooleanError::cannot_evaluate(name, span)) + Err(LeoError::from(CompilerError::cannot_evaluate(name, span))) } diff --git a/compiler/src/expression/relational/eq.rs b/compiler/src/expression/relational/eq.rs index 6e5fa0f874..52a2318c2c 100644 --- a/compiler/src/expression/relational/eq.rs +++ b/compiler/src/expression/relational/eq.rs @@ -16,8 +16,8 @@ //! Enforces a relational `==` operator in a resolved Leo program. -use crate::{enforce_and, errors::ExpressionError, value::ConstrainedValue, GroupType}; -use leo_asg::Span; +use crate::{enforce_and, value::ConstrainedValue, GroupType}; +use leo_errors::{CompilerError, LeoError, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::{boolean::Boolean, traits::eq::EvaluateEqGadget}; @@ -28,7 +28,7 @@ pub fn evaluate_eq<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( left: ConstrainedValue<'a, F, G>, right: ConstrainedValue<'a, F, G>, span: &Span, -) -> Result, ExpressionError> { +) -> Result, LeoError> { let namespace_string = format!("evaluate {} == {} {}:{}", left, right, span.line_start, span.col_start); let constraint_result = match (left, right) { (ConstrainedValue::Address(address_1), ConstrainedValue::Address(address_2)) => { @@ -75,14 +75,14 @@ pub fn evaluate_eq<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( return Ok(current); } (val_1, val_2) => { - return Err(ExpressionError::incompatible_types( + return Err(LeoError::from(CompilerError::incompatible_types( format!("{} == {}", val_1, val_2,), span, - )); + ))); } }; - let boolean = constraint_result.map_err(|_| ExpressionError::cannot_evaluate("==".to_string(), span))?; + let boolean = constraint_result.map_err(|_| LeoError::from(CompilerError::cannot_evaluate("==".to_string(), span)))?; Ok(ConstrainedValue::Boolean(boolean)) } diff --git a/compiler/src/expression/relational/ge.rs b/compiler/src/expression/relational/ge.rs index 4c0eaae137..261caabf2c 100644 --- a/compiler/src/expression/relational/ge.rs +++ b/compiler/src/expression/relational/ge.rs @@ -16,8 +16,8 @@ //! Enforces a relational `>=` operator in a resolved Leo program. -use crate::{errors::ExpressionError, value::ConstrainedValue, GroupType}; -use leo_asg::Span; +use crate::{value::ConstrainedValue, GroupType}; +use leo_errors::{CompilerError, LeoError, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::traits::bits::ComparatorGadget; @@ -28,21 +28,21 @@ pub fn evaluate_ge<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( left: ConstrainedValue<'a, F, G>, right: ConstrainedValue<'a, F, G>, span: &Span, -) -> Result, ExpressionError> { +) -> Result, LeoError> { let unique_namespace = cs.ns(|| format!("evaluate {} >= {} {}:{}", left, right, span.line_start, span.col_start)); let constraint_result = match (left, right) { (ConstrainedValue::Integer(num_1), ConstrainedValue::Integer(num_2)) => { num_1.greater_than_or_equal(unique_namespace, &num_2) } (val_1, val_2) => { - return Err(ExpressionError::incompatible_types( + return Err(LeoError::from(CompilerError::incompatible_types( format!("{} >= {}", val_1, val_2), span, - )); + ))); } }; - let boolean = constraint_result.map_err(|_| ExpressionError::cannot_evaluate(">=".to_string(), span))?; + let boolean = constraint_result.map_err(|_| LeoError::from(CompilerError::cannot_evaluate(">=".to_string(), span)))?; Ok(ConstrainedValue::Boolean(boolean)) } diff --git a/compiler/src/expression/relational/gt.rs b/compiler/src/expression/relational/gt.rs index ff90419a45..079fcb94e9 100644 --- a/compiler/src/expression/relational/gt.rs +++ b/compiler/src/expression/relational/gt.rs @@ -16,8 +16,8 @@ //! Enforces a relational `>` operator in a resolved Leo program. -use crate::{errors::ExpressionError, value::ConstrainedValue, GroupType}; -use leo_asg::Span; +use crate::{value::ConstrainedValue, GroupType}; +use leo_errors::{CompilerError, LeoError, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::traits::bits::ComparatorGadget; @@ -28,21 +28,21 @@ pub fn evaluate_gt<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( left: ConstrainedValue<'a, F, G>, right: ConstrainedValue<'a, F, G>, span: &Span, -) -> Result, ExpressionError> { +) -> Result, LeoError> { let unique_namespace = cs.ns(|| format!("evaluate {} > {} {}:{}", left, right, span.line_start, span.col_start)); let constraint_result = match (left, right) { (ConstrainedValue::Integer(num_1), ConstrainedValue::Integer(num_2)) => { num_1.greater_than(unique_namespace, &num_2) } (val_1, val_2) => { - return Err(ExpressionError::incompatible_types( + return Err(LeoError::from(CompilerError::incompatible_types( format!("{} > {}", val_1, val_2), span, - )); + ))); } }; - let boolean = constraint_result.map_err(|_| ExpressionError::cannot_evaluate(">".to_string(), span))?; + let boolean = constraint_result.map_err(|_| LeoError::from(CompilerError::cannot_evaluate(">".to_string(), span)))?; Ok(ConstrainedValue::Boolean(boolean)) } diff --git a/compiler/src/expression/relational/le.rs b/compiler/src/expression/relational/le.rs index 9bce73f1be..ef6ea15dc1 100644 --- a/compiler/src/expression/relational/le.rs +++ b/compiler/src/expression/relational/le.rs @@ -16,8 +16,8 @@ //! Enforces a relational `<=` operator in a resolved Leo program. -use crate::{errors::ExpressionError, value::ConstrainedValue, GroupType}; -use leo_asg::Span; +use crate::{value::ConstrainedValue, GroupType}; +use leo_errors::{CompilerError, LeoError, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::traits::bits::ComparatorGadget; @@ -28,21 +28,21 @@ pub fn evaluate_le<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( left: ConstrainedValue<'a, F, G>, right: ConstrainedValue<'a, F, G>, span: &Span, -) -> Result, ExpressionError> { +) -> Result, LeoError> { let unique_namespace = cs.ns(|| format!("evaluate {} <= {} {}:{}", left, right, span.line_start, span.col_start)); let constraint_result = match (left, right) { (ConstrainedValue::Integer(num_1), ConstrainedValue::Integer(num_2)) => { num_1.less_than_or_equal(unique_namespace, &num_2) } (val_1, val_2) => { - return Err(ExpressionError::incompatible_types( + return Err(LeoError::from(CompilerError::incompatible_types( format!("{} <= {}", val_1, val_2), span, - )); + ))); } }; - let boolean = constraint_result.map_err(|_| ExpressionError::cannot_evaluate("<=".to_string(), span))?; + let boolean = constraint_result.map_err(|_| LeoError::from(CompilerError::cannot_evaluate("<=".to_string(), span)))?; Ok(ConstrainedValue::Boolean(boolean)) } diff --git a/compiler/src/expression/relational/lt.rs b/compiler/src/expression/relational/lt.rs index 4beb907241..96308fee52 100644 --- a/compiler/src/expression/relational/lt.rs +++ b/compiler/src/expression/relational/lt.rs @@ -16,8 +16,8 @@ //! Enforces a relational `<` operator in a resolved Leo program. -use crate::{errors::ExpressionError, value::ConstrainedValue, GroupType}; -use leo_asg::Span; +use crate::{value::ConstrainedValue, GroupType}; +use leo_errors::{CompilerError, LeoError, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::traits::bits::EvaluateLtGadget; @@ -28,21 +28,21 @@ pub fn evaluate_lt<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( left: ConstrainedValue<'a, F, G>, right: ConstrainedValue<'a, F, G>, span: &Span, -) -> Result, ExpressionError> { +) -> Result, LeoError> { let unique_namespace = cs.ns(|| format!("evaluate {} < {} {}:{}", left, right, span.line_start, span.col_start)); let constraint_result = match (left, right) { (ConstrainedValue::Integer(num_1), ConstrainedValue::Integer(num_2)) => { num_1.less_than(unique_namespace, &num_2) } (val_1, val_2) => { - return Err(ExpressionError::incompatible_types( + return Err(LeoError::from(CompilerError::incompatible_types( format!("{} < {}", val_1, val_2), span, - )); + ))); } }; - let boolean = constraint_result.map_err(|_| ExpressionError::cannot_evaluate("<".to_string(), span))?; + let boolean = constraint_result.map_err(|_| LeoError::from(CompilerError::cannot_evaluate("<".to_string(), span)))?; Ok(ConstrainedValue::Boolean(boolean)) } diff --git a/compiler/src/expression/tuple/access.rs b/compiler/src/expression/tuple/access.rs index 842c714ab2..6552b98a1b 100644 --- a/compiler/src/expression/tuple/access.rs +++ b/compiler/src/expression/tuple/access.rs @@ -16,8 +16,10 @@ //! Enforces array access in a compiled Leo program. -use crate::{errors::ExpressionError, program::ConstrainedProgram, value::ConstrainedValue, GroupType}; -use leo_asg::{Expression, Span}; +use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; +use leo_asg::Expression; +use leo_errors::{CompilerError, LeoError, Span}; + use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -30,17 +32,17 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { tuple: &'a Expression<'a>, index: usize, span: &Span, - ) -> Result, ExpressionError> { + ) -> Result, LeoError> { // Get the tuple values. let tuple = match self.enforce_expression(cs, tuple)? { ConstrainedValue::Tuple(tuple) => tuple, - value => return Err(ExpressionError::undefined_array(value.to_string(), span)), + value => return Err(LeoError::from(CompilerError::undefined_array(value.to_string(), span))), }; // Check for out of bounds access. if index > tuple.len() - 1 { // probably safe to be a panic here - return Err(ExpressionError::tuple_index_out_of_bounds(index, span)); + return Err(LeoError::from(CompilerError::tuple_index_out_of_bounds(index, span))); } Ok(tuple[index].to_owned()) diff --git a/compiler/src/expression/tuple/tuple.rs b/compiler/src/expression/tuple/tuple.rs index 45ce92d86d..772a9d72d2 100644 --- a/compiler/src/expression/tuple/tuple.rs +++ b/compiler/src/expression/tuple/tuple.rs @@ -18,8 +18,10 @@ use std::cell::Cell; -use crate::{errors::ExpressionError, program::ConstrainedProgram, value::ConstrainedValue, GroupType}; +use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::Expression; +use leo_errors::LeoError; + use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -30,7 +32,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { &mut self, cs: &mut CS, tuple: &[Cell<&'a Expression<'a>>], - ) -> Result, ExpressionError> { + ) -> Result, LeoError> { let mut result = Vec::with_capacity(tuple.len()); for expression in tuple.iter() { result.push(self.enforce_expression(cs, expression.get())?); diff --git a/compiler/src/expression/variable_ref/variable_ref.rs b/compiler/src/expression/variable_ref/variable_ref.rs index abc07ddf82..6c0ee2233b 100644 --- a/compiler/src/expression/variable_ref/variable_ref.rs +++ b/compiler/src/expression/variable_ref/variable_ref.rs @@ -16,21 +16,23 @@ //! Enforces an identifier expression in a compiled Leo program. -use crate::{errors::ExpressionError, program::ConstrainedProgram, value::ConstrainedValue, GroupType}; +use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::VariableRef; +use leo_errors::{CompilerError, LeoError}; + use snarkvm_fields::PrimeField; impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { /// Enforce a variable expression by getting the resolved value - pub fn evaluate_ref(&mut self, variable_ref: &VariableRef) -> Result, ExpressionError> { + pub fn evaluate_ref(&mut self, variable_ref: &VariableRef) -> Result, LeoError> { // Evaluate the identifier name in the current function scope let variable = variable_ref.variable.borrow(); let result_value = if let Some(value) = self.get(variable.id) { value.clone() } else { - return Err(ExpressionError::undefined_identifier(variable.name.clone())); + return Err(LeoError::from(CompilerError::undefined_identifier(variable.name.clone()))); // todo: probably can be a panic here instead }; diff --git a/compiler/src/function/function.rs b/compiler/src/function/function.rs index 2ecc340d17..6c9ac81dbb 100644 --- a/compiler/src/function/function.rs +++ b/compiler/src/function/function.rs @@ -32,7 +32,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { function: &'a Function<'a>, target: Option<&'a Expression<'a>>, arguments: &[Cell<&'a Expression<'a>>], - ) -> Result, FunctionError> { + ) -> Result, LeoError> { let target_value = target.map(|target| self.enforce_expression(cs, target)).transpose()?; let self_var = if let Some(target) = &target_value { @@ -47,7 +47,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { }; if function.arguments.len() != arguments.len() { - return Err(FunctionError::input_not_found( + return Err(LeoError::from(CompilerError::input_not_found() "arguments length invalid".to_string(), &function.span.clone().unwrap_or_default(), )); @@ -90,6 +90,6 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { // Conditionally select a result based on returned indicators Self::conditionally_select_result(cs, &output, results, &function.span.clone().unwrap_or_default()) - .map_err(FunctionError::StatementError) + .map_err(LeoError::from(CompilerError::StatementError)) } } diff --git a/compiler/src/function/input/array.rs b/compiler/src/function/input/array.rs index 5ac984e118..a78ffbd718 100644 --- a/compiler/src/function/input/array.rs +++ b/compiler/src/function/input/array.rs @@ -16,10 +16,11 @@ //! Allocates an array as a main function input parameter in a compiled Leo program. -use crate::{errors::FunctionError, program::ConstrainedProgram, value::ConstrainedValue, GroupType}; +use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::Type; -use leo_ast::{InputValue, Span}; +use leo_ast::InputValue; +use leo_errors::{CompilerError, LeoError, Span}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -33,18 +34,18 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { array_len: usize, input_value: Option, span: &Span, - ) -> Result, FunctionError> { + ) -> Result, LeoError> { // Build the array value using the expected types. let mut array_value = vec![]; match input_value { Some(InputValue::Array(arr)) => { if array_len != arr.len() { - return Err(FunctionError::invalid_input_array_dimensions( + return Err(LeoError::from(CompilerError::invalid_input_array_dimensions( arr.len(), array_len, span, - )); + ))); } // Allocate each value in the current row @@ -69,7 +70,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { } } _ => { - return Err(FunctionError::invalid_array(input_value.unwrap().to_string(), span)); + return Err(LeoError::from(CompilerError::invalid_array(input_value.unwrap().to_string(), span))); } } diff --git a/compiler/src/function/input/input_keyword.rs b/compiler/src/function/input/input_keyword.rs index 9db9e13b1e..bf5d4a98be 100644 --- a/compiler/src/function/input/input_keyword.rs +++ b/compiler/src/function/input/input_keyword.rs @@ -14,9 +14,11 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{errors::FunctionError, ConstrainedCircuitMember, ConstrainedProgram, ConstrainedValue, GroupType}; +use crate::{ConstrainedCircuitMember, ConstrainedProgram, ConstrainedValue, GroupType}; use leo_asg::{Circuit, CircuitMember, Type}; -use leo_ast::{Identifier, Input, Span}; +use leo_ast::{Identifier, Input}; +use leo_errors::{LeoError, Span}; + use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -34,7 +36,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { span: &Span, expected_type: &'a Circuit<'a>, input: &Input, - ) -> Result, FunctionError> { + ) -> Result, LeoError> { // Create an identifier for each input variable let registers_name = Identifier { diff --git a/compiler/src/function/input/input_section.rs b/compiler/src/function/input/input_section.rs index 1fc8b1f988..169062c090 100644 --- a/compiler/src/function/input/input_section.rs +++ b/compiler/src/function/input/input_section.rs @@ -14,9 +14,11 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{errors::FunctionError, ConstrainedCircuitMember, ConstrainedProgram, ConstrainedValue, GroupType}; -use leo_asg::{AsgConvertError, Circuit, CircuitMember}; +use crate::{ConstrainedCircuitMember, ConstrainedProgram, ConstrainedValue, GroupType}; +use leo_asg::{Circuit, CircuitMember}; use leo_ast::{Identifier, InputValue, Parameter}; +use leo_errors::{AsgError, LeoError}; + use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -30,7 +32,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { identifier: Identifier, expected_type: &'a Circuit<'a>, section: IndexMap>, - ) -> Result, FunctionError> { + ) -> Result, LeoError> { let mut members = Vec::with_capacity(section.len()); // Allocate each section definition as a circuit member value @@ -42,12 +44,12 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { }; let declared_type = self.asg.scope.resolve_ast_type(¶meter.type_)?; if !expected_type.is_assignable_from(&declared_type) { - return Err(AsgConvertError::unexpected_type( + return Err(LeoError::from(AsgError::unexpected_type( &expected_type.to_string(), Some(&declared_type.to_string()), &identifier.span, ) - .into()); + .into())); } let member_name = parameter.variable.clone(); let member_value = self.allocate_main_function_input( diff --git a/compiler/src/function/input/main_function_input.rs b/compiler/src/function/input/main_function_input.rs index 75379676fe..9fde6b78d5 100644 --- a/compiler/src/function/input/main_function_input.rs +++ b/compiler/src/function/input/main_function_input.rs @@ -18,7 +18,6 @@ use crate::{ address::Address, - errors::{FunctionError, IntegerError}, program::ConstrainedProgram, value::{ boolean::input::bool_from_input, @@ -33,7 +32,9 @@ use crate::{ Integer, }; use leo_asg::{ConstInt, Type}; -use leo_ast::{Char, InputValue, Span}; +use leo_ast::{Char, InputValue}; +use leo_errors::{CompilerError, LeoError, Span}; + use snarkvm_fields::PrimeField; use snarkvm_gadgets::boolean::Boolean; @@ -47,7 +48,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { name: &str, input_option: Option, span: &Span, - ) -> Result, FunctionError> { + ) -> Result, LeoError> { match type_ { Type::Address => Ok(Address::from_input(cs, name, input_option, span)?), Type::Boolean => Ok(bool_from_input(cs, name, input_option, span)?), @@ -77,8 +78,8 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { name: &str, input_option: Option, span: &Span, - ) -> Result, FunctionError> { - let input = input_option.ok_or_else(|| FunctionError::input_not_found(name.to_string(), span))?; + ) -> Result, LeoError> { + let input = input_option.ok_or_else(|| LeoError::from(CompilerError::input_not_found(name.to_string(), span)))?; match (type_, input) { (Type::Address, InputValue::Address(addr)) => Ok(ConstrainedValue::Address(Address::constant(addr, span)?)), @@ -106,7 +107,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let parsed_type = parsed.get_int_type(); let input_type = input_type.into(); if std::mem::discriminant(&parsed_type) != std::mem::discriminant(&input_type) { - return Err(FunctionError::from(IntegerError::integer_type_mismatch( + return Err(LeoError::from(CompilerError::integer_type_mismatch( input_type.to_string(), parsed_type.to_string(), span, @@ -116,11 +117,11 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { } (Type::Array(type_, arr_len), InputValue::Array(values)) => { if *arr_len != values.len() { - return Err(FunctionError::invalid_input_array_dimensions( + return Err(LeoError::from(CompilerError::invalid_input_array_dimensions( *arr_len, values.len(), span, - )); + ))); } Ok(ConstrainedValue::Array( @@ -132,7 +133,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { } (Type::Tuple(types), InputValue::Tuple(values)) => { if values.len() != types.len() { - return Err(FunctionError::tuple_size_mismatch(types.len(), values.len(), span)); + return Err(LeoError::from(CompilerError::tuple_size_mismatch(types.len(), values.len(), span))); } Ok(ConstrainedValue::Tuple( @@ -148,12 +149,12 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { (Type::Circuit(_), _) => unimplemented!("main function input not implemented for type {}", type_), // Should not happen. // Return an error if the input type and input value do not match. - (_, input) => Err(FunctionError::input_type_mismatch( + (_, input) => Err(LeoError::from(CompilerError::input_type_mismatch( type_.to_string(), input.to_string(), name.to_string(), span, - )), + ))), } } } diff --git a/compiler/src/function/input/tuple.rs b/compiler/src/function/input/tuple.rs index f35922718b..204d4be89f 100644 --- a/compiler/src/function/input/tuple.rs +++ b/compiler/src/function/input/tuple.rs @@ -16,10 +16,11 @@ //! Allocates an array as a main function input parameter in a compiled Leo program. -use crate::{errors::FunctionError, program::ConstrainedProgram, value::ConstrainedValue, GroupType}; +use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::Type; -use leo_ast::{InputValue, Span}; +use leo_ast::InputValue; +use leo_errors::{CompilerError, LeoError, Span}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -32,13 +33,13 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { types: &[Type], input_value: Option, span: &Span, - ) -> Result, FunctionError> { + ) -> Result, LeoError> { let mut tuple_values = vec![]; match input_value { Some(InputValue::Tuple(values)) => { if values.len() != types.len() { - return Err(FunctionError::tuple_size_mismatch(types.len(), values.len(), span)); + return Err(LeoError::from(CompilerError::tuple_size_mismatch(types.len(), values.len(), span))); } // Allocate each value in the tuple. @@ -57,7 +58,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { } } _ => { - return Err(FunctionError::invalid_tuple(input_value.unwrap().to_string(), span)); + return Err(LeoError::from(CompilerError::invalid_tuple(input_value.unwrap().to_string(), span))); } } diff --git a/compiler/src/function/main_function.rs b/compiler/src/function/main_function.rs index 8fe7e3a635..eeed11a946 100644 --- a/compiler/src/function/main_function.rs +++ b/compiler/src/function/main_function.rs @@ -31,7 +31,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { cs: &mut CS, function: &'a Function<'a>, input: &Input, - ) -> Result { + ) -> Result { let registers = input.get_registers(); // Iterate over main function input variables and allocate new values @@ -65,7 +65,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { ) { // If variable is in both [main] and [constants] sections - error. (_, Some(_), Some(_)) => { - return Err(FunctionError::double_input_declaration( + return Err(LeoError::from(CompilerError::double_input_declaration() name.to_string(), &input_variable.name.span, )); @@ -88,21 +88,21 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { )?, // Function argument is const, input is not. (true, Some(_), None) => { - return Err(FunctionError::expected_const_input( + return Err(LeoError::from(CompilerError::expected_const_input() name.to_string(), &input_variable.name.span, )); } // Input is const, function argument is not. (false, None, Some(_)) => { - return Err(FunctionError::expected_non_const_input( + return Err(LeoError::from(CompilerError::expected_non_const_input() name.to_string(), &input_variable.name.span, )); } // When not found - Error out. (_, _, _) => { - return Err(FunctionError::input_not_found( + return Err(LeoError::from(CompilerError::input_not_found() name.to_string(), &input_variable.name.span, )); diff --git a/compiler/src/function/mut_target.rs b/compiler/src/function/mut_target.rs index f9ecd96351..a9a69c26c2 100644 --- a/compiler/src/function/mut_target.rs +++ b/compiler/src/function/mut_target.rs @@ -40,7 +40,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { fn prepare_mut_access( out: &mut Vec>, expr: &'a Expression<'a>, - ) -> Result>, StatementError> { + ) -> Result>, LeoError> { match expr { Expression::ArrayRangeAccess(ArrayRangeAccessExpression { array, left, right, .. }) => { let inner = Self::prepare_mut_access(out, array.get())?; @@ -84,7 +84,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { assignee: &'a Expression<'a>, target_value: ConstrainedValue<'a, F, G>, indicator: &Boolean, - ) -> Result { + ) -> Result { let mut accesses = vec![]; let target = Self::prepare_mut_access(&mut accesses, assignee)?; if target.is_none() { diff --git a/compiler/src/function/result/result.rs b/compiler/src/function/result/result.rs index a0f71b896c..2192349103 100644 --- a/compiler/src/function/result/result.rs +++ b/compiler/src/function/result/result.rs @@ -40,7 +40,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { expected_return: &Type<'a>, results: Vec<(Boolean, ConstrainedValue<'a, F, G>)>, span: &Span, - ) -> Result, StatementError> { + ) -> Result, LeoError> { // Initialize empty return value. let mut return_value = None; @@ -60,7 +60,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { if get_indicator_value(&indicator) { // Error if we already have a return value. if return_value.is_some() { - return Err(StatementError::multiple_returns(span)); + return Err(LeoError::from(CompilerError::multiple_returns(span));) } else { // Set the function return value. return_value = Some(result); @@ -84,7 +84,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { &result, &value, ) - .map_err(|_| StatementError::select_fail(result.to_string(), value.to_string(), span))?, + .map_err(|_| LeoError::from(CompilerError::select_fail(result.to_string(), value.to_string(), span)))?, ); } else { return_value = Some(result); // we ignore indicator for default -- questionable @@ -94,7 +94,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { if expected_return.is_unit() { Ok(ConstrainedValue::Tuple(vec![])) } else { - return_value.ok_or_else(|| StatementError::no_returns(&expected_return, span)) + return_value.ok_or_else(|| LeoError::from(CompilerError::no_returns(&expected_return, span))) } } } diff --git a/compiler/src/lib.rs b/compiler/src/lib.rs index 631e923f38..a99bb5cc07 100644 --- a/compiler/src/lib.rs +++ b/compiler/src/lib.rs @@ -21,9 +21,6 @@ #![allow(clippy::module_inception)] #![allow(clippy::upper_case_acronyms)] -#[macro_use] -extern crate thiserror; - pub mod compiler; pub mod console; @@ -34,8 +31,6 @@ pub use constraints::*; pub mod definition; -pub mod errors; - pub mod expression; pub use expression::*; diff --git a/compiler/src/output/mod.rs b/compiler/src/output/mod.rs index 89d09e6823..6d10ac741d 100644 --- a/compiler/src/output/mod.rs +++ b/compiler/src/output/mod.rs @@ -22,9 +22,10 @@ pub use self::output_file::*; pub mod output_bytes; pub use self::output_bytes::*; -use crate::{errors::OutputBytesError, Char, CharType, ConstrainedValue, GroupType, REGISTERS_VARIABLE_NAME}; +use crate::{Char, CharType, ConstrainedValue, GroupType, REGISTERS_VARIABLE_NAME}; use leo_asg::Program; -use leo_ast::{Parameter, Registers, Span}; +use leo_ast::{Parameter, Registers}; +use leo_errors::{CompilerError, LeoError, Span}; use snarkvm_fields::PrimeField; @@ -88,7 +89,7 @@ impl Output { registers: &Registers, value: ConstrainedValue<'a, F, G>, span: &Span, - ) -> Result { + ) -> Result { let return_values = match value { ConstrainedValue::Tuple(tuple) => tuple, value => vec![value], @@ -105,7 +106,7 @@ impl Output { // Return an error if we do not have enough return registers if register_values.len() < return_values.len() { - return Err(OutputBytesError::not_enough_registers(span)); + return Err(LeoError::from(CompilerError::not_enough_registers(span));) } let mut registers = BTreeMap::new(); @@ -118,11 +119,11 @@ impl Output { let return_value_type = value.to_type(span)?; if !register_type.is_assignable_from(&return_value_type) { - return Err(OutputBytesError::mismatched_output_types( + return Err(LeoError::from(CompilerError::mismatched_output_types( ®ister_type, &return_value_type, span, - )); + ))); } let value = match value { diff --git a/compiler/src/output/output_bytes.rs b/compiler/src/output/output_bytes.rs index 9060f2e40c..07f8af6644 100644 --- a/compiler/src/output/output_bytes.rs +++ b/compiler/src/output/output_bytes.rs @@ -14,9 +14,10 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{errors::OutputBytesError, ConstrainedValue, GroupType, REGISTERS_VARIABLE_NAME}; +use crate::{ConstrainedValue, GroupType, REGISTERS_VARIABLE_NAME}; use leo_asg::Program; -use leo_ast::{Parameter, Registers, Span}; +use leo_ast::{Parameter, Registers}; +use leo_errors::{CompilerError, LeoError, Span}; use snarkvm_fields::PrimeField; @@ -37,7 +38,7 @@ impl OutputBytes { value: ConstrainedValue<'a, F, G>, span: &Span, - ) -> Result { + ) -> Result { let return_values = match value { ConstrainedValue::Tuple(values) => values, value => vec![value], @@ -54,7 +55,7 @@ impl OutputBytes { // Return an error if we do not have enough return registers if register_values.len() < return_values.len() { - return Err(OutputBytesError::not_enough_registers(span)); + return Err(LeoError::from(CompilerError::not_enough_registers(span));) } // Manually construct result string @@ -72,11 +73,11 @@ impl OutputBytes { let return_value_type = value.to_type(span)?; if !register_type.is_assignable_from(&return_value_type) { - return Err(OutputBytesError::mismatched_output_types( + return Err(LeoError::from(CompilerError::mismatched_output_types( ®ister_type, &return_value_type, span, - )); + ))); } let value = value.to_string(); diff --git a/compiler/src/output/output_file.rs b/compiler/src/output/output_file.rs index b9b2570baf..60b4a3b372 100644 --- a/compiler/src/output/output_file.rs +++ b/compiler/src/output/output_file.rs @@ -16,7 +16,8 @@ //! The `program.out` file. -use crate::errors::OutputFileError; +use leo_errors::{CompilerError, LeoError}; + use std::{ borrow::Cow, @@ -43,7 +44,7 @@ impl OutputFile { } /// Writes output to a file. - pub fn write(&self, path: &Path, bytes: &[u8]) -> Result<(), OutputFileError> { + pub fn write(&self, path: &Path, bytes: &[u8]) -> Result<(), LeoError> { // create output file let path = self.setup_file_path(path); let mut file = File::create(&path)?; @@ -53,13 +54,13 @@ impl OutputFile { /// Removes the output file at the given path if it exists. Returns `true` on success, /// `false` if the file doesn't exist, and `Error` if the file system fails during operation. - pub fn remove(&self, path: &Path) -> Result { + pub fn remove(&self, path: &Path) -> Result { let path = self.setup_file_path(path); if !path.exists() { return Ok(false); } - fs::remove_file(&path).map_err(|_| OutputFileError::FileRemovalError(path.into_owned()))?; + fs::remove_file(&path).map_err(|_| LeoError::from(CompilerError::FileRemovalError(path.into_owned())))?; Ok(true) } diff --git a/compiler/src/phases/phase.rs b/compiler/src/phases/phase.rs index 1423fa47fa..b2c5c65348 100644 --- a/compiler/src/phases/phase.rs +++ b/compiler/src/phases/phase.rs @@ -18,7 +18,9 @@ use crate::{CombineAstAsgDirector, CombinerOptions}; use leo_asg::Program as AsgProgram; -use leo_ast::{Ast, Program as AstProgram, ReconstructingReducer, ReducerError}; +use leo_ast::{Ast, Program as AstProgram, ReconstructingReducer}; +use leo_errors::LeoError; + macro_rules! phase { ($phase_name:ident, $function:item) => { @@ -49,7 +51,7 @@ macro_rules! phase { } impl $phase_name { - pub fn phase_ast(&self, ast: &AstProgram, asg: &AsgProgram) -> Result { + pub fn phase_ast(&self, ast: &AstProgram, asg: &AsgProgram) -> Result { Ok(Ast::new(CombineAstAsgDirector::new(Self::default(), Options{}) .reduce_program(ast, asg)?)) } diff --git a/compiler/src/phases/reducing_director.rs b/compiler/src/phases/reducing_director.rs index 2a934909a8..82b8bc6df5 100644 --- a/compiler/src/phases/reducing_director.rs +++ b/compiler/src/phases/reducing_director.rs @@ -74,7 +74,6 @@ use leo_ast::{ CircuitMember as AstCircuitMember, CircuitMemberAccessExpression, CircuitStaticFunctionAccessExpression, - CombinerError, ConditionalStatement as AstConditionalStatement, ConsoleArgs as AstConsoleArgs, ConsoleFunction as AstConsoleFunction, @@ -88,9 +87,7 @@ use leo_ast::{ IterationStatement as AstIterationStatement, PositiveNumber, ReconstructingReducer, - ReducerError, ReturnStatement as AstReturnStatement, - Span, SpreadOrExpression, Statement as AstStatement, TernaryExpression as AstTernaryExpression, @@ -100,6 +97,7 @@ use leo_ast::{ UnaryExpression as AstUnaryExpression, ValueExpression, }; +use leo_errors::{AstError, LeoError, Span}; use tendril::StrTendril; pub trait CombinerOptions { @@ -118,7 +116,7 @@ impl CombineAstAsgDirector { Self { ast_reducer, options } } - pub fn reduce_type(&mut self, ast: &AstType, asg: &AsgType, span: &Span) -> Result { + pub fn reduce_type(&mut self, ast: &AstType, asg: &AsgType, span: &Span) -> Result { let new = match (ast, asg) { (AstType::Array(ast_type, ast_dimensions), AsgType::Array(asg_type, asg_dimensions)) => { if self.options.type_inference_enabled() { @@ -153,7 +151,7 @@ impl CombineAstAsgDirector { &mut self, ast: &AstExpression, asg: &AsgExpression, - ) -> Result { + ) -> Result { let new = match (ast, asg) { (AstExpression::Value(value), AsgExpression::Constant(const_)) => self.reduce_value(&value, &const_)?, (AstExpression::Binary(ast), AsgExpression::Binary(asg)) => { @@ -208,7 +206,7 @@ impl CombineAstAsgDirector { &mut self, ast: &AstArrayAccessExpression, asg: &AsgArrayAccessExpression, - ) -> Result { + ) -> Result { let array = self.reduce_expression(&ast.array, asg.array.get())?; let index = self.reduce_expression(&ast.index, asg.index.get())?; @@ -219,7 +217,7 @@ impl CombineAstAsgDirector { &mut self, ast: &AstArrayInitExpression, asg: &AsgArrayInitExpression, - ) -> Result { + ) -> Result { let element = self.reduce_expression(&ast.element, asg.element.get())?; self.ast_reducer.reduce_array_init(ast, element) @@ -229,7 +227,7 @@ impl CombineAstAsgDirector { &mut self, ast: &AstArrayInlineExpression, asg: &AsgArrayInlineExpression, - ) -> Result { + ) -> Result { let mut elements = vec![]; for (ast_element, asg_element) in ast.elements.iter().zip(asg.elements.iter()) { let reduced_element = match ast_element { @@ -251,7 +249,7 @@ impl CombineAstAsgDirector { &mut self, ast: &AstArrayRangeAccessExpression, asg: &AsgArrayRangeAccessExpression, - ) -> Result { + ) -> Result { let array = self.reduce_expression(&ast.array, asg.array.get())?; let left = match (ast.left.as_ref(), asg.left.get()) { (Some(ast_left), Some(asg_left)) => Some(self.reduce_expression(ast_left, asg_left)?), @@ -269,7 +267,7 @@ impl CombineAstAsgDirector { &mut self, ast: &AstBinaryExpression, asg: &AsgBinaryExpression, - ) -> Result { + ) -> Result { let left = self.reduce_expression(&ast.left, asg.left.get())?; let right = self.reduce_expression(&ast.right, asg.right.get())?; @@ -280,7 +278,7 @@ impl CombineAstAsgDirector { &mut self, ast: &AstCallExpression, asg: &AsgCallExpression, - ) -> Result { + ) -> Result { // TODO FIGURE IT OUT // let function = self.reduce_expression(&ast.function, asg.function.get())?; // let target = asg.target.get().map(|exp| self.reduce_expression()) @@ -298,7 +296,7 @@ impl CombineAstAsgDirector { &mut self, ast: &AstCastExpression, asg: &AsgCastExpression, - ) -> Result { + ) -> Result { let inner = self.reduce_expression(&ast.inner, &asg.inner.get())?; let target_type = self.reduce_type(&ast.target_type, &asg.target_type, &ast.span)?; @@ -309,7 +307,7 @@ impl CombineAstAsgDirector { &mut self, ast: &CircuitMemberAccessExpression, _asg: &AsgCircuitAccessExpression, - ) -> Result { + ) -> Result { // let circuit = self.reduce_expression(&circuit_member_access.circuit)?; // let name = self.reduce_identifier(&circuit_member_access.name)?; // let target = input.target.get().map(|e| self.reduce_expression(e)); @@ -322,7 +320,7 @@ impl CombineAstAsgDirector { &mut self, ast: &CircuitStaticFunctionAccessExpression, _asg: &AsgCircuitAccessExpression, - ) -> Result { + ) -> Result { // let circuit = self.reduce_expression(&circuit_member_access.circuit)?; // let name = self.reduce_identifier(&circuit_member_access.name)?; // let target = input.target.get().map(|e| self.reduce_expression(e)); @@ -335,7 +333,7 @@ impl CombineAstAsgDirector { &mut self, ast: &CircuitImpliedVariableDefinition, asg: &AsgExpression, - ) -> Result { + ) -> Result { let expression = ast .expression .as_ref() @@ -350,7 +348,7 @@ impl CombineAstAsgDirector { &mut self, ast: &AstCircuitInitExpression, asg: &AsgCircuitInitExpression, - ) -> Result { + ) -> Result { let mut members = vec![]; for (ast_member, asg_member) in ast.members.iter().zip(asg.values.iter()) { members.push(self.reduce_circuit_implied_variable_definition(ast_member, asg_member.1.get())?); @@ -363,7 +361,7 @@ impl CombineAstAsgDirector { &mut self, ast: &AstTernaryExpression, asg: &AsgTernaryExpression, - ) -> Result { + ) -> Result { let condition = self.reduce_expression(&ast.condition, asg.condition.get())?; let if_true = self.reduce_expression(&ast.if_true, asg.if_true.get())?; let if_false = self.reduce_expression(&ast.if_false, asg.if_false.get())?; @@ -375,7 +373,7 @@ impl CombineAstAsgDirector { &mut self, ast: &AstTupleAccessExpression, asg: &AsgTupleAccessExpression, - ) -> Result { + ) -> Result { let tuple = self.reduce_expression(&ast.tuple, asg.tuple_ref.get())?; self.ast_reducer.reduce_tuple_access(ast, tuple) @@ -385,7 +383,7 @@ impl CombineAstAsgDirector { &mut self, ast: &AstTupleInitExpression, asg: &AsgTupleInitExpression, - ) -> Result { + ) -> Result { let mut elements = vec![]; for (ast_element, asg_element) in ast.elements.iter().zip(asg.elements.iter()) { let element = self.reduce_expression(ast_element, asg_element.get())?; @@ -399,13 +397,13 @@ impl CombineAstAsgDirector { &mut self, ast: &AstUnaryExpression, asg: &AsgUnaryExpression, - ) -> Result { + ) -> Result { let inner = self.reduce_expression(&ast.inner, asg.inner.get())?; self.ast_reducer.reduce_unary(ast, inner, ast.op.clone()) } - pub fn reduce_value(&mut self, ast: &ValueExpression, asg: &AsgConstant) -> Result { + pub fn reduce_value(&mut self, ast: &ValueExpression, asg: &AsgConstant) -> Result { let mut new = ast.clone(); if self.options.type_inference_enabled() { @@ -458,7 +456,7 @@ impl CombineAstAsgDirector { &mut self, ast: &ValueExpression, _asg: &AsgVariableRef, - ) -> Result { + ) -> Result { // TODO FIGURE IT OUT let new = match ast { // ValueExpression::Group(group_value) => { @@ -475,7 +473,7 @@ impl CombineAstAsgDirector { &mut self, ast_statement: &AstStatement, asg_statement: &AsgStatement, - ) -> Result { + ) -> Result { let new = match (ast_statement, asg_statement) { (AstStatement::Assign(ast), AsgStatement::Assign(asg)) => { AstStatement::Assign(self.reduce_assign(ast, asg)?) @@ -509,7 +507,7 @@ impl CombineAstAsgDirector { &mut self, ast: &AstAssignAccess, asg: &AsgAssignAccess, - ) -> Result { + ) -> Result { let new = match (ast, asg) { (AstAssignAccess::ArrayRange(ast_left, ast_right), AsgAssignAccess::ArrayRange(asg_left, asg_right)) => { let left = match (ast_left.as_ref(), asg_left.get()) { @@ -533,7 +531,7 @@ impl CombineAstAsgDirector { self.ast_reducer.reduce_assignee_access(ast, new) } - pub fn reduce_assignee(&mut self, ast: &Assignee, asg: &[AsgAssignAccess]) -> Result { + pub fn reduce_assignee(&mut self, ast: &Assignee, asg: &[AsgAssignAccess]) -> Result { let mut accesses = vec![]; for (ast_access, asg_access) in ast.accesses.iter().zip(asg) { accesses.push(self.reduce_assign_access(ast_access, asg_access)?); @@ -546,7 +544,7 @@ impl CombineAstAsgDirector { &mut self, ast: &AstAssignStatement, asg: &AsgAssignStatement, - ) -> Result { + ) -> Result { let assignee = self.reduce_assignee(&ast.assignee, &asg.target_accesses)?; let value = self.reduce_expression(&ast.value, asg.value.get())?; @@ -557,7 +555,7 @@ impl CombineAstAsgDirector { &mut self, ast: &AstBlockStatement, asg: &AsgBlockStatement, - ) -> Result { + ) -> Result { let mut statements = vec![]; for (ast_statement, asg_statement) in ast.statements.iter().zip(asg.statements.iter()) { statements.push(self.reduce_statement(ast_statement, asg_statement.get())?); @@ -570,13 +568,13 @@ impl CombineAstAsgDirector { &mut self, ast: &AstConditionalStatement, asg: &AsgConditionalStatement, - ) -> Result { + ) -> Result { let condition = self.reduce_expression(&ast.condition, asg.condition.get())?; let block; if let AsgStatement::Block(asg_block) = asg.result.get() { block = self.reduce_block(&ast.block, asg_block)?; } else { - return Err(ReducerError::from(CombinerError::asg_statement_not_block( + return Err(LeoError::from(AstError::asg_statement_not_block( &asg.span.as_ref().unwrap(), ))); } @@ -592,7 +590,7 @@ impl CombineAstAsgDirector { &mut self, ast: &AstConsoleStatement, asg: &AsgConsoleStatement, - ) -> Result { + ) -> Result { let function = match (&ast.function, &asg.function) { (AstConsoleFunction::Assert(ast_expression), AsgConsoleFunction::Assert(asg_expression)) => { AstConsoleFunction::Assert(self.reduce_expression(&ast_expression, asg_expression.get())?) @@ -615,7 +613,7 @@ impl CombineAstAsgDirector { match &ast.function { AstConsoleFunction::Error(_) => AstConsoleFunction::Error(args), AstConsoleFunction::Log(_) => AstConsoleFunction::Log(args), - _ => return Err(ReducerError::impossible_console_assert_call(&ast_console_args.span)), + _ => return Err(LeoError::from(AstError::impossible_console_assert_call(&ast_console_args.span))), } } _ => ast.function.clone(), @@ -628,7 +626,7 @@ impl CombineAstAsgDirector { &mut self, ast: &AstDefinitionStatement, asg: &AsgDefinitionStatement, - ) -> Result { + ) -> Result { let type_; if asg.variables.len() > 1 { @@ -666,7 +664,7 @@ impl CombineAstAsgDirector { &mut self, ast: &AstExpressionStatement, asg: &AsgExpressionStatement, - ) -> Result { + ) -> Result { let inner_expression = self.reduce_expression(&ast.expression, asg.expression.get())?; self.ast_reducer.reduce_expression_statement(ast, inner_expression) } @@ -675,14 +673,14 @@ impl CombineAstAsgDirector { &mut self, ast: &AstIterationStatement, asg: &AsgIterationStatement, - ) -> Result { + ) -> Result { let start = self.reduce_expression(&ast.start, asg.start.get())?; let stop = self.reduce_expression(&ast.stop, asg.stop.get())?; let block; if let AsgStatement::Block(asg_block) = asg.body.get() { block = self.reduce_block(&ast.block, asg_block)?; } else { - return Err(ReducerError::from(CombinerError::asg_statement_not_block( + return Err(LeoError::from(AstError::asg_statement_not_block( &asg.span.as_ref().unwrap(), ))); } @@ -695,7 +693,7 @@ impl CombineAstAsgDirector { &mut self, ast: &AstReturnStatement, asg: &AsgReturnStatement, - ) -> Result { + ) -> Result { let expression = self.reduce_expression(&ast.expression, asg.expression.get())?; self.ast_reducer.reduce_return(ast, expression) @@ -705,7 +703,7 @@ impl CombineAstAsgDirector { &mut self, ast: &leo_ast::Program, asg: &leo_asg::Program, - ) -> Result { + ) -> Result { self.ast_reducer.swap_in_circuit(); let mut circuits = IndexMap::new(); for ((ast_ident, ast_circuit), (_asg_ident, asg_circuit)) in ast.circuits.iter().zip(&asg.circuits) { @@ -734,7 +732,7 @@ impl CombineAstAsgDirector { ) } - pub fn reduce_function(&mut self, ast: &AstFunction, asg: &AsgFunction) -> Result { + pub fn reduce_function(&mut self, ast: &AstFunction, asg: &AsgFunction) -> Result { let output = ast .output .as_ref() @@ -767,7 +765,7 @@ impl CombineAstAsgDirector { &mut self, ast: &AstCircuitMember, asg: &AsgCircuitMember, - ) -> Result { + ) -> Result { let new = match (ast, asg) { (AstCircuitMember::CircuitVariable(identifier, ast_type), AsgCircuitMember::Variable(asg_type)) => { AstCircuitMember::CircuitVariable( @@ -784,7 +782,7 @@ impl CombineAstAsgDirector { self.ast_reducer.reduce_circuit_member(ast, new) } - pub fn reduce_circuit(&mut self, ast: &AstCircuit, asg: &AsgCircuit) -> Result { + pub fn reduce_circuit(&mut self, ast: &AstCircuit, asg: &AsgCircuit) -> Result { let mut members = vec![]; for (ast_member, asg_member) in ast.members.iter().zip(asg.members.borrow().iter()) { members.push(self.reduce_circuit_member(ast_member, asg_member.1)?); diff --git a/compiler/src/prelude/blake2s.rs b/compiler/src/prelude/blake2s.rs index e22ac21f14..5463921f12 100644 --- a/compiler/src/prelude/blake2s.rs +++ b/compiler/src/prelude/blake2s.rs @@ -15,8 +15,9 @@ // along with the Leo library. If not, see . use super::CoreCircuit; -use crate::{errors::ExpressionError, ConstrainedValue, GroupType, Integer}; -use leo_asg::{Function, Span}; +use crate::{ConstrainedValue, GroupType, Integer}; +use leo_asg::Function; +use leo_errors::{CompilerError, LeoError, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::{ @@ -54,7 +55,7 @@ impl<'a, F: PrimeField, G: GroupType> CoreCircuit<'a, F, G> for Blake2s { span: &Span, target: Option>, mut arguments: Vec>, - ) -> Result, ExpressionError> { + ) -> Result, LeoError> { assert_eq!(arguments.len(), 2); // asg enforced assert!(function.name.borrow().name.as_ref() == "hash"); // asg enforced assert!(target.is_none()); // asg enforced @@ -62,12 +63,12 @@ impl<'a, F: PrimeField, G: GroupType> CoreCircuit<'a, F, G> for Blake2s { let seed = unwrap_argument(arguments.remove(0)); let digest = Blake2sGadget::check_evaluation_gadget(cs.ns(|| "blake2s hash"), &seed[..], &input[..]) - .map_err(|e| ExpressionError::cannot_enforce("Blake2s check evaluation gadget".to_owned(), e, span))?; + .map_err(|e| LeoError::from(CompilerError::cannot_enforce("Blake2s check evaluation gadget".to_owned(), e, span)))?; Ok(ConstrainedValue::Array( digest .to_bytes(cs) - .map_err(|e| ExpressionError::cannot_enforce("Vec ToBytes".to_owned(), e, span))? + .map_err(|e| LeoError::from(CompilerError::cannot_enforce("Vec ToBytes".to_owned(), e, span)))? .into_iter() .map(Integer::U8) .map(ConstrainedValue::Integer) diff --git a/compiler/src/prelude/mod.rs b/compiler/src/prelude/mod.rs index 736308274b..d73a6d079e 100644 --- a/compiler/src/prelude/mod.rs +++ b/compiler/src/prelude/mod.rs @@ -17,8 +17,10 @@ pub mod blake2s; pub use blake2s::*; -use crate::{errors::ExpressionError, ConstrainedValue, GroupType}; -use leo_asg::{Function, Span}; +use crate::{ConstrainedValue, GroupType}; +use leo_asg::Function; +use leo_errors::{LeoError, Span}; + use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -30,7 +32,7 @@ pub trait CoreCircuit<'a, F: PrimeField, G: GroupType>: Send + Sync { span: &Span, target: Option>, arguments: Vec>, - ) -> Result, ExpressionError>; + ) -> Result, LeoError>; } pub fn resolve_core_circuit<'a, F: PrimeField, G: GroupType>(name: &str) -> impl CoreCircuit<'a, F, G> { diff --git a/compiler/src/statement/assign/assign.rs b/compiler/src/statement/assign/assign.rs index a535d8214e..68d43ef0e5 100644 --- a/compiler/src/statement/assign/assign.rs +++ b/compiler/src/statement/assign/assign.rs @@ -16,8 +16,10 @@ //! Enforces an assign statement in a compiled Leo program. -use crate::{arithmetic::*, errors::StatementError, program::ConstrainedProgram, value::ConstrainedValue, GroupType}; -use leo_asg::{AssignOperation, AssignStatement, Span}; +use crate::{arithmetic::*, program::ConstrainedProgram, value::ConstrainedValue, GroupType}; +use leo_asg::{AssignOperation, AssignStatement}; +use leo_errors::{CompilerError, LeoError}; + use snarkvm_fields::PrimeField; use snarkvm_gadgets::{boolean::Boolean, traits::select::CondSelectGadget}; @@ -30,7 +32,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { cs: &mut CS, indicator: &Boolean, statement: &AssignStatement<'a>, - ) -> Result<(), StatementError> { + ) -> Result<(), LeoError> { // Get the name of the variable we are assigning to let new_value = self.enforce_expression(cs, statement.value.get())?; @@ -47,7 +49,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { target: &mut ConstrainedValue<'a, F, G>, new_value: ConstrainedValue<'a, F, G>, span: &Span, - ) -> Result<(), StatementError> { + ) -> Result<(), LeoError> { let new_value = match operation { AssignOperation::Assign => new_value, AssignOperation::Add => enforce_add(cs, target.clone(), new_value, span)?, @@ -58,7 +60,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { _ => unimplemented!("unimplemented assign operator"), }; let selected_value = ConstrainedValue::conditionally_select(cs.ns(|| scope), condition, &new_value, target) - .map_err(|_| StatementError::select_fail(new_value.to_string(), target.to_string(), span))?; + .map_err(|_| LeoError::from(CompilerError::select_fail(new_value.to_string(), target.to_string(), span)))?; *target = selected_value; Ok(()) diff --git a/compiler/src/statement/assign/assignee/array_index.rs b/compiler/src/statement/assign/assignee/array_index.rs index 4b7fc6f3b0..7b1fdf94cb 100644 --- a/compiler/src/statement/assign/assignee/array_index.rs +++ b/compiler/src/statement/assign/assignee/array_index.rs @@ -19,13 +19,14 @@ use std::convert::TryInto; use crate::{ - errors::{ExpressionError, StatementError}, program::ConstrainedProgram, value::ConstrainedValue, GroupType, Integer, }; use leo_asg::{ConstInt, Expression, Node}; +use leo_errors::{CompilerError, LeoError}; + use snarkvm_fields::PrimeField; use snarkvm_gadgets::traits::{eq::EvaluateEqGadget, select::CondSelectGadget}; @@ -39,7 +40,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { cs: &mut CS, mut context: ResolverContext<'a, 'b, F, G>, index: &'a Expression<'a>, - ) -> Result<(), StatementError> { + ) -> Result<(), LeoError> { let input_len = context.input.len(); let index_resolved = self.enforce_index(cs, index, &context.span)?; @@ -48,11 +49,11 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { ConstrainedValue::Array(input) => { if let Some(index) = index_resolved.to_usize() { if index >= input.len() { - Err(StatementError::array_assign_index_bounds( + Err(LeoError::from(CompilerError::array_assign_index_bounds( index, input.len(), &context.span, - )) + ))) } else { let target = input.get_mut(index).unwrap(); if context.remaining_accesses.is_empty() { @@ -68,7 +69,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let array_len: u32 = input .len() .try_into() - .map_err(|_| ExpressionError::array_length_out_of_bounds(&span))?; + .map_err(|_| LeoError::from(CompilerError::array_length_out_of_bounds(&span)))?; self.array_bounds_check(cs, &&index_resolved, array_len, &span)?; } @@ -81,11 +82,11 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let index_bounded = i .try_into() - .map_err(|_| ExpressionError::array_index_out_of_legal_bounds(&span))?; + .map_err(|_| LeoError::from(CompilerError::array_index_out_of_legal_bounds(&span)))?; let const_index = ConstInt::U32(index_bounded).cast_to(&index_resolved.get_type()); let index_comparison = index_resolved .evaluate_equal(eq_namespace, &Integer::new(&const_index)) - .map_err(|_| ExpressionError::cannot_evaluate("==".to_string(), &span))?; + .map_err(|_| LeoError::from(CompilerError::cannot_evaluate("==".to_string(), &span)))?; let mut unique_namespace = cs.ns(|| { format!( @@ -118,23 +119,23 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { &temp_item, &item, ) - .map_err(|e| ExpressionError::cannot_enforce("conditional select".to_string(), e, &span))?; + .map_err(|e| LeoError::from(CompilerError::cannot_enforce("conditional select".to_string(), e, &span)))?; *item = value; } Ok(()) } } - _ => Err(StatementError::array_assign_interior_index(&context.span)), + _ => Err(LeoError::from(CompilerError::array_assign_interior_index(&context.span))), } } else if context.from_range && input_len != 0 { context.from_range = false; if let Some(index) = index_resolved.to_usize() { if index >= input_len { - return Err(StatementError::array_assign_index_bounds( + return Err(LeoError::from(CompilerError::array_assign_index_bounds( index, input_len, &context.span, - )); + ))); } let target = context.input.remove(index); @@ -152,7 +153,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { .input .len() .try_into() - .map_err(|_| ExpressionError::array_length_out_of_bounds(&span))?; + .map_err(|_| LeoError::from(CompilerError::array_length_out_of_bounds(&span)))?; self.array_bounds_check(cs, &&index_resolved, array_len, &span)?; } @@ -165,11 +166,11 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let index_bounded = i .try_into() - .map_err(|_| ExpressionError::array_index_out_of_legal_bounds(&span))?; + .map_err(|_| LeoError::from(CompilerError::array_index_out_of_legal_bounds(&span)))?; let const_index = ConstInt::U32(index_bounded).cast_to(&index_resolved.get_type()); let index_comparison = index_resolved .evaluate_equal(eq_namespace, &Integer::new(&const_index)) - .map_err(|_| ExpressionError::cannot_evaluate("==".to_string(), &span))?; + .map_err(|_| LeoError::from(CompilerError::cannot_evaluate("==".to_string(), &span)))?; let mut unique_namespace = cs.ns(|| { format!( @@ -198,13 +199,13 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { }; let value = ConstrainedValue::conditionally_select(unique_namespace, &index_comparison, &temp_item, &item) - .map_err(|e| ExpressionError::cannot_enforce("conditional select".to_string(), e, &span))?; + .map_err(|e| LeoError::from(CompilerError::cannot_enforce("conditional select".to_string(), e, &span)))?; **item = value; } Ok(()) } } else { - Err(StatementError::array_assign_interior_index(&context.span)) + Err(LeoError::from(CompilerError::array_assign_interior_index(&context.span))) } } } diff --git a/compiler/src/statement/assign/assignee/array_range_index.rs b/compiler/src/statement/assign/assignee/array_range_index.rs index 3712a06382..511263bbdb 100644 --- a/compiler/src/statement/assign/assignee/array_range_index.rs +++ b/compiler/src/statement/assign/assignee/array_range_index.rs @@ -16,8 +16,9 @@ //! Resolves assignees in a compiled Leo program. -use crate::{errors::StatementError, program::ConstrainedProgram, value::ConstrainedValue, GroupType}; +use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::Expression; +use leo_errors::{CompilerError, LeoError}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -31,13 +32,13 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { mut context: ResolverContext<'a, 'b, F, G>, start: Option<&'a Expression<'a>>, stop: Option<&'a Expression<'a>>, - ) -> Result<(), StatementError> { + ) -> Result<(), LeoError> { let start_index = start .map(|start| self.enforce_index(cs, start, &context.span)) .transpose()? .map(|x| { x.to_usize() - .ok_or_else(|| StatementError::array_assign_index_const(&context.span)) + .ok_or_else(|| LeoError::from(CompilerError::array_assign_index_const(&context.span))) }) .transpose()?; let stop_index = stop @@ -45,7 +46,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { .transpose()? .map(|x| { x.to_usize() - .ok_or_else(|| StatementError::array_assign_index_const(&context.span)) + .ok_or_else(|| LeoError::from(CompilerError::array_assign_index_const(&context.span))) }) .transpose()?; let start_index = start_index.unwrap_or(0); @@ -74,7 +75,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { } Ok(()) } - _ => Err(StatementError::array_assign_index(&context.span)), + _ => Err(LeoError::from(CompilerError::array_assign_index(&context.span)),) } } else { // range of a range diff --git a/compiler/src/statement/assign/assignee/member.rs b/compiler/src/statement/assign/assignee/member.rs index c51c70514d..fe537748f5 100644 --- a/compiler/src/statement/assign/assignee/member.rs +++ b/compiler/src/statement/assign/assignee/member.rs @@ -14,8 +14,9 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{errors::StatementError, program::ConstrainedProgram, value::ConstrainedValue, GroupType}; +use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::Identifier; +use leo_errors::{CompilerError, LeoError}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -28,9 +29,9 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { cs: &mut CS, mut context: ResolverContext<'a, 'b, F, G>, name: &Identifier, - ) -> Result<(), StatementError> { + ) -> Result<(), LeoError> { if context.input.len() != 1 { - return Err(StatementError::array_assign_interior_index(&context.span)); + return Err(LeoError::from(CompilerError::array_assign_interior_index(&context.span))); } match context.input.remove(0) { ConstrainedValue::CircuitExpression(_variable, members) => { @@ -44,15 +45,15 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { } None => { // Throw an error if the circuit variable does not exist in the circuit - Err(StatementError::undefined_circuit_variable( + Err(LeoError::from(CompilerError::undefined_circuit_variable( name.to_string(), &context.span, - )) + ))) } } } // Throw an error if the circuit definition does not exist in the file - x => Err(StatementError::undefined_circuit(x.to_string(), &context.span)), + x => Err(LeoError::from(CompilerError::undefined_circuit(x.to_string(), &context.span)),) } } } diff --git a/compiler/src/statement/assign/assignee/mod.rs b/compiler/src/statement/assign/assignee/mod.rs index d6e5a67f70..9a4b96c153 100644 --- a/compiler/src/statement/assign/assignee/mod.rs +++ b/compiler/src/statement/assign/assignee/mod.rs @@ -16,8 +16,9 @@ //! Resolves assignees in a compiled Leo program. -use crate::{errors::StatementError, program::ConstrainedProgram, value::ConstrainedValue, GroupType}; -use leo_asg::{AssignAccess, AssignOperation, AssignStatement, Span}; +use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; +use leo_asg::{AssignAccess, AssignOperation, AssignStatement}; +use leo_errors::{CompilerError, LeoError, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::boolean::Boolean; @@ -44,7 +45,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { cs: &mut CS, context: &ResolverContext<'a, 'b, F, G>, target: &mut ConstrainedValue<'a, F, G>, - ) -> Result<(), StatementError> { + ) -> Result<(), LeoError> { Self::enforce_assign_operation( cs, context.indicator, @@ -60,7 +61,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { &mut self, cs: &mut CS, mut context: ResolverContext<'a, 'b, F, G>, - ) -> Result<(), StatementError> { + ) -> Result<(), LeoError> { if context.remaining_accesses.is_empty() { if context.input.len() != 1 { panic!("invalid non-array-context multi-value assignment"); @@ -89,7 +90,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { assignee: &AssignStatement<'a>, target_value: ConstrainedValue<'a, F, G>, indicator: &Boolean, - ) -> Result<(), StatementError> { + ) -> Result<(), LeoError> { let span = assignee.span.clone().unwrap_or_default(); let variable = assignee.target_variable.get().borrow(); @@ -113,18 +114,18 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { stop_index: usize, len: usize, span: &Span, - ) -> Result<(), StatementError> { + ) -> Result<(), LeoError> { if stop_index < start_index { - Err(StatementError::array_assign_range_order( + Err(LeoError::from(CompilerError::array_assign_range_order( start_index, stop_index, len, span, - )) + ))) } else if start_index > len { - Err(StatementError::array_assign_index_bounds(start_index, len, span)) + Err(LeoError::from(CompilerError::array_assign_index_bounds(start_index, len, span))) } else if stop_index > len { - Err(StatementError::array_assign_index_bounds(stop_index, len, span)) + Err(LeoError::from(CompilerError::array_assign_index_bounds(stop_index, len, span))) } else { Ok(()) } diff --git a/compiler/src/statement/assign/assignee/tuple.rs b/compiler/src/statement/assign/assignee/tuple.rs index 34df5a3477..c0145ab132 100644 --- a/compiler/src/statement/assign/assignee/tuple.rs +++ b/compiler/src/statement/assign/assignee/tuple.rs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{errors::StatementError, program::ConstrainedProgram, value::ConstrainedValue, GroupType}; +use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; +use leo_errors::{CompilerError, LeoError}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -27,24 +28,24 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { cs: &mut CS, mut context: ResolverContext<'a, 'b, F, G>, index: usize, - ) -> Result<(), StatementError> { + ) -> Result<(), LeoError> { if context.input.len() != 1 { - return Err(StatementError::array_assign_interior_index(&context.span)); + return Err(LeoError::from(CompilerError::array_assign_interior_index(&context.span))); } match context.input.remove(0) { ConstrainedValue::Tuple(old) => { if index > old.len() { - Err(StatementError::tuple_assign_index_bounds( + Err(LeoError::from(CompilerError::tuple_assign_index_bounds( index, old.len(), &context.span, - )) + ))) } else { context.input = vec![&mut old[index]]; self.resolve_target_access(cs, context) } } - _ => Err(StatementError::tuple_assign_index(&context.span)), + _ => Err(LeoError::from(CompilerError::tuple_assign_index(&context.span))), } } } diff --git a/compiler/src/statement/conditional/conditional.rs b/compiler/src/statement/conditional/conditional.rs index 3fe7469209..48169b42a4 100644 --- a/compiler/src/statement/conditional/conditional.rs +++ b/compiler/src/statement/conditional/conditional.rs @@ -17,7 +17,6 @@ //! Methods to enforce constraints on statements in a compiled Leo program. use crate::{ - errors::StatementError, program::ConstrainedProgram, value::ConstrainedValue, GroupType, @@ -25,6 +24,8 @@ use crate::{ StatementResult, }; use leo_asg::ConditionalStatement; +use leo_errors::{CompilerError, LeoError}; + use snarkvm_fields::PrimeField; use snarkvm_gadgets::boolean::Boolean; @@ -57,7 +58,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let inner_indicator = match self.enforce_expression(cs, statement.condition.get())? { ConstrainedValue::Boolean(resolved) => resolved, value => { - return Err(StatementError::conditional_boolean(value.to_string(), &span)); + return Err(LeoError::from(CompilerError::conditional_boolean(value.to_string(), &span))); } }; @@ -73,7 +74,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { outer_indicator, &inner_indicator, ) - .map_err(|_| StatementError::indicator_calculation(branch_1_name, &span))?; + .map_err(|_| LeoError::from(CompilerError::indicator_calculation(branch_1_name, &span)))?; let mut results = vec![]; @@ -94,7 +95,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { &outer_indicator, &inner_indicator, ) - .map_err(|_| StatementError::indicator_calculation(branch_2_name, &span))?; + .map_err(|_| LeoError::from(CompilerError::indicator_calculation(branch_2_name, &span)))?; // Evaluate branch 2 let mut branch_2_result = match statement.next.get() { diff --git a/compiler/src/statement/definition/definition.rs b/compiler/src/statement/definition/definition.rs index e0b7eca6ea..5c2fea7467 100644 --- a/compiler/src/statement/definition/definition.rs +++ b/compiler/src/statement/definition/definition.rs @@ -16,8 +16,9 @@ //! Enforces a definition statement in a compiled Leo program. -use crate::{errors::StatementError, program::ConstrainedProgram, ConstrainedValue, GroupType}; -use leo_asg::{DefinitionStatement, Span, Variable}; +use crate::{program::ConstrainedProgram, ConstrainedValue, GroupType}; +use leo_asg::{DefinitionStatement, Variable}; +use leo_errors::{CompilerError, LeoError, Span}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -28,13 +29,13 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { variable_names: &[&'a Variable<'a>], values: Vec>, span: &Span, - ) -> Result<(), StatementError> { + ) -> Result<(), LeoError> { if values.len() != variable_names.len() { - return Err(StatementError::invalid_number_of_definitions( + return Err(LeoError::from(CompilerError::invalid_number_of_definitions( values.len(), variable_names.len(), span, - )); + ))); } for (variable, value) in variable_names.iter().zip(values.into_iter()) { @@ -49,7 +50,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { &mut self, cs: &mut CS, statement: &DefinitionStatement<'a>, - ) -> Result<(), StatementError> { + ) -> Result<(), LeoError> { let num_variables = statement.variables.len(); let expression = self.enforce_expression(cs, statement.value.get())?; @@ -63,7 +64,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let values = match expression { // ConstrainedValue::Return(values) => values, ConstrainedValue::Tuple(values) => values, - value => return Err(StatementError::multiple_definition(value.to_string(), &span)), + value => return Err(LeoError::from(CompilerError::multiple_definition(value.to_string(), &span))), }; self.enforce_multiple_definition(&statement.variables[..], values, &span) diff --git a/compiler/src/statement/iteration/iteration.rs b/compiler/src/statement/iteration/iteration.rs index ea7af7a1eb..b2f9b0df67 100644 --- a/compiler/src/statement/iteration/iteration.rs +++ b/compiler/src/statement/iteration/iteration.rs @@ -17,7 +17,6 @@ //! Enforces an iteration statement in a compiled Leo program. use crate::{ - errors::StatementError, program::ConstrainedProgram, value::ConstrainedValue, GroupType, @@ -27,6 +26,8 @@ use crate::{ StatementResult, }; use leo_asg::IterationStatement; +use leo_errors::{CompilerError, LeoError}; + use snarkvm_fields::PrimeField; use snarkvm_gadgets::{boolean::Boolean, integers::uint::UInt32}; @@ -47,11 +48,11 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let from = self .enforce_index(cs, statement.start.get(), &span)? .to_usize() - .ok_or_else(|| StatementError::loop_index_const(&span))?; + .ok_or_else(|| LeoError::from(CompilerError::loop_index_const(&span)))?; let to = self .enforce_index(cs, statement.stop.get(), &span)? .to_usize() - .ok_or_else(|| StatementError::loop_index_const(&span))?; + .ok_or_else(|| LeoError::from(CompilerError::loop_index_const(&span)))?; let iter: Box> = match (from < to, statement.inclusive) { (true, true) => Box::new(from..=to), diff --git a/compiler/src/statement/return_/return_.rs b/compiler/src/statement/return_/return_.rs index 91e23c9e04..3563d82e33 100644 --- a/compiler/src/statement/return_/return_.rs +++ b/compiler/src/statement/return_/return_.rs @@ -16,8 +16,9 @@ //! Enforces a return statement in a compiled Leo program. -use crate::{errors::StatementError, program::ConstrainedProgram, value::ConstrainedValue, GroupType}; +use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::ReturnStatement; +use leo_errors::LeoError; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -27,7 +28,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { &mut self, cs: &mut CS, statement: &ReturnStatement<'a>, - ) -> Result, StatementError> { + ) -> Result, LeoError> { let result = self.enforce_expression(cs, statement.expression.get())?; Ok(result) } diff --git a/compiler/src/statement/statement.rs b/compiler/src/statement/statement.rs index 4e349fcbc5..59dca4941b 100644 --- a/compiler/src/statement/statement.rs +++ b/compiler/src/statement/statement.rs @@ -16,14 +16,15 @@ //! Enforces a statement in a compiled Leo program. -use crate::{errors::StatementError, program::ConstrainedProgram, value::ConstrainedValue, GroupType}; +use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::{Node, Statement}; +use leo_errors::{CompilerError, LeoError}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::boolean::Boolean; use snarkvm_r1cs::ConstraintSystem; -pub type StatementResult = Result; +pub type StatementResult = Result; pub type IndicatorAndConstrainedValue<'a, T, U> = (Boolean, ConstrainedValue<'a, T, U>); impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { @@ -81,7 +82,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { } } _ => { - return Err(StatementError::unassigned(&statement.span.clone().unwrap_or_default())); + return Err(LeoError::from(CompilerError::unassigned(&statement.span.clone().unwrap_or_default()))); } } } diff --git a/compiler/src/test.rs b/compiler/src/test.rs index 62c17db6f1..5e7965ba43 100644 --- a/compiler/src/test.rs +++ b/compiler/src/test.rs @@ -18,6 +18,8 @@ use std::path::{Path, PathBuf}; use leo_asg::*; use leo_ast::{Ast, Program}; +use leo_errors::LeoError; + use leo_synthesizer::{CircuitSynthesizer, SerializedCircuit, SummarizedCircuit}; use leo_test_framework::{ runner::{Namespace, ParseType, Runner}, @@ -28,7 +30,6 @@ use snarkvm_curves::{bls12_377::Bls12_377, edwards_bls12::Fq}; use crate::{ compiler::Compiler, - errors::CompilerError, targets::edwards_bls12::EdwardsGroupType, AstSnapshotOptions, Output, @@ -70,7 +71,7 @@ fn hash(input: String) -> String { pub(crate) fn parse_program( program_string: &str, theorem_options: Option, -) -> Result { +) -> Result { let mut compiler = new_compiler("compiler-test".into(), theorem_options); compiler.parse_program_from_string(program_string)?; diff --git a/compiler/src/value/address/address.rs b/compiler/src/value/address/address.rs index f706448c4d..0d1fd83185 100644 --- a/compiler/src/value/address/address.rs +++ b/compiler/src/value/address/address.rs @@ -14,8 +14,9 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{errors::AddressError, ConstrainedValue, GroupType, IntegerTrait}; -use leo_ast::{InputValue, Span}; +use crate::{ConstrainedValue, GroupType, IntegerTrait}; +use leo_ast::InputValue; +use leo_errors::{CompilerError, LeoError, Span}; use snarkvm_dpc::{account::Address as AleoAddress, testnet1::instantiated::Components}; use snarkvm_fields::PrimeField; @@ -40,8 +41,8 @@ pub struct Address { } impl Address { - pub(crate) fn constant(address: String, span: &Span) -> Result { - let address = AleoAddress::from_str(&address).map_err(|error| AddressError::account_error(error, span))?; + pub(crate) fn constant(address: String, span: &Span) -> Result { + let address = AleoAddress::from_str(&address).map_err(|error| LeoError::from(CompilerError::account_error(error, span)))?; let mut address_bytes = vec![]; address.write_le(&mut address_bytes).unwrap(); @@ -63,14 +64,14 @@ impl Address { name: &str, input_value: Option, span: &Span, - ) -> Result, AddressError> { + ) -> Result, LeoError> { // Check that the input value is the correct type let address_value = match input_value { Some(input) => { if let InputValue::Address(string) = input { Some(string) } else { - return Err(AddressError::invalid_address(name.to_owned(), span)); + return Err(LeoError::from(CompilerError::invalid_address(name.to_owned(), span))); } } None => None, @@ -80,7 +81,7 @@ impl Address { cs.ns(|| format!("`{}: address` {}:{}", name, span.line_start, span.col_start)), || address_value.ok_or(SynthesisError::AssignmentMissing), ) - .map_err(|_| AddressError::missing_address(span))?; + .map_err(|_| LeoError::from(CompilerError::missing_address(span)))?; Ok(ConstrainedValue::Address(address)) } diff --git a/compiler/src/value/boolean/input.rs b/compiler/src/value/boolean/input.rs index 93e220b282..c32268db64 100644 --- a/compiler/src/value/boolean/input.rs +++ b/compiler/src/value/boolean/input.rs @@ -16,8 +16,10 @@ //! Methods to enforce constraints on input boolean values in a resolved Leo program. -use crate::{errors::BooleanError, value::ConstrainedValue, GroupType}; -use leo_ast::{InputValue, Span}; +use crate::{value::ConstrainedValue, GroupType}; +use leo_ast::InputValue; +use leo_errors::{CompilerError, LeoError, Span}; + use snarkvm_fields::PrimeField; use snarkvm_gadgets::{boolean::Boolean, traits::alloc::AllocGadget}; @@ -28,12 +30,12 @@ pub(crate) fn allocate_bool>( name: &str, option: Option, span: &Span, -) -> Result { +) -> Result { Boolean::alloc( cs.ns(|| format!("`{}: bool` {}:{}", name, span.line_start, span.col_start)), || option.ok_or(SynthesisError::AssignmentMissing), ) - .map_err(|_| BooleanError::missing_boolean(format!("{}: bool", name), span)) + .map_err(|_| LeoError::from(CompilerError::missing_boolean(format!("{}: bool", name), span))) } pub(crate) fn bool_from_input<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( @@ -41,14 +43,14 @@ pub(crate) fn bool_from_input<'a, F: PrimeField, G: GroupType, CS: Constraint name: &str, input_value: Option, span: &Span, -) -> Result, BooleanError> { +) -> Result, LeoError> { // Check that the input value is the correct type let option = match input_value { Some(input) => { if let InputValue::Boolean(bool) = input { Some(bool) } else { - return Err(BooleanError::invalid_boolean(name.to_owned(), span)); + return Err(LeoError::from(CompilerError::invalid_boolean(name.to_owned(), span))); } } None => None, diff --git a/compiler/src/value/char/char.rs b/compiler/src/value/char/char.rs index efa6e81ca5..2835cfc690 100644 --- a/compiler/src/value/char/char.rs +++ b/compiler/src/value/char/char.rs @@ -15,13 +15,14 @@ // along with the Leo library. If not, see . use crate::{ - errors::CharError, value::{field::input::allocate_field, ConstrainedValue}, FieldType, GroupType, }; -use leo_ast::{InputValue, Span}; +use leo_ast::InputValue; +use leo_errors::{CompilerError, LeoError, Span}; + use snarkvm_fields::PrimeField; use snarkvm_gadgets::{ boolean::Boolean, @@ -52,7 +53,7 @@ impl Char { character: CharType, field: String, span: &Span, - ) -> Result { + ) -> Result { Ok(Self { character, field: FieldType::constant(cs, field, span)?, @@ -147,7 +148,7 @@ pub(crate) fn char_from_input<'a, F: PrimeField, G: GroupType, CS: Constraint name: &str, input_value: Option, span: &Span, -) -> Result, CharError> { +) -> Result, LeoError> { // Check that the parameter value is the correct type let option = match input_value { Some(input) => { @@ -159,7 +160,7 @@ pub(crate) fn char_from_input<'a, F: PrimeField, G: GroupType, CS: Constraint } } } else { - return Err(CharError::invalid_char(input.to_string(), span)); + return Err(LeoError::from(CompilerError::invalid_char(input.to_string(), span))); } } None => (CharType::Scalar(0 as char), None), diff --git a/compiler/src/value/field/field_type.rs b/compiler/src/value/field/field_type.rs index b047545119..4f9f836fc7 100644 --- a/compiler/src/value/field/field_type.rs +++ b/compiler/src/value/field/field_type.rs @@ -16,8 +16,9 @@ //! A data type that represents a field value -use crate::{errors::FieldError, number_string_typing}; -use leo_ast::Span; +use crate::number_string_typing; +use leo_errors::{CompilerError, LeoError, Span}; + use snarkvm_fields::PrimeField; use snarkvm_gadgets::{ @@ -46,70 +47,70 @@ impl FieldType { } /// Returns a new `FieldType` from the given `String` or returns a `FieldError`. - pub fn constant>(cs: CS, string: String, span: &Span) -> Result { + pub fn constant>(cs: CS, string: String, span: &Span) -> Result { let number_info = number_string_typing(&string); let value = match number_info { (number, neg) if neg => { - -F::from_str(&number).map_err(|_| FieldError::invalid_field(string.clone(), span))? + -F::from_str(&number).map_err(|_| LeoError::from(CompilerError::invalid_field(string.clone(), span)))? } - (number, _) => F::from_str(&number).map_err(|_| FieldError::invalid_field(string.clone(), span))?, + (number, _) => F::from_str(&number).map_err(|_| LeoError::from(CompilerError::invalid_field(string.clone(), span)))?, }; - let value = FpGadget::alloc_constant(cs, || Ok(value)).map_err(|_| FieldError::invalid_field(string, span))?; + let value = FpGadget::alloc_constant(cs, || Ok(value)).map_err(|_| LeoError::from(CompilerError::invalid_field(string, span)))?; Ok(FieldType(value)) } /// Returns a new `FieldType` by calling the `FpGadget` `negate` function. - pub fn negate>(&self, cs: CS, span: &Span) -> Result { - let result = self.0.negate(cs).map_err(|e| FieldError::negate_operation(e, span))?; + pub fn negate>(&self, cs: CS, span: &Span) -> Result { + let result = self.0.negate(cs).map_err(|e| LeoError::from(CompilerError::negate_operation(e, span)))?; Ok(FieldType(result)) } /// Returns a new `FieldType` by calling the `FpGadget` `add` function. - pub fn add>(&self, cs: CS, other: &Self, span: &Span) -> Result { + pub fn add>(&self, cs: CS, other: &Self, span: &Span) -> Result { let value = self .0 .add(cs, &other.0) - .map_err(|e| FieldError::binary_operation("+".to_string(), e, span))?; + .map_err(|e| LeoError::from(CompilerError::binary_operation("+".to_string(), e, span)))?; Ok(FieldType(value)) } /// Returns a new `FieldType` by calling the `FpGadget` `sub` function. - pub fn sub>(&self, cs: CS, other: &Self, span: &Span) -> Result { + pub fn sub>(&self, cs: CS, other: &Self, span: &Span) -> Result { let value = self .0 .sub(cs, &other.0) - .map_err(|e| FieldError::binary_operation("-".to_string(), e, span))?; + .map_err(|e| LeoError::from(CompilerError::binary_operation("-".to_string(), e, span)))?; Ok(FieldType(value)) } /// Returns a new `FieldType` by calling the `FpGadget` `mul` function. - pub fn mul>(&self, cs: CS, other: &Self, span: &Span) -> Result { + pub fn mul>(&self, cs: CS, other: &Self, span: &Span) -> Result { let value = self .0 .mul(cs, &other.0) - .map_err(|e| FieldError::binary_operation("*".to_string(), e, span))?; + .map_err(|e| LeoError::from(CompilerError::binary_operation("*".to_string(), e, span)))?; Ok(FieldType(value)) } /// Returns a new `FieldType` by calling the `FpGadget` `inverse` function. - pub fn inverse>(&self, cs: CS, span: &Span) -> Result { + pub fn inverse>(&self, cs: CS, span: &Span) -> Result { let value = self .0 .inverse(cs) - .map_err(|e| FieldError::binary_operation("inv".to_string(), e, span))?; + .map_err(|e| LeoError::from(CompilerError::binary_operation("inv".to_string(), e, span)))?; Ok(FieldType(value)) } /// Returns a new `FieldType` by calling the `FpGadget` `div` function. - pub fn div>(&self, mut cs: CS, other: &Self, span: &Span) -> Result { + pub fn div>(&self, mut cs: CS, other: &Self, span: &Span) -> Result { let inverse = other.inverse(cs.ns(|| "division inverse"), span)?; self.mul(cs, &inverse, span) diff --git a/compiler/src/value/field/input.rs b/compiler/src/value/field/input.rs index b1a1074788..d2f966aaa2 100644 --- a/compiler/src/value/field/input.rs +++ b/compiler/src/value/field/input.rs @@ -16,8 +16,10 @@ //! Methods to enforce constraints on input field values in a compiled Leo program. -use crate::{errors::FieldError, number_string_typing, value::ConstrainedValue, FieldType, GroupType}; -use leo_ast::{InputValue, Span}; +use crate::{number_string_typing, value::ConstrainedValue, FieldType, GroupType}; +use leo_ast::InputValue; +use leo_errors::{CompilerError, LeoError, Span}; + use snarkvm_fields::PrimeField; use snarkvm_gadgets::traits::alloc::AllocGadget; @@ -28,7 +30,7 @@ pub(crate) fn allocate_field>( name: &str, option: Option, span: &Span, -) -> Result, FieldError> { +) -> Result, LeoError> { match option { Some(string) => { let number_info = number_string_typing(&string); @@ -39,15 +41,15 @@ pub(crate) fn allocate_field>( || Some(number).ok_or(SynthesisError::AssignmentMissing), ) .map(|value| value.negate(cs, span)) - .map_err(|_| FieldError::missing_field(format!("{}: field", name), span))?, + .map_err(|_| LeoError::from(CompilerError::missing_field(format!("{}: field", name), span)))?, (number, _) => FieldType::alloc( cs.ns(|| format!("`{}: field` {}:{}", name, span.line_start, span.col_start)), || Some(number).ok_or(SynthesisError::AssignmentMissing), ) - .map_err(|_| FieldError::missing_field(format!("{}: field", name), span)), + .map_err(|_| LeoError::from(CompilerError::missing_field(format!("{}: field", name), span))), } } - None => Err(FieldError::missing_field(format!("{}: field", name), span)), + None => Err(LeoError::from(CompilerError::missing_field(format!("{}: field", name), span))), } } @@ -56,14 +58,14 @@ pub(crate) fn field_from_input<'a, F: PrimeField, G: GroupType, CS: Constrain name: &str, input_value: Option, span: &Span, -) -> Result, FieldError> { +) -> Result, LeoError> { // Check that the parameter value is the correct type let option = match input_value { Some(input) => { if let InputValue::Field(string) = input { Some(string) } else { - return Err(FieldError::invalid_field(input.to_string(), span)); + return Err(LeoError::from(CompilerError::invalid_field(input.to_string(), span))); } } None => None, diff --git a/compiler/src/value/group/group_type.rs b/compiler/src/value/group/group_type.rs index 6a94d040ea..883f604bad 100644 --- a/compiler/src/value/group/group_type.rs +++ b/compiler/src/value/group/group_type.rs @@ -16,8 +16,9 @@ //! A data type that represents members in the group formed by the set of affine points on a curve. -use crate::errors::GroupError; -use leo_asg::{GroupValue, Span}; +use leo_asg::GroupValue; +use leo_errors::{LeoError, Span}; + use snarkvm_fields::{Field, One}; use snarkvm_gadgets::{ @@ -45,13 +46,13 @@ pub trait GroupType: + ToBitsBEGadget + ToBytesGadget { - fn constant(value: &GroupValue, span: &Span) -> Result; + fn constant(value: &GroupValue, span: &Span) -> Result; - fn to_allocated>(&self, cs: CS, span: &Span) -> Result; + fn to_allocated>(&self, cs: CS, span: &Span) -> Result; - fn negate>(&self, cs: CS, span: &Span) -> Result; + fn negate>(&self, cs: CS, span: &Span) -> Result; - fn add>(&self, cs: CS, other: &Self, span: &Span) -> Result; + fn add>(&self, cs: CS, other: &Self, span: &Span) -> Result; - fn sub>(&self, cs: CS, other: &Self, span: &Span) -> Result; + fn sub>(&self, cs: CS, other: &Self, span: &Span) -> Result; } diff --git a/compiler/src/value/group/input.rs b/compiler/src/value/group/input.rs index e3d53ada8a..bc11f54232 100644 --- a/compiler/src/value/group/input.rs +++ b/compiler/src/value/group/input.rs @@ -16,9 +16,11 @@ //! Methods to enforce constraints on input group values in a Leo program. -use crate::{errors::GroupError, ConstrainedValue, GroupType}; -use leo_asg::{GroupValue, Span}; +use crate::{ConstrainedValue, GroupType}; +use leo_asg::GroupValue; use leo_ast::InputValue; +use leo_errors::{CompilerError, LeoError, Span}; + use snarkvm_fields::PrimeField; use snarkvm_r1cs::{ConstraintSystem, SynthesisError}; @@ -28,12 +30,12 @@ pub(crate) fn allocate_group, CS: ConstraintSyste name: &str, option: Option, span: &Span, -) -> Result { +) -> Result { G::alloc( cs.ns(|| format!("`{}: group` {}:{}", name, span.line_start, span.col_start)), || option.ok_or(SynthesisError::AssignmentMissing), ) - .map_err(|_| GroupError::missing_group(format!("{}: group", name), span)) + .map_err(|_| LeoError::from(CompilerError::missing_group(format!("{}: group", name), span))) } pub(crate) fn group_from_input<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( @@ -41,14 +43,14 @@ pub(crate) fn group_from_input<'a, F: PrimeField, G: GroupType, CS: Constrain name: &str, input_value: Option, span: &Span, -) -> Result, GroupError> { +) -> Result, LeoError> { // Check that the parameter value is the correct type let option = match input_value { Some(input) => { if let InputValue::Group(string) = input { Some(string) } else { - return Err(GroupError::invalid_group(input.to_string(), span)); + return Err(LeoError::from(CompilerError::invalid_group(input.to_string(), span))); } } None => None, diff --git a/compiler/src/value/group/targets/edwards_bls12.rs b/compiler/src/value/group/targets/edwards_bls12.rs index bf6367ea35..0d334a706f 100644 --- a/compiler/src/value/group/targets/edwards_bls12.rs +++ b/compiler/src/value/group/targets/edwards_bls12.rs @@ -14,8 +14,9 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{errors::GroupError, number_string_typing, GroupType}; -use leo_asg::{GroupCoordinate, GroupValue, Span}; +use crate::{number_string_typing, GroupType}; +use leo_asg::{GroupCoordinate, GroupValue}; +use leo_errors::{CompilerError, LeoError, Span}; use snarkvm_curves::{ edwards_bls12::{EdwardsAffine, EdwardsParameters, Fq}, @@ -61,7 +62,7 @@ impl GroupType for EdwardsGroupType { fn to_allocated>(&self, mut cs: CS, span: &Span) -> Result { self.allocated(cs.ns(|| format!("allocate affine point {}:{}", span.line_start, span.col_start))) .map(|ebg| EdwardsGroupType::Allocated(Box::new(ebg))) - .map_err(|error| GroupError::synthesis_error(error, span)) + .map_err(|error| LeoError::from(CompilerError::synthesis_error(error, span))) } fn negate>(&self, cs: CS, span: &Span) -> Result { @@ -69,7 +70,7 @@ impl GroupType for EdwardsGroupType { EdwardsGroupType::Constant(group) => Ok(EdwardsGroupType::Constant(group.neg())), EdwardsGroupType::Allocated(group) => { let result = , Fq>>::negate(group, cs) - .map_err(|e| GroupError::negate_operation(e, span))?; + .map_err(|e| LeoError::from(CompilerError::negate_operation(e, span)))?; Ok(EdwardsGroupType::Allocated(Box::new(result))) } @@ -88,7 +89,7 @@ impl GroupType for EdwardsGroupType { cs, other_value, ) - .map_err(|e| GroupError::binary_operation("+".to_string(), e, span))?; + .map_err(|e| LeoError::from(CompilerError::binary_operation("+".to_string(), e, span)))?; Ok(EdwardsGroupType::Allocated(Box::new(result))) } @@ -98,7 +99,7 @@ impl GroupType for EdwardsGroupType { Ok(EdwardsGroupType::Allocated(Box::new( allocated_value .add_constant(cs, constant_value) - .map_err(|e| GroupError::binary_operation("+".to_string(), e, span))?, + .map_err(|e| LeoError::from(CompilerError::binary_operation("+".to_string(), e, span)))?, ))) } } @@ -116,7 +117,7 @@ impl GroupType for EdwardsGroupType { cs, other_value, ) - .map_err(|e| GroupError::binary_operation("-".to_string(), e, span))?; + .map_err(|e| LeoError::from(CompilerError::binary_operation("-".to_string(), e, span)))?; Ok(EdwardsGroupType::Allocated(Box::new(result))) } @@ -126,7 +127,7 @@ impl GroupType for EdwardsGroupType { Ok(EdwardsGroupType::Allocated(Box::new( allocated_value .sub_constant(cs, constant_value) - .map_err(|e| GroupError::binary_operation("-".to_string(), e, span))?, + .map_err(|e| LeoError::from(CompilerError::binary_operation("-".to_string(), e, span)))?, ))) } } @@ -149,8 +150,8 @@ impl EdwardsGroupType { } else { let one = edwards_affine_one(); let number_value = match number_info { - (number, neg) if neg => -Fp256::from_str(&number).map_err(|_| GroupError::n_group(number, span))?, - (number, _) => Fp256::from_str(&number).map_err(|_| GroupError::n_group(number, span))?, + (number, neg) if neg => -Fp256::from_str(&number).map_err(|_| LeoError::from(CompilerError::n_group(number, span)))?, + (number, _) => Fp256::from_str(&number).map_err(|_| LeoError::from(CompilerError::n_group(number, span)))?, }; let result: EdwardsAffine = one.mul(number_value); @@ -201,7 +202,7 @@ impl EdwardsGroupType { Self::edwards_affine_from_y_str(number_string_typing(&y_string), span, None, span) } // Invalid - (x, y) => Err(GroupError::invalid_group(format!("({}, {})", x, y), span)), + (x, y) => Err(LeoError::from(CompilerError::invalid_group(format!("({}, {})", x, y), span)),) } } @@ -212,14 +213,14 @@ impl EdwardsGroupType { element_span: &Span, ) -> Result { let x = match x_info { - (x_str, neg) if neg => -Fq::from_str(&x_str).map_err(|_| GroupError::x_invalid(x_str, x_span))?, - (x_str, _) => Fq::from_str(&x_str).map_err(|_| GroupError::x_invalid(x_str, x_span))?, + (x_str, neg) if neg => -Fq::from_str(&x_str).map_err(|_| LeoError::from(CompilerError::x_invalid(x_str, x_span)))?, + (x_str, _) => Fq::from_str(&x_str).map_err(|_| LeoError::from(CompilerError::x_invalid(x_str, x_span)))?, }; match greatest { // Sign provided Some(greatest) => { - EdwardsAffine::from_x_coordinate(x, greatest).ok_or_else(|| GroupError::x_recover(element_span)) + EdwardsAffine::from_x_coordinate(x, greatest).ok_or_else(|| LeoError::from(CompilerError::x_recover(element_span))) } // Sign inferred None => { @@ -234,7 +235,7 @@ impl EdwardsGroupType { } // Otherwise return error. - Err(GroupError::x_recover(element_span)) + Err(LeoError::from(CompilerError::x_recover(element_span))) } } } @@ -246,14 +247,14 @@ impl EdwardsGroupType { element_span: &Span, ) -> Result { let y = match y_info { - (y_str, neg) if neg => -Fq::from_str(&y_str).map_err(|_| GroupError::y_invalid(y_str, y_span))?, - (y_str, _) => Fq::from_str(&y_str).map_err(|_| GroupError::y_invalid(y_str, y_span))?, + (y_str, neg) if neg => -Fq::from_str(&y_str).map_err(|_| LeoError::from(CompilerError::y_invalid(y_str, y_span)))?, + (y_str, _) => Fq::from_str(&y_str).map_err(|_| LeoError::from(CompilerError::y_invalid(y_str, y_span)))?, }; match greatest { // Sign provided Some(greatest) => { - EdwardsAffine::from_y_coordinate(y, greatest).ok_or_else(|| GroupError::y_recover(element_span)) + EdwardsAffine::from_y_coordinate(y, greatest).ok_or_else(|| LeoError::from(CompilerError::y_recover(element_span))) } // Sign inferred None => { @@ -268,7 +269,7 @@ impl EdwardsGroupType { } // Otherwise return error. - Err(GroupError::y_recover(element_span)) + Err(LeoError::from(CompilerError::y_recover(element_span))) } } } @@ -282,16 +283,16 @@ impl EdwardsGroupType { ) -> Result { let x = match x_info { (x_str, neg) if neg => { - -Fq::from_str(&x_str).map_err(|_| GroupError::x_invalid(x_str.to_string(), x_span))? + -Fq::from_str(&x_str).map_err(|_| LeoError::from(CompilerError::x_invalid(x_str.to_string(), x_span)))? } - (x_str, _) => Fq::from_str(&x_str).map_err(|_| GroupError::x_invalid(x_str.to_string(), x_span))?, + (x_str, _) => Fq::from_str(&x_str).map_err(|_| LeoError::from(CompilerError::x_invalid(x_str.to_string(), x_span)))?, }; let y = match y_info { (y_str, neg) if neg => { - -Fq::from_str(&y_str).map_err(|_| GroupError::y_invalid(y_str.to_string(), y_span))? + -Fq::from_str(&y_str).map_err(|_| LeoError::from(CompilerError::y_invalid(y_str.to_string(), y_span)))? } - (y_str, _) => Fq::from_str(&y_str).map_err(|_| GroupError::y_invalid(y_str.to_string(), y_span))?, + (y_str, _) => Fq::from_str(&y_str).map_err(|_| LeoError::from(CompilerError::y_invalid(y_str.to_string(), y_span)))?, }; let element = EdwardsAffine::new(x, y); @@ -299,7 +300,7 @@ impl EdwardsGroupType { if element.is_on_curve() { Ok(element) } else { - Err(GroupError::not_on_curve(element.to_string(), element_span)) + Err(LeoError::from(CompilerError::not_on_curve(element.to_string(), element_span))) } } diff --git a/compiler/src/value/integer/integer.rs b/compiler/src/value/integer/integer.rs index eacc71f064..6a6cf2f918 100644 --- a/compiler/src/value/integer/integer.rs +++ b/compiler/src/value/integer/integer.rs @@ -15,9 +15,10 @@ // along with the Leo library. If not, see . //! Conversion of integer declarations to constraints in Leo. -use crate::{errors::IntegerError, IntegerTrait}; -use leo_asg::{ConstInt, IntegerType, Span}; +use crate::IntegerTrait; +use leo_asg::{ConstInt, IntegerType}; use leo_ast::InputValue; +use leo_errors::{CompilerError, LeoError, Span}; use snarkvm_fields::{Field, PrimeField}; use snarkvm_gadgets::{ @@ -131,7 +132,7 @@ impl Integer { name: &str, option: Option, span: &Span, - ) -> Result { + ) -> Result { Ok(match integer_type { IntegerType::U8 => allocate_type!(u8, UInt8, Integer::U8, cs, name, option, span), IntegerType::U16 => allocate_type!(u16, UInt16, Integer::U16, cs, name, option, span), @@ -153,22 +154,22 @@ impl Integer { name: &str, integer_value: Option, span: &Span, - ) -> Result { + ) -> Result { // Check that the input value is the correct type let option = match integer_value { Some(input) => { if let InputValue::Integer(type_, number) = input { let asg_type = IntegerType::from(type_); if std::mem::discriminant(&asg_type) != std::mem::discriminant(integer_type) { - return Err(IntegerError::integer_type_mismatch( + return Err(LeoError::from(CompilerError::integer_type_mismatch( integer_type.to_string(), asg_type.to_string(), span, - )); + ))); } Some(number) } else { - return Err(IntegerError::invalid_integer(input.to_string(), span)); + return Err(LeoError::from(CompilerError::invalid_integer(input.to_string(), span))); } } None => None, @@ -181,14 +182,14 @@ impl Integer { self, cs: &mut CS, span: &Span, - ) -> Result { + ) -> Result { let unique_namespace = format!("enforce -{} {}:{}", self, span.line_start, span.col_start); let a = self; let result = match_signed_integer!(a, span => a.neg(cs.ns(|| unique_namespace))); - result.ok_or_else(|| IntegerError::negate_operation(span)) + result.ok_or_else(|| LeoError::from(CompilerError::invalid_unsigned_negate(span))) } pub fn add>( @@ -196,7 +197,7 @@ impl Integer { cs: &mut CS, other: Self, span: &Span, - ) -> Result { + ) -> Result { let unique_namespace = format!("enforce {} + {} {}:{}", self, other, span.line_start, span.col_start); let a = self; @@ -204,7 +205,7 @@ impl Integer { let result = match_integers_span!((a, b), span => a.add(cs.ns(|| unique_namespace), &b)); - result.ok_or_else(|| IntegerError::binary_operation("+".to_string(), span)) + result.ok_or_else(|| LeoError::from(CompilerError::invalid_integer_binary_operation("+".to_string(), span))) } pub fn sub>( @@ -212,7 +213,7 @@ impl Integer { cs: &mut CS, other: Self, span: &Span, - ) -> Result { + ) -> Result { let unique_namespace = format!("enforce {} - {} {}:{}", self, other, span.line_start, span.col_start); let a = self; @@ -220,7 +221,7 @@ impl Integer { let result = match_integers_span!((a, b), span => a.sub(cs.ns(|| unique_namespace), &b)); - result.ok_or_else(|| IntegerError::binary_operation("-".to_string(), span)) + result.ok_or_else(|| LeoError::from(CompilerError::invalid_integer_binary_operation("-".to_string(), span))) } pub fn mul>( @@ -228,7 +229,7 @@ impl Integer { cs: &mut CS, other: Self, span: &Span, - ) -> Result { + ) -> Result { let unique_namespace = format!("enforce {} * {} {}:{}", self, other, span.line_start, span.col_start); let a = self; @@ -236,7 +237,7 @@ impl Integer { let result = match_integers_span!((a, b), span => a.mul(cs.ns(|| unique_namespace), &b)); - result.ok_or_else(|| IntegerError::binary_operation("*".to_string(), span)) + result.ok_or_else(|| LeoError::from(CompilerError::invalid_integer_binary_operation("*".to_string(), span))) } pub fn div>( @@ -244,7 +245,7 @@ impl Integer { cs: &mut CS, other: Self, span: &Span, - ) -> Result { + ) -> Result { let unique_namespace = format!("enforce {} ÷ {} {}:{}", self, other, span.line_start, span.col_start); let a = self; @@ -252,7 +253,7 @@ impl Integer { let result = match_integers_span!((a, b), span => a.div(cs.ns(|| unique_namespace), &b)); - result.ok_or_else(|| IntegerError::binary_operation("÷".to_string(), span)) + result.ok_or_else(|| LeoError::from(CompilerError::invalid_integer_binary_operation("÷".to_string(), span))) } pub fn pow>( @@ -260,7 +261,7 @@ impl Integer { cs: &mut CS, other: Self, span: &Span, - ) -> Result { + ) -> Result { let unique_namespace = format!("enforce {} ** {} {}:{}", self, other, span.line_start, span.col_start); let a = self; @@ -268,7 +269,7 @@ impl Integer { let result = match_integers_span!((a, b), span => a.pow(cs.ns(|| unique_namespace), &b)); - result.ok_or_else(|| IntegerError::binary_operation("**".to_string(), span)) + result.ok_or_else(|| LeoError::from(CompilerError::invalid_integer_binary_operation("**".to_string(), span))) } } diff --git a/compiler/src/value/integer/macros.rs b/compiler/src/value/integer/macros.rs index ec1e064230..30449c2bb2 100644 --- a/compiler/src/value/integer/macros.rs +++ b/compiler/src/value/integer/macros.rs @@ -3,7 +3,7 @@ // The Leo library is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or +// the Free Software Foundation, either version 3 of the License.to_string(), or // (at your option) any later version. // The Leo library is distributed in the hope that it will be useful, @@ -55,11 +55,11 @@ macro_rules! match_unsigned_integer { macro_rules! match_signed_integer { ($integer: ident, $span: ident => $expression: expr) => { match $integer { - Integer::I8($integer) => Some(Integer::I8($expression.map_err(|e| IntegerError::signed(e, $span))?)), - Integer::I16($integer) => Some(Integer::I16($expression.map_err(|e| IntegerError::signed(e, $span))?)), - Integer::I32($integer) => Some(Integer::I32($expression.map_err(|e| IntegerError::signed(e, $span))?)), - Integer::I64($integer) => Some(Integer::I64($expression.map_err(|e| IntegerError::signed(e, $span))?)), - Integer::I128($integer) => Some(Integer::I128($expression.map_err(|e| IntegerError::signed(e, $span))?)), + Integer::I8($integer) => Some(Integer::I8($expression.map_err(|e| LeoError::from(CompilerError::signed(e.to_string(), $span)))?)), + Integer::I16($integer) => Some(Integer::I16($expression.map_err(|e| LeoError::from(CompilerError::signed(e.to_string(), $span)))?)), + Integer::I32($integer) => Some(Integer::I32($expression.map_err(|e| LeoError::from(CompilerError::signed(e.to_string(), $span)))?)), + Integer::I64($integer) => Some(Integer::I64($expression.map_err(|e| LeoError::from(CompilerError::signed(e.to_string(), $span)))?)), + Integer::I128($integer) => Some(Integer::I128($expression.map_err(|e| LeoError::from(CompilerError::signed(e.to_string(), $span)))?)), _ => None, } @@ -91,35 +91,35 @@ macro_rules! match_integers_span { (($a: ident, $b: ident), $span: ident => $expression:expr) => { match ($a, $b) { (Integer::U8($a), Integer::U8($b)) => { - Some(Integer::U8($expression.map_err(|e| IntegerError::unsigned(e, $span))?)) + Some(Integer::U8($expression.map_err(|e| LeoError::from(CompilerError::unsigned(e.to_string(), $span)))?)) } (Integer::U16($a), Integer::U16($b)) => { - Some(Integer::U16($expression.map_err(|e| IntegerError::unsigned(e, $span))?)) + Some(Integer::U16($expression.map_err(|e| LeoError::from(CompilerError::unsigned(e.to_string(), $span)))?)) } (Integer::U32($a), Integer::U32($b)) => { - Some(Integer::U32($expression.map_err(|e| IntegerError::unsigned(e, $span))?)) + Some(Integer::U32($expression.map_err(|e| LeoError::from(CompilerError::unsigned(e.to_string(), $span)))?)) } (Integer::U64($a), Integer::U64($b)) => { - Some(Integer::U64($expression.map_err(|e| IntegerError::unsigned(e, $span))?)) + Some(Integer::U64($expression.map_err(|e| LeoError::from(CompilerError::unsigned(e.to_string(), $span)))?)) } (Integer::U128($a), Integer::U128($b)) => Some(Integer::U128( - $expression.map_err(|e| IntegerError::unsigned(e, $span))?, + $expression.map_err(|e| LeoError::from(CompilerError::unsigned(e.to_string(), $span)))?, )), (Integer::I8($a), Integer::I8($b)) => { - Some(Integer::I8($expression.map_err(|e| IntegerError::signed(e, $span))?)) + Some(Integer::I8($expression.map_err(|e| LeoError::from(CompilerError::signed(e.to_string(), $span)))?)) } (Integer::I16($a), Integer::I16($b)) => { - Some(Integer::I16($expression.map_err(|e| IntegerError::signed(e, $span))?)) + Some(Integer::I16($expression.map_err(|e| LeoError::from(CompilerError::signed(e.to_string(), $span)))?)) } (Integer::I32($a), Integer::I32($b)) => { - Some(Integer::I32($expression.map_err(|e| IntegerError::signed(e, $span))?)) + Some(Integer::I32($expression.map_err(|e| LeoError::from(CompilerError::signed(e.to_string(), $span)))?)) } (Integer::I64($a), Integer::I64($b)) => { - Some(Integer::I64($expression.map_err(|e| IntegerError::signed(e, $span))?)) + Some(Integer::I64($expression.map_err(|e| LeoError::from(CompilerError::signed(e.to_string(), $span)))?)) } (Integer::I128($a), Integer::I128($b)) => { - Some(Integer::I128($expression.map_err(|e| IntegerError::signed(e, $span))?)) + Some(Integer::I128($expression.map_err(|e| LeoError::from(CompilerError::signed(e.to_string(), $span)))?)) } (_, _) => None, } @@ -131,7 +131,7 @@ macro_rules! allocate_type { let option = $option .map(|s| { s.parse::<$rust_ty>() - .map_err(|_| IntegerError::invalid_integer(s, $span)) + .map_err(|_| LeoError::from(CompilerError::invalid_integer(s, $span))) }) .transpose()?; @@ -139,7 +139,7 @@ macro_rules! allocate_type { $cs.ns(|| { format!( "`{}: {}` {}:{}", - $name, + $name.to_string(), stringify!($rust_ty), $span.line_start, $span.col_start @@ -147,7 +147,7 @@ macro_rules! allocate_type { }), || option.ok_or(SynthesisError::AssignmentMissing), ) - .map_err(|_| IntegerError::missing_integer(format!("{}: {}", $name, stringify!($rust_ty)), $span))?; + .map_err(|_| LeoError::from(CompilerError::missing_integer(format!("{}: {}", $name.to_string(), stringify!($rust_ty)), $span)))?; $leo_ty(result) }}; diff --git a/compiler/src/value/value.rs b/compiler/src/value/value.rs index eb23ec9843..8d7bafb38d 100644 --- a/compiler/src/value/value.rs +++ b/compiler/src/value/value.rs @@ -16,8 +16,10 @@ //! The in memory stored value for a defined name in a compiled Leo program. -use crate::{errors::ValueError, Address, Char, FieldType, GroupType, Integer}; -use leo_asg::{Circuit, Identifier, Span, Type}; +use crate::{Address, Char, FieldType, GroupType, Integer}; +use leo_asg::{Circuit, Identifier, Type}; +use leo_errors::{CompilerError, LeoError, Span}; + use snarkvm_fields::PrimeField; use snarkvm_gadgets::{ @@ -51,7 +53,7 @@ pub enum ConstrainedValue<'a, F: PrimeField, G: GroupType> { } impl<'a, F: PrimeField, G: GroupType> ConstrainedValue<'a, F, G> { - pub(crate) fn to_type(&self, span: &Span) -> Result, ValueError> { + pub(crate) fn to_type(&self, span: &Span) -> Result, LeoError> { Ok(match self { // Data types ConstrainedValue::Address(_address) => Type::Address, diff --git a/errors/Cargo.toml b/errors/Cargo.toml new file mode 100644 index 0000000000..9e0dc6ea99 --- /dev/null +++ b/errors/Cargo.toml @@ -0,0 +1,41 @@ +[package] +name = "leo-errors" +version = "1.5.3" +authors = [ "The Aleo Team " ] +description = "Errors of the Leo programming language" +homepage = "https://aleo.org" +repository = "https://github.com/AleoHQ/leo" +keywords = [ + "aleo", + "cryptography", + "leo", + "programming-language", + "zero-knowledge" +] +categories = [ "cryptography::cryptocurrencies", "web-programming" ] +include = [ "Cargo.toml", "src", "README.md", "LICENSE.md" ] +license = "GPL-3.0" +edition = "2018" + +[dependencies.derivative] +version = "2.2.0" + +[dependencies.eyre] +version = "0.6.5" +default-features = false + +[dependencies.backtrace] +version = "0.3.61" + +[dependencies.pest] +version = "2.0" + +[dependencies.serde] +version = "1.0.126" +features = [ "derive", "rc" ] + +[dependencies.tendril] +version = "0.4.2" + +[dependencies.thiserror] +version = "1.0.26" diff --git a/errors/LICENSE.md b/errors/LICENSE.md new file mode 100644 index 0000000000..b95c626e2a --- /dev/null +++ b/errors/LICENSE.md @@ -0,0 +1,596 @@ +GNU General Public License +========================== + +Version 3, 29 June 2007 + +Copyright © 2007 Free Software Foundation, Inc. <> + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +## Preamble + +The GNU General Public License is a free, copyleft license for software and other +kinds of works. + +The licenses for most software and other practical works are designed to take away +your freedom to share and change the works. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change all versions of a +program--to make sure it remains free software for all its users. We, the Free +Software Foundation, use the GNU General Public License for most of our software; it +applies also to any other work released this way by its authors. You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our General +Public Licenses are designed to make sure that you have the freedom to distribute +copies of free software (and charge for them if you wish), that you receive source +code or can get it if you want it, that you can change the software or use pieces of +it in new free programs, and that you know you can do these things. + +To protect your rights, we need to prevent others from denying you these rights or +asking you to surrender the rights. Therefore, you have certain responsibilities if +you distribute copies of the software, or if you modify it: responsibilities to +respect the freedom of others. + +For example, if you distribute copies of such a program, whether gratis or for a fee, +you must pass on to the recipients the same freedoms that you received. You must make +sure that they, too, receive or can get the source code. And you must show them these +terms so they know their rights. + +Developers that use the GNU GPL protect your rights with two steps: **(1)** assert +copyright on the software, and **(2)** offer you this License giving you legal permission +to copy, distribute and/or modify it. + +For the developers' and authors' protection, the GPL clearly explains that there is +no warranty for this free software. For both users' and authors' sake, the GPL +requires that modified versions be marked as changed, so that their problems will not +be attributed erroneously to authors of previous versions. + +Some devices are designed to deny users access to install or run modified versions of +the software inside them, although the manufacturer can do so. This is fundamentally +incompatible with the aim of protecting users' freedom to change the software. The +systematic pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we have designed +this version of the GPL to prohibit the practice for those products. If such problems +arise substantially in other domains, we stand ready to extend this provision to +those domains in future versions of the GPL, as needed to protect the freedom of +users. + +Finally, every program is threatened constantly by software patents. States should +not allow patents to restrict development and use of software on general-purpose +computers, but in those that do, we wish to avoid the special danger that patents +applied to a free program could make it effectively proprietary. To prevent this, the +GPL assures that patents cannot be used to render the program non-free. + +The precise terms and conditions for copying, distribution and modification follow. + +## TERMS AND CONDITIONS + +### 0. Definitions + +“This License” refers to version 3 of the GNU General Public License. + +“Copyright” also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + +“The Program” refers to any copyrightable work licensed under this +License. Each licensee is addressed as “you”. “Licensees” and +“recipients” may be individuals or organizations. + +To “modify” a work means to copy from or adapt all or part of the work in +a fashion requiring copyright permission, other than the making of an exact copy. The +resulting work is called a “modified version” of the earlier work or a +work “based on” the earlier work. + +A “covered work” means either the unmodified Program or a work based on +the Program. + +To “propagate” a work means to do anything with it that, without +permission, would make you directly or secondarily liable for infringement under +applicable copyright law, except executing it on a computer or modifying a private +copy. Propagation includes copying, distribution (with or without modification), +making available to the public, and in some countries other activities as well. + +To “convey” a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through a computer +network, with no transfer of a copy, is not conveying. + +An interactive user interface displays “Appropriate Legal Notices” to the +extent that it includes a convenient and prominently visible feature that **(1)** +displays an appropriate copyright notice, and **(2)** tells the user that there is no +warranty for the work (except to the extent that warranties are provided), that +licensees may convey the work under this License, and how to view a copy of this +License. If the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + +### 1. Source Code + +The “source code” for a work means the preferred form of the work for +making modifications to it. “Object code” means any non-source form of a +work. + +A “Standard Interface” means an interface that either is an official +standard defined by a recognized standards body, or, in the case of interfaces +specified for a particular programming language, one that is widely used among +developers working in that language. + +The “System Libraries” of an executable work include anything, other than +the work as a whole, that **(a)** is included in the normal form of packaging a Major +Component, but which is not part of that Major Component, and **(b)** serves only to +enable use of the work with that Major Component, or to implement a Standard +Interface for which an implementation is available to the public in source code form. +A “Major Component”, in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system (if any) on which +the executable work runs, or a compiler used to produce the work, or an object code +interpreter used to run it. + +The “Corresponding Source” for a work in object code form means all the +source code needed to generate, install, and (for an executable work) run the object +code and to modify the work, including scripts to control those activities. However, +it does not include the work's System Libraries, or general-purpose tools or +generally available free programs which are used unmodified in performing those +activities but which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for the work, and +the source code for shared libraries and dynamically linked subprograms that the work +is specifically designed to require, such as by intimate data communication or +control flow between those subprograms and other parts of the work. + +The Corresponding Source need not include anything that users can regenerate +automatically from other parts of the Corresponding Source. + +The Corresponding Source for a work in source code form is that same work. + +### 2. Basic Permissions + +All rights granted under this License are granted for the term of copyright on the +Program, and are irrevocable provided the stated conditions are met. This License +explicitly affirms your unlimited permission to run the unmodified Program. The +output from running a covered work is covered by this License only if the output, +given its content, constitutes a covered work. This License acknowledges your rights +of fair use or other equivalent, as provided by copyright law. + +You may make, run and propagate covered works that you do not convey, without +conditions so long as your license otherwise remains in force. You may convey covered +works to others for the sole purpose of having them make modifications exclusively +for you, or provide you with facilities for running those works, provided that you +comply with the terms of this License in conveying all material for which you do not +control copyright. Those thus making or running the covered works for you must do so +exclusively on your behalf, under your direction and control, on terms that prohibit +them from making any copies of your copyrighted material outside their relationship +with you. + +Conveying under any other circumstances is permitted solely under the conditions +stated below. Sublicensing is not allowed; section 10 makes it unnecessary. + +### 3. Protecting Users' Legal Rights From Anti-Circumvention Law + +No covered work shall be deemed part of an effective technological measure under any +applicable law fulfilling obligations under article 11 of the WIPO copyright treaty +adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention +of such measures. + +When you convey a covered work, you waive any legal power to forbid circumvention of +technological measures to the extent such circumvention is effected by exercising +rights under this License with respect to the covered work, and you disclaim any +intention to limit operation or modification of the work as a means of enforcing, +against the work's users, your or third parties' legal rights to forbid circumvention +of technological measures. + +### 4. Conveying Verbatim Copies + +You may convey verbatim copies of the Program's source code as you receive it, in any +medium, provided that you conspicuously and appropriately publish on each copy an +appropriate copyright notice; keep intact all notices stating that this License and +any non-permissive terms added in accord with section 7 apply to the code; keep +intact all notices of the absence of any warranty; and give all recipients a copy of +this License along with the Program. + +You may charge any price or no price for each copy that you convey, and you may offer +support or warranty protection for a fee. + +### 5. Conveying Modified Source Versions + +You may convey a work based on the Program, or the modifications to produce it from +the Program, in the form of source code under the terms of section 4, provided that +you also meet all of these conditions: + +* **a)** The work must carry prominent notices stating that you modified it, and giving a +relevant date. +* **b)** The work must carry prominent notices stating that it is released under this +License and any conditions added under section 7. This requirement modifies the +requirement in section 4 to “keep intact all notices”. +* **c)** You must license the entire work, as a whole, under this License to anyone who +comes into possession of a copy. This License will therefore apply, along with any +applicable section 7 additional terms, to the whole of the work, and all its parts, +regardless of how they are packaged. This License gives no permission to license the +work in any other way, but it does not invalidate such permission if you have +separately received it. +* **d)** If the work has interactive user interfaces, each must display Appropriate Legal +Notices; however, if the Program has interactive interfaces that do not display +Appropriate Legal Notices, your work need not make them do so. + +A compilation of a covered work with other separate and independent works, which are +not by their nature extensions of the covered work, and which are not combined with +it such as to form a larger program, in or on a volume of a storage or distribution +medium, is called an “aggregate” if the compilation and its resulting +copyright are not used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work in an aggregate +does not cause this License to apply to the other parts of the aggregate. + +### 6. Conveying Non-Source Forms + +You may convey a covered work in object code form under the terms of sections 4 and +5, provided that you also convey the machine-readable Corresponding Source under the +terms of this License, in one of these ways: + +* **a)** Convey the object code in, or embodied in, a physical product (including a +physical distribution medium), accompanied by the Corresponding Source fixed on a +durable physical medium customarily used for software interchange. +* **b)** Convey the object code in, or embodied in, a physical product (including a +physical distribution medium), accompanied by a written offer, valid for at least +three years and valid for as long as you offer spare parts or customer support for +that product model, to give anyone who possesses the object code either **(1)** a copy of +the Corresponding Source for all the software in the product that is covered by this +License, on a durable physical medium customarily used for software interchange, for +a price no more than your reasonable cost of physically performing this conveying of +source, or **(2)** access to copy the Corresponding Source from a network server at no +charge. +* **c)** Convey individual copies of the object code with a copy of the written offer to +provide the Corresponding Source. This alternative is allowed only occasionally and +noncommercially, and only if you received the object code with such an offer, in +accord with subsection 6b. +* **d)** Convey the object code by offering access from a designated place (gratis or for +a charge), and offer equivalent access to the Corresponding Source in the same way +through the same place at no further charge. You need not require recipients to copy +the Corresponding Source along with the object code. If the place to copy the object +code is a network server, the Corresponding Source may be on a different server +(operated by you or a third party) that supports equivalent copying facilities, +provided you maintain clear directions next to the object code saying where to find +the Corresponding Source. Regardless of what server hosts the Corresponding Source, +you remain obligated to ensure that it is available for as long as needed to satisfy +these requirements. +* **e)** Convey the object code using peer-to-peer transmission, provided you inform +other peers where the object code and Corresponding Source of the work are being +offered to the general public at no charge under subsection 6d. + +A separable portion of the object code, whose source code is excluded from the +Corresponding Source as a System Library, need not be included in conveying the +object code work. + +A “User Product” is either **(1)** a “consumer product”, which +means any tangible personal property which is normally used for personal, family, or +household purposes, or **(2)** anything designed or sold for incorporation into a +dwelling. In determining whether a product is a consumer product, doubtful cases +shall be resolved in favor of coverage. For a particular product received by a +particular user, “normally used” refers to a typical or common use of +that class of product, regardless of the status of the particular user or of the way +in which the particular user actually uses, or expects or is expected to use, the +product. A product is a consumer product regardless of whether the product has +substantial commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + +“Installation Information” for a User Product means any methods, +procedures, authorization keys, or other information required to install and execute +modified versions of a covered work in that User Product from a modified version of +its Corresponding Source. The information must suffice to ensure that the continued +functioning of the modified object code is in no case prevented or interfered with +solely because modification has been made. + +If you convey an object code work under this section in, or with, or specifically for +use in, a User Product, and the conveying occurs as part of a transaction in which +the right of possession and use of the User Product is transferred to the recipient +in perpetuity or for a fixed term (regardless of how the transaction is +characterized), the Corresponding Source conveyed under this section must be +accompanied by the Installation Information. But this requirement does not apply if +neither you nor any third party retains the ability to install modified object code +on the User Product (for example, the work has been installed in ROM). + +The requirement to provide Installation Information does not include a requirement to +continue to provide support service, warranty, or updates for a work that has been +modified or installed by the recipient, or for the User Product in which it has been +modified or installed. Access to a network may be denied when the modification itself +materially and adversely affects the operation of the network or violates the rules +and protocols for communication across the network. + +Corresponding Source conveyed, and Installation Information provided, in accord with +this section must be in a format that is publicly documented (and with an +implementation available to the public in source code form), and must require no +special password or key for unpacking, reading or copying. + +### 7. Additional Terms + +“Additional permissions” are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. Additional +permissions that are applicable to the entire Program shall be treated as though they +were included in this License, to the extent that they are valid under applicable +law. If additional permissions apply only to part of the Program, that part may be +used separately under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + +When you convey a copy of a covered work, you may at your option remove any +additional permissions from that copy, or from any part of it. (Additional +permissions may be written to require their own removal in certain cases when you +modify the work.) You may place additional permissions on material, added by you to a +covered work, for which you have or can give appropriate copyright permission. + +Notwithstanding any other provision of this License, for material you add to a +covered work, you may (if authorized by the copyright holders of that material) +supplement the terms of this License with terms: + +* **a)** Disclaiming warranty or limiting liability differently from the terms of +sections 15 and 16 of this License; or +* **b)** Requiring preservation of specified reasonable legal notices or author +attributions in that material or in the Appropriate Legal Notices displayed by works +containing it; or +* **c)** Prohibiting misrepresentation of the origin of that material, or requiring that +modified versions of such material be marked in reasonable ways as different from the +original version; or +* **d)** Limiting the use for publicity purposes of names of licensors or authors of the +material; or +* **e)** Declining to grant rights under trademark law for use of some trade names, +trademarks, or service marks; or +* **f)** Requiring indemnification of licensors and authors of that material by anyone +who conveys the material (or modified versions of it) with contractual assumptions of +liability to the recipient, for any liability that these contractual assumptions +directly impose on those licensors and authors. + +All other non-permissive additional terms are considered “further +restrictions” within the meaning of section 10. If the Program as you received +it, or any part of it, contains a notice stating that it is governed by this License +along with a term that is a further restriction, you may remove that term. If a +license document contains a further restriction but permits relicensing or conveying +under this License, you may add to a covered work material governed by the terms of +that license document, provided that the further restriction does not survive such +relicensing or conveying. + +If you add terms to a covered work in accord with this section, you must place, in +the relevant source files, a statement of the additional terms that apply to those +files, or a notice indicating where to find the applicable terms. + +Additional terms, permissive or non-permissive, may be stated in the form of a +separately written license, or stated as exceptions; the above requirements apply +either way. + +### 8. Termination + +You may not propagate or modify a covered work except as expressly provided under +this License. Any attempt otherwise to propagate or modify it is void, and will +automatically terminate your rights under this License (including any patent licenses +granted under the third paragraph of section 11). + +However, if you cease all violation of this License, then your license from a +particular copyright holder is reinstated **(a)** provisionally, unless and until the +copyright holder explicitly and finally terminates your license, and **(b)** permanently, +if the copyright holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + +Moreover, your license from a particular copyright holder is reinstated permanently +if the copyright holder notifies you of the violation by some reasonable means, this +is the first time you have received notice of violation of this License (for any +work) from that copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + +Termination of your rights under this section does not terminate the licenses of +parties who have received copies or rights from you under this License. If your +rights have been terminated and not permanently reinstated, you do not qualify to +receive new licenses for the same material under section 10. + +### 9. Acceptance Not Required for Having Copies + +You are not required to accept this License in order to receive or run a copy of the +Program. Ancillary propagation of a covered work occurring solely as a consequence of +using peer-to-peer transmission to receive a copy likewise does not require +acceptance. However, nothing other than this License grants you permission to +propagate or modify any covered work. These actions infringe copyright if you do not +accept this License. Therefore, by modifying or propagating a covered work, you +indicate your acceptance of this License to do so. + +### 10. Automatic Licensing of Downstream Recipients + +Each time you convey a covered work, the recipient automatically receives a license +from the original licensors, to run, modify and propagate that work, subject to this +License. You are not responsible for enforcing compliance by third parties with this +License. + +An “entity transaction” is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an organization, or +merging organizations. If propagation of a covered work results from an entity +transaction, each party to that transaction who receives a copy of the work also +receives whatever licenses to the work the party's predecessor in interest had or +could give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if the predecessor +has it or can get it with reasonable efforts. + +You may not impose any further restrictions on the exercise of the rights granted or +affirmed under this License. For example, you may not impose a license fee, royalty, +or other charge for exercise of rights granted under this License, and you may not +initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging +that any patent claim is infringed by making, using, selling, offering for sale, or +importing the Program or any portion of it. + +### 11. Patents + +A “contributor” is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The work thus +licensed is called the contributor's “contributor version”. + +A contributor's “essential patent claims” are all patent claims owned or +controlled by the contributor, whether already acquired or hereafter acquired, that +would be infringed by some manner, permitted by this License, of making, using, or +selling its contributor version, but do not include claims that would be infringed +only as a consequence of further modification of the contributor version. For +purposes of this definition, “control” includes the right to grant patent +sublicenses in a manner consistent with the requirements of this License. + +Each contributor grants you a non-exclusive, worldwide, royalty-free patent license +under the contributor's essential patent claims, to make, use, sell, offer for sale, +import and otherwise run, modify and propagate the contents of its contributor +version. + +In the following three paragraphs, a “patent license” is any express +agreement or commitment, however denominated, not to enforce a patent (such as an +express permission to practice a patent or covenant not to sue for patent +infringement). To “grant” such a patent license to a party means to make +such an agreement or commitment not to enforce a patent against the party. + +If you convey a covered work, knowingly relying on a patent license, and the +Corresponding Source of the work is not available for anyone to copy, free of charge +and under the terms of this License, through a publicly available network server or +other readily accessible means, then you must either **(1)** cause the Corresponding +Source to be so available, or **(2)** arrange to deprive yourself of the benefit of the +patent license for this particular work, or **(3)** arrange, in a manner consistent with +the requirements of this License, to extend the patent license to downstream +recipients. “Knowingly relying” means you have actual knowledge that, but +for the patent license, your conveying the covered work in a country, or your +recipient's use of the covered work in a country, would infringe one or more +identifiable patents in that country that you have reason to believe are valid. + +If, pursuant to or in connection with a single transaction or arrangement, you +convey, or propagate by procuring conveyance of, a covered work, and grant a patent +license to some of the parties receiving the covered work authorizing them to use, +propagate, modify or convey a specific copy of the covered work, then the patent +license you grant is automatically extended to all recipients of the covered work and +works based on it. + +A patent license is “discriminatory” if it does not include within the +scope of its coverage, prohibits the exercise of, or is conditioned on the +non-exercise of one or more of the rights that are specifically granted under this +License. You may not convey a covered work if you are a party to an arrangement with +a third party that is in the business of distributing software, under which you make +payment to the third party based on the extent of your activity of conveying the +work, and under which the third party grants, to any of the parties who would receive +the covered work from you, a discriminatory patent license **(a)** in connection with +copies of the covered work conveyed by you (or copies made from those copies), or **(b)** +primarily for and in connection with specific products or compilations that contain +the covered work, unless you entered into that arrangement, or that patent license +was granted, prior to 28 March 2007. + +Nothing in this License shall be construed as excluding or limiting any implied +license or other defenses to infringement that may otherwise be available to you +under applicable patent law. + +### 12. No Surrender of Others' Freedom + +If conditions are imposed on you (whether by court order, agreement or otherwise) +that contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot convey a covered work so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not convey it at all. For example, if you +agree to terms that obligate you to collect a royalty for further conveying from +those to whom you convey the Program, the only way you could satisfy both those terms +and this License would be to refrain entirely from conveying the Program. + +### 13. Use with the GNU Affero General Public License + +Notwithstanding any other provision of this License, you have permission to link or +combine any covered work with a work licensed under version 3 of the GNU Affero +General Public License into a single combined work, and to convey the resulting work. +The terms of this License will continue to apply to the part which is the covered +work, but the special requirements of the GNU Affero General Public License, section +13, concerning interaction through a network will apply to the combination as such. + +### 14. Revised Versions of this License + +The Free Software Foundation may publish revised and/or new versions of the GNU +General Public License from time to time. Such new versions will be similar in spirit +to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Program specifies that +a certain numbered version of the GNU General Public License “or any later +version” applies to it, you have the option of following the terms and +conditions either of that numbered version or of any later version published by the +Free Software Foundation. If the Program does not specify a version number of the GNU +General Public License, you may choose any version ever published by the Free +Software Foundation. + +If the Program specifies that a proxy can decide which future versions of the GNU +General Public License can be used, that proxy's public statement of acceptance of a +version permanently authorizes you to choose that version for the Program. + +Later license versions may give you additional or different permissions. However, no +additional obligations are imposed on any author or copyright holder as a result of +your choosing to follow a later version. + +### 15. Disclaimer of Warranty + +THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER +EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE +QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE +DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +### 16. Limitation of Liability + +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY +COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS +PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, +INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE +OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE +WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + +### 17. Interpretation of Sections 15 and 16 + +If the disclaimer of warranty and limitation of liability provided above cannot be +given local legal effect according to their terms, reviewing courts shall apply local +law that most closely approximates an absolute waiver of all civil liability in +connection with the Program, unless a warranty or assumption of liability accompanies +a copy of the Program in return for a fee. + +_END OF TERMS AND CONDITIONS_ + +## How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible use to +the public, the best way to achieve this is to make it free software which everyone +can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach them +to the start of each source file to most effectively state the exclusion of warranty; +and each file should have at least the “copyright” line and a pointer to +where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + +If the program does terminal interaction, make it output a short notice like this +when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type 'show c' for details. + +The hypothetical commands `show w` and `show c` should show the appropriate parts of +the General Public License. Of course, your program's commands might be different; +for a GUI interface, you would use an “about box”. + +You should also get your employer (if you work as a programmer) or school, if any, to +sign a “copyright disclaimer” for the program, if necessary. For more +information on this, and how to apply and follow the GNU GPL, see +<>. + +The GNU General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may consider it +more useful to permit linking proprietary applications with the library. If this is +what you want to do, use the GNU Lesser General Public License instead of this +License. But first, please read +<>. diff --git a/errors/src/asg/asg.rs b/errors/src/asg/asg.rs new file mode 100644 index 0000000000..1f24c356cb --- /dev/null +++ b/errors/src/asg/asg.rs @@ -0,0 +1,408 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +use crate::{ErrorCode, FormattedError, LeoErrorCode, Span}; + +#[derive(Debug, Error)] +pub enum AsgError { + #[error(transparent)] + FormattedError(#[from] FormattedError), +} + +impl LeoErrorCode for AsgError {} + +impl ErrorCode for AsgError { + #[inline(always)] + fn exit_code_mask() -> u32 { + 2000 + } + + #[inline(always)] + fn error_type() -> String { + "G".to_string() + } + + fn new_from_span(message: String, help: Option, exit_code: u32, span: &Span) -> Self { + Self::FormattedError(FormattedError::new_from_span( + message, + help, + exit_code ^ Self::exit_code_mask(), + Self::code_identifier(), + Self::error_type(), + span, + )) + } +} + +impl AsgError { + pub fn unresolved_circuit(name: &str, span: &Span) -> Self { + Self::new_from_span(format!("failed to resolve circuit: '{}'", name), None, 0, span) + } + + pub fn unresolved_import(name: &str, span: &Span) -> Self { + Self::new_from_span(format!("failed to resolve import: '{}'", name), None, 1, span) + } + + pub fn unresolved_circuit_member(circuit_name: &str, name: &str, span: &Span) -> Self { + Self::new_from_span( + format!( + "illegal reference to non-existant member '{}' of circuit '{}'", + name, circuit_name + ), + None, + 2, + span, + ) + } + + pub fn missing_circuit_member(circuit_name: &str, name: &str, span: &Span) -> Self { + Self::new_from_span( + format!( + "missing circuit member '{}' for initialization of circuit '{}'", + name, circuit_name + ), + None, + 3, + span, + ) + } + + pub fn overridden_circuit_member(circuit_name: &str, name: &str, span: &Span) -> Self { + Self::new_from_span( + format!( + "cannot declare circuit member '{}' more than once for initialization of circuit '{}'", + name, circuit_name + ), + None, + 4, + span, + ) + } + + pub fn redefined_circuit_member(circuit_name: &str, name: &str, span: &Span) -> Self { + Self::new_from_span( + format!( + "cannot declare circuit member '{}' multiple times in circuit '{}'", + name, circuit_name + ), + None, + 5, + span, + ) + } + + pub fn extra_circuit_member(circuit_name: &str, name: &str, span: &Span) -> Self { + Self::new_from_span( + format!( + "extra circuit member '{}' for initialization of circuit '{}' is not allowed", + name, circuit_name + ), + None, + 6, + span, + ) + } + + pub fn illegal_function_assign(name: &str, span: &Span) -> Self { + Self::new_from_span(format!("attempt to assign to function '{}'", name), None, 7, span) + } + + pub fn circuit_variable_call(circuit_name: &str, name: &str, span: &Span) -> Self { + Self::new_from_span( + format!("cannot call variable member '{}' of circuit '{}'", name, circuit_name), + None, + 8, + span, + ) + } + + pub fn circuit_static_call_invalid(circuit_name: &str, name: &str, span: &Span) -> Self { + Self::new_from_span( + format!( + "cannot call static function '{}' of circuit '{}' from target", + name, circuit_name + ), + None, + 9, + span, + ) + } + + pub fn circuit_member_mut_call_invalid(circuit_name: &str, name: &str, span: &Span) -> Self { + Self::new_from_span( + format!( + "cannot call mutable member function '{}' of circuit '{}' from immutable context", + name, circuit_name + ), + None, + 10, + span, + ) + } + + pub fn circuit_member_call_invalid(circuit_name: &str, name: &str, span: &Span) -> Self { + Self::new_from_span( + format!( + "cannot call member function '{}' of circuit '{}' from static context", + name, circuit_name + ), + None, + 11, + span, + ) + } + + pub fn circuit_function_ref(circuit_name: &str, name: &str, span: &Span) -> Self { + Self::new_from_span( + format!( + "cannot reference function member '{}' of circuit '{}' as value", + name, circuit_name + ), + None, + 12, + span, + ) + } + + pub fn index_into_non_array(name: &str, span: &Span) -> Self { + Self::new_from_span(format!("failed to index into non-array '{}'", name), None, 13, span) + } + + pub fn invalid_assign_index(name: &str, num: &str, span: &Span) -> Self { + Self::new_from_span( + format!("failed to index array with invalid integer '{}'[{}]", name, num), + None, + 14, + span, + ) + } + + pub fn invalid_backwards_assignment(name: &str, left: usize, right: usize, span: &Span) -> Self { + Self::new_from_span( + format!( + "failed to index array range for assignment with left > right '{}'[{}..{}]", + name, left, right + ), + None, + 15, + span, + ) + } + + pub fn invalid_const_assign(name: &str, span: &Span) -> Self { + Self::new_from_span( + format!( + "failed to create const variable(s) '{}' with non constant values.", + name + ), + None, + 16, + span, + ) + } + + pub fn duplicate_function_definition(name: &str, span: &Span) -> Self { + Self::new_from_span( + format!("a function named \"{}\" already exists in this scope", name), + None, + 17, + span, + ) + } + + pub fn duplicate_variable_definition(name: &str, span: &Span) -> Self { + Self::new_from_span( + format!("a variable named \"{}\" already exists in this scope", name), + None, + 18, + span, + ) + } + + pub fn index_into_non_tuple(name: &str, span: &Span) -> Self { + Self::new_from_span(format!("failed to index into non-tuple '{}'", name), None, 19, span) + } + + pub fn tuple_index_out_of_bounds(index: usize, span: &Span) -> Self { + Self::new_from_span(format!("tuple index out of bounds: '{}'", index), None, 20, span) + } + + pub fn array_index_out_of_bounds(index: usize, span: &Span) -> Self { + Self::new_from_span(format!("array index out of bounds: '{}'", index), None, 21, span) + } + + pub fn ternary_different_types(left: &str, right: &str, span: &Span) -> Self { + let message = format!("ternary sides had different types: left {}, right {}", left, right); + + Self::new_from_span(message, None, 22, span) + } + + pub fn unknown_array_size(span: &Span) -> Self { + Self::new_from_span( + "array size cannot be inferred, add explicit types".to_string(), + None, + 23, + span, + ) + } + + pub fn unexpected_call_argument_count(expected: usize, got: usize, span: &Span) -> Self { + Self::new_from_span( + format!("function call expected {} arguments, got {}", expected, got), + None, + 24, + span, + ) + } + + pub fn unresolved_function(name: &str, span: &Span) -> Self { + Self::new_from_span(format!("failed to resolve function: '{}'", name), None, 25, span) + } + + pub fn unresolved_type(name: &str, span: &Span) -> Self { + Self::new_from_span( + format!("failed to resolve type for variable definition '{}'", name), + None, + 26, + span, + ) + } + + pub fn unexpected_type(expected: &str, received: Option<&str>, span: &Span) -> Self { + Self::new_from_span( + format!( + "unexpected type, expected: '{}', received: '{}'", + expected, + received.unwrap_or("unknown") + ), + None, + 27, + span, + ) + } + + pub fn unexpected_nonconst(span: &Span) -> Self { + Self::new_from_span("expected const, found non-const value".to_string(), None, 28, span) + } + + pub fn unresolved_reference(name: &str, span: &Span) -> Self { + Self::new_from_span( + format!("failed to resolve variable reference '{}'", name), + None, + 29, + span, + ) + } + + pub fn invalid_boolean(value: &str, span: &Span) -> Self { + Self::new_from_span(format!("failed to parse boolean value '{}'", value), None, 30, span) + } + + pub fn invalid_char(value: &str, span: &Span) -> Self { + Self::new_from_span(format!("failed to parse char value '{}'", value), None, 31, span) + } + + pub fn invalid_int(value: &str, span: &Span) -> Self { + Self::new_from_span(format!("failed to parse int value '{}'", value), None, 32, span) + } + + pub fn unsigned_negation(span: &Span) -> Self { + Self::new_from_span("cannot negate unsigned integer".to_string(), None, 33, span) + } + + pub fn immutable_assignment(name: &str, span: &Span) -> Self { + Self::new_from_span( + format!("illegal assignment to immutable variable '{}'", name), + None, + 34, + span, + ) + } + + pub fn function_missing_return(name: &str, span: &Span) -> Self { + Self::new_from_span( + format!("function '{}' missing return for all paths", name), + None, + 35, + span, + ) + } + + pub fn function_return_validation(name: &str, description: &str, span: &Span) -> Self { + Self::new_from_span( + format!("function '{}' failed to validate return path: '{}'", name, description), + None, + 36, + span, + ) + } + + pub fn input_ref_needs_type(category: &str, name: &str, span: &Span) -> Self { + Self::new_from_span( + format!("could not infer type for input in '{}': '{}'", category, name), + None, + 37, + span, + ) + } + + pub fn invalid_self_in_global(span: &Span) -> Self { + Self::new_from_span( + "cannot have `mut self` or `self` arguments in global functions".to_string(), + None, + 38, + span, + ) + } + + pub fn call_test_function(span: &Span) -> Self { + Self::new_from_span("cannot call test function".to_string(), None, 39, span) + } + + pub fn circuit_test_function(span: &Span) -> Self { + Self::new_from_span( + "cannot have test function as member of circuit".to_string(), + None, + 40, + span, + ) + } + + pub fn parse_index_error(span: &Span) -> Self { + Self::new_from_span("failed to parse index".to_string(), None, 41, span) + } + + pub fn parse_dimension_error(span: &Span) -> Self { + Self::new_from_span("failed to parse dimension".to_string(), None, 42, span) + } + + pub fn reference_self_outside_circuit(span: &Span) -> Self { + Self::new_from_span( + "referenced self outside of circuit function".to_string(), + None, + 43, + span, + ) + } + + pub fn illegal_ast_structure(details: &str, span: &Span) -> Self { + Self::new_from_span(format!("illegal ast structure: {}", details), None, 44, span) + } + + pub fn illegal_input_variable_reference(details: &str, span: &Span) -> Self { + Self::new_from_span(format!("illegal ast structure: {}", details), None, 45, span) + } +} diff --git a/errors/src/asg/mod.rs b/errors/src/asg/mod.rs new file mode 100644 index 0000000000..ad18104ffa --- /dev/null +++ b/errors/src/asg/mod.rs @@ -0,0 +1,18 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +pub mod asg; +pub use self::asg::*; \ No newline at end of file diff --git a/errors/src/ast/ast.rs b/errors/src/ast/ast.rs new file mode 100644 index 0000000000..8c3135bcf9 --- /dev/null +++ b/errors/src/ast/ast.rs @@ -0,0 +1,81 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +use crate::{ErrorCode, FormattedError, LeoErrorCode, Span}; + +#[derive(Debug, Error)] +pub enum AstError { + #[error(transparent)] + FormattedError(#[from] FormattedError), +} + +impl LeoErrorCode for AstError {} + +impl ErrorCode for AstError { + #[inline(always)] + fn exit_code_mask() -> u32 { + 1000 + } + + #[inline(always)] + fn error_type() -> String { + "T".to_string() + } + + fn new_from_span(message: String, help: Option, exit_code: u32, span: &Span) -> Self { + Self::FormattedError(FormattedError::new_from_span( + message, + help, + exit_code ^ Self::exit_code_mask(), + Self::code_identifier(), + Self::error_type(), + span, + )) + } +} + +impl AstError { + pub fn big_self_outside_of_circuit(span: &Span) -> Self { + let message = "cannot call keyword `Self` outside of a circuit function".to_string(); + + Self::new_from_span(message, None, 1, span) + } + + pub fn invalid_array_dimension_size(span: &Span) -> Self { + let message = "received dimension size of 0, expected it to be 1 or larger.".to_string(); + + Self::new_from_span(message, None, 2, span) + } + + pub fn asg_statement_not_block(span: &Span) -> Self { + let message = "AstStatement should be be a block".to_string(); + + Self::new_from_span(message, None, 3, span) + } + + pub fn empty_string(span: &Span) -> Self { + let message = + "Cannot constrcut an empty string: it has the type of [char; 0] which is not possible.".to_string(); + + Self::new_from_span(message, None, 5, span) + } + + pub fn impossible_console_assert_call(span: &Span) -> Self { + let message = "Console::Assert cannot be matched here, its handled in another case.".to_string(); + + Self::new_from_span(message, None, 6, span) + } +} diff --git a/errors/src/ast/mod.rs b/errors/src/ast/mod.rs new file mode 100644 index 0000000000..902979095c --- /dev/null +++ b/errors/src/ast/mod.rs @@ -0,0 +1,18 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +pub mod ast; +pub use self::ast::*; \ No newline at end of file diff --git a/errors/src/common/formatted.rs b/errors/src/common/formatted.rs new file mode 100644 index 0000000000..3849dd8259 --- /dev/null +++ b/errors/src/common/formatted.rs @@ -0,0 +1,148 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +use crate::Span; + +use std::{fmt, sync::Arc}; + +use backtrace::Backtrace; +use derivative::Derivative; + +pub const INDENT: &str = " "; + +/// Formatted compiler error type +/// undefined value `x` +/// --> file.leo: 2:8 +/// | +/// 2 | let a = x; +/// | ^ +/// | +/// = help: Initialize a variable `x` first. +#[derive(Derivative)] +#[derivative(Clone, Debug, Default, Hash, PartialEq)] +pub struct FormattedError { + pub line_start: usize, + pub line_stop: usize, + pub col_start: usize, + pub col_stop: usize, + pub path: Arc, + pub content: String, + pub message: String, + pub help: Option, + pub exit_code: u32, + pub code_identifier: String, + pub error_type: String, + #[derivative(PartialEq = "ignore")] + #[derivative(Hash = "ignore")] + pub backtrace: Backtrace, +} + +impl FormattedError { + pub fn new_from_span( + message: String, + help: Option, + exit_code: u32, + code_identifier: String, + error_type: String, + span: &Span, + ) -> Self { + Self { + line_start: span.line_start, + line_stop: span.line_stop, + col_start: span.col_start, + col_stop: span.col_stop, + path: span.path.clone(), + content: span.content.to_string(), + message, + help, + exit_code, + code_identifier, + error_type, + backtrace: Backtrace::new(), + } + } +} + +impl fmt::Display for FormattedError { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let underline = |mut start: usize, mut end: usize| -> String { + if start > end { + std::mem::swap(&mut start, &mut end) + } + + let mut underline = String::new(); + + for _ in 0..start { + underline.push(' '); + end -= 1; + } + + for _ in 0..end { + underline.push('^'); + } + + underline + }; + + let underlined = underline(self.col_start, self.col_start); + + let error_message = format!( + "{indent }[E{error_type}{code_identifier}{exit_code}]: {message}\ + {indent }--> {path}:{line_start}:{start}\n\ + {indent } ", + indent = INDENT, + error_type = self.error_type, + code_identifier = self.code_identifier, + exit_code = self.exit_code, + message = self.message, + path = &*self.path, + line_start = self.line_start, + start = self.col_start, + ); + + write!(f, "{}", error_message)?; + + for (line_no, line) in self.content.lines().enumerate() { + writeln!( + f, + "|\n{line_no:width$} | {text}", + width = INDENT.len(), + line_no = self.line_start + line_no, + text = line, + )?; + } + + write!( + f, + "{indent } |{underlined}\n\ + {indent } |\n", + indent = INDENT, + underlined = underlined, + )?; + + if let Some(help) = &self.help { + write!(f, "{indent } = {help}", indent = INDENT, help = help)?; + } + + write!(f, "{:?}", self.backtrace,) + } +} + +impl std::error::Error for FormattedError { + fn description(&self) -> &str { + &self.message + } +} diff --git a/compiler/src/errors/value/mod.rs b/errors/src/common/mod.rs similarity index 72% rename from compiler/src/errors/value/mod.rs rename to errors/src/common/mod.rs index 74a2fa1c84..d4d9da616d 100644 --- a/compiler/src/errors/value/mod.rs +++ b/errors/src/common/mod.rs @@ -14,23 +14,14 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -pub mod address; -pub use self::address::*; +pub mod formatted; +pub use self::formatted::*; -pub mod boolean; -pub use self::boolean::*; +pub mod span; +pub use self::span::*; -pub mod char; -pub use self::char::*; +pub mod tendril_json; +pub use self::tendril_json::*; -pub mod field; -pub use self::field::*; - -pub mod group; -pub use self::group::*; - -pub mod integer; -pub use self::integer::*; - -pub mod value; -pub use self::value::*; +pub mod traits; +pub use self::traits::*; \ No newline at end of file diff --git a/errors/src/common/span.rs b/errors/src/common/span.rs new file mode 100644 index 0000000000..0c2d4d8a29 --- /dev/null +++ b/errors/src/common/span.rs @@ -0,0 +1,152 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +use std::{fmt, sync::Arc, usize}; + +use backtrace::Backtrace; +use derivative::Derivative; +use pest::Span as PestSpan; +use serde::{Deserialize, Serialize}; +use tendril::StrTendril; + +#[derive(Derivative, Deserialize, Serialize)] +#[derivative(Clone, Debug, Default, Eq, Hash, PartialEq)] +pub struct Span { + pub line_start: usize, + pub line_stop: usize, + pub col_start: usize, + pub col_stop: usize, + pub path: Arc, + #[serde(with = "crate::tendril_json")] + pub content: StrTendril, + #[derivative(PartialEq = "ignore")] + #[derivative(Hash = "ignore")] + #[serde(skip)] + pub backtrace: Backtrace, +} + +impl Span { + pub fn new( + line_start: usize, + line_stop: usize, + col_start: usize, + col_stop: usize, + path: Arc, + content: StrTendril, + ) -> Self { + Self { + line_start, + line_stop, + col_start, + col_stop, + path, + content, + backtrace: Backtrace::new(), + } + } +} + +impl fmt::Display for Span { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + if self.line_start == self.line_stop { + write!(f, "{}:{}-{}", self.line_start, self.col_start, self.col_stop) + } else { + write!( + f, + "{}:{}-{}:{}", + self.line_start, self.col_start, self.line_stop, self.col_stop + ) + } + } +} + +impl<'ast> From> for Span { + fn from(span: PestSpan) -> Self { + let start = span.start_pos().line_col(); + let end = span.end_pos().line_col(); + + Span::new( + start.0, + end.0, + start.1, + end.1, + Arc::new(String::new()), + span.as_str().into(), + ) + } +} + +impl std::ops::Add for &Span { + type Output = Span; + + fn add(self, other: &Span) -> Span { + self.clone() + other.clone() + } +} + +impl std::ops::Add for Span { + type Output = Self; + + #[allow(clippy::comparison_chain)] + fn add(self, other: Self) -> Self { + if self.line_start == other.line_stop { + Span { + line_start: self.line_start, + line_stop: self.line_stop, + col_start: self.col_start.min(other.col_start), + col_stop: self.col_stop.max(other.col_stop), + path: self.path, + content: self.content, + backtrace: self.backtrace, + } + } else { + let mut new_content = vec![]; + let self_lines = self.content.lines().collect::>(); + let other_lines = other.content.lines().collect::>(); + for line in self.line_start.min(other.line_start)..self.line_stop.max(other.line_stop) + 1 { + if line >= self.line_start && line <= self.line_stop { + new_content.push(self_lines.get(line - self.line_start).copied().unwrap_or_default()); + } else if line >= other.line_start && line <= other.line_stop { + new_content.push(other_lines.get(line - other.line_start).copied().unwrap_or_default()); + } else if new_content.last().map(|x| *x != "...").unwrap_or(true) { + new_content.push("..."); + } + } + let new_content = new_content.join("\n").into(); + if self.line_start < other.line_stop { + Span { + line_start: self.line_start, + line_stop: other.line_stop, + col_start: self.col_start, + col_stop: other.col_stop, + path: self.path, + content: new_content, + backtrace: self.backtrace, + } + } else { + Span { + line_start: other.line_start, + line_stop: self.line_stop, + col_start: other.col_start, + col_stop: self.col_stop, + path: self.path, + content: new_content, + backtrace: self.backtrace, + } + } + } + } +} diff --git a/errors/src/common/tendril_json.rs b/errors/src/common/tendril_json.rs new file mode 100644 index 0000000000..35c9b45759 --- /dev/null +++ b/errors/src/common/tendril_json.rs @@ -0,0 +1,26 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +use serde::{Deserialize, Deserializer, Serializer}; +use tendril::StrTendril; + +pub fn serialize(tendril: &StrTendril, serializer: S) -> Result { + serializer.serialize_str(&tendril[..]) +} + +pub fn deserialize<'de, D: Deserializer<'de>>(deserializer: D) -> Result { + Ok(String::deserialize(deserializer)?.into()) +} diff --git a/compiler/src/errors/output_file.rs b/errors/src/common/traits.rs similarity index 58% rename from compiler/src/errors/output_file.rs rename to errors/src/common/traits.rs index 014327c3ad..e56f9ff5c4 100644 --- a/compiler/src/errors/output_file.rs +++ b/errors/src/common/traits.rs @@ -14,25 +14,19 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use std::{io, path::PathBuf}; +use crate::Span; -#[derive(Debug, Error)] -pub enum OutputFileError { - #[error("{}: {}", _0, _1)] - Crate(&'static str, String), +pub trait ErrorCode: Sized { + fn exit_code_mask() -> u32; - #[error("Cannot read from the provided file path - {:?}", _0)] - FileReadError(PathBuf), + fn error_type() -> String; - #[error("Cannot remove the provided file - {:?}", _0)] - FileRemovalError(PathBuf), - - #[error("writing: {}", _0)] - Writing(io::Error), + fn new_from_span(message: String, help: Option, exit_code: u32, span: &Span) -> Self; } -impl From for OutputFileError { - fn from(error: std::io::Error) -> Self { - OutputFileError::Crate("std::io", error.to_string()) +pub trait LeoErrorCode: ErrorCode { + #[inline(always)] + fn code_identifier() -> String { + "037".to_string() } } diff --git a/errors/src/compiler/compiler.rs b/errors/src/compiler/compiler.rs new file mode 100644 index 0000000000..2fc1053c16 --- /dev/null +++ b/errors/src/compiler/compiler.rs @@ -0,0 +1,443 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +use crate::{ErrorCode, FormattedError, LeoErrorCode, Span}; + +#[derive(Debug, Error)] +pub enum CompilerError { + #[error(transparent)] + FormattedError(#[from] FormattedError), +} + +impl LeoErrorCode for CompilerError {} + +impl ErrorCode for CompilerError { + #[inline(always)] + fn exit_code_mask() -> u32 { + 4000 + } + + #[inline(always)] + fn error_type() -> String { + "C".to_string() + } + + fn new_from_span(message: String, help: Option, exit_code: u32, span: &Span) -> Self { + Self::FormattedError(FormattedError::new_from_span( + message, + help, + exit_code ^ Self::exit_code_mask(), + Self::code_identifier(), + Self::error_type(), + span, + )) + } +} + +impl CompilerError { + pub fn expected_left_or_right_brace(span: &Span) -> Self { + let message = "Formatter given a {. Expected a { or } after".to_string(); + + Self::new_from_span(message, None, 0, span) + } + + pub fn expected_escaped_right_brace(span: &Span) -> Self { + let message = "Formatter given a }. Expected a container {} or }}".to_string(); + + Self::new_from_span(message, None, 1, span) + } + + pub fn length(containers: usize, parameters: usize, span: &Span) -> Self { + let message = format!( + "Formatter given {} containers and found {} parameters", + containers, parameters + ); + + Self::new_from_span(message, None, 2, span) + } + + pub fn assertion_depends_on_input(span: &Span) -> Self { + let message = "console.assert() does not produce constraints and cannot use inputs. \ + Assertions should only be used in @test functions" + .to_string(); + + Self::new_from_span(message, None, 3, span) + } + + pub fn assertion_failed(span: &Span) -> Self { + let message = "Assertion failed".to_string(); + + Self::new_from_span(message, None, 4, span) + } + + pub fn assertion_must_be_boolean(span: &Span) -> Self { + let message = "Assertion expression must evaluate to a boolean value".to_string(); + + Self::new_from_span(message, None, 5, span) + } + + pub fn cannot_enforce(operation: String, error: String, span: &Span) -> Self { + let message = format!( + "the gadget operation `{}` failed due to synthesis error `{}`", + operation, error, + ); + + Self::new_from_span(message, None, 6, span) + } + + pub fn cannot_evaluate(operation: String, span: &Span) -> Self { + let message = format!("Mismatched types found for operation `{}`", operation); + + Self::new_from_span(message, None, 7, span) + } + + pub fn array_length_out_of_bounds(span: &Span) -> Self { + let message = "array length cannot be >= 2^32".to_string(); + + Self::new_from_span(message, None, 8, span) + } + + pub fn array_index_out_of_legal_bounds(span: &Span) -> Self { + let message = "array index cannot be >= 2^32".to_string(); + + Self::new_from_span(message, None, 9, span) + } + + pub fn conditional_boolean(actual: String, span: &Span) -> Self { + let message = format!("if, else conditional must resolve to a boolean, found `{}`", actual); + + Self::new_from_span(message, None, 10, span) + } + + pub fn expected_circuit_member(expected: String, span: &Span) -> Self { + let message = format!("expected circuit member `{}`, not found", expected); + + Self::new_from_span(message, None, 11, span) + } + + pub fn incompatible_types(operation: String, span: &Span) -> Self { + let message = format!("no implementation for `{}`", operation); + + Self::new_from_span(message, None, 12, span) + } + + pub fn tuple_index_out_of_bounds(index: usize, span: &Span) -> Self { + let message = format!("cannot access index {} of tuple out of bounds", index); + + Self::new_from_span(message, None, 13, span) + } + + pub fn array_index_out_of_bounds(index: usize, span: &Span) -> Self { + let message = format!("cannot access index {} of array out of bounds", index); + + Self::new_from_span(message, None, 14, span) + } + + pub fn array_invalid_slice_length(span: &Span) -> Self { + let message = "illegal length of slice".to_string(); + + Self::new_from_span(message, None, 15, span) + } + + pub fn invalid_index(actual: String, span: &Span) -> Self { + let message = format!("index must resolve to an integer, found `{}`", actual); + + Self::new_from_span(message, None, 16, span) + } + + pub fn invalid_length(expected: usize, actual: usize, span: &Span) -> Self { + let message = format!("expected array length {}, found one with length {}", expected, actual); + + Self::new_from_span(message, None, 17, span) + } + + pub fn invalid_static_access(member: String, span: &Span) -> Self { + let message = format!("static member `{}` must be accessed using `::` syntax", member); + + Self::new_from_span(message, None, 18, span) + } + + pub fn undefined_array(actual: String, span: &Span) -> Self { + let message = format!("array `{}` must be declared before it is used in an expression", actual); + + Self::new_from_span(message, None, 19, span) + } + + pub fn undefined_circuit(actual: String, span: &Span) -> Self { + let message = format!( + "circuit `{}` must be declared before it is used in an expression", + actual + ); + + Self::new_from_span(message, None, 20, span) + } + + pub fn undefined_identifier(name: &str, span: &Span) -> Self { + let message = format!("Cannot find value `{}` in this scope", name); + + Self::new_from_span(message, None, 21, span) + } + + pub fn undefined_member_access(circuit: String, member: String, span: &Span) -> Self { + let message = format!("Circuit `{}` has no member `{}`", circuit, member); + + Self::new_from_span(message, None, 22, span) + } + + pub fn input_type_mismatch(expected: String, actual: String, variable: String, span: &Span) -> Self { + let message = format!( + "Expected input variable `{}` to be type `{}`, found type `{}`", + variable, expected, actual + ); + + Self::new_from_span(message, None, 23, span) + } + + pub fn expected_const_input(variable: String, span: &Span) -> Self { + let message = format!( + "Expected input variable `{}` to be constant. Move input variable `{}` to [constants] section of input file", + variable, variable + ); + + Self::new_from_span(message, None, 24, span) + } + + pub fn expected_non_const_input(variable: String, span: &Span) -> Self { + let message = format!( + "Expected input variable `{}` to be non-constant. Move input variable `{}` to [main] section of input file", + variable, variable + ); + + Self::new_from_span(message, None, 25, span) + } + + pub fn invalid_array(actual: String, span: &Span) -> Self { + let message = format!("Expected function input array, found `{}`", actual); + + Self::new_from_span(message, None, 26, span) + } + + pub fn invalid_input_array_dimensions(expected: usize, actual: usize, span: &Span) -> Self { + let message = format!( + "Input array dimensions mismatch expected {}, found array dimensions {}", + expected, actual + ); + + Self::new_from_span(message, None, 27, span) + } + + pub fn tuple_size_mismatch(expected: usize, actual: usize, span: &Span) -> Self { + let message = format!( + "Input tuple size mismatch expected {}, found tuple with length {}", + expected, actual + ); + + Self::new_from_span(message, None, 28, span) + } + + pub fn invalid_tuple(actual: String, span: &Span) -> Self { + let message = format!("Expected function input tuple, found `{}`", actual); + + Self::new_from_span(message, None, 29, span) + } + + pub fn input_not_found(expected: String, span: &Span) -> Self { + let message = format!("main function input {} not found", expected); + + Self::new_from_span(message, None, 30, span) + } + + pub fn double_input_declaration(input_name: String, span: &Span) -> Self { + let message = format!("Input variable {} declared twice", input_name); + + Self::new_from_span(message, None, 31, span) + } + + pub fn not_enough_registers(span: &Span) -> Self { + let message = "number of input registers must be greater than or equal to output registers".to_string(); + + Self::new_from_span(message, None, 32, span) + } + + pub fn mismatched_output_types(left: &str, right: &str, span: &Span) -> Self { + let message = format!( + "Mismatched types. Expected register output type `{}`, found type `{}`.", + left, right + ); + + Self::new_from_span(message, None, 33, span) + } + + pub fn account_error(error: String, span: &Span) -> Self { + let message = format!("account creation failed due to `{}`", error); + + Self::new_from_span(message, None, 34, span) + } + + pub fn invalid_address(actual: String, span: &Span) -> Self { + let message = format!("expected address input type, found `{}`", actual); + + Self::new_from_span(message, None, 35, span) + } + + pub fn missing_address(span: &Span) -> Self { + let message = "expected address input not found".to_string(); + + Self::new_from_span(message, None, 36, span) + } + + pub fn negate_operation(error: String, span: &Span) -> Self { + let message = format!("field negation failed due to synthesis error `{:?}`", error,); + + Self::new_from_span(message, None, 37, span) + } + + pub fn binary_operation(operation: String, error: String, span: &Span) -> Self { + let message = format!( + "the field binary operation `{}` failed due to synthesis error `{:?}`", + operation, error, + ); + + Self::new_from_span(message, None, 38, span) + } + + pub fn invalid_field(actual: String, span: &Span) -> Self { + let message = format!("expected field element input type, found `{}`", actual); + + Self::new_from_span(message, None, 39, span) + } + + pub fn missing_field(expected: String, span: &Span) -> Self { + let message = format!("expected field input `{}` not found", expected); + + Self::new_from_span(message, None, 40, span) + } + + pub fn no_inverse(field: String, span: &Span) -> Self { + let message = format!("no multiplicative inverse found for field `{}`", field); + + Self::new_from_span(message, None, 41, span) + } + + pub fn x_invalid(x: String, span: &Span) -> Self { + let message = format!("invalid x coordinate `{}`", x); + + Self::new_from_span(message, None, 42, span) + } + + pub fn y_invalid(y: String, span: &Span) -> Self { + let message = format!("invalid y coordinate `{}`", y); + + Self::new_from_span(message, None, 43, span) + } + + pub fn not_on_curve(element: String, span: &Span) -> Self { + let message = format!("group element `{}` is not on the supported curve", element); + + Self::new_from_span(message, None, 44, span) + } + + pub fn x_recover(span: &Span) -> Self { + let message = "could not recover group element from x coordinate".to_string(); + + Self::new_from_span(message, None, 45, span) + } + + pub fn y_recover(span: &Span) -> Self { + let message = "could not recover group element from y coordinate".to_string(); + + Self::new_from_span(message, None, 46, span) + } + + pub fn n_group(number: String, span: &Span) -> Self { + let message = format!("cannot multiply group generator by \"{}\"", number); + + Self::new_from_span(message, None, 47, span) + } + + pub fn signed(error: String, span: &Span) -> Self { + let message = format!("integer operation failed due to the signed integer error `{:?}`", error); + + Self::new_from_span(message, None, 48, span) + } + + pub fn unsigned(error: String, span: &Span) -> Self { + let message = format!( + "integer operation failed due to the unsigned integer error `{:?}`", + error + ); + + Self::new_from_span(message, None, 49, span) + } + + pub fn integer_synthesis(error: String, span: &Span) -> Self { + let message = format!("integer operation failed due to the synthesis error `{}`", error); + + Self::new_from_span(message, None, 50, span) + } + + pub fn invalid_unsigned_negate(span: &Span) -> Self { + let message = "integer negation can only be enforced on signed integers".to_string(); + + Self::new_from_span(message, None, 51, span) + } + + pub fn invalid_integer_binary_operation(operation: String, span: &Span) -> Self { + let message = format!( + "the integer binary operation `{}` can only be enforced on integers of the same type", + operation + ); + + Self::new_from_span(message, None, 52, span) + } + + pub fn integer_type_mismatch(expected: String, received: String, span: &Span) -> Self { + let message = format!("expected data type `{}`, found `{}`", expected, received); + + Self::new_from_span(message, None, 53, span) + } + + pub fn invalid_integer(actual: String, span: &Span) -> Self { + let message = format!("failed to parse `{}` as expected integer type", actual); + + Self::new_from_span(message, None, 54, span) + } + + pub fn missing_integer(expected: String, span: &Span) -> Self { + let message = format!("expected integer input `{}` not found", expected); + + Self::new_from_span(message, None, 55, span) + } + + pub fn invalid_group(actual: String, span: &Span) -> Self { + let message = format!("expected group affine point input type, found `{}`", actual); + + Self::new_from_span(message, None, 56, span) + } + + pub fn missing_group(expected: String, span: &Span) -> Self { + let message = format!("expected group input `{}` not found", expected); + + Self::new_from_span(message, None, 57, span) + } + + pub fn group_synthesis_error(error: String, span: &Span) -> Self { + let message = format!("compilation failed due to group synthesis error `{:?}`", error); + + Self::new_from_span(message, span) + } + +} diff --git a/compiler/src/errors/mod.rs b/errors/src/compiler/mod.rs similarity index 65% rename from compiler/src/errors/mod.rs rename to errors/src/compiler/mod.rs index daf4325aa2..9abfa1c6f1 100644 --- a/compiler/src/errors/mod.rs +++ b/errors/src/compiler/mod.rs @@ -15,28 +15,4 @@ // along with the Leo library. If not, see . pub mod compiler; -pub use self::compiler::*; - -pub mod expression; -pub use self::expression::*; - -pub mod function; -pub use self::function::*; - -pub mod import; -pub use self::import::*; - -pub mod console; -pub use self::console::*; - -pub mod output_file; -pub use self::output_file::*; - -pub mod output_bytes; -pub use self::output_bytes::*; - -pub mod statement; -pub use self::statement::*; - -pub mod value; -pub use self::value::*; +pub use self::compiler::*; \ No newline at end of file diff --git a/errors/src/import/import.rs b/errors/src/import/import.rs new file mode 100644 index 0000000000..4fd325dd43 --- /dev/null +++ b/errors/src/import/import.rs @@ -0,0 +1,123 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +use crate::{ErrorCode, FormattedError, LeoErrorCode, Span}; + +#[derive(Debug, Error)] +pub enum ImportError { + #[error(transparent)] + FormattedError(#[from] FormattedError), +} + +impl LeoErrorCode for ImportError {} + +impl ErrorCode for ImportError { + #[inline(always)] + fn exit_code_mask() -> u32 { + 3000 + } + + #[inline(always)] + fn error_type() -> String { + "I".to_string() + } + + fn new_from_span(message: String, help: Option, exit_code: u32, span: &Span) -> Self { + Self::FormattedError(FormattedError::new_from_span( + message, + help, + exit_code ^ Self::exit_code_mask(), + Self::code_identifier(), + Self::error_type(), + span, + )) + } +} + +impl ImportError { + /// + /// An imported package has the same name as an imported core_package. + /// + pub fn conflicting_imports(name: &str, span: &Span) -> Self { + let message = format!("conflicting imports found for `{}`.", name); + + Self::new_from_span(message, None, 0, span) + } + + pub fn recursive_imports(package: &str, span: &Span) -> Self { + let message = format!("recursive imports for `{}`.", package); + + Self::new_from_span(message, None, 1, span) + } + + /// + /// Failed to convert a file path into an os string. + /// + pub fn convert_os_string(span: &Span) -> Self { + let message = "Failed to convert file string name, maybe an illegal character?".to_string(); + + Self::new_from_span(message, None, 2, span) + } + + /// + /// Failed to find the directory of the current file. + /// + pub fn current_directory_error(error: std::io::Error) -> Self { + let message = format!("Compilation failed trying to find current directory - {:?}.", error); + + Self::new_from_span(message, None, 3, &Span::default()) + } + + /// + /// Failed to open or get the name of a directory. + /// + pub fn directory_error(error: std::io::Error, span: &Span, path: &std::path::Path) -> Self { + let message = format!( + "Compilation failed due to directory error @ '{}' - {:?}.", + path.to_str().unwrap_or_default(), + error + ); + + Self::new_from_span(message, None, 4, span) + } + + /// + /// Failed to find a main file for the current package. + /// + pub fn expected_main_file(entry: String, span: &Span) -> Self { + let message = format!("Expected main file at `{}`.", entry,); + + Self::new_from_span(message, None, 5, span) + } + + /// + /// Failed to import a package name. + /// + pub fn unknown_package(name: &str, span: &Span) -> Self { + let message = format!( + "Cannot find imported package `{}` in source files or import directory.", + name + ); + + Self::new_from_span(message, None, 6, span) + } + + pub fn io_error(span: &Span, path: &str, error: std::io::Error) -> Self { + let message = format!("cannot read imported file '{}': {:?}", path, error,); + + Self::new_from_span(message, None, 7, span) + } +} diff --git a/errors/src/import/mod.rs b/errors/src/import/mod.rs new file mode 100644 index 0000000000..7b1d5d2296 --- /dev/null +++ b/errors/src/import/mod.rs @@ -0,0 +1,18 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +pub mod import; +pub use self::import::*; \ No newline at end of file diff --git a/errors/src/lib.rs b/errors/src/lib.rs new file mode 100644 index 0000000000..1f0647a6f8 --- /dev/null +++ b/errors/src/lib.rs @@ -0,0 +1,91 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +pub mod asg; +pub use self::asg::*; + +pub mod ast; +pub use self::ast::*; + +pub mod common; +pub use self::common::*; + +pub mod compiler; +pub use self::compiler::*; + +pub mod import; +pub use self::import::*; + +pub mod parser; +pub use self::parser::*; + +pub mod snarkvm; +pub use self::snarkvm::*; + +#[macro_use] +extern crate thiserror; + +use eyre::ErrReport; + +#[derive(Debug, Error)] +pub enum LeoError { + #[error(transparent)] + AsgError(#[from] AsgError), + + #[error(transparent)] + AstError(#[from] AstError), + + #[error(transparent)] + CompilerError(#[from] CompilerError), + + #[error(transparent)] + ImportError(#[from] ImportError), + + #[error(transparent)] + ParserError(#[from] ParserError), + + #[error(transparent)] + RustError(#[from] ErrReport), + + #[error(transparent)] + SnarkVMError(#[from] SnarkVMError), +} + +// #[test] +// fn test_error() { +// let err = FormattedError { +// path: std::sync::Arc::new("file.leo".to_string()), +// line_start: 2, +// line_stop: 2, +// col_start: 9, +// col_stop: 10, +// content: "let a = x;".into(), +// message: "undefined value `x`".to_string(), +// }; + +// assert_eq!( +// err.to_string(), +// vec![ +// " --> file.leo:2:9", +// " |", +// " 2 | let a = x;", +// " | ^", +// " |", +// " = undefined value `x`", +// ] +// .join("\n") +// ); +// } diff --git a/errors/src/parser/mod.rs b/errors/src/parser/mod.rs new file mode 100644 index 0000000000..16be3e3ee4 --- /dev/null +++ b/errors/src/parser/mod.rs @@ -0,0 +1,18 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +pub mod parser; +pub use self::parser::*; \ No newline at end of file diff --git a/errors/src/parser/parser.rs b/errors/src/parser/parser.rs new file mode 100644 index 0000000000..c971a09a6e --- /dev/null +++ b/errors/src/parser/parser.rs @@ -0,0 +1,159 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +use crate::{ErrorCode, FormattedError, LeoErrorCode, Span}; + +#[derive(Debug, Error)] +pub enum ParserError { + #[error(transparent)] + FormattedError(#[from] FormattedError), +} + +impl LeoErrorCode for ParserError {} + +impl ErrorCode for ParserError { + #[inline(always)] + fn exit_code_mask() -> u32 { + 0 + } + + #[inline(always)] + fn error_type() -> String { + "P".to_string() + } + + fn new_from_span(message: String, help: Option, exit_code: u32, span: &Span) -> Self { + Self::FormattedError(FormattedError::new_from_span( + message, + help, + exit_code ^ Self::exit_code_mask(), + Self::code_identifier(), + Self::error_type(), + span, + )) + } +} + +impl ParserError { + pub fn unexpected_token(message: String, help: String, span: &Span) -> Self { + Self::new_from_span(message, Some(help), 0, span) + } + + pub fn invalid_address_lit(token: &str, span: &Span) -> Self { + Self::new_from_span(format!("invalid address literal: '{}'", token), None, 1, span) + } + + pub fn invalid_import_list(span: &Span) -> Self { + Self::new_from_span("Cannot import empty list".to_string(), None, 2, span) + } + + pub fn unexpected_eof(span: &Span) -> Self { + Self::new_from_span("unexpected EOF".to_string(), None, 3, span) + } + + pub fn unexpected_whitespace(left: &str, right: &str, span: &Span) -> Self { + Self::new_from_span( + format!("Unexpected white space between terms {} and {}", left, right), + None, + 4, + span, + ) + } + + pub fn unexpected(got: String, expected: String, span: &Span) -> Self { + Self::new_from_span(format!("expected {} -- got '{}'", expected, got), None, 5, span) + } + + pub fn mixed_commas_and_semicolons(span: &Span) -> Self { + Self::new_from_span( + "Cannot mix use of commas and semi-colons for circuit member variable declarations.".to_string(), + None, + 6, + span, + ) + } + + pub fn unexpected_ident(got: &str, expected: &[&str], span: &Span) -> Self { + Self::new_from_span( + format!( + "expected identifier {} -- got '{}'", + expected + .iter() + .map(|x| format!("'{}'", x)) + .collect::>() + .join(", "), + got + ), + None, + 7, + span, + ) + } + + pub fn unexpected_statement(got: String, expected: &str, span: &Span) -> Self { + Self::new_from_span(format!("expected '{}', got '{}'", expected, got), None, 8, span) + } + + pub fn unexpected_str(got: String, expected: &str, span: &Span) -> Self { + Self::new_from_span(format!("expected '{}', got '{}'", expected, got), None, 9, span) + } + + pub fn spread_in_array_init(span: &Span) -> Self { + Self::new_from_span("illegal spread in array initializer".to_string(), None, 10, span) + } + + pub fn invalid_assignment_target(span: &Span) -> Self { + Self::new_from_span("invalid assignment target".to_string(), None, 11, span) + } + + pub fn invalid_package_name(span: &Span) -> Self { + Self::new_from_span( + "package names must be lowercase alphanumeric ascii with underscores and singular dashes".to_string(), + None, + 12, + span, + ) + } + + pub fn illegal_self_const(span: &Span) -> Self { + Self::new_from_span("cannot have const self".to_string(), None, 13, span) + } + + pub fn mut_function_input(mut span: Span) -> Self { + let message = + "function func(mut a: u32) { ... } is deprecated. Passed variables are mutable by default.".to_string(); + span.col_start -= 1; + span.col_stop -= 1; + Self::new_from_span(message, None, 14, &span) + } + + pub fn let_mut_statement(mut span: Span) -> Self { + let message = "let mut = ... is deprecated. `let` keyword implies mutabality by default.".to_string(); + span.col_start -= 1; + span.col_stop -= 1; + Self::new_from_span(message, None, 15, &span) + } + + pub fn test_function(span: &Span) -> Self { + let message = "\"test function...\" is deprecated. Did you mean @test annotation?".to_string(); + Self::new_from_span(message, None, 16, span) + } + + pub fn context_annotation(span: &Span) -> Self { + let message = "\"@context(...)\" is deprecated. Did you mean @test annotation?".to_string(); + Self::new_from_span(message, None, 17, span) + } +} diff --git a/errors/src/snarkvm/mod.rs b/errors/src/snarkvm/mod.rs new file mode 100644 index 0000000000..fb6052c2ab --- /dev/null +++ b/errors/src/snarkvm/mod.rs @@ -0,0 +1,18 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +pub mod snarkvm; +pub use self::snarkvm::*; \ No newline at end of file diff --git a/compiler/src/errors/import.rs b/errors/src/snarkvm/snarkvm.rs similarity index 83% rename from compiler/src/errors/import.rs rename to errors/src/snarkvm/snarkvm.rs index 022ec5d1b9..23768c351c 100644 --- a/compiler/src/errors/import.rs +++ b/errors/src/snarkvm/snarkvm.rs @@ -14,12 +14,10 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use leo_ast::{FormattedError, LeoError}; +use eyre::ErrReport; #[derive(Debug, Error)] -pub enum ImportError { - #[error("{}", _0)] - Error(#[from] FormattedError), +pub enum SnarkVMError { + #[error(transparent)] + SnarkVMError(#[from] ErrReport), } - -impl LeoError for ImportError {} diff --git a/imports/Cargo.toml b/imports/Cargo.toml index 5e9ede2cb7..5ad2211eec 100644 --- a/imports/Cargo.toml +++ b/imports/Cargo.toml @@ -21,6 +21,10 @@ edition = "2018" path = "../ast" version = "1.5.3" +[dependencies.leo-errors] +path = "../errors" +version = "1.5.3" + [dependencies.leo-asg] path = "../asg" version = "1.5.3" diff --git a/imports/src/errors/import_parser.rs b/imports/src/errors/import_parser.rs index c653d4dbf9..a6ac2b23f6 100644 --- a/imports/src/errors/import_parser.rs +++ b/imports/src/errors/import_parser.rs @@ -39,9 +39,9 @@ impl LeoError for ImportParserError {} impl Into for ImportParserError { fn into(self) -> AsgConvertError { match self { - ImportParserError::Error(x) => AsgConvertError::ImportError(x), + ImportParserError::Error(x) => LeoError::from(AsgError::ImportError(x),) ImportParserError::SyntaxError(x) => x.into(), - ImportParserError::AstError(x) => AsgConvertError::AstError(x), + ImportParserError::AstError(x) => LeoError::from(AsgError::AstError(x),) ImportParserError::AsgConvertError(x) => x, } } diff --git a/imports/src/lib.rs b/imports/src/lib.rs index 3cda1b33de..6643ca9ece 100644 --- a/imports/src/lib.rs +++ b/imports/src/lib.rs @@ -16,11 +16,5 @@ #![allow(clippy::from_over_into)] -#[macro_use] -extern crate thiserror; - -pub mod errors; -pub use self::errors::*; - pub mod parser; pub use self::parser::*; diff --git a/imports/src/parser/import_parser.rs b/imports/src/parser/import_parser.rs index c8fcfdf43a..64a46c95f0 100644 --- a/imports/src/parser/import_parser.rs +++ b/imports/src/parser/import_parser.rs @@ -14,8 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::errors::ImportParserError; -use leo_asg::{AsgContext, AsgConvertError, ImportResolver, Program, Span}; +use leo_asg::{AsgContext, ImportResolver, Program}; +use leo_errors::{ImportError, LeoError, Span}; use indexmap::{IndexMap, IndexSet}; use std::path::PathBuf; @@ -47,10 +47,10 @@ impl<'a> ImportResolver<'a> for ImportParser<'a> { context: AsgContext<'a>, package_segments: &[&str], span: &Span, - ) -> Result>, AsgConvertError> { + ) -> Result>, LeoError> { let full_path = package_segments.join("."); if self.partial_imports.contains(&full_path) { - return Err(ImportParserError::recursive_imports(&full_path, span).into()); + return Err(LeoError::from(ImportError::recursive_imports(&full_path, span))); } if let Some(program) = self.imports.get(&full_path) { return Ok(Some(program.clone())); @@ -61,7 +61,7 @@ impl<'a> ImportResolver<'a> for ImportParser<'a> { self.partial_imports.insert(full_path.clone()); let program = imports .parse_package(context, path, package_segments, span) - .map_err(|x| -> AsgConvertError { x.into() })?; + .map_err(|x| -> LeoError { x.into() })?; self.partial_imports.remove(&full_path); self.imports.insert(full_path, program.clone()); Ok(Some(program)) diff --git a/imports/src/parser/parse_package.rs b/imports/src/parser/parse_package.rs index a14f12a2cc..48e14479ff 100644 --- a/imports/src/parser/parse_package.rs +++ b/imports/src/parser/parse_package.rs @@ -14,8 +14,9 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{errors::ImportParserError, ImportParser}; -use leo_asg::{AsgContext, Identifier, Program, Span}; +use crate::ImportParser; +use leo_asg::{AsgContext, Program}; +use leo_errors::{ImportError, LeoError, Span}; use std::{fs, fs::DirEntry, path::PathBuf}; @@ -30,7 +31,7 @@ impl<'a> ImportParser<'a> { package: &DirEntry, remaining_segments: &[&str], span: &Span, - ) -> Result, ImportParserError> { + ) -> Result, LeoError> { if !remaining_segments.is_empty() { return self.parse_package(context, package.path(), remaining_segments, span); } @@ -51,7 +52,7 @@ impl<'a> ImportParser<'a> { mut path: PathBuf, segments: &[&str], span: &Span, - ) -> Result, ImportParserError> { + ) -> Result, LeoError> { let error_path = path.clone(); let package_name = segments[0]; @@ -82,9 +83,9 @@ impl<'a> ImportParser<'a> { // Get a vector of all packages in the source directory. let entries = fs::read_dir(path) - .map_err(|error| ImportParserError::directory_error(error, span, &error_path))? + .map_err(|error| LeoError::from(ImportError::directory_error(error, span, &error_path)))? .collect::, std::io::Error>>() - .map_err(|error| ImportParserError::directory_error(error, span, &error_path))?; + .map_err(|error| LeoError::from(ImportError::directory_error(error, span, &error_path)))?; // Check if the imported package name is in the source directory. let matched_source_entry = entries.into_iter().find(|entry| { @@ -99,9 +100,9 @@ impl<'a> ImportParser<'a> { if imports_directory.exists() { // Get a vector of all packages in the imports directory. let entries = fs::read_dir(imports_directory) - .map_err(|error| ImportParserError::directory_error(error, span, &error_path))? + .map_err(|error| LeoError::from(ImportError::directory_error(error, span, &error_path)))? .collect::, std::io::Error>>() - .map_err(|error| ImportParserError::directory_error(error, span, &error_path))?; + .map_err(|error| LeoError::from(ImportError::directory_error(error, span, &error_path)))?; // Check if the imported package name is in the imports directory. let matched_import_entry = entries @@ -110,24 +111,22 @@ impl<'a> ImportParser<'a> { // Check if the package name was found in both the source and imports directory. match (matched_source_entry, matched_import_entry) { - (Some(_), Some(_)) => Err(ImportParserError::conflicting_imports(Identifier::new_with_span( + (Some(_), Some(_)) => Err(LeoError::from(ImportError::conflicting_imports( package_name, - span.clone(), + &span, ))), (Some(source_entry), None) => self.parse_package_access(context, &source_entry, &segments[1..], span), (None, Some(import_entry)) => self.parse_package_access(context, &import_entry, &segments[1..], span), - (None, None) => Err(ImportParserError::unknown_package(Identifier::new_with_span( + (None, None) => Err(LeoError::from(ImportError::unknown_package( package_name, - span.clone(), + &span, ))), } } else { // Enforce local package access with no found imports directory match matched_source_entry { Some(source_entry) => self.parse_package_access(context, &source_entry, &segments[1..], span), - None => Err(ImportParserError::unknown_package(Identifier::new_with_span( - package_name, - span.clone(), + None => Err(LeoError::from(ImportError::unknown_package(package_name, &span, ))), } } diff --git a/imports/src/parser/parse_symbol.rs b/imports/src/parser/parse_symbol.rs index ce1f391f60..5693852e02 100644 --- a/imports/src/parser/parse_symbol.rs +++ b/imports/src/parser/parse_symbol.rs @@ -14,8 +14,9 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{errors::ImportParserError, ImportParser}; -use leo_ast::{Program, Span}; +use crate::ImportParser; +use leo_ast::Program; +use leo_errors::{ImportError, LeoError, Span}; use std::fs::DirEntry; @@ -27,25 +28,25 @@ impl<'a> ImportParser<'a> { /// /// Builds an abstract syntax tree from the given file and then builds the Leo syntax tree. /// - pub(crate) fn parse_import_file(package: &DirEntry, span: &Span) -> Result { + pub(crate) fn parse_import_file(package: &DirEntry, span: &Span) -> Result { // Get the package file type. let file_type = package .file_type() - .map_err(|error| ImportParserError::directory_error(error, span, &package.path()))?; + .map_err(|error| LeoError::from(ImportError::directory_error(error, span, &package.path())))?; let file_name = package .file_name() .into_string() - .map_err(|_| ImportParserError::convert_os_string(span))?; + .map_err(|_| LeoError::from(ImportError::convert_os_string(span)))?; let mut file_path = package.path(); if file_type.is_dir() { file_path.push(MAIN_FILE); if !file_path.exists() { - return Err(ImportParserError::expected_main_file( + return Err(LeoError::from(ImportError::expected_main_file( format!("{:?}", file_path.as_path()), span, - )); + ))); } } @@ -53,7 +54,7 @@ impl<'a> ImportParser<'a> { // Build the package abstract syntax tree. let program_string = - &std::fs::read_to_string(&file_path).map_err(|x| ImportParserError::io_error(span, file_path_str, x))?; + &std::fs::read_to_string(&file_path).map_err(|x| LeoError::from(ImportError::io_error(span, file_path_str, x)))?; let mut program = leo_parser::parse(&file_path_str, &program_string)?; program.name = file_name; let mut ast = leo_ast::Ast::new(program); diff --git a/parser/Cargo.toml b/parser/Cargo.toml index 10529e693a..1732acbc6c 100644 --- a/parser/Cargo.toml +++ b/parser/Cargo.toml @@ -26,6 +26,10 @@ harness = false path = "../ast" version = "1.5.3" +[dependencies.leo-errors] +path = "../errors" +version = "1.5.3" + [dependencies.lazy_static] version = "1.3.0" diff --git a/parser/src/errors/mod.rs b/parser/src/errors/mod.rs index 6138a74a98..ff53f73aae 100644 --- a/parser/src/errors/mod.rs +++ b/parser/src/errors/mod.rs @@ -13,12 +13,3 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . - -pub mod token; -pub use token::*; - -pub mod syntax; -pub use syntax::*; - -pub mod deprecated; -pub use deprecated::*; diff --git a/parser/src/errors/token.rs b/parser/src/errors/token.rs index 2b9beca504..ec07fbe4ba 100644 --- a/parser/src/errors/token.rs +++ b/parser/src/errors/token.rs @@ -3,7 +3,7 @@ // The Leo library is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or +o// the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // The Leo library is distributed in the hope that it will be useful, diff --git a/parser/src/lib.rs b/parser/src/lib.rs index b896eee0b8..b226b37215 100644 --- a/parser/src/lib.rs +++ b/parser/src/lib.rs @@ -21,16 +21,10 @@ #![allow(clippy::vec_init_then_push)] -#[macro_use] -extern crate thiserror; - pub(crate) mod tokenizer; pub use tokenizer::KEYWORD_TOKENS; pub(crate) use tokenizer::*; -pub mod errors; -pub use errors::*; - pub mod parser; pub use parser::*; diff --git a/parser/src/parser/context.rs b/parser/src/parser/context.rs index c83cf2a4dd..94eee223fa 100644 --- a/parser/src/parser/context.rs +++ b/parser/src/parser/context.rs @@ -16,8 +16,9 @@ use std::{borrow::Cow, unimplemented}; -use crate::{assert_no_whitespace, tokenizer::*, SyntaxError, SyntaxResult, Token, KEYWORD_TOKENS}; +use crate::{assert_no_whitespace, tokenizer::*, SyntaxResult, Token, KEYWORD_TOKENS}; use leo_ast::*; +use leo_errors::{LeoError, ParserError, Span}; use tendril::format_tendril; /// Stores a program in tokenized format plus additional context. @@ -62,8 +63,8 @@ impl ParserContext { /// /// Returns an unexpected end of function [`SyntaxError`]. /// - pub fn eof(&self) -> SyntaxError { - SyntaxError::unexpected_eof(&self.end_span) + pub fn eof(&self) -> LeoError { + LeoError::from(ParserError::unexpected_eof(&self.end_span)) } /// @@ -299,7 +300,11 @@ impl ParserContext { if &token == inner { Ok(self.tokens.pop().unwrap().span) } else { - Err(SyntaxError::unexpected(inner, &[token], span)) + Err(LeoError::from(ParserError::unexpected( + inner.to_string(), + token.to_string(), + span, + ))) } } else { Err(self.eof()) @@ -314,7 +319,11 @@ impl ParserContext { if token.iter().any(|x| x == inner) { Ok(self.tokens.pop().unwrap()) } else { - Err(SyntaxError::unexpected(inner, token, span)) + Err(LeoError::from(ParserError::unexpected( + inner.to_string(), + token.iter().map(|x| format!("'{}'", x)).collect::>().join(", "), + span, + ))) } } else { Err(self.eof()) @@ -355,7 +364,11 @@ impl ParserContext { unimplemented!() } } else { - Err(SyntaxError::unexpected_str(inner, "ident", span)) + Err(LeoError::from(ParserError::unexpected_str( + inner.to_string(), + "ident", + span, + ))) } } else { Err(self.eof()) diff --git a/parser/src/parser/expression.rs b/parser/src/parser/expression.rs index 789ecaf9de..82fa17e128 100644 --- a/parser/src/parser/expression.rs +++ b/parser/src/parser/expression.rs @@ -16,6 +16,8 @@ use tendril::format_tendril; +use leo_errors::{LeoError, ParserError}; + use super::*; const INT_TYPES: &[Token] = &[ @@ -459,7 +461,11 @@ impl ParserContext { }); } else { let next = self.peek()?; - return Err(SyntaxError::unexpected_str(&next.token, "int or ident", &next.span)); + return Err(LeoError::from(ParserError::unexpected_str( + next.token.to_string(), + "int or ident", + &next.span, + ))); } } Token::LeftParen => { @@ -606,7 +612,7 @@ impl ParserContext { let first = match first { SpreadOrExpression::Spread(first) => { let span = span + first.span(); - return Err(SyntaxError::spread_in_array_init(&span)); + return Err(LeoError::from(ParserError::spread_in_array_init(&span))); } SpreadOrExpression::Expression(x) => x, }; @@ -723,7 +729,11 @@ impl ParserContext { Expression::Identifier(ident) } token => { - return Err(SyntaxError::unexpected_str(&token, "expression", &span)); + return Err(LeoError::from(ParserError::unexpected_str( + token.to_string(), + "expression", + &span, + ))); } }) } diff --git a/parser/src/parser/file.rs b/parser/src/parser/file.rs index 80abacaddb..f929f35d9b 100644 --- a/parser/src/parser/file.rs +++ b/parser/src/parser/file.rs @@ -16,6 +16,8 @@ use tendril::format_tendril; +use leo_errors::{LeoError, ParserError}; + use crate::KEYWORD_TOKENS; use super::*; @@ -46,9 +48,7 @@ impl ParserContext { functions.insert(id, function); } Token::Ident(ident) if ident.as_ref() == "test" => { - return Err(SyntaxError::DeprecatedError(DeprecatedError::test_function( - &token.span, - ))); + return Err(LeoError::from(ParserError::test_function(&token.span))); // self.expect(Token::Test)?; // let (id, function) = self.parse_function_declaration()?; // tests.insert(id, TestFunction { @@ -61,17 +61,21 @@ impl ParserContext { global_consts.insert(name, global_const); } _ => { - return Err(SyntaxError::unexpected( - &token.token, - &[ + return Err(LeoError::from(ParserError::unexpected( + token.token.to_string(), + [ Token::Import, Token::Circuit, Token::Function, Token::Ident("test".into()), Token::At, - ], + ] + .iter() + .map(|x| format!("'{}'", x)) + .collect::>() + .join(", "), &token.span, - )); + ))); } } } @@ -92,9 +96,7 @@ impl ParserContext { let start = self.expect(Token::At)?; let name = self.expect_ident()?; if name.name.as_ref() == "context" { - return Err(SyntaxError::DeprecatedError(DeprecatedError::context_annotation( - &name.span, - ))); + return Err(LeoError::from(ParserError::context_annotation(&name.span))); } assert_no_whitespace(&start, &name.span, &name.name, "@")?; @@ -106,11 +108,15 @@ impl ParserContext { loop { if let Some(end) = self.eat(Token::RightParen) { if comma { - return Err(SyntaxError::unexpected( - &Token::RightParen, - &[Token::Ident("identifier".into()), Token::Int("number".into())], + return Err(LeoError::from(ParserError::unexpected( + Token::RightParen.to_string(), + [Token::Ident("identifier".into()), Token::Int("number".into())] + .iter() + .map(|x| format!("'{}'", x)) + .collect::>() + .join(", "), &end.span, - )); + ))); } end_span = end.span; break; @@ -122,7 +128,11 @@ impl ParserContext { args.push(int.value); } else { let token = self.peek()?; - return Err(SyntaxError::unexpected_str(&token.token, "ident or int", &token.span)); + return Err(LeoError::from(ParserError::unexpected_str( + token.token.to_string(), + "ident or int", + &token.span, + ))); } if self.eat(Token::Comma).is_none() && !comma { end_span = self.expect(Token::RightParen)?; @@ -159,7 +169,7 @@ impl ParserContext { } if out.is_empty() { - return Err(SyntaxError::invalid_import_list(span)); + return Err(LeoError::from(ParserError::invalid_import_list(span))); } Ok(out) @@ -238,7 +248,11 @@ impl ParserContext { // Return an error if the package name contains a keyword. if let Some(token) = KEYWORD_TOKENS.iter().find(|x| x.to_string() == base.name.as_ref()) { - return Err(SyntaxError::unexpected_str(token, "package name", &base.span)); + return Err(LeoError::from(ParserError::unexpected_str( + token.to_string(), + "package name", + &base.span, + ))); } // Return an error if the package name contains invalid characters. @@ -247,7 +261,7 @@ impl ParserContext { .chars() .all(|x| x.is_ascii_lowercase() || x.is_ascii_digit() || x == '-' || x == '_') { - return Err(SyntaxError::invalid_package_name(&base.span)); + return Err(LeoError::from(ParserError::invalid_package_name(&base.span))); } // Return the package name. @@ -309,14 +323,14 @@ impl ParserContext { let peeked = &self.peek()?; if peeked.token == Token::Semicolon { if commas { - return Err(SyntaxError::mixed_commas_and_semicolons(&peeked.span)); + return Err(LeoError::from(ParserError::mixed_commas_and_semicolons(&peeked.span))); } semi_colons = true; self.expect(Token::Semicolon)?; } else { if semi_colons { - return Err(SyntaxError::mixed_commas_and_semicolons(&peeked.span)); + return Err(LeoError::from(ParserError::mixed_commas_and_semicolons(&peeked.span))); } commas = true; @@ -366,11 +380,15 @@ impl ParserContext { let function = self.parse_function_declaration()?; Ok(CircuitMember::CircuitFunction(function.1)) } else { - Err(SyntaxError::unexpected( - peeked_token, - &[Token::Function, Token::At], + Err(LeoError::from(ParserError::unexpected( + peeked_token.to_string(), + [Token::Function, Token::At] + .iter() + .map(|x| format!("'{}'", x)) + .collect::>() + .join(", "), &peeked.span, - )) + ))) } } @@ -421,7 +439,7 @@ impl ParserContext { } if let Some(mutable) = &mutable { - return Err(SyntaxError::DeprecatedError(DeprecatedError::mut_function_input( + return Err(LeoError::from(ParserError::mut_function_input( &mutable.span + &name.span, ))); } diff --git a/parser/src/parser/mod.rs b/parser/src/parser/mod.rs index 9a0cad7a4c..a195eb0067 100644 --- a/parser/src/parser/mod.rs +++ b/parser/src/parser/mod.rs @@ -29,11 +29,27 @@ pub mod type_; use std::unimplemented; -use crate::{errors::assert_no_whitespace, tokenizer::*, DeprecatedError, SyntaxError, Token}; +use crate::{tokenizer::*, Token}; use indexmap::IndexMap; use leo_ast::*; +use leo_errors::{LeoError, ParserError, Span}; -pub type SyntaxResult = Result; +pub type SyntaxResult = Result; + +pub(crate) fn assert_no_whitespace(left_span: &Span, right_span: &Span, left: &str, right: &str) -> SyntaxResult<()> { + if left_span.col_stop != right_span.col_start { + let mut error_span = left_span + right_span; + error_span.col_start = left_span.col_stop - 1; + error_span.col_stop = right_span.col_start - 1; + return Err(LeoError::from(ParserError::unexpected_whitespace( + left, + right, + &error_span, + ))); + } + + Ok(()) +} /// Creates a new program from a given file path and source code text. pub fn parse(path: &str, source: &str) -> SyntaxResult { diff --git a/parser/src/parser/statement.rs b/parser/src/parser/statement.rs index 1b82145f43..0eba963c15 100644 --- a/parser/src/parser/statement.rs +++ b/parser/src/parser/statement.rs @@ -16,6 +16,8 @@ use super::*; +use leo_errors::{LeoError, ParserError}; + const ASSIGN_TOKENS: &[Token] = &[ Token::Assign, Token::AddEq, @@ -62,7 +64,7 @@ impl ParserContext { accesses.push(AssigneeAccess::ArrayIndex(*expr.index)); } Expression::Identifier(id) => identifier = id, - _ => return Err(SyntaxError::invalid_assignment_target(expr.span())), + _ => return Err(LeoError::from(ParserError::invalid_assignment_target(expr.span()))), } Ok(identifier) } @@ -189,11 +191,11 @@ impl ParserContext { match s { Statement::Block(_) | Statement::Conditional(_) => Some(Box::new(s)), s => { - return Err(SyntaxError::unexpected_statement( + return Err(LeoError::from(ParserError::unexpected_statement( s.to_string(), "Block or Conditional", s.span(), - )); + ))); } } } else { @@ -246,7 +248,13 @@ impl ParserContext { start_span = span; chars } - SpannedToken { token, span } => return Err(SyntaxError::unexpected_str(&token, "formatted string", &span)), + SpannedToken { token, span } => { + return Err(LeoError::from(ParserError::unexpected_str( + token.to_string(), + "formatted string", + &span, + ))); + } }; // let parts = FormatStringPart::from_string(string); @@ -280,11 +288,11 @@ impl ParserContext { "error" => ConsoleFunction::Error(self.parse_console_args()?), "log" => ConsoleFunction::Log(self.parse_console_args()?), x => { - return Err(SyntaxError::unexpected_ident( + return Err(LeoError::from(ParserError::unexpected_ident( &x, &["assert", "error", "log"], &function.span, - )); + ))); } }; self.expect(Token::RightParen)?; @@ -303,7 +311,7 @@ impl ParserContext { pub fn parse_variable_name(&mut self, span: &SpannedToken) -> SyntaxResult { let mutable = self.eat(Token::Mut); if let Some(mutable) = &mutable { - return Err(SyntaxError::DeprecatedError(DeprecatedError::let_mut_statement( + return Err(LeoError::from(ParserError::let_mut_statement( &mutable.span + &span.span, ))); } diff --git a/parser/src/parser/type_.rs b/parser/src/parser/type_.rs index 7604770f38..10fd83cdf6 100644 --- a/parser/src/parser/type_.rs +++ b/parser/src/parser/type_.rs @@ -15,6 +15,7 @@ // along with the Leo library. If not, see . use super::*; +use leo_errors::{LeoError, ParserError}; const TYPE_TOKENS: &[Token] = &[ Token::I8, @@ -68,7 +69,11 @@ impl ParserContext { dimensions.push(int); } else { let token = self.peek()?; - return Err(SyntaxError::unexpected_str(&token.token, "int", &token.span)); + return Err(LeoError::from(ParserError::unexpected_str( + token.token.to_string(), + "int", + &token.span, + ))); } if self.eat(Token::Comma).is_none() { break; diff --git a/parser/src/tokenizer/lexer.rs b/parser/src/tokenizer/lexer.rs index cf9b452e9b..1628ece9aa 100644 --- a/parser/src/tokenizer/lexer.rs +++ b/parser/src/tokenizer/lexer.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use crate::tokenizer::{Char, Token}; -use leo_ast::Span; +use leo_errors::Span; use serde::{Deserialize, Serialize}; use tendril::StrTendril; diff --git a/parser/src/tokenizer/mod.rs b/parser/src/tokenizer/mod.rs index 5da374e575..f840838128 100644 --- a/parser/src/tokenizer/mod.rs +++ b/parser/src/tokenizer/mod.rs @@ -28,12 +28,12 @@ pub(crate) use self::token::*; pub(crate) mod lexer; pub(crate) use self::lexer::*; -use crate::TokenError; -use leo_ast::Span; +use leo_errors::{LeoError, ParserError, Span}; + use tendril::StrTendril; /// Creates a new vector of spanned tokens from a given file path and source code text. -pub(crate) fn tokenize(path: &str, input: StrTendril) -> Result, TokenError> { +pub(crate) fn tokenize(path: &str, input: StrTendril) -> Result, LeoError> { let path = Arc::new(path.to_string()); let mut tokens = vec![]; let mut index = 0usize; @@ -42,17 +42,17 @@ pub(crate) fn tokenize(path: &str, input: StrTendril) -> Result index { match Token::eat(input.subtendril(index as u32, (input.len() - index) as u32)) { (token_len, Some(token)) => { - let mut span = Span { - line_start: line_no, - line_stop: line_no, - col_start: index - line_start + 1, - col_stop: index - line_start + token_len + 1, - path: path.clone(), - content: input.subtendril( + let mut span = Span::new( + line_no, + line_no, + index - line_start + 1, + index - line_start + token_len + 1, + path.clone(), + input.subtendril( line_start as u32, input[line_start..].find('\n').unwrap_or(input.len() - line_start) as u32, ), - }; + ); match &token { Token::CommentLine(_) => { line_no += 1; @@ -70,7 +70,7 @@ pub(crate) fn tokenize(path: &str, input: StrTendril) -> Result { if !check_address(address) { - return Err(TokenError::invalid_address_lit(address, &span)); + return Err(LeoError::from(ParserError::invalid_address_lit(address, &span))); } } _ => (), @@ -82,17 +82,21 @@ pub(crate) fn tokenize(path: &str, input: StrTendril) -> Result Result { - serde_json::to_string_pretty(&self) + pub fn to_json_string(&self) -> Result { + serde_json::to_string_pretty(&self).map_err(|e| LeoError::from(SnarkVMError::from(eyre!(e)))) } - pub fn from_json_string(json: &str) -> Result { - serde_json::from_str(json) + pub fn from_json_string(json: &str) -> Result { + serde_json::from_str(json).map_err(|e| LeoError::from(SnarkVMError::from(eyre!(e)))) } } @@ -114,17 +115,17 @@ impl From> for SerializedCircuit { } impl TryFrom for CircuitSynthesizer { - type Error = FieldError; + type Error = LeoError; fn try_from(serialized: SerializedCircuit) -> Result, Self::Error> { // Deserialize assignments fn get_deserialized_assignments( assignments: &[SerializedField], - ) -> Result::Fr>, FieldError> { + ) -> Result::Fr>, LeoError> { let mut deserialized = OptionalVec::with_capacity(assignments.len()); for serialized_assignment in assignments { - let field = ::Fr::try_from(serialized_assignment)?; + let field = ::Fr::try_from(serialized_assignment).map_err(|e| LeoError::from(SnarkVMError::from(eyre!(e))))?; deserialized.insert(field); } @@ -138,11 +139,11 @@ impl TryFrom for CircuitSynthesizer { // Deserialize constraints fn get_deserialized_constraints( constraints: &[(SerializedField, SerializedIndex)], - ) -> Result::Fr, Index)>, FieldError> { + ) -> Result::Fr, Index)>, LeoError> { let mut deserialized = Vec::with_capacity(constraints.len()); for &(ref serialized_coeff, ref serialized_index) in constraints { - let field = ::Fr::try_from(serialized_coeff)?; + let field = ::Fr::try_from(serialized_coeff).map_err(|e| LeoError::from(SnarkVMError::from(eyre!(e))))?; let index = Index::from(serialized_index); deserialized.push((field, index)); From 753039c4b48b7aed94294410b32dc28e88699b20 Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Sat, 31 Jul 2021 00:01:23 -0700 Subject: [PATCH 02/58] code re-organization, dsl for errors --- asg/src/error/mod.rs | 329 ---------- ast/src/errors/ast.rs | 40 -- ast/src/errors/canonicalization.rs | 43 -- ast/src/errors/combiner.rs | 37 -- ast/src/errors/error.rs | 142 ----- ast/src/errors/reducer.rs | 50 -- errors/src/asg/asg.rs | 534 +++++++--------- errors/src/ast/ast.rs | 80 +-- errors/src/common/macros.rs | 68 ++ errors/src/common/mod.rs | 4 + errors/src/common/traits.rs | 3 +- errors/src/compiler/compiler.rs | 587 +++++++++--------- errors/src/import/import.rs | 131 ++-- errors/src/lib.rs | 4 + .../imports => errors/src/package}/mod.rs | 4 +- .../mod.rs => errors/src/package/package.rs | 13 +- errors/src/parser/parser.rs | 192 +++--- {ast/src/errors => errors/src/state}/mod.rs | 3 + .../inputs => errors/src/state}/state.rs | 31 +- imports/src/errors/import_parser.rs | 127 ---- imports/src/errors/mod.rs | 18 - imports/src/parser/parse_package.rs | 8 +- imports/src/parser/parse_symbol.rs | 4 +- package/src/errors/imports/directory.rs | 29 - package/src/errors/inputs/directory.rs | 46 -- package/src/errors/inputs/input.rs | 32 - package/src/errors/inputs/mod.rs | 24 - package/src/errors/mod.rs | 33 - package/src/errors/outputs/checksum.rs | 35 -- package/src/errors/outputs/circuit.rs | 35 -- package/src/errors/outputs/directory.rs | 26 - package/src/errors/outputs/mod.rs | 33 - package/src/errors/outputs/proof.rs | 35 -- package/src/errors/outputs/proving_key.rs | 35 -- .../src/errors/outputs/verification_key.rs | 35 -- package/src/errors/package.rs | 100 --- package/src/errors/root/gitignore.rs | 27 - package/src/errors/root/manifest.rs | 47 -- package/src/errors/root/mod.rs | 27 - package/src/errors/root/readme.rs | 28 - package/src/errors/root/zip.rs | 39 -- package/src/errors/source/directory.rs | 41 -- package/src/errors/source/lib.rs | 27 - package/src/errors/source/main.rs | 27 - package/src/lib.rs | 6 - parser/src/parser/file.rs | 2 +- parser/src/parser/statement.rs | 2 +- 47 files changed, 785 insertions(+), 2438 deletions(-) delete mode 100644 asg/src/error/mod.rs delete mode 100644 ast/src/errors/ast.rs delete mode 100644 ast/src/errors/canonicalization.rs delete mode 100644 ast/src/errors/combiner.rs delete mode 100644 ast/src/errors/error.rs delete mode 100644 ast/src/errors/reducer.rs create mode 100644 errors/src/common/macros.rs rename {package/src/errors/imports => errors/src/package}/mod.rs (94%) rename package/src/errors/source/mod.rs => errors/src/package/package.rs (85%) rename {ast/src/errors => errors/src/state}/mod.rs (94%) rename {package/src/errors/inputs => errors/src/state}/state.rs (63%) delete mode 100644 imports/src/errors/import_parser.rs delete mode 100644 imports/src/errors/mod.rs delete mode 100644 package/src/errors/imports/directory.rs delete mode 100644 package/src/errors/inputs/directory.rs delete mode 100644 package/src/errors/inputs/input.rs delete mode 100644 package/src/errors/inputs/mod.rs delete mode 100644 package/src/errors/mod.rs delete mode 100644 package/src/errors/outputs/checksum.rs delete mode 100644 package/src/errors/outputs/circuit.rs delete mode 100644 package/src/errors/outputs/directory.rs delete mode 100644 package/src/errors/outputs/mod.rs delete mode 100644 package/src/errors/outputs/proof.rs delete mode 100644 package/src/errors/outputs/proving_key.rs delete mode 100644 package/src/errors/outputs/verification_key.rs delete mode 100644 package/src/errors/package.rs delete mode 100644 package/src/errors/root/gitignore.rs delete mode 100644 package/src/errors/root/manifest.rs delete mode 100644 package/src/errors/root/mod.rs delete mode 100644 package/src/errors/root/readme.rs delete mode 100644 package/src/errors/root/zip.rs delete mode 100644 package/src/errors/source/directory.rs delete mode 100644 package/src/errors/source/lib.rs delete mode 100644 package/src/errors/source/main.rs diff --git a/asg/src/error/mod.rs b/asg/src/error/mod.rs deleted file mode 100644 index 5b455b4593..0000000000 --- a/asg/src/error/mod.rs +++ /dev/null @@ -1,329 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -//! Errors encountered when attempting to convert to an asg from an ast. - -// use crate::Span; -// use leo_ast::{AstError, FormattedError, LeoError}; -// use leo_parser::SyntaxError; - -// #[derive(Debug, Error)] -// pub enum AsgConvertError { -// #[error("{}", _0)] -// Error(#[from] FormattedError), - -// #[error("{}", _0)] -// ImportError(FormattedError), - -// #[error("{}", _0)] -// AstError(#[from] AstError), - -// #[error("{}", _0)] -// InternalError(String), - -// #[error("{}", _0)] -// SyntaxError(#[from] SyntaxError), -// } - -// impl LeoError for AsgConvertError {} - -// impl AsgConvertError { -// fn new_from_span(message: String, span: &Span) -> Self { -// AsgConvertError::Error(FormattedError::new_from_span(message, span)) -// } - -// pub fn unresolved_circuit(name: &str, span: &Span) -> Self { -// Self::new_from_span(format!("failed to resolve circuit: '{}'", name), span) -// } - -// pub fn unresolved_import(name: &str, span: &Span) -> Self { -// Self::new_from_span(format!("failed to resolve import: '{}'", name), span) -// } - -// pub fn unresolved_circuit_member(circuit_name: &str, name: &str, span: &Span) -> Self { -// Self::new_from_span( -// format!( -// "illegal reference to non-existant member '{}' of circuit '{}'", -// name, circuit_name -// ), -// span, -// ) -// } - -// pub fn missing_circuit_member(circuit_name: &str, name: &str, span: &Span) -> Self { -// Self::new_from_span( -// format!( -// "missing circuit member '{}' for initialization of circuit '{}'", -// name, circuit_name -// ), -// span, -// ) -// } - -// pub fn overridden_circuit_member(circuit_name: &str, name: &str, span: &Span) -> Self { -// Self::new_from_span( -// format!( -// "cannot declare circuit member '{}' more than once for initialization of circuit '{}'", -// name, circuit_name -// ), -// span, -// ) -// } - -// pub fn redefined_circuit_member(circuit_name: &str, name: &str, span: &Span) -> Self { -// Self::new_from_span( -// format!( -// "cannot declare circuit member '{}' multiple times in circuit '{}'", -// name, circuit_name -// ), -// span, -// ) -// } - -// pub fn extra_circuit_member(circuit_name: &str, name: &str, span: &Span) -> Self { -// Self::new_from_span( -// format!( -// "extra circuit member '{}' for initialization of circuit '{}' is not allowed", -// name, circuit_name -// ), -// span, -// ) -// } - -// pub fn illegal_function_assign(name: &str, span: &Span) -> Self { -// Self::new_from_span(format!("attempt to assign to function '{}'", name), span) -// } - -// pub fn circuit_variable_call(circuit_name: &str, name: &str, span: &Span) -> Self { -// Self::new_from_span( -// format!("cannot call variable member '{}' of circuit '{}'", name, circuit_name), -// span, -// ) -// } - -// pub fn circuit_static_call_invalid(circuit_name: &str, name: &str, span: &Span) -> Self { -// Self::new_from_span( -// format!( -// "cannot call static function '{}' of circuit '{}' from target", -// name, circuit_name -// ), -// span, -// ) -// } - -// pub fn circuit_member_mut_call_invalid(circuit_name: &str, name: &str, span: &Span) -> Self { -// Self::new_from_span( -// format!( -// "cannot call mutable member function '{}' of circuit '{}' from immutable context", -// name, circuit_name -// ), -// span, -// ) -// } - -// pub fn circuit_member_call_invalid(circuit_name: &str, name: &str, span: &Span) -> Self { -// Self::new_from_span( -// format!( -// "cannot call member function '{}' of circuit '{}' from static context", -// name, circuit_name -// ), -// span, -// ) -// } - -// pub fn circuit_function_ref(circuit_name: &str, name: &str, span: &Span) -> Self { -// Self::new_from_span( -// format!( -// "cannot reference function member '{}' of circuit '{}' as value", -// name, circuit_name -// ), -// span, -// ) -// } - -// pub fn index_into_non_array(name: &str, span: &Span) -> Self { -// Self::new_from_span(format!("failed to index into non-array '{}'", name), span) -// } - -// pub fn invalid_assign_index(name: &str, num: &str, span: &Span) -> Self { -// Self::new_from_span( -// format!("failed to index array with invalid integer '{}'[{}]", name, num), -// span, -// ) -// } - -// pub fn invalid_backwards_assignment(name: &str, left: usize, right: usize, span: &Span) -> Self { -// Self::new_from_span( -// format!( -// "failed to index array range for assignment with left > right '{}'[{}..{}]", -// name, left, right -// ), -// span, -// ) -// } - -// pub fn invalid_const_assign(name: &str, span: &Span) -> Self { -// Self::new_from_span( -// format!( -// "failed to create const variable(s) '{}' with non constant values.", -// name -// ), -// span, -// ) -// } - -// pub fn duplicate_function_definition(name: &str, span: &Span) -> Self { -// Self::new_from_span( -// format!("a function named \"{}\" already exists in this scope", name), -// span, -// ) -// } - -// pub fn duplicate_variable_definition(name: &str, span: &Span) -> Self { -// Self::new_from_span( -// format!("a variable named \"{}\" already exists in this scope", name), -// span, -// ) -// } - -// pub fn index_into_non_tuple(name: &str, span: &Span) -> Self { -// Self::new_from_span(format!("failed to index into non-tuple '{}'", name), span) -// } - -// pub fn tuple_index_out_of_bounds(index: usize, span: &Span) -> Self { -// Self::new_from_span(format!("tuple index out of bounds: '{}'", index), span) -// } - -// pub fn array_index_out_of_bounds(index: usize, span: &Span) -> Self { -// Self::new_from_span(format!("array index out of bounds: '{}'", index), span) -// } - -// pub fn ternary_different_types(left: &str, right: &str, span: &Span) -> Self { -// let message = format!("ternary sides had different types: left {}, right {}", left, right); - -// Self::new_from_span(message, span) -// } - -// pub fn unknown_array_size(span: &Span) -> Self { -// Self::new_from_span("array size cannot be inferred, add explicit types".to_string(), span) -// } - -// pub fn unexpected_call_argument_count(expected: usize, got: usize, span: &Span) -> Self { -// Self::new_from_span( -// format!("function call expected {} arguments, got {}", expected, got), -// span, -// ) -// } - -// pub fn unresolved_function(name: &str, span: &Span) -> Self { -// Self::new_from_span(format!("failed to resolve function: '{}'", name), span) -// } - -// pub fn unresolved_type(name: &str, span: &Span) -> Self { -// Self::new_from_span( -// format!("failed to resolve type for variable definition '{}'", name), -// span, -// ) -// } - -// pub fn unexpected_type(expected: &str, received: Option<&str>, span: &Span) -> Self { -// Self::new_from_span( -// format!( -// "unexpected type, expected: '{}', received: '{}'", -// expected, -// received.unwrap_or("unknown") -// ), -// span, -// ) -// } - -// pub fn unexpected_nonconst(span: &Span) -> Self { -// Self::new_from_span("expected const, found non-const value".to_string(), span) -// } - -// pub fn unresolved_reference(name: &str, span: &Span) -> Self { -// Self::new_from_span(format!("failed to resolve variable reference '{}'", name), span) -// } - -// pub fn invalid_boolean(value: &str, span: &Span) -> Self { -// Self::new_from_span(format!("failed to parse boolean value '{}'", value), span) -// } - -// pub fn invalid_char(value: &str, span: &Span) -> Self { -// Self::new_from_span(format!("failed to parse char value '{}'", value), span) -// } - -// pub fn invalid_int(value: &str, span: &Span) -> Self { -// Self::new_from_span(format!("failed to parse int value '{}'", value), span) -// } - -// pub fn unsigned_negation(span: &Span) -> Self { -// Self::new_from_span("cannot negate unsigned integer".to_string(), span) -// } - -// pub fn immutable_assignment(name: &str, span: &Span) -> Self { -// Self::new_from_span(format!("illegal assignment to immutable variable '{}'", name), span) -// } - -// pub fn function_missing_return(name: &str, span: &Span) -> Self { -// Self::new_from_span(format!("function '{}' missing return for all paths", name), span) -// } - -// pub fn function_return_validation(name: &str, description: &str, span: &Span) -> Self { -// Self::new_from_span( -// format!("function '{}' failed to validate return path: '{}'", name, description), -// span, -// ) -// } - -// pub fn input_ref_needs_type(category: &str, name: &str, span: &Span) -> Self { -// Self::new_from_span( -// format!("could not infer type for input in '{}': '{}'", category, name), -// span, -// ) -// } - -// pub fn invalid_self_in_global(span: &Span) -> Self { -// Self::new_from_span( -// "cannot have `mut self` or `self` arguments in global functions".to_string(), -// span, -// ) -// } - -// pub fn call_test_function(span: &Span) -> Self { -// Self::new_from_span("cannot call test function".to_string(), span) -// } - -// pub fn circuit_test_function(span: &Span) -> Self { -// Self::new_from_span("cannot have test function as member of circuit".to_string(), span) -// } - -// pub fn parse_index_error() -> Self { -// AsgConvertError::InternalError("failed to parse index".to_string()) -// } - -// pub fn parse_dimension_error() -> Self { -// AsgConvertError::InternalError("failed to parse dimension".to_string()) -// } - -// pub fn reference_self_outside_circuit() -> Self { -// AsgConvertError::InternalError("referenced self outside of circuit function".to_string()) -// } - -// pub fn illegal_ast_structure(details: &str) -> Self { -// AsgConvertError::InternalError(format!("illegal ast structure: {}", details)) -// } -// } diff --git a/ast/src/errors/ast.rs b/ast/src/errors/ast.rs deleted file mode 100644 index 4e8b7db187..0000000000 --- a/ast/src/errors/ast.rs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{FormattedError, LeoError, ReducerError, Span}; - -#[derive(Debug, Error)] -pub enum AstError { - #[error("{}", _0)] - Error(#[from] FormattedError), - - #[error("{}", _0)] - IOError(#[from] std::io::Error), - - #[error("{}", _0)] - ReducerError(#[from] ReducerError), - - #[error("{}", _0)] - SerdeJsonError(#[from] ::serde_json::Error), -} - -impl LeoError for AstError {} - -impl AstError { - fn _new_from_span(message: String, span: &Span) -> Self { - AstError::Error(FormattedError::new_from_span(message, span)) - } -} diff --git a/ast/src/errors/canonicalization.rs b/ast/src/errors/canonicalization.rs deleted file mode 100644 index b3f7cb6622..0000000000 --- a/ast/src/errors/canonicalization.rs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{FormattedError, LeoError, Span}; - -#[derive(Debug, Error)] -pub enum CanonicalizeError { - #[error("{}", _0)] - Error(#[from] FormattedError), -} - -impl LeoError for CanonicalizeError {} - -impl CanonicalizeError { - fn new_from_span(message: String, span: &Span) -> Self { - CanonicalizeError::Error(FormattedError::new_from_span(message, span)) - } - - pub fn big_self_outside_of_circuit(span: &Span) -> Self { - let message = "cannot call keyword `Self` outside of a circuit function".to_string(); - - Self::new_from_span(message, span) - } - - pub fn invalid_array_dimension_size(span: &Span) -> Self { - let message = "received dimension size of 0, expected it to be 1 or larger.".to_string(); - - Self::new_from_span(message, span) - } -} diff --git a/ast/src/errors/combiner.rs b/ast/src/errors/combiner.rs deleted file mode 100644 index 8ad146d1cd..0000000000 --- a/ast/src/errors/combiner.rs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{FormattedError, LeoError, Span}; - -#[derive(Debug, Error)] -pub enum CombinerError { - #[error("{}", _0)] - Error(#[from] FormattedError), -} - -impl LeoError for CombinerError {} - -impl CombinerError { - fn new_from_span(message: String, span: &Span) -> Self { - CombinerError::Error(FormattedError::new_from_span(message, span)) - } - - pub fn asg_statement_not_block(span: &Span) -> Self { - let message = "AstStatement should be be a block".to_string(); - - Self::new_from_span(message, span) - } -} diff --git a/ast/src/errors/error.rs b/ast/src/errors/error.rs deleted file mode 100644 index b2c1ebff5a..0000000000 --- a/ast/src/errors/error.rs +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{LeoError, Span}; -use std::{fmt, sync::Arc}; - -pub const INDENT: &str = " "; - -/// Formatted compiler error type -/// --> file.leo: 2:8 -/// | -/// 2 | let a = x; -/// | ^ -/// | -/// = undefined value `x` -#[derive(Clone, Debug, Eq, Hash, PartialEq)] -pub struct FormattedError { - pub line_start: usize, - pub line_stop: usize, - pub col_start: usize, - pub col_stop: usize, - pub path: Arc, - pub content: String, - pub message: String, -} - -impl FormattedError { - pub fn new_from_span(message: String, span: &Span) -> Self { - Self { - line_start: span.line_start, - line_stop: span.line_stop, - col_start: span.col_start, - col_stop: span.col_stop, - path: span.path.clone(), - content: span.content.to_string(), - message, - } - } -} - -impl LeoError for FormattedError {} - -fn underline(mut start: usize, mut end: usize) -> String { - if start > end { - std::mem::swap(&mut start, &mut end) - } - - let mut underline = String::new(); - - for _ in 0..start { - underline.push(' '); - end -= 1; - } - - for _ in 0..end { - underline.push('^'); - } - - underline -} - -impl fmt::Display for FormattedError { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let underline = underline(self.col_start, self.col_stop); - - let error_message = format!( - "{indent }--> {path}:{line_start}:{start}\n\ - {indent } ", - indent = INDENT, - path = &*self.path, - line_start = self.line_start, - start = self.col_start, - ); - - write!(f, "{}", error_message)?; - - for (line_no, line) in self.content.lines().enumerate() { - writeln!( - f, - "|\n{line_no:width$} | {text}", - width = INDENT.len(), - line_no = self.line_start + line_no, - text = line, - )?; - } - - write!( - f, - "{indent } |{underline}\n\ - {indent } |\n\ - {indent } = {message}", - indent = INDENT, - underline = underline, - message = self.message, - ) - } -} - -impl std::error::Error for FormattedError { - fn description(&self) -> &str { - &self.message - } -} - -#[test] -fn test_error() { - let err = FormattedError { - path: std::sync::Arc::new("file.leo".to_string()), - line_start: 2, - line_stop: 2, - col_start: 9, - col_stop: 10, - content: "let a = x;".into(), - message: "undefined value `x`".to_string(), - }; - - assert_eq!( - err.to_string(), - vec![ - " --> file.leo:2:9", - " |", - " 2 | let a = x;", - " | ^", - " |", - " = undefined value `x`", - ] - .join("\n") - ); -} diff --git a/ast/src/errors/reducer.rs b/ast/src/errors/reducer.rs deleted file mode 100644 index 9655c47bde..0000000000 --- a/ast/src/errors/reducer.rs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{CanonicalizeError, CombinerError, FormattedError, LeoError, Span}; - -#[derive(Debug, Error)] -pub enum ReducerError { - #[error("{}", _0)] - Error(#[from] FormattedError), - - #[error("{}", _0)] - CanonicalizeError(#[from] CanonicalizeError), - - #[error("{}", _0)] - CombinerError(#[from] CombinerError), -} - -impl LeoError for ReducerError {} - -impl ReducerError { - fn new_from_span(message: String, span: &Span) -> Self { - ReducerError::Error(FormattedError::new_from_span(message, span)) - } - - pub fn empty_string(span: &Span) -> Self { - let message = - "Cannot constrcut an empty string: it has the type of [char; 0] which is not possible.".to_string(); - - Self::new_from_span(message, span) - } - - pub fn impossible_console_assert_call(span: &Span) -> Self { - let message = "Console::Assert cannot be matched here, its handled in another case.".to_string(); - - Self::new_from_span(message, span) - } -} diff --git a/errors/src/asg/asg.rs b/errors/src/asg/asg.rs index 1f24c356cb..41ab7b5879 100644 --- a/errors/src/asg/asg.rs +++ b/errors/src/asg/asg.rs @@ -14,395 +14,323 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{ErrorCode, FormattedError, LeoErrorCode, Span}; +use crate::create_errors; -#[derive(Debug, Error)] -pub enum AsgError { - #[error(transparent)] - FormattedError(#[from] FormattedError), -} +create_errors!( + AsgError, + exit_code_mask: 0u32, + error_code_prefix: "G", -impl LeoErrorCode for AsgError {} - -impl ErrorCode for AsgError { - #[inline(always)] - fn exit_code_mask() -> u32 { - 2000 + unresolved_circuit { + args: (name: &str), + msg: format!("failed to resolve circuit: '{}'", name), + help: None, } - #[inline(always)] - fn error_type() -> String { - "G".to_string() + unresolved_import { + args: (name: &str), + msg: format!("failed to resolve import: '{}'", name), + help: None, } - fn new_from_span(message: String, help: Option, exit_code: u32, span: &Span) -> Self { - Self::FormattedError(FormattedError::new_from_span( - message, - help, - exit_code ^ Self::exit_code_mask(), - Self::code_identifier(), - Self::error_type(), - span, - )) - } -} - -impl AsgError { - pub fn unresolved_circuit(name: &str, span: &Span) -> Self { - Self::new_from_span(format!("failed to resolve circuit: '{}'", name), None, 0, span) + unresolved_circuit_member { + args: (circuit_name: &str, name: &str), + msg: format!( + "illegal reference to non-existant member '{}' of circuit '{}'", + name, circuit_name + ), + help: None, } - pub fn unresolved_import(name: &str, span: &Span) -> Self { - Self::new_from_span(format!("failed to resolve import: '{}'", name), None, 1, span) + missing_circuit_member { + args: (circuit_name: &str, name: &str), + msg: format!( + "missing circuit member '{}' for initialization of circuit '{}'", + name, circuit_name + ), + help: None, } - pub fn unresolved_circuit_member(circuit_name: &str, name: &str, span: &Span) -> Self { - Self::new_from_span( - format!( - "illegal reference to non-existant member '{}' of circuit '{}'", - name, circuit_name - ), - None, - 2, - span, - ) + overridden_circuit_member { + args: (circuit_name: &str, name: &str), + msg: format!( + "cannot declare circuit member '{}' more than once for initialization of circuit '{}'", + name, circuit_name + ), + help: None, } - pub fn missing_circuit_member(circuit_name: &str, name: &str, span: &Span) -> Self { - Self::new_from_span( - format!( - "missing circuit member '{}' for initialization of circuit '{}'", - name, circuit_name - ), - None, - 3, - span, - ) + redefined_circuit_member { + args: (circuit_name: &str, name: &str), + msg: format!( + "cannot declare circuit member '{}' multiple times in circuit '{}'", + name, circuit_name + ), + help: None, } - pub fn overridden_circuit_member(circuit_name: &str, name: &str, span: &Span) -> Self { - Self::new_from_span( - format!( - "cannot declare circuit member '{}' more than once for initialization of circuit '{}'", - name, circuit_name - ), - None, - 4, - span, - ) + extra_circuit_member { + args: (circuit_name: &str, name: &str), + msg: format!( + "extra circuit member '{}' for initialization of circuit '{}' is not allowed", + name, circuit_name + ), + help: None, } - pub fn redefined_circuit_member(circuit_name: &str, name: &str, span: &Span) -> Self { - Self::new_from_span( - format!( - "cannot declare circuit member '{}' multiple times in circuit '{}'", - name, circuit_name - ), - None, - 5, - span, - ) + illegal_function_assign { + args: (name: &str), + msg: format!("attempt to assign to function '{}'", name), + help: None, } - pub fn extra_circuit_member(circuit_name: &str, name: &str, span: &Span) -> Self { - Self::new_from_span( - format!( - "extra circuit member '{}' for initialization of circuit '{}' is not allowed", - name, circuit_name - ), - None, - 6, - span, - ) + circuit_variable_call { + args: (circuit_name: &str, name: &str), + msg: format!("cannot call variable member '{}' of circuit '{}'", name, circuit_name), + help: None, } - pub fn illegal_function_assign(name: &str, span: &Span) -> Self { - Self::new_from_span(format!("attempt to assign to function '{}'", name), None, 7, span) + circuit_static_call_invalid { + args: (circuit_name: &str, name: &str), + msg: format!( + "cannot call static function '{}' of circuit '{}' from target", + name, circuit_name + ), + help: None, } - pub fn circuit_variable_call(circuit_name: &str, name: &str, span: &Span) -> Self { - Self::new_from_span( - format!("cannot call variable member '{}' of circuit '{}'", name, circuit_name), - None, - 8, - span, - ) + circuit_member_mut_call_invalid { + args: (circuit_name: &str, name: &str), + msg: format!( + "cannot call mutable member function '{}' of circuit '{}' from immutable context", + name, circuit_name + ), + help: None, } - pub fn circuit_static_call_invalid(circuit_name: &str, name: &str, span: &Span) -> Self { - Self::new_from_span( - format!( - "cannot call static function '{}' of circuit '{}' from target", - name, circuit_name - ), - None, - 9, - span, - ) + circuit_member_call_invalid { + args: (circuit_name: &str, name: &str), + msg: format!( + "cannot call member function '{}' of circuit '{}' from static context", + name, circuit_name + ), + help: None, } - pub fn circuit_member_mut_call_invalid(circuit_name: &str, name: &str, span: &Span) -> Self { - Self::new_from_span( - format!( - "cannot call mutable member function '{}' of circuit '{}' from immutable context", - name, circuit_name - ), - None, - 10, - span, - ) + circuit_function_ref { + args: (circuit_name: &str, name: &str), + msg: format!( + "cannot reference function member '{}' of circuit '{}' as value", + name, circuit_name + ), + help: None, } - pub fn circuit_member_call_invalid(circuit_name: &str, name: &str, span: &Span) -> Self { - Self::new_from_span( - format!( - "cannot call member function '{}' of circuit '{}' from static context", - name, circuit_name - ), - None, - 11, - span, - ) + index_into_non_array { + args: (name: &str), + msg: format!("failed to index into non-array '{}'", name), + help: None, + } + + invalid_assign_index { + args: (name: &str, num: &str), + msg: format!("failed to index array with invalid integer '{}'[{}]", name, num), + help: None, + } + + invalid_backwards_assignment { + args: (name: &str, left: usize, right: usize), + msg: format!( + "failed to index array range for assignment with left > right '{}'[{}..{}]", + name, left, right + ), + help: None, } - pub fn circuit_function_ref(circuit_name: &str, name: &str, span: &Span) -> Self { - Self::new_from_span( - format!( - "cannot reference function member '{}' of circuit '{}' as value", - name, circuit_name - ), - None, - 12, - span, - ) + invalid_const_assign { + args: (name: &str), + msg: format!( + "failed to create const variable(s) '{}' with non constant values.", + name + ), + help: None, } - pub fn index_into_non_array(name: &str, span: &Span) -> Self { - Self::new_from_span(format!("failed to index into non-array '{}'", name), None, 13, span) + duplicate_function_definition { + args: (name: &str), + msg: format!("a function named \"{}\" already exists in this scope", name), + help: None, } - pub fn invalid_assign_index(name: &str, num: &str, span: &Span) -> Self { - Self::new_from_span( - format!("failed to index array with invalid integer '{}'[{}]", name, num), - None, - 14, - span, - ) + duplicate_variable_definition { + args: (name: &str), + msg: format!("a variable named \"{}\" already exists in this scope", name), + help: None, } - pub fn invalid_backwards_assignment(name: &str, left: usize, right: usize, span: &Span) -> Self { - Self::new_from_span( - format!( - "failed to index array range for assignment with left > right '{}'[{}..{}]", - name, left, right - ), - None, - 15, - span, - ) + index_into_non_tuple { + args: (name: &str), + msg: format!("failed to index into non-tuple '{}'", name), + help: None, } - pub fn invalid_const_assign(name: &str, span: &Span) -> Self { - Self::new_from_span( - format!( - "failed to create const variable(s) '{}' with non constant values.", - name - ), - None, - 16, - span, - ) + tuple_index_out_of_bounds { + args: (index: usize), + msg: format!("tuple index out of bounds: '{}'", index), + help: None, } - pub fn duplicate_function_definition(name: &str, span: &Span) -> Self { - Self::new_from_span( - format!("a function named \"{}\" already exists in this scope", name), - None, - 17, - span, - ) + array_index_out_of_bounds { + args: (index: usize), + msg: format!("array index out of bounds: '{}'", index), + help: None, } - pub fn duplicate_variable_definition(name: &str, span: &Span) -> Self { - Self::new_from_span( - format!("a variable named \"{}\" already exists in this scope", name), - None, - 18, - span, - ) + ternary_different_types { + args: (left: &str, right: &str), + msg: format!("ternary sides had different types: left {}, right {}", left, right), + help: None, } - pub fn index_into_non_tuple(name: &str, span: &Span) -> Self { - Self::new_from_span(format!("failed to index into non-tuple '{}'", name), None, 19, span) + unknown_array_size { + args: (), + msg: "array size cannot be inferred, add explicit types", + help: None, } - pub fn tuple_index_out_of_bounds(index: usize, span: &Span) -> Self { - Self::new_from_span(format!("tuple index out of bounds: '{}'", index), None, 20, span) + unexpected_call_argument_count { + args: (expected: usize, got: usize), + msg: format!("function call expected {} arguments, got {}", expected, got), + help: None, } - pub fn array_index_out_of_bounds(index: usize, span: &Span) -> Self { - Self::new_from_span(format!("array index out of bounds: '{}'", index), None, 21, span) + unresolved_function { + args: (name: &str), + msg: format!("failed to resolve function: '{}'", name), + help: None, } - pub fn ternary_different_types(left: &str, right: &str, span: &Span) -> Self { - let message = format!("ternary sides had different types: left {}, right {}", left, right); - - Self::new_from_span(message, None, 22, span) + unresolved_type { + args: (name: &str), + msg: format!("failed to resolve type for variable definition '{}'", name), + help: None, } - pub fn unknown_array_size(span: &Span) -> Self { - Self::new_from_span( - "array size cannot be inferred, add explicit types".to_string(), - None, - 23, - span, - ) + unexpected_type { + args: (expected: &str, received: Option<&str>), + msg: format!( + "unexpected type, expected: '{}', received: '{}'", + expected, + received.unwrap_or("unknown") + ), + help: None, } - pub fn unexpected_call_argument_count(expected: usize, got: usize, span: &Span) -> Self { - Self::new_from_span( - format!("function call expected {} arguments, got {}", expected, got), - None, - 24, - span, - ) + unexpected_nonconst { + args: (), + msg: "expected const, found non-const value", + help: None, } - pub fn unresolved_function(name: &str, span: &Span) -> Self { - Self::new_from_span(format!("failed to resolve function: '{}'", name), None, 25, span) + unresolved_reference { + args: (name: &str), + msg: format!("failed to resolve variable reference '{}'", name), + help: None, } - pub fn unresolved_type(name: &str, span: &Span) -> Self { - Self::new_from_span( - format!("failed to resolve type for variable definition '{}'", name), - None, - 26, - span, - ) + invalid_boolean { + args: (value: &str), + msg: format!("failed to parse boolean value '{}'", value), + help: None, } - pub fn unexpected_type(expected: &str, received: Option<&str>, span: &Span) -> Self { - Self::new_from_span( - format!( - "unexpected type, expected: '{}', received: '{}'", - expected, - received.unwrap_or("unknown") - ), - None, - 27, - span, - ) + invalid_char { + args: (value: &str), + msg: format!("failed to parse char value '{}'", value), + help: None, } - pub fn unexpected_nonconst(span: &Span) -> Self { - Self::new_from_span("expected const, found non-const value".to_string(), None, 28, span) + invalid_int { + args: (value: &str), + msg: format!("failed to parse int value '{}'", value), + help: None, } - pub fn unresolved_reference(name: &str, span: &Span) -> Self { - Self::new_from_span( - format!("failed to resolve variable reference '{}'", name), - None, - 29, - span, - ) + unsigned_negation { + args: (), + msg: "cannot negate unsigned integer", + help: None, } - pub fn invalid_boolean(value: &str, span: &Span) -> Self { - Self::new_from_span(format!("failed to parse boolean value '{}'", value), None, 30, span) + immutable_assignment { + args: (name: &str), + msg: format!("illegal assignment to immutable variable '{}'", name), + help: None, } - pub fn invalid_char(value: &str, span: &Span) -> Self { - Self::new_from_span(format!("failed to parse char value '{}'", value), None, 31, span) + function_missing_return { + args: (name: &str), + msg: format!("function '{}' missing return for all paths", name), + help: None, } - pub fn invalid_int(value: &str, span: &Span) -> Self { - Self::new_from_span(format!("failed to parse int value '{}'", value), None, 32, span) + function_return_validation { + args: (name: &str, description: &str), + msg: format!("function '{}' failed to validate return path: '{}'", name, description), + help: None, } - pub fn unsigned_negation(span: &Span) -> Self { - Self::new_from_span("cannot negate unsigned integer".to_string(), None, 33, span) + input_ref_needs_type { + args: (category: &str, name: &str), + msg: format!("could not infer type for input in '{}': '{}'", category, name), + help: None, } - pub fn immutable_assignment(name: &str, span: &Span) -> Self { - Self::new_from_span( - format!("illegal assignment to immutable variable '{}'", name), - None, - 34, - span, - ) + invalid_self_in_global { + args: (), + msg: "cannot have `mut self` or `self` arguments in global functions", + help: None, } - pub fn function_missing_return(name: &str, span: &Span) -> Self { - Self::new_from_span( - format!("function '{}' missing return for all paths", name), - None, - 35, - span, - ) + call_test_function { + args: (), + msg: "cannot call test function", + help: None, } - pub fn function_return_validation(name: &str, description: &str, span: &Span) -> Self { - Self::new_from_span( - format!("function '{}' failed to validate return path: '{}'", name, description), - None, - 36, - span, - ) + circuit_test_function { + args: (), + msg: "cannot have test function as member of circuit", + help: None, } - pub fn input_ref_needs_type(category: &str, name: &str, span: &Span) -> Self { - Self::new_from_span( - format!("could not infer type for input in '{}': '{}'", category, name), - None, - 37, - span, - ) + parse_index_error { + args: (), + msg: "failed to parse index", + help: None, } - pub fn invalid_self_in_global(span: &Span) -> Self { - Self::new_from_span( - "cannot have `mut self` or `self` arguments in global functions".to_string(), - None, - 38, - span, - ) + parse_dimension_error { + args: (), + msg: "failed to parse dimension", + help: None, } - pub fn call_test_function(span: &Span) -> Self { - Self::new_from_span("cannot call test function".to_string(), None, 39, span) + reference_self_outside_circuit { + args: (), + msg: "referenced self outside of circuit function", + help: None, } - pub fn circuit_test_function(span: &Span) -> Self { - Self::new_from_span( - "cannot have test function as member of circuit".to_string(), - None, - 40, - span, - ) + illegal_ast_structure { + args: (details: &str), + msg: format!("illegal ast structure: {}", details), + help: None, } - pub fn parse_index_error(span: &Span) -> Self { - Self::new_from_span("failed to parse index".to_string(), None, 41, span) + illegal_input_variable_reference { + args: (details: &str), + msg: format!("illegal ast structure: {}", details), + help: None, } - - pub fn parse_dimension_error(span: &Span) -> Self { - Self::new_from_span("failed to parse dimension".to_string(), None, 42, span) - } - - pub fn reference_self_outside_circuit(span: &Span) -> Self { - Self::new_from_span( - "referenced self outside of circuit function".to_string(), - None, - 43, - span, - ) - } - - pub fn illegal_ast_structure(details: &str, span: &Span) -> Self { - Self::new_from_span(format!("illegal ast structure: {}", details), None, 44, span) - } - - pub fn illegal_input_variable_reference(details: &str, span: &Span) -> Self { - Self::new_from_span(format!("illegal ast structure: {}", details), None, 45, span) - } -} +); diff --git a/errors/src/ast/ast.rs b/errors/src/ast/ast.rs index 8c3135bcf9..0bbf4281eb 100644 --- a/errors/src/ast/ast.rs +++ b/errors/src/ast/ast.rs @@ -14,68 +14,40 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{ErrorCode, FormattedError, LeoErrorCode, Span}; +use crate::create_errors; -#[derive(Debug, Error)] -pub enum AstError { - #[error(transparent)] - FormattedError(#[from] FormattedError), -} +create_errors!( + AstError, + exit_code_mask: 1000u32, + error_code_prefix: "T", -impl LeoErrorCode for AstError {} - -impl ErrorCode for AstError { - #[inline(always)] - fn exit_code_mask() -> u32 { - 1000 + big_self_outside_of_circuit { + args: (), + msg: "cannot call keyword `Self` outside of a circuit function", + help: None, } - #[inline(always)] - fn error_type() -> String { - "T".to_string() + invalid_array_dimension_size { + args: (), + msg: "received dimension size of 0, expected it to be 1 or larger.", + help: None, } - fn new_from_span(message: String, help: Option, exit_code: u32, span: &Span) -> Self { - Self::FormattedError(FormattedError::new_from_span( - message, - help, - exit_code ^ Self::exit_code_mask(), - Self::code_identifier(), - Self::error_type(), - span, - )) - } -} - -impl AstError { - pub fn big_self_outside_of_circuit(span: &Span) -> Self { - let message = "cannot call keyword `Self` outside of a circuit function".to_string(); - - Self::new_from_span(message, None, 1, span) + asg_statement_not_block { + args: (), + msg: "AstStatement should be be a block", + help: None, } - pub fn invalid_array_dimension_size(span: &Span) -> Self { - let message = "received dimension size of 0, expected it to be 1 or larger.".to_string(); - - Self::new_from_span(message, None, 2, span) + empty_string { + args: (), + msg: "Cannot constrcut an empty string: it has the type of [char; 0] which is not possible.", + help: None, } - pub fn asg_statement_not_block(span: &Span) -> Self { - let message = "AstStatement should be be a block".to_string(); - - Self::new_from_span(message, None, 3, span) + impossible_console_assert_call { + args: (), + msg: "Console::Assert cannot be matched here, its handled in another case.", + help: None, } - - pub fn empty_string(span: &Span) -> Self { - let message = - "Cannot constrcut an empty string: it has the type of [char; 0] which is not possible.".to_string(); - - Self::new_from_span(message, None, 5, span) - } - - pub fn impossible_console_assert_call(span: &Span) -> Self { - let message = "Console::Assert cannot be matched here, its handled in another case.".to_string(); - - Self::new_from_span(message, None, 6, span) - } -} +); diff --git a/errors/src/common/macros.rs b/errors/src/common/macros.rs new file mode 100644 index 0000000000..4affbaef15 --- /dev/null +++ b/errors/src/common/macros.rs @@ -0,0 +1,68 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +#[macro_export] +macro_rules! create_errors { + (@step $_code:expr,) => {}; + ($error_type:ident, exit_code_mask: $exit_code_mask:expr, error_code_prefix: $error_code_prefix:expr, $($names:ident { args: ($($arg_names:ident: $arg_types:ty$(,)?)*), msg: $messages:expr, help: $helps:expr, })*) => { + use crate::{ErrorCode, FormattedError, LeoErrorCode, Span}; + + #[derive(Debug, Error)] + pub enum $error_type { + #[error(transparent)] + FormattedError(#[from] FormattedError), + } + + impl LeoErrorCode for $error_type {} + + impl ErrorCode for $error_type { + #[inline(always)] + fn exit_code_mask() -> u32 { + $exit_code_mask + } + + #[inline(always)] + fn error_type() -> String { + $error_code_prefix.to_string() + } + + fn new_from_span(message: T, help: Option, exit_code: u32, span: &Span) -> Self + where T: ToString { + Self::FormattedError(FormattedError::new_from_span( + message.to_string(), + help, + exit_code + Self::exit_code_mask(), + Self::code_identifier(), + Self::error_type(), + span, + )) + } + } + + impl $error_type { + create_errors!(@step 0u32, $(($names($($arg_names: $arg_types,)*), $messages, $helps),)*); + } + }; + (@step $code:expr, ($error_name:ident($($arg_names:ident: $arg_types:ty,)*), $message:expr, $help:expr), $(($names:ident($($tail_arg_names:ident: $tail_arg_types:ty,)*), $messages:expr, $helps:expr),)*) => { + pub fn $error_name($($arg_names: $arg_types,)* span: &Span) -> Self { + + Self::new_from_span($message, $help, $code, span) + } + + create_errors!(@step $code + 1u32, $(($names($($tail_arg_names: $tail_arg_types,)*), $messages, $helps),)*); + }; + +} \ No newline at end of file diff --git a/errors/src/common/mod.rs b/errors/src/common/mod.rs index d4d9da616d..df44577b24 100644 --- a/errors/src/common/mod.rs +++ b/errors/src/common/mod.rs @@ -17,6 +17,10 @@ pub mod formatted; pub use self::formatted::*; +#[macro_use] +pub mod macros; +pub use self::macros::*; + pub mod span; pub use self::span::*; diff --git a/errors/src/common/traits.rs b/errors/src/common/traits.rs index e56f9ff5c4..09ff8ac19b 100644 --- a/errors/src/common/traits.rs +++ b/errors/src/common/traits.rs @@ -21,7 +21,8 @@ pub trait ErrorCode: Sized { fn error_type() -> String; - fn new_from_span(message: String, help: Option, exit_code: u32, span: &Span) -> Self; + fn new_from_span(message: T, help: Option, exit_code: u32, span: &Span) -> Self + where T: ToString; } pub trait LeoErrorCode: ErrorCode { diff --git a/errors/src/compiler/compiler.rs b/errors/src/compiler/compiler.rs index 2fc1053c16..7705a8ed97 100644 --- a/errors/src/compiler/compiler.rs +++ b/errors/src/compiler/compiler.rs @@ -14,430 +14,399 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{ErrorCode, FormattedError, LeoErrorCode, Span}; +use crate::create_errors; -#[derive(Debug, Error)] -pub enum CompilerError { - #[error(transparent)] - FormattedError(#[from] FormattedError), -} +create_errors!( + CompilerError, + exit_code_mask: 2000u32, + error_code_prefix: "G", +); -impl LeoErrorCode for CompilerError {} +// impl CompilerError { +// pub fn expected_left_or_right_brace(span: &Span) -> Self { +// let message = "Formatter given a {. Expected a { or } after".to_string(); -impl ErrorCode for CompilerError { - #[inline(always)] - fn exit_code_mask() -> u32 { - 4000 - } +// Self::new_from_span(message, None, 0, span) +// } - #[inline(always)] - fn error_type() -> String { - "C".to_string() - } +// pub fn expected_escaped_right_brace(span: &Span) -> Self { +// let message = "Formatter given a }. Expected a container {} or }}".to_string(); - fn new_from_span(message: String, help: Option, exit_code: u32, span: &Span) -> Self { - Self::FormattedError(FormattedError::new_from_span( - message, - help, - exit_code ^ Self::exit_code_mask(), - Self::code_identifier(), - Self::error_type(), - span, - )) - } -} +// Self::new_from_span(message, None, 1, span) +// } -impl CompilerError { - pub fn expected_left_or_right_brace(span: &Span) -> Self { - let message = "Formatter given a {. Expected a { or } after".to_string(); +// pub fn length(containers: usize, parameters: usize, span: &Span) -> Self { +// let message = format!( +// "Formatter given {} containers and found {} parameters", +// containers, parameters +// ); - Self::new_from_span(message, None, 0, span) - } +// Self::new_from_span(message, None, 2, span) +// } - pub fn expected_escaped_right_brace(span: &Span) -> Self { - let message = "Formatter given a }. Expected a container {} or }}".to_string(); +// pub fn assertion_depends_on_input(span: &Span) -> Self { +// let message = "console.assert() does not produce constraints and cannot use inputs. \ +// Assertions should only be used in @test functions" +// .to_string(); - Self::new_from_span(message, None, 1, span) - } +// Self::new_from_span(message, None, 3, span) +// } - pub fn length(containers: usize, parameters: usize, span: &Span) -> Self { - let message = format!( - "Formatter given {} containers and found {} parameters", - containers, parameters - ); +// pub fn assertion_failed(span: &Span) -> Self { +// let message = "Assertion failed".to_string(); - Self::new_from_span(message, None, 2, span) - } +// Self::new_from_span(message, None, 4, span) +// } - pub fn assertion_depends_on_input(span: &Span) -> Self { - let message = "console.assert() does not produce constraints and cannot use inputs. \ - Assertions should only be used in @test functions" - .to_string(); +// pub fn assertion_must_be_boolean(span: &Span) -> Self { +// let message = "Assertion expression must evaluate to a boolean value".to_string(); - Self::new_from_span(message, None, 3, span) - } +// Self::new_from_span(message, None, 5, span) +// } - pub fn assertion_failed(span: &Span) -> Self { - let message = "Assertion failed".to_string(); +// pub fn cannot_enforce(operation: String, error: String, span: &Span) -> Self { +// let message = format!( +// "the gadget operation `{}` failed due to synthesis error `{}`", +// operation, error, +// ); - Self::new_from_span(message, None, 4, span) - } +// Self::new_from_span(message, None, 6, span) +// } - pub fn assertion_must_be_boolean(span: &Span) -> Self { - let message = "Assertion expression must evaluate to a boolean value".to_string(); +// pub fn cannot_evaluate(operation: String, span: &Span) -> Self { +// let message = format!("Mismatched types found for operation `{}`", operation); - Self::new_from_span(message, None, 5, span) - } +// Self::new_from_span(message, None, 7, span) +// } - pub fn cannot_enforce(operation: String, error: String, span: &Span) -> Self { - let message = format!( - "the gadget operation `{}` failed due to synthesis error `{}`", - operation, error, - ); +// pub fn array_length_out_of_bounds(span: &Span) -> Self { +// let message = "array length cannot be >= 2^32".to_string(); - Self::new_from_span(message, None, 6, span) - } +// Self::new_from_span(message, None, 8, span) +// } - pub fn cannot_evaluate(operation: String, span: &Span) -> Self { - let message = format!("Mismatched types found for operation `{}`", operation); +// pub fn array_index_out_of_legal_bounds(span: &Span) -> Self { +// let message = "array index cannot be >= 2^32".to_string(); - Self::new_from_span(message, None, 7, span) - } +// Self::new_from_span(message, None, 9, span) +// } - pub fn array_length_out_of_bounds(span: &Span) -> Self { - let message = "array length cannot be >= 2^32".to_string(); +// pub fn conditional_boolean(actual: String, span: &Span) -> Self { +// let message = format!("if, else conditional must resolve to a boolean, found `{}`", actual); - Self::new_from_span(message, None, 8, span) - } +// Self::new_from_span(message, None, 10, span) +// } - pub fn array_index_out_of_legal_bounds(span: &Span) -> Self { - let message = "array index cannot be >= 2^32".to_string(); +// pub fn expected_circuit_member(expected: String, span: &Span) -> Self { +// let message = format!("expected circuit member `{}`, not found", expected); - Self::new_from_span(message, None, 9, span) - } +// Self::new_from_span(message, None, 11, span) +// } - pub fn conditional_boolean(actual: String, span: &Span) -> Self { - let message = format!("if, else conditional must resolve to a boolean, found `{}`", actual); +// pub fn incompatible_types(operation: String, span: &Span) -> Self { +// let message = format!("no implementation for `{}`", operation); - Self::new_from_span(message, None, 10, span) - } +// Self::new_from_span(message, None, 12, span) +// } - pub fn expected_circuit_member(expected: String, span: &Span) -> Self { - let message = format!("expected circuit member `{}`, not found", expected); +// pub fn tuple_index_out_of_bounds(index: usize, span: &Span) -> Self { +// let message = format!("cannot access index {} of tuple out of bounds", index); - Self::new_from_span(message, None, 11, span) - } +// Self::new_from_span(message, None, 13, span) +// } - pub fn incompatible_types(operation: String, span: &Span) -> Self { - let message = format!("no implementation for `{}`", operation); +// pub fn array_index_out_of_bounds(index: usize, span: &Span) -> Self { +// let message = format!("cannot access index {} of array out of bounds", index); - Self::new_from_span(message, None, 12, span) - } +// Self::new_from_span(message, None, 14, span) +// } - pub fn tuple_index_out_of_bounds(index: usize, span: &Span) -> Self { - let message = format!("cannot access index {} of tuple out of bounds", index); +// pub fn array_invalid_slice_length(span: &Span) -> Self { +// let message = "illegal length of slice".to_string(); - Self::new_from_span(message, None, 13, span) - } +// Self::new_from_span(message, None, 15, span) +// } - pub fn array_index_out_of_bounds(index: usize, span: &Span) -> Self { - let message = format!("cannot access index {} of array out of bounds", index); +// pub fn invalid_index(actual: String, span: &Span) -> Self { +// let message = format!("index must resolve to an integer, found `{}`", actual); - Self::new_from_span(message, None, 14, span) - } +// Self::new_from_span(message, None, 16, span) +// } - pub fn array_invalid_slice_length(span: &Span) -> Self { - let message = "illegal length of slice".to_string(); +// pub fn invalid_length(expected: usize, actual: usize, span: &Span) -> Self { +// let message = format!("expected array length {}, found one with length {}", expected, actual); - Self::new_from_span(message, None, 15, span) - } +// Self::new_from_span(message, None, 17, span) +// } - pub fn invalid_index(actual: String, span: &Span) -> Self { - let message = format!("index must resolve to an integer, found `{}`", actual); +// pub fn invalid_static_access(member: String, span: &Span) -> Self { +// let message = format!("static member `{}` must be accessed using `::` syntax", member); - Self::new_from_span(message, None, 16, span) - } +// Self::new_from_span(message, None, 18, span) +// } - pub fn invalid_length(expected: usize, actual: usize, span: &Span) -> Self { - let message = format!("expected array length {}, found one with length {}", expected, actual); +// pub fn undefined_array(actual: String, span: &Span) -> Self { +// let message = format!("array `{}` must be declared before it is used in an expression", actual); - Self::new_from_span(message, None, 17, span) - } +// Self::new_from_span(message, None, 19, span) +// } - pub fn invalid_static_access(member: String, span: &Span) -> Self { - let message = format!("static member `{}` must be accessed using `::` syntax", member); +// pub fn undefined_circuit(actual: String, span: &Span) -> Self { +// let message = format!( +// "circuit `{}` must be declared before it is used in an expression", +// actual +// ); - Self::new_from_span(message, None, 18, span) - } +// Self::new_from_span(message, None, 20, span) +// } - pub fn undefined_array(actual: String, span: &Span) -> Self { - let message = format!("array `{}` must be declared before it is used in an expression", actual); +// pub fn undefined_identifier(name: &str, span: &Span) -> Self { +// let message = format!("Cannot find value `{}` in this scope", name); - Self::new_from_span(message, None, 19, span) - } +// Self::new_from_span(message, None, 21, span) +// } - pub fn undefined_circuit(actual: String, span: &Span) -> Self { - let message = format!( - "circuit `{}` must be declared before it is used in an expression", - actual - ); +// pub fn undefined_member_access(circuit: String, member: String, span: &Span) -> Self { +// let message = format!("Circuit `{}` has no member `{}`", circuit, member); - Self::new_from_span(message, None, 20, span) - } +// Self::new_from_span(message, None, 22, span) +// } - pub fn undefined_identifier(name: &str, span: &Span) -> Self { - let message = format!("Cannot find value `{}` in this scope", name); +// pub fn input_type_mismatch(expected: String, actual: String, variable: String, span: &Span) -> Self { +// let message = format!( +// "Expected input variable `{}` to be type `{}`, found type `{}`", +// variable, expected, actual +// ); - Self::new_from_span(message, None, 21, span) - } +// Self::new_from_span(message, None, 23, span) +// } - pub fn undefined_member_access(circuit: String, member: String, span: &Span) -> Self { - let message = format!("Circuit `{}` has no member `{}`", circuit, member); +// pub fn expected_const_input(variable: String, span: &Span) -> Self { +// let message = format!( +// "Expected input variable `{}` to be constant. Move input variable `{}` to [constants] section of input file", +// variable, variable +// ); - Self::new_from_span(message, None, 22, span) - } +// Self::new_from_span(message, None, 24, span) +// } - pub fn input_type_mismatch(expected: String, actual: String, variable: String, span: &Span) -> Self { - let message = format!( - "Expected input variable `{}` to be type `{}`, found type `{}`", - variable, expected, actual - ); +// pub fn expected_non_const_input(variable: String, span: &Span) -> Self { +// let message = format!( +// "Expected input variable `{}` to be non-constant. Move input variable `{}` to [main] section of input file", +// variable, variable +// ); - Self::new_from_span(message, None, 23, span) - } +// Self::new_from_span(message, None, 25, span) +// } - pub fn expected_const_input(variable: String, span: &Span) -> Self { - let message = format!( - "Expected input variable `{}` to be constant. Move input variable `{}` to [constants] section of input file", - variable, variable - ); +// pub fn invalid_array(actual: String, span: &Span) -> Self { +// let message = format!("Expected function input array, found `{}`", actual); - Self::new_from_span(message, None, 24, span) - } +// Self::new_from_span(message, None, 26, span) +// } - pub fn expected_non_const_input(variable: String, span: &Span) -> Self { - let message = format!( - "Expected input variable `{}` to be non-constant. Move input variable `{}` to [main] section of input file", - variable, variable - ); +// pub fn invalid_input_array_dimensions(expected: usize, actual: usize, span: &Span) -> Self { +// let message = format!( +// "Input array dimensions mismatch expected {}, found array dimensions {}", +// expected, actual +// ); - Self::new_from_span(message, None, 25, span) - } +// Self::new_from_span(message, None, 27, span) +// } - pub fn invalid_array(actual: String, span: &Span) -> Self { - let message = format!("Expected function input array, found `{}`", actual); +// pub fn tuple_size_mismatch(expected: usize, actual: usize, span: &Span) -> Self { +// let message = format!( +// "Input tuple size mismatch expected {}, found tuple with length {}", +// expected, actual +// ); - Self::new_from_span(message, None, 26, span) - } +// Self::new_from_span(message, None, 28, span) +// } - pub fn invalid_input_array_dimensions(expected: usize, actual: usize, span: &Span) -> Self { - let message = format!( - "Input array dimensions mismatch expected {}, found array dimensions {}", - expected, actual - ); +// pub fn invalid_tuple(actual: String, span: &Span) -> Self { +// let message = format!("Expected function input tuple, found `{}`", actual); - Self::new_from_span(message, None, 27, span) - } +// Self::new_from_span(message, None, 29, span) +// } - pub fn tuple_size_mismatch(expected: usize, actual: usize, span: &Span) -> Self { - let message = format!( - "Input tuple size mismatch expected {}, found tuple with length {}", - expected, actual - ); +// pub fn input_not_found(expected: String, span: &Span) -> Self { +// let message = format!("main function input {} not found", expected); - Self::new_from_span(message, None, 28, span) - } +// Self::new_from_span(message, None, 30, span) +// } - pub fn invalid_tuple(actual: String, span: &Span) -> Self { - let message = format!("Expected function input tuple, found `{}`", actual); +// pub fn double_input_declaration(input_name: String, span: &Span) -> Self { +// let message = format!("Input variable {} declared twice", input_name); - Self::new_from_span(message, None, 29, span) - } +// Self::new_from_span(message, None, 31, span) +// } - pub fn input_not_found(expected: String, span: &Span) -> Self { - let message = format!("main function input {} not found", expected); +// pub fn not_enough_registers(span: &Span) -> Self { +// let message = "number of input registers must be greater than or equal to output registers".to_string(); - Self::new_from_span(message, None, 30, span) - } +// Self::new_from_span(message, None, 32, span) +// } - pub fn double_input_declaration(input_name: String, span: &Span) -> Self { - let message = format!("Input variable {} declared twice", input_name); +// pub fn mismatched_output_types(left: &str, right: &str, span: &Span) -> Self { +// let message = format!( +// "Mismatched types. Expected register output type `{}`, found type `{}`.", +// left, right +// ); - Self::new_from_span(message, None, 31, span) - } +// Self::new_from_span(message, None, 33, span) +// } - pub fn not_enough_registers(span: &Span) -> Self { - let message = "number of input registers must be greater than or equal to output registers".to_string(); +// pub fn account_error(error: String, span: &Span) -> Self { +// let message = format!("account creation failed due to `{}`", error); - Self::new_from_span(message, None, 32, span) - } +// Self::new_from_span(message, None, 34, span) +// } - pub fn mismatched_output_types(left: &str, right: &str, span: &Span) -> Self { - let message = format!( - "Mismatched types. Expected register output type `{}`, found type `{}`.", - left, right - ); +// pub fn invalid_address(actual: String, span: &Span) -> Self { +// let message = format!("expected address input type, found `{}`", actual); - Self::new_from_span(message, None, 33, span) - } +// Self::new_from_span(message, None, 35, span) +// } - pub fn account_error(error: String, span: &Span) -> Self { - let message = format!("account creation failed due to `{}`", error); +// pub fn missing_address(span: &Span) -> Self { +// let message = "expected address input not found".to_string(); - Self::new_from_span(message, None, 34, span) - } +// Self::new_from_span(message, None, 36, span) +// } - pub fn invalid_address(actual: String, span: &Span) -> Self { - let message = format!("expected address input type, found `{}`", actual); +// pub fn negate_operation(error: String, span: &Span) -> Self { +// let message = format!("field negation failed due to synthesis error `{:?}`", error,); - Self::new_from_span(message, None, 35, span) - } +// Self::new_from_span(message, None, 37, span) +// } - pub fn missing_address(span: &Span) -> Self { - let message = "expected address input not found".to_string(); +// pub fn binary_operation(operation: String, error: String, span: &Span) -> Self { +// let message = format!( +// "the field binary operation `{}` failed due to synthesis error `{:?}`", +// operation, error, +// ); - Self::new_from_span(message, None, 36, span) - } +// Self::new_from_span(message, None, 38, span) +// } - pub fn negate_operation(error: String, span: &Span) -> Self { - let message = format!("field negation failed due to synthesis error `{:?}`", error,); +// pub fn invalid_field(actual: String, span: &Span) -> Self { +// let message = format!("expected field element input type, found `{}`", actual); - Self::new_from_span(message, None, 37, span) - } +// Self::new_from_span(message, None, 39, span) +// } - pub fn binary_operation(operation: String, error: String, span: &Span) -> Self { - let message = format!( - "the field binary operation `{}` failed due to synthesis error `{:?}`", - operation, error, - ); +// pub fn missing_field(expected: String, span: &Span) -> Self { +// let message = format!("expected field input `{}` not found", expected); - Self::new_from_span(message, None, 38, span) - } +// Self::new_from_span(message, None, 40, span) +// } - pub fn invalid_field(actual: String, span: &Span) -> Self { - let message = format!("expected field element input type, found `{}`", actual); +// pub fn no_inverse(field: String, span: &Span) -> Self { +// let message = format!("no multiplicative inverse found for field `{}`", field); - Self::new_from_span(message, None, 39, span) - } +// Self::new_from_span(message, None, 41, span) +// } - pub fn missing_field(expected: String, span: &Span) -> Self { - let message = format!("expected field input `{}` not found", expected); +// pub fn x_invalid(x: String, span: &Span) -> Self { +// let message = format!("invalid x coordinate `{}`", x); - Self::new_from_span(message, None, 40, span) - } +// Self::new_from_span(message, None, 42, span) +// } - pub fn no_inverse(field: String, span: &Span) -> Self { - let message = format!("no multiplicative inverse found for field `{}`", field); +// pub fn y_invalid(y: String, span: &Span) -> Self { +// let message = format!("invalid y coordinate `{}`", y); - Self::new_from_span(message, None, 41, span) - } +// Self::new_from_span(message, None, 43, span) +// } - pub fn x_invalid(x: String, span: &Span) -> Self { - let message = format!("invalid x coordinate `{}`", x); +// pub fn not_on_curve(element: String, span: &Span) -> Self { +// let message = format!("group element `{}` is not on the supported curve", element); - Self::new_from_span(message, None, 42, span) - } +// Self::new_from_span(message, None, 44, span) +// } - pub fn y_invalid(y: String, span: &Span) -> Self { - let message = format!("invalid y coordinate `{}`", y); +// pub fn x_recover(span: &Span) -> Self { +// let message = "could not recover group element from x coordinate".to_string(); - Self::new_from_span(message, None, 43, span) - } +// Self::new_from_span(message, None, 45, span) +// } - pub fn not_on_curve(element: String, span: &Span) -> Self { - let message = format!("group element `{}` is not on the supported curve", element); +// pub fn y_recover(span: &Span) -> Self { +// let message = "could not recover group element from y coordinate".to_string(); - Self::new_from_span(message, None, 44, span) - } +// Self::new_from_span(message, None, 46, span) +// } - pub fn x_recover(span: &Span) -> Self { - let message = "could not recover group element from x coordinate".to_string(); +// pub fn n_group(number: String, span: &Span) -> Self { +// let message = format!("cannot multiply group generator by \"{}\"", number); - Self::new_from_span(message, None, 45, span) - } +// Self::new_from_span(message, None, 47, span) +// } - pub fn y_recover(span: &Span) -> Self { - let message = "could not recover group element from y coordinate".to_string(); +// pub fn signed(error: String, span: &Span) -> Self { +// let message = format!("integer operation failed due to the signed integer error `{:?}`", error); - Self::new_from_span(message, None, 46, span) - } +// Self::new_from_span(message, None, 48, span) +// } - pub fn n_group(number: String, span: &Span) -> Self { - let message = format!("cannot multiply group generator by \"{}\"", number); +// pub fn unsigned(error: String, span: &Span) -> Self { +// let message = format!( +// "integer operation failed due to the unsigned integer error `{:?}`", +// error +// ); - Self::new_from_span(message, None, 47, span) - } +// Self::new_from_span(message, None, 49, span) +// } - pub fn signed(error: String, span: &Span) -> Self { - let message = format!("integer operation failed due to the signed integer error `{:?}`", error); +// pub fn integer_synthesis(error: String, span: &Span) -> Self { +// let message = format!("integer operation failed due to the synthesis error `{}`", error); - Self::new_from_span(message, None, 48, span) - } - - pub fn unsigned(error: String, span: &Span) -> Self { - let message = format!( - "integer operation failed due to the unsigned integer error `{:?}`", - error - ); - - Self::new_from_span(message, None, 49, span) - } - - pub fn integer_synthesis(error: String, span: &Span) -> Self { - let message = format!("integer operation failed due to the synthesis error `{}`", error); - - Self::new_from_span(message, None, 50, span) - } +// Self::new_from_span(message, None, 50, span) +// } - pub fn invalid_unsigned_negate(span: &Span) -> Self { - let message = "integer negation can only be enforced on signed integers".to_string(); +// pub fn invalid_unsigned_negate(span: &Span) -> Self { +// let message = "integer negation can only be enforced on signed integers".to_string(); - Self::new_from_span(message, None, 51, span) - } +// Self::new_from_span(message, None, 51, span) +// } - pub fn invalid_integer_binary_operation(operation: String, span: &Span) -> Self { - let message = format!( - "the integer binary operation `{}` can only be enforced on integers of the same type", - operation - ); +// pub fn invalid_integer_binary_operation(operation: String, span: &Span) -> Self { +// let message = format!( +// "the integer binary operation `{}` can only be enforced on integers of the same type", +// operation +// ); - Self::new_from_span(message, None, 52, span) - } +// Self::new_from_span(message, None, 52, span) +// } - pub fn integer_type_mismatch(expected: String, received: String, span: &Span) -> Self { - let message = format!("expected data type `{}`, found `{}`", expected, received); +// pub fn integer_type_mismatch(expected: String, received: String, span: &Span) -> Self { +// let message = format!("expected data type `{}`, found `{}`", expected, received); - Self::new_from_span(message, None, 53, span) - } +// Self::new_from_span(message, None, 53, span) +// } - pub fn invalid_integer(actual: String, span: &Span) -> Self { - let message = format!("failed to parse `{}` as expected integer type", actual); +// pub fn invalid_integer(actual: String, span: &Span) -> Self { +// let message = format!("failed to parse `{}` as expected integer type", actual); - Self::new_from_span(message, None, 54, span) - } +// Self::new_from_span(message, None, 54, span) +// } - pub fn missing_integer(expected: String, span: &Span) -> Self { - let message = format!("expected integer input `{}` not found", expected); +// pub fn missing_integer(expected: String, span: &Span) -> Self { +// let message = format!("expected integer input `{}` not found", expected); - Self::new_from_span(message, None, 55, span) - } +// Self::new_from_span(message, None, 55, span) +// } - pub fn invalid_group(actual: String, span: &Span) -> Self { - let message = format!("expected group affine point input type, found `{}`", actual); +// pub fn invalid_group(actual: String, span: &Span) -> Self { +// let message = format!("expected group affine point input type, found `{}`", actual); - Self::new_from_span(message, None, 56, span) - } +// Self::new_from_span(message, None, 56, span) +// } - pub fn missing_group(expected: String, span: &Span) -> Self { - let message = format!("expected group input `{}` not found", expected); +// pub fn missing_group(expected: String, span: &Span) -> Self { +// let message = format!("expected group input `{}` not found", expected); - Self::new_from_span(message, None, 57, span) - } +// Self::new_from_span(message, None, 57, span) +// } - pub fn group_synthesis_error(error: String, span: &Span) -> Self { - let message = format!("compilation failed due to group synthesis error `{:?}`", error); - - Self::new_from_span(message, span) - } - -} +// } diff --git a/errors/src/import/import.rs b/errors/src/import/import.rs index 4fd325dd43..590cad03e8 100644 --- a/errors/src/import/import.rs +++ b/errors/src/import/import.rs @@ -14,110 +14,71 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{ErrorCode, FormattedError, LeoErrorCode, Span}; +use crate::create_errors; -#[derive(Debug, Error)] -pub enum ImportError { - #[error(transparent)] - FormattedError(#[from] FormattedError), -} +create_errors!( + ImportError, + exit_code_mask: 3000u32, + error_code_prefix: "I", -impl LeoErrorCode for ImportError {} - -impl ErrorCode for ImportError { - #[inline(always)] - fn exit_code_mask() -> u32 { - 3000 + // An imported package has the same name as an imported core_package. + conflicting_imports { + args: (name: &str), + msg: format!("conflicting imports found for `{}`.", name), + help: None, } - #[inline(always)] - fn error_type() -> String { - "I".to_string() + recursive_imports { + args: (package: &str), + msg: format!("recursive imports for `{}`.", package), + help: None, } - fn new_from_span(message: String, help: Option, exit_code: u32, span: &Span) -> Self { - Self::FormattedError(FormattedError::new_from_span( - message, - help, - exit_code ^ Self::exit_code_mask(), - Self::code_identifier(), - Self::error_type(), - span, - )) - } -} - -impl ImportError { - /// - /// An imported package has the same name as an imported core_package. - /// - pub fn conflicting_imports(name: &str, span: &Span) -> Self { - let message = format!("conflicting imports found for `{}`.", name); - - Self::new_from_span(message, None, 0, span) + // Failed to convert a file path into an os string. + convert_os_string { + args: (), + msg: "Failed to convert file string name, maybe an illegal character?", + help: None, } - pub fn recursive_imports(package: &str, span: &Span) -> Self { - let message = format!("recursive imports for `{}`.", package); - - Self::new_from_span(message, None, 1, span) + // Failed to find the directory of the current file. + current_directory_error { + args: (error: std::io::Error), + msg: format!("Compilation failed trying to find current directory - {:?}.", error), + help: None, } - /// - /// Failed to convert a file path into an os string. - /// - pub fn convert_os_string(span: &Span) -> Self { - let message = "Failed to convert file string name, maybe an illegal character?".to_string(); - - Self::new_from_span(message, None, 2, span) - } - - /// - /// Failed to find the directory of the current file. - /// - pub fn current_directory_error(error: std::io::Error) -> Self { - let message = format!("Compilation failed trying to find current directory - {:?}.", error); - - Self::new_from_span(message, None, 3, &Span::default()) - } - - /// - /// Failed to open or get the name of a directory. - /// - pub fn directory_error(error: std::io::Error, span: &Span, path: &std::path::Path) -> Self { - let message = format!( + // Failed to open or get the name of a directory. + directory_error { + args: (error: std::io::Error, path: &std::path::Path), + msg: format!( "Compilation failed due to directory error @ '{}' - {:?}.", path.to_str().unwrap_or_default(), error - ); - - Self::new_from_span(message, None, 4, span) + ), + help: None, } - /// - /// Failed to find a main file for the current package. - /// - pub fn expected_main_file(entry: String, span: &Span) -> Self { - let message = format!("Expected main file at `{}`.", entry,); - - Self::new_from_span(message, None, 5, span) + // Failed to find a main file for the current package. + expected_main_file { + args: (entry: String), + msg: format!("Expected main file at `{}`.", entry), + help: None, } - /// - /// Failed to import a package name. - /// - pub fn unknown_package(name: &str, span: &Span) -> Self { - let message = format!( + // Failed to import a package name. + unknown_package { + args: (name: &str), + msg: format!( "Cannot find imported package `{}` in source files or import directory.", name - ); - - Self::new_from_span(message, None, 6, span) + ), + help: None, } - pub fn io_error(span: &Span, path: &str, error: std::io::Error) -> Self { - let message = format!("cannot read imported file '{}': {:?}", path, error,); - - Self::new_from_span(message, None, 7, span) + io_error { + args: (path: &str, error: std::io::Error), + msg: format!("cannot read imported file '{}': {:?}", path, error), + help: None, } -} +); \ No newline at end of file diff --git a/errors/src/lib.rs b/errors/src/lib.rs index 1f0647a6f8..752c66bd84 100644 --- a/errors/src/lib.rs +++ b/errors/src/lib.rs @@ -20,6 +20,7 @@ pub use self::asg::*; pub mod ast; pub use self::ast::*; +#[macro_use] pub mod common; pub use self::common::*; @@ -29,6 +30,9 @@ pub use self::compiler::*; pub mod import; pub use self::import::*; +pub mod package; +pub use self::package::*; + pub mod parser; pub use self::parser::*; diff --git a/package/src/errors/imports/mod.rs b/errors/src/package/mod.rs similarity index 94% rename from package/src/errors/imports/mod.rs rename to errors/src/package/mod.rs index 35ff3d6fab..0cecae3330 100644 --- a/package/src/errors/imports/mod.rs +++ b/errors/src/package/mod.rs @@ -14,5 +14,5 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -pub mod directory; -pub use directory::*; +pub mod package; +pub use self::package::*; \ No newline at end of file diff --git a/package/src/errors/source/mod.rs b/errors/src/package/package.rs similarity index 85% rename from package/src/errors/source/mod.rs rename to errors/src/package/package.rs index 0e073f0423..a2bafa453b 100644 --- a/package/src/errors/source/mod.rs +++ b/errors/src/package/package.rs @@ -14,11 +14,10 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -pub mod directory; -pub use directory::*; +use crate::create_errors; -pub mod lib; -pub use lib::*; - -pub mod main; -pub use main::*; +create_errors!( + PackageError, + exit_code_mask: 4000u32, + error_code_prefix: "PA", +); diff --git a/errors/src/parser/parser.rs b/errors/src/parser/parser.rs index c971a09a6e..361a4463bf 100644 --- a/errors/src/parser/parser.rs +++ b/errors/src/parser/parser.rs @@ -14,146 +14,126 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{ErrorCode, FormattedError, LeoErrorCode, Span}; +use crate::create_errors; -#[derive(Debug, Error)] -pub enum ParserError { - #[error(transparent)] - FormattedError(#[from] FormattedError), -} +create_errors!( + ParserError, + exit_code_mask: 5000u32, + error_code_prefix: "P", -impl LeoErrorCode for ParserError {} - -impl ErrorCode for ParserError { - #[inline(always)] - fn exit_code_mask() -> u32 { - 0 + unexpected_token { + args: (message: String, help: String), + msg: message, + help: Some(help), } - #[inline(always)] - fn error_type() -> String { - "P".to_string() + invalid_address_lit { + args: (token: &str), + msg: format!("invalid address literal: '{}'", token), + help: None, } - fn new_from_span(message: String, help: Option, exit_code: u32, span: &Span) -> Self { - Self::FormattedError(FormattedError::new_from_span( - message, - help, - exit_code ^ Self::exit_code_mask(), - Self::code_identifier(), - Self::error_type(), - span, - )) - } -} - -impl ParserError { - pub fn unexpected_token(message: String, help: String, span: &Span) -> Self { - Self::new_from_span(message, Some(help), 0, span) + invalid_import_list { + args: (), + msg: "Cannot import empty list", + help: None, } - pub fn invalid_address_lit(token: &str, span: &Span) -> Self { - Self::new_from_span(format!("invalid address literal: '{}'", token), None, 1, span) + unexpected_eof { + args: (), + msg: "unexpected EOF", + help: None, } - pub fn invalid_import_list(span: &Span) -> Self { - Self::new_from_span("Cannot import empty list".to_string(), None, 2, span) + unexpected_whitespace { + args: (left: &str, right: &str), + msg: format!("Unexpected white space between terms {} and {}", left, right), + help: None, } - pub fn unexpected_eof(span: &Span) -> Self { - Self::new_from_span("unexpected EOF".to_string(), None, 3, span) + unexpected { + args: (got: String, expected: String), + msg: format!("expected {} -- got '{}'", expected, got), + help: None, } - pub fn unexpected_whitespace(left: &str, right: &str, span: &Span) -> Self { - Self::new_from_span( - format!("Unexpected white space between terms {} and {}", left, right), - None, - 4, - span, - ) + mixed_commas_and_semicolons { + args: (), + msg: "Cannot mix use of commas and semi-colons for circuit member variable declarations.", + help: None, } - pub fn unexpected(got: String, expected: String, span: &Span) -> Self { - Self::new_from_span(format!("expected {} -- got '{}'", expected, got), None, 5, span) + unexpected_ident { + args: (got: &str, expected: &[&str]), + msg: format!( + "unexpected identifier: expected {} -- got '{}'", + expected + .iter() + .map(|x| format!("'{}'", x)) + .collect::>() + .join(", "), + got + ), + help: None, } - pub fn mixed_commas_and_semicolons(span: &Span) -> Self { - Self::new_from_span( - "Cannot mix use of commas and semi-colons for circuit member variable declarations.".to_string(), - None, - 6, - span, - ) + unexpected_statement { + args: (got: String, expected: &str), + msg: format!("unexpected statement: expected '{}', got '{}'", expected, got), + help: None, } - pub fn unexpected_ident(got: &str, expected: &[&str], span: &Span) -> Self { - Self::new_from_span( - format!( - "expected identifier {} -- got '{}'", - expected - .iter() - .map(|x| format!("'{}'", x)) - .collect::>() - .join(", "), - got - ), - None, - 7, - span, - ) + unexpected_str { + args: (got: String, expected: &str), + msg: format!("unexpected string: expected '{}', got '{}'", expected, got), + help: None, } - pub fn unexpected_statement(got: String, expected: &str, span: &Span) -> Self { - Self::new_from_span(format!("expected '{}', got '{}'", expected, got), None, 8, span) + spread_in_array_init { + args: (), + msg: "illegal spread in array initializer", + help: None, } - pub fn unexpected_str(got: String, expected: &str, span: &Span) -> Self { - Self::new_from_span(format!("expected '{}', got '{}'", expected, got), None, 9, span) + invalid_assignment_target { + args: (), + msg: "invalid assignment target", + help: None, } - pub fn spread_in_array_init(span: &Span) -> Self { - Self::new_from_span("illegal spread in array initializer".to_string(), None, 10, span) + invalid_package_name { + args: (), + msg: "package names must be lowercase alphanumeric ascii with underscores and singular dashes", + help: None, } - pub fn invalid_assignment_target(span: &Span) -> Self { - Self::new_from_span("invalid assignment target".to_string(), None, 11, span) + illegal_self_const { + args: (), + msg: "cannot have const self", + help: None, } - pub fn invalid_package_name(span: &Span) -> Self { - Self::new_from_span( - "package names must be lowercase alphanumeric ascii with underscores and singular dashes".to_string(), - None, - 12, - span, - ) + mut_function_input { + args: (), + msg: "function func(mut a: u32) { ... } is deprecated. Passed variables are mutable by default.", + help: None, } - pub fn illegal_self_const(span: &Span) -> Self { - Self::new_from_span("cannot have const self".to_string(), None, 13, span) + let_mut_statement { + args: (), + msg: "let mut = ... is deprecated. `let` keyword implies mutabality by default.", + help: None, } - pub fn mut_function_input(mut span: Span) -> Self { - let message = - "function func(mut a: u32) { ... } is deprecated. Passed variables are mutable by default.".to_string(); - span.col_start -= 1; - span.col_stop -= 1; - Self::new_from_span(message, None, 14, &span) + test_function { + args: (), + msg: "\"test function...\" is deprecated. Did you mean @test annotation?", + help: None, } - pub fn let_mut_statement(mut span: Span) -> Self { - let message = "let mut = ... is deprecated. `let` keyword implies mutabality by default.".to_string(); - span.col_start -= 1; - span.col_stop -= 1; - Self::new_from_span(message, None, 15, &span) + context_annotation { + args: (), + msg: "\"@context(...)\" is deprecated. Did you mean @test annotation?", + help: None, } - - pub fn test_function(span: &Span) -> Self { - let message = "\"test function...\" is deprecated. Did you mean @test annotation?".to_string(); - Self::new_from_span(message, None, 16, span) - } - - pub fn context_annotation(span: &Span) -> Self { - let message = "\"@context(...)\" is deprecated. Did you mean @test annotation?".to_string(); - Self::new_from_span(message, None, 17, span) - } -} +); \ No newline at end of file diff --git a/ast/src/errors/mod.rs b/errors/src/state/mod.rs similarity index 94% rename from ast/src/errors/mod.rs rename to errors/src/state/mod.rs index ff53f73aae..8f466c87e3 100644 --- a/ast/src/errors/mod.rs +++ b/errors/src/state/mod.rs @@ -13,3 +13,6 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . + +pub mod state; +pub use self::state::*; \ No newline at end of file diff --git a/package/src/errors/inputs/state.rs b/errors/src/state/state.rs similarity index 63% rename from package/src/errors/inputs/state.rs rename to errors/src/state/state.rs index e944f93469..698f667a86 100644 --- a/package/src/errors/inputs/state.rs +++ b/errors/src/state/state.rs @@ -14,19 +14,30 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use std::path::PathBuf; +use crate::{ErrorCode, FormattedError, LeoErrorCode, new_from_span, Span}; #[derive(Debug, Error)] -pub enum StateFileError { - #[error("{}: {}", _0, _1)] - Crate(&'static str, String), - - #[error("Cannot read from the provided file path - {:?}", _0)] - FileReadError(PathBuf), +pub enum StateError { + #[error(transparent)] + FormattedError(#[from] FormattedError), } -impl From for StateFileError { - fn from(error: std::io::Error) -> Self { - StateFileError::Crate("std::io", error.to_string()) +impl LeoErrorCode for StateError {} + +impl ErrorCode for StateError { + #[inline(always)] + fn exit_code_mask() -> u32 { + 6000 } + + #[inline(always)] + fn error_type() -> String { + "P".to_string() + } + + new_from_span!(); +} + +impl StateError { + } diff --git a/imports/src/errors/import_parser.rs b/imports/src/errors/import_parser.rs deleted file mode 100644 index a6ac2b23f6..0000000000 --- a/imports/src/errors/import_parser.rs +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . -use leo_asg::AsgConvertError; -use leo_ast::{AstError, FormattedError, Identifier, LeoError, Span}; -use leo_parser::SyntaxError; - -use std::{io, path::Path}; - -#[derive(Debug, Error)] -pub enum ImportParserError { - #[error("{}", _0)] - Error(#[from] FormattedError), - - #[error("{}", _0)] - SyntaxError(#[from] SyntaxError), - - #[error("{}", _0)] - AstError(#[from] AstError), - - #[error("{}", _0)] - AsgConvertError(#[from] AsgConvertError), -} - -impl LeoError for ImportParserError {} - -impl Into for ImportParserError { - fn into(self) -> AsgConvertError { - match self { - ImportParserError::Error(x) => LeoError::from(AsgError::ImportError(x),) - ImportParserError::SyntaxError(x) => x.into(), - ImportParserError::AstError(x) => LeoError::from(AsgError::AstError(x),) - ImportParserError::AsgConvertError(x) => x, - } - } -} - -impl ImportParserError { - fn new_from_span(message: String, span: &Span) -> Self { - ImportParserError::Error(FormattedError::new_from_span(message, span)) - } - - /// - /// An imported package has the same name as an imported core_package. - /// - pub fn conflicting_imports(identifier: Identifier) -> Self { - let message = format!("conflicting imports found for `{}`.", identifier.name); - - Self::new_from_span(message, &identifier.span) - } - - pub fn recursive_imports(package: &str, span: &Span) -> Self { - let message = format!("recursive imports for `{}`.", package); - - Self::new_from_span(message, span) - } - - /// - /// Failed to convert a file path into an os string. - /// - pub fn convert_os_string(span: &Span) -> Self { - let message = "Failed to convert file string name, maybe an illegal character?".to_string(); - - Self::new_from_span(message, span) - } - - /// - /// Failed to find the directory of the current file. - /// - pub fn current_directory_error(error: io::Error) -> Self { - let message = format!("Compilation failed trying to find current directory - {:?}.", error); - - Self::new_from_span(message, &Span::default()) - } - - /// - /// Failed to open or get the name of a directory. - /// - pub fn directory_error(error: io::Error, span: &Span, path: &Path) -> Self { - let message = format!( - "Compilation failed due to directory error @ '{}' - {:?}.", - path.to_str().unwrap_or_default(), - error - ); - - Self::new_from_span(message, span) - } - - /// - /// Failed to find a main file for the current package. - /// - pub fn expected_main_file(entry: String, span: &Span) -> Self { - let message = format!("Expected main file at `{}`.", entry,); - - Self::new_from_span(message, span) - } - - /// - /// Failed to import a package name. - /// - pub fn unknown_package(identifier: Identifier) -> Self { - let message = format!( - "Cannot find imported package `{}` in source files or import directory.", - identifier.name - ); - - Self::new_from_span(message, &identifier.span) - } - - pub fn io_error(span: &Span, path: &str, error: std::io::Error) -> Self { - let message = format!("cannot read imported file '{}': {:?}", path, error,); - - Self::new_from_span(message, span) - } -} diff --git a/imports/src/errors/mod.rs b/imports/src/errors/mod.rs deleted file mode 100644 index bf08c78578..0000000000 --- a/imports/src/errors/mod.rs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -pub mod import_parser; -pub use self::import_parser::*; diff --git a/imports/src/parser/parse_package.rs b/imports/src/parser/parse_package.rs index 48e14479ff..4bc71a2419 100644 --- a/imports/src/parser/parse_package.rs +++ b/imports/src/parser/parse_package.rs @@ -83,9 +83,9 @@ impl<'a> ImportParser<'a> { // Get a vector of all packages in the source directory. let entries = fs::read_dir(path) - .map_err(|error| LeoError::from(ImportError::directory_error(error, span, &error_path)))? + .map_err(|error| LeoError::from(ImportError::directory_error(error, &error_path, span)))? .collect::, std::io::Error>>() - .map_err(|error| LeoError::from(ImportError::directory_error(error, span, &error_path)))?; + .map_err(|error| LeoError::from(ImportError::directory_error(error, &error_path, span)))?; // Check if the imported package name is in the source directory. let matched_source_entry = entries.into_iter().find(|entry| { @@ -100,9 +100,9 @@ impl<'a> ImportParser<'a> { if imports_directory.exists() { // Get a vector of all packages in the imports directory. let entries = fs::read_dir(imports_directory) - .map_err(|error| LeoError::from(ImportError::directory_error(error, span, &error_path)))? + .map_err(|error| LeoError::from(ImportError::directory_error(error, &error_path, span)))? .collect::, std::io::Error>>() - .map_err(|error| LeoError::from(ImportError::directory_error(error, span, &error_path)))?; + .map_err(|error| LeoError::from(ImportError::directory_error(error, &error_path, span)))?; // Check if the imported package name is in the imports directory. let matched_import_entry = entries diff --git a/imports/src/parser/parse_symbol.rs b/imports/src/parser/parse_symbol.rs index 5693852e02..c76cf0544f 100644 --- a/imports/src/parser/parse_symbol.rs +++ b/imports/src/parser/parse_symbol.rs @@ -32,7 +32,7 @@ impl<'a> ImportParser<'a> { // Get the package file type. let file_type = package .file_type() - .map_err(|error| LeoError::from(ImportError::directory_error(error, span, &package.path())))?; + .map_err(|error| LeoError::from(ImportError::directory_error(error, &package.path(), span)))?; let file_name = package .file_name() .into_string() @@ -54,7 +54,7 @@ impl<'a> ImportParser<'a> { // Build the package abstract syntax tree. let program_string = - &std::fs::read_to_string(&file_path).map_err(|x| LeoError::from(ImportError::io_error(span, file_path_str, x)))?; + &std::fs::read_to_string(&file_path).map_err(|x| LeoError::from(ImportError::io_error(file_path_str, x, span)))?; let mut program = leo_parser::parse(&file_path_str, &program_string)?; program.name = file_name; let mut ast = leo_ast::Ast::new(program); diff --git a/package/src/errors/imports/directory.rs b/package/src/errors/imports/directory.rs deleted file mode 100644 index e027babdec..0000000000 --- a/package/src/errors/imports/directory.rs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use std::{ffi::OsString, io}; - -#[derive(Debug, Error)] -pub enum ImportsDirectoryError { - #[error("creating: {}", _0)] - Creating(io::Error), - - #[error("package {:?} does not exist as an import", _0)] - ImportDoesNotExist(OsString), - - #[error("removing: {}", _0)] - Removing(io::Error), -} diff --git a/package/src/errors/inputs/directory.rs b/package/src/errors/inputs/directory.rs deleted file mode 100644 index 0a36e53836..0000000000 --- a/package/src/errors/inputs/directory.rs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{InputFileError, StateFileError}; - -use std::{ffi::OsString, fs::FileType, io}; - -#[derive(Debug, Error)] -pub enum InputsDirectoryError { - #[error("creating: {}", _0)] - Creating(io::Error), - - #[error("file entry getting: {}", _0)] - GettingFileEntry(io::Error), - - #[error("file {:?} name getting", _0)] - GettingFileName(OsString), - - #[error("file {:?} type getting: {}", _0, _1)] - GettingFileType(OsString, io::Error), - - #[error("{}", _0)] - InputFileError(#[from] InputFileError), - - #[error("invalid file {:?} type: {:?}", _0, _1)] - InvalidFileType(OsString, FileType), - - #[error("reading: {}", _0)] - Reading(io::Error), - - #[error("{}", _0)] - StateFileError(#[from] StateFileError), -} diff --git a/package/src/errors/inputs/input.rs b/package/src/errors/inputs/input.rs deleted file mode 100644 index 0dbbbb0a0c..0000000000 --- a/package/src/errors/inputs/input.rs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use std::path::PathBuf; - -#[derive(Debug, Error)] -pub enum InputFileError { - #[error("{}: {}", _0, _1)] - Crate(&'static str, String), - - #[error("Cannot read from the provided file path - {:?}", _0)] - FileReadError(PathBuf), -} - -impl From for InputFileError { - fn from(error: std::io::Error) -> Self { - InputFileError::Crate("std::io", error.to_string()) - } -} diff --git a/package/src/errors/inputs/mod.rs b/package/src/errors/inputs/mod.rs deleted file mode 100644 index ff9df5e267..0000000000 --- a/package/src/errors/inputs/mod.rs +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -pub mod directory; -pub use directory::*; - -pub mod input; -pub use input::*; - -pub mod state; -pub use state::*; diff --git a/package/src/errors/mod.rs b/package/src/errors/mod.rs deleted file mode 100644 index 32bf1fc55c..0000000000 --- a/package/src/errors/mod.rs +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -pub mod imports; -pub use imports::*; - -pub mod inputs; -pub use inputs::*; - -pub mod outputs; -pub use outputs::*; - -pub mod package; -pub use self::package::*; - -pub mod root; -pub use self::root::*; - -pub mod source; -pub use self::source::*; diff --git a/package/src/errors/outputs/checksum.rs b/package/src/errors/outputs/checksum.rs deleted file mode 100644 index 7d52981bd8..0000000000 --- a/package/src/errors/outputs/checksum.rs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use std::path::PathBuf; - -#[derive(Debug, Error)] -pub enum ChecksumFileError { - #[error("{}: {}", _0, _1)] - Crate(&'static str, String), - - #[error("Cannot read from the provided file path - {:?}", _0)] - FileReadError(PathBuf), - - #[error("Cannot remove the provided file - {:?}", _0)] - FileRemovalError(PathBuf), -} - -impl From for ChecksumFileError { - fn from(error: std::io::Error) -> Self { - ChecksumFileError::Crate("std::io", error.to_string()) - } -} diff --git a/package/src/errors/outputs/circuit.rs b/package/src/errors/outputs/circuit.rs deleted file mode 100644 index 69b172c05d..0000000000 --- a/package/src/errors/outputs/circuit.rs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use std::path::PathBuf; - -#[derive(Debug, Error)] -pub enum CircuitFileError { - #[error("{}: {}", _0, _1)] - Crate(&'static str, String), - - #[error("Cannot read from the provided file path - {:?}", _0)] - FileReadError(PathBuf), - - #[error("Cannot remove the provided file - {:?}", _0)] - FileRemovalError(PathBuf), -} - -impl From for CircuitFileError { - fn from(error: std::io::Error) -> Self { - CircuitFileError::Crate("std::io", error.to_string()) - } -} diff --git a/package/src/errors/outputs/directory.rs b/package/src/errors/outputs/directory.rs deleted file mode 100644 index 8945526cfa..0000000000 --- a/package/src/errors/outputs/directory.rs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use std::io; - -#[derive(Debug, Error)] -pub enum OutputsDirectoryError { - #[error("creating: {}", _0)] - Creating(io::Error), - - #[error("removing: {}", _0)] - Removing(io::Error), -} diff --git a/package/src/errors/outputs/mod.rs b/package/src/errors/outputs/mod.rs deleted file mode 100644 index e936884a57..0000000000 --- a/package/src/errors/outputs/mod.rs +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -pub mod circuit; -pub use circuit::*; - -pub mod checksum; -pub use checksum::*; - -pub mod directory; -pub use self::directory::*; - -pub mod proof; -pub use proof::*; - -pub mod proving_key; -pub use proving_key::*; - -pub mod verification_key; -pub use verification_key::*; diff --git a/package/src/errors/outputs/proof.rs b/package/src/errors/outputs/proof.rs deleted file mode 100644 index adce5b7bf5..0000000000 --- a/package/src/errors/outputs/proof.rs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use std::path::PathBuf; - -#[derive(Debug, Error)] -pub enum ProofFileError { - #[error("{}: {}", _0, _1)] - Crate(&'static str, String), - - #[error("Cannot read from the provided file path - {:?}", _0)] - FileReadError(PathBuf), - - #[error("Cannot remove the provided file - {:?}", _0)] - FileRemovalError(PathBuf), -} - -impl From for ProofFileError { - fn from(error: std::io::Error) -> Self { - ProofFileError::Crate("std::io", error.to_string()) - } -} diff --git a/package/src/errors/outputs/proving_key.rs b/package/src/errors/outputs/proving_key.rs deleted file mode 100644 index 6431af92fd..0000000000 --- a/package/src/errors/outputs/proving_key.rs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use std::path::PathBuf; - -#[derive(Debug, Error)] -pub enum ProvingKeyFileError { - #[error("{}: {}", _0, _1)] - Crate(&'static str, String), - - #[error("Cannot read from the provided file path - {:?}", _0)] - FileReadError(PathBuf), - - #[error("Cannot remove the provided file - {:?}", _0)] - FileRemovalError(PathBuf), -} - -impl From for ProvingKeyFileError { - fn from(error: std::io::Error) -> Self { - ProvingKeyFileError::Crate("std::io", error.to_string()) - } -} diff --git a/package/src/errors/outputs/verification_key.rs b/package/src/errors/outputs/verification_key.rs deleted file mode 100644 index 6a9f437b8a..0000000000 --- a/package/src/errors/outputs/verification_key.rs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use std::path::PathBuf; - -#[derive(Debug, Error)] -pub enum VerificationKeyFileError { - #[error("{}: {}", _0, _1)] - Crate(&'static str, String), - - #[error("Cannot read from the provided file path - {:?}", _0)] - FileReadError(PathBuf), - - #[error("Cannot remove the provided file - {:?}", _0)] - FileRemovalError(PathBuf), -} - -impl From for VerificationKeyFileError { - fn from(error: std::io::Error) -> Self { - VerificationKeyFileError::Crate("std::io", error.to_string()) - } -} diff --git a/package/src/errors/package.rs b/package/src/errors/package.rs deleted file mode 100644 index 47f4808924..0000000000 --- a/package/src/errors/package.rs +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . -use std::ffi::OsString; - -#[derive(Debug, Error)] -pub enum PackageError { - #[error("{}: {}", _0, _1)] - Crate(&'static str, String), - - #[error("Failed to initialize package {:?} ({:?})", _0, _1)] - FailedToInitialize(String, OsString), - - #[error("Invalid project name: {:?}", _0)] - InvalidPackageName(String), -} - -impl From for PackageError { - fn from(error: std::io::Error) -> Self { - PackageError::Crate("std::io", error.to_string()) - } -} - -impl From for PackageError { - fn from(error: crate::errors::GitignoreError) -> Self { - PackageError::Crate("leo-package", error.to_string()) - } -} - -impl From for PackageError { - fn from(error: crate::errors::InputFileError) -> Self { - PackageError::Crate("leo-package", error.to_string()) - } -} - -impl From for PackageError { - fn from(error: crate::errors::InputsDirectoryError) -> Self { - PackageError::Crate("leo-package", error.to_string()) - } -} - -impl From for PackageError { - fn from(error: crate::errors::ImportsDirectoryError) -> Self { - PackageError::Crate("leo-package", error.to_string()) - } -} - -impl From for PackageError { - fn from(error: crate::errors::OutputsDirectoryError) -> Self { - PackageError::Crate("leo-package", error.to_string()) - } -} - -impl From for PackageError { - fn from(error: crate::errors::READMEError) -> Self { - PackageError::Crate("leo-package", error.to_string()) - } -} - -impl From for PackageError { - fn from(error: crate::errors::SourceDirectoryError) -> Self { - PackageError::Crate("leo-package", error.to_string()) - } -} - -impl From for PackageError { - fn from(error: crate::errors::StateFileError) -> Self { - PackageError::Crate("leo-package", error.to_string()) - } -} - -impl From for PackageError { - fn from(error: crate::errors::LibraryFileError) -> Self { - PackageError::Crate("leo-package", error.to_string()) - } -} - -impl From for PackageError { - fn from(error: crate::errors::ManifestError) -> Self { - PackageError::Crate("leo-package", error.to_string()) - } -} - -impl From for PackageError { - fn from(error: crate::errors::MainFileError) -> Self { - PackageError::Crate("leo-package", error.to_string()) - } -} diff --git a/package/src/errors/root/gitignore.rs b/package/src/errors/root/gitignore.rs deleted file mode 100644 index bf047ddabb..0000000000 --- a/package/src/errors/root/gitignore.rs +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -#[derive(Debug, Error)] -pub enum GitignoreError { - #[error("{}: {}", _0, _1)] - Crate(&'static str, String), -} - -impl From for GitignoreError { - fn from(error: std::io::Error) -> Self { - GitignoreError::Crate("std::io", error.to_string()) - } -} diff --git a/package/src/errors/root/manifest.rs b/package/src/errors/root/manifest.rs deleted file mode 100644 index 1e732a817f..0000000000 --- a/package/src/errors/root/manifest.rs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use std::io; - -#[derive(Debug, Error)] -pub enum ManifestError { - #[error("{}: {}", _0, _1)] - Crate(&'static str, String), - - #[error("`{}` creating: {}", _0, _1)] - Creating(&'static str, io::Error), - - #[error("`{}` metadata: {}", _0, _1)] - Metadata(&'static str, io::Error), - - #[error("`{}` opening: {}", _0, _1)] - Opening(&'static str, io::Error), - - #[error("`{}` parsing: {}", _0, _1)] - Parsing(&'static str, toml::de::Error), - - #[error("`{}` reading: {}", _0, _1)] - Reading(&'static str, io::Error), - - #[error("`{}` writing: {}", _0, _1)] - Writing(&'static str, io::Error), -} - -impl From for ManifestError { - fn from(error: crate::errors::PackageError) -> Self { - ManifestError::Crate("leo-package", error.to_string()) - } -} diff --git a/package/src/errors/root/mod.rs b/package/src/errors/root/mod.rs deleted file mode 100644 index 6b90439ca1..0000000000 --- a/package/src/errors/root/mod.rs +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -pub mod gitignore; -pub use self::gitignore::*; - -pub mod manifest; -pub use self::manifest::*; - -pub mod readme; -pub use self::readme::*; - -pub mod zip; -pub use self::zip::*; diff --git a/package/src/errors/root/readme.rs b/package/src/errors/root/readme.rs deleted file mode 100644 index f5d99216c5..0000000000 --- a/package/src/errors/root/readme.rs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -#[allow(clippy::upper_case_acronyms)] -#[derive(Debug, Error)] -pub enum READMEError { - #[error("{}: {}", _0, _1)] - Crate(&'static str, String), -} - -impl From for READMEError { - fn from(error: std::io::Error) -> Self { - READMEError::Crate("std::io", error.to_string()) - } -} diff --git a/package/src/errors/root/zip.rs b/package/src/errors/root/zip.rs deleted file mode 100644 index af9f4e231b..0000000000 --- a/package/src/errors/root/zip.rs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use std::path::PathBuf; -use zip::result::ZipError; - -#[derive(Debug, Error)] -pub enum ZipFileError { - #[error("{}: {}", _0, _1)] - Crate(&'static str, String), - - #[error("Cannot read from the provided file path - {:?}", _0)] - FileReadError(PathBuf), - - #[error("Cannot remove the provided file - {:?}", _0)] - FileRemovalError(PathBuf), - - #[error("{}", _0)] - ZipError(#[from] ZipError), -} - -impl From for ZipFileError { - fn from(error: std::io::Error) -> Self { - ZipFileError::Crate("std::io", error.to_string()) - } -} diff --git a/package/src/errors/source/directory.rs b/package/src/errors/source/directory.rs deleted file mode 100644 index 00d0629ec2..0000000000 --- a/package/src/errors/source/directory.rs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use std::{ffi::OsString, fs::FileType, io}; - -#[derive(Debug, Error)] -pub enum SourceDirectoryError { - #[error("creating: {}", _0)] - Creating(io::Error), - - #[error("file entry getting: {}", _0)] - GettingFileEntry(io::Error), - - #[error("file {:?} extension getting", _0)] - GettingFileExtension(OsString), - - #[error("file {:?} type getting: {}", _0, _1)] - GettingFileType(OsString, io::Error), - - #[error("invalid file {:?} extension: {:?}", _0, _1)] - InvalidFileExtension(OsString, OsString), - - #[error("invalid file {:?} type: {:?}", _0, _1)] - InvalidFileType(OsString, FileType), - - #[error("reading: {}", _0)] - Reading(io::Error), -} diff --git a/package/src/errors/source/lib.rs b/package/src/errors/source/lib.rs deleted file mode 100644 index 149257085c..0000000000 --- a/package/src/errors/source/lib.rs +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -#[derive(Debug, Error)] -pub enum LibraryFileError { - #[error("{}: {}", _0, _1)] - Crate(&'static str, String), -} - -impl From for LibraryFileError { - fn from(error: std::io::Error) -> Self { - LibraryFileError::Crate("std::io", error.to_string()) - } -} diff --git a/package/src/errors/source/main.rs b/package/src/errors/source/main.rs deleted file mode 100644 index fc1de8d998..0000000000 --- a/package/src/errors/source/main.rs +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -#[derive(Debug, Error)] -pub enum MainFileError { - #[error("{}: {}", _0, _1)] - Crate(&'static str, String), -} - -impl From for MainFileError { - fn from(error: std::io::Error) -> Self { - MainFileError::Crate("std::io", error.to_string()) - } -} diff --git a/package/src/lib.rs b/package/src/lib.rs index 1ae814a303..b3acb13176 100644 --- a/package/src/lib.rs +++ b/package/src/lib.rs @@ -14,12 +14,6 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -#[macro_use] -extern crate thiserror; - -pub mod errors; -pub use errors::*; - pub mod imports; pub mod inputs; pub mod outputs; diff --git a/parser/src/parser/file.rs b/parser/src/parser/file.rs index f929f35d9b..0a5af4f3c5 100644 --- a/parser/src/parser/file.rs +++ b/parser/src/parser/file.rs @@ -440,7 +440,7 @@ impl ParserContext { if let Some(mutable) = &mutable { return Err(LeoError::from(ParserError::mut_function_input( - &mutable.span + &name.span, + &(&mutable.span + &name.span), ))); } diff --git a/parser/src/parser/statement.rs b/parser/src/parser/statement.rs index 0eba963c15..8e97d0d912 100644 --- a/parser/src/parser/statement.rs +++ b/parser/src/parser/statement.rs @@ -312,7 +312,7 @@ impl ParserContext { let mutable = self.eat(Token::Mut); if let Some(mutable) = &mutable { return Err(LeoError::from(ParserError::let_mut_statement( - &mutable.span + &span.span, + &(&mutable.span + &span.span), ))); } From 0eda3fcbb47658ba0fdf88171165017623a5130b Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Sat, 31 Jul 2021 00:03:32 -0700 Subject: [PATCH 03/58] forgot to convert state errors --- errors/src/lib.rs | 3 +++ errors/src/state/state.rs | 32 ++++++-------------------------- 2 files changed, 9 insertions(+), 26 deletions(-) diff --git a/errors/src/lib.rs b/errors/src/lib.rs index 752c66bd84..587d38e470 100644 --- a/errors/src/lib.rs +++ b/errors/src/lib.rs @@ -39,6 +39,9 @@ pub use self::parser::*; pub mod snarkvm; pub use self::snarkvm::*; +pub mod state; +pub use self::state::*; + #[macro_use] extern crate thiserror; diff --git a/errors/src/state/state.rs b/errors/src/state/state.rs index 698f667a86..86ef583dd6 100644 --- a/errors/src/state/state.rs +++ b/errors/src/state/state.rs @@ -14,30 +14,10 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{ErrorCode, FormattedError, LeoErrorCode, new_from_span, Span}; +use crate::create_errors; -#[derive(Debug, Error)] -pub enum StateError { - #[error(transparent)] - FormattedError(#[from] FormattedError), -} - -impl LeoErrorCode for StateError {} - -impl ErrorCode for StateError { - #[inline(always)] - fn exit_code_mask() -> u32 { - 6000 - } - - #[inline(always)] - fn error_type() -> String { - "P".to_string() - } - - new_from_span!(); -} - -impl StateError { - -} +create_errors!( + PackageError, + exit_code_mask: 6000u32, + error_code_prefix: "S", +); From c8be8704717363da2eb5c7ae1fa5aa80cff32f9d Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Tue, 3 Aug 2021 02:43:21 -0700 Subject: [PATCH 04/58] Compiles, still need to handle state and input eventually --- Cargo.lock | 7 +- compiler/Cargo.toml | 7 + compiler/src/compiler.rs | 51 +- compiler/src/console/assert.rs | 14 +- compiler/src/console/format.rs | 32 +- compiler/src/constraints/constraints.rs | 12 +- compiler/src/expression/arithmetic/bit_not.rs | 5 +- compiler/src/expression/arithmetic/negate.rs | 5 +- compiler/src/expression/array/access.rs | 48 +- compiler/src/expression/array/array.rs | 6 +- compiler/src/expression/array/index.rs | 6 +- compiler/src/expression/binary/binary.rs | 1 - compiler/src/expression/circuit/access.rs | 11 +- compiler/src/expression/circuit/circuit.rs | 7 +- .../src/expression/conditional/conditional.rs | 14 +- compiler/src/expression/expression.rs | 13 +- compiler/src/expression/function/function.rs | 6 +- compiler/src/expression/logical/and.rs | 11 +- compiler/src/expression/logical/not.rs | 5 +- compiler/src/expression/logical/or.rs | 11 +- compiler/src/expression/relational/eq.rs | 10 +- compiler/src/expression/relational/ge.rs | 3 +- compiler/src/expression/relational/gt.rs | 3 +- compiler/src/expression/relational/le.rs | 3 +- compiler/src/expression/relational/lt.rs | 3 +- compiler/src/expression/tuple/access.rs | 1 - compiler/src/expression/tuple/tuple.rs | 1 - .../expression/variable_ref/variable_ref.rs | 8 +- compiler/src/function/function.rs | 10 +- compiler/src/function/input/array.rs | 5 +- compiler/src/function/input/input_keyword.rs | 1 - compiler/src/function/input/input_section.rs | 6 +- .../src/function/input/main_function_input.rs | 19 +- compiler/src/function/input/tuple.rs | 11 +- compiler/src/function/main_function.rs | 20 +- compiler/src/function/mut_target.rs | 3 +- compiler/src/function/result/result.rs | 24 +- compiler/src/output/mod.rs | 10 +- compiler/src/output/output_bytes.rs | 10 +- compiler/src/output/output_file.rs | 16 +- compiler/src/phases/phase.rs | 1 - compiler/src/phases/reducing_director.rs | 12 +- compiler/src/prelude/blake2s.rs | 19 +- compiler/src/statement/assign/assign.rs | 11 +- .../statement/assign/assignee/array_index.rs | 45 +- .../assign/assignee/array_range_index.rs | 8 +- .../src/statement/assign/assignee/member.rs | 11 +- compiler/src/statement/assign/assignee/mod.rs | 12 +- .../src/statement/assign/assignee/tuple.rs | 10 +- .../src/statement/conditional/conditional.rs | 9 +- .../src/statement/definition/definition.rs | 9 +- compiler/src/statement/iteration/iteration.rs | 5 +- compiler/src/statement/statement.rs | 4 +- compiler/src/test.rs | 7 +- compiler/src/value/address/address.rs | 11 +- compiler/src/value/boolean/input.rs | 13 +- compiler/src/value/char/char.rs | 5 +- compiler/src/value/field/field_type.rs | 62 +- compiler/src/value/field/input.rs | 25 +- compiler/src/value/group/group_type.rs | 1 - compiler/src/value/group/input.rs | 13 +- .../src/value/group/targets/edwards_bls12.rs | 123 +- compiler/src/value/integer/integer.rs | 26 +- compiler/src/value/integer/macros.rs | 85 +- compiler/src/value/value.rs | 3 +- errors/Cargo.toml | 4 + errors/src/asg/asg.rs | 52 +- errors/src/asg/mod.rs | 2 +- errors/src/ast/ast.rs | 5 + errors/src/ast/mod.rs | 2 +- errors/src/common/backtraced.rs | 94 ++ errors/src/common/formatted.rs | 56 +- errors/src/common/macros.rs | 58 +- errors/src/common/mod.rs | 5 +- errors/src/common/traits.rs | 11 +- errors/src/compiler/compiler.rs | 1115 +++++++++++------ errors/src/compiler/mod.rs | 2 +- errors/src/import/import.rs | 10 +- errors/src/import/mod.rs | 2 +- errors/src/lib.rs | 10 +- errors/src/package/mod.rs | 2 +- errors/src/package/package.rs | 402 ++++++ errors/src/parser/mod.rs | 2 +- errors/src/parser/parser.rs | 20 +- errors/src/snarkvm/mod.rs | 2 +- errors/src/state/mod.rs | 2 +- errors/src/state/state.rs | 2 +- imports/src/parser/parse_package.rs | 13 +- imports/src/parser/parse_symbol.rs | 4 +- package/Cargo.toml | 14 +- package/src/imports/directory.rs | 17 +- package/src/inputs/directory.rs | 45 +- package/src/inputs/input.rs | 25 +- package/src/inputs/pairs.rs | 35 +- package/src/inputs/state.rs | 24 +- package/src/lib.rs | 6 +- package/src/outputs/checksum.rs | 36 +- package/src/outputs/circuit.rs | 36 +- package/src/outputs/directory.rs | 15 +- package/src/outputs/proof.rs | 36 +- package/src/outputs/proving_key.rs | 38 +- package/src/outputs/verification_key.rs | 42 +- package/src/package.rs | 24 +- package/src/root/gitignore.rs | 19 +- package/src/root/manifest.rs | 92 +- package/src/root/readme.rs | 19 +- package/src/root/zip.rs | 58 +- package/src/source/directory.rs | 50 +- package/src/source/main.rs | 13 +- parser/src/test.rs | 3 +- synthesizer/src/serialized_circuit.rs | 6 +- 111 files changed, 2533 insertions(+), 966 deletions(-) create mode 100644 errors/src/common/backtraced.rs diff --git a/Cargo.lock b/Cargo.lock index ce04d6bd97..29ebf4fc7e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1227,7 +1227,9 @@ dependencies = [ name = "leo-compiler" version = "1.5.3" dependencies = [ + "backtrace", "bincode", + "eyre", "hex", "indexmap", "leo-asg", @@ -1269,6 +1271,7 @@ dependencies = [ "backtrace", "derivative", "eyre", + "leo-input", "pest", "serde", "tendril", @@ -1351,9 +1354,11 @@ version = "1.5.3" name = "leo-package" version = "1.5.3" dependencies = [ + "backtrace", + "eyre", "lazy_static", + "leo-errors", "serde", - "thiserror", "toml", "tracing", "walkdir", diff --git a/compiler/Cargo.toml b/compiler/Cargo.toml index 796bbe93b4..156ad14e81 100644 --- a/compiler/Cargo.toml +++ b/compiler/Cargo.toml @@ -84,9 +84,16 @@ default-features = false [dependencies.snarkvm-utilities] version = "0.7.4" +[dependencies.backtrace] +version = "0.3.61" + [dependencies.bincode] version = "1.3" +[dependencies.eyre] +version = "0.6.5" +default-features = false + [dependencies.hex] version = "0.4.2" diff --git a/compiler/src/compiler.rs b/compiler/src/compiler.rs index 34225e89ce..14e07b9fa3 100644 --- a/compiler/src/compiler.rs +++ b/compiler/src/compiler.rs @@ -27,7 +27,7 @@ use crate::{ pub use leo_asg::{new_context, AsgContext as Context, AsgContext}; use leo_asg::{Asg, AsgPass, Program as AsgProgram}; use leo_ast::{Input, MainInput, Program as AstProgram}; -use leo_errors::{CompilerError, LeoError, Span}; +use leo_errors::{CompilerError, LeoError, SnarkVMError}; use leo_input::LeoInputParser; use leo_package::inputs::InputPairs; use leo_parser::parse_ast; @@ -37,6 +37,8 @@ use snarkvm_dpc::testnet1::{instantiated::Components, parameters::SystemParamete use snarkvm_fields::PrimeField; use snarkvm_r1cs::{ConstraintSynthesizer, ConstraintSystem, SynthesisError}; +use backtrace::Backtrace; +use eyre::eyre; use sha2::{Digest, Sha256}; use std::{ fs, @@ -152,7 +154,7 @@ impl<'a, F: PrimeField, G: GroupType> Compiler<'a, F, G> { context: AsgContext<'a>, options: Option, ast_snapshot_options: Option, - ) -> Result Result { let mut compiler = Self::new( package_name, main_file_path, @@ -180,7 +182,7 @@ impl<'a, F: PrimeField, G: GroupType> Compiler<'a, F, G> { input_path: &Path, state_string: &str, state_path: &Path, - ) -> Result<(), LeoError { + ) -> Result<(), LeoError> { let input_syntax_tree = LeoInputParser::parse_file(&input_string).map_err(|mut e| { e.set_path( input_path.to_str().unwrap_or_default(), @@ -223,10 +225,15 @@ impl<'a, F: PrimeField, G: GroupType> Compiler<'a, F, G> { /// /// Parses and stores all programs imported by the main program file. /// - pub fn parse_program(&mut self) -> Result<(), LeoError { + pub fn parse_program(&mut self) -> Result<(), LeoError> { // Load the program file. - let content = fs::read_to_string(&self.main_file_path) - .map_err(|e| LeoError::from(CompilerError::FileReadError(self.main_file_path.clone(), e)))?; + let content = fs::read_to_string(&self.main_file_path).map_err(|e| { + LeoError::from(CompilerError::file_read_error( + self.main_file_path.clone(), + eyre!(e), + Backtrace::new(), + )) + })?; self.parse_program_from_string(&content) } @@ -235,7 +242,7 @@ impl<'a, F: PrimeField, G: GroupType> Compiler<'a, F, G> { /// Equivalent to parse_and_check_program but uses the given program_string instead of a main /// file path. /// - pub fn parse_program_from_string(&mut self, program_string: &str) -> Result<(), LeoError { + pub fn parse_program_from_string(&mut self, program_string: &str) -> Result<(), LeoError> { // Use the parser to construct the abstract syntax tree (ast). let mut ast: leo_ast::Ast = parse_ast(self.main_file_path.to_str().unwrap_or_default(), program_string)?; @@ -278,7 +285,7 @@ impl<'a, F: PrimeField, G: GroupType> Compiler<'a, F, G> { // Store the ASG. self.asg = Some(asg.into_repr()); - self.do_asg_passes().map_err(LeoError::from(CompilerError::AsgPassError))?; + self.do_asg_passes()?; Ok(()) } @@ -286,7 +293,7 @@ impl<'a, F: PrimeField, G: GroupType> Compiler<'a, F, G> { /// /// Run compiler optimization passes on the program in asg format. /// - fn do_asg_passes(&mut self) -> Result<(), FormattedError> { + fn do_asg_passes(&mut self) -> Result<(), LeoError> { assert!(self.asg.is_some()); // Do constant folding. @@ -307,24 +314,29 @@ impl<'a, F: PrimeField, G: GroupType> Compiler<'a, F, G> { /// /// Synthesizes the circuit with program input to verify correctness. /// - pub fn compile_constraints>(&self, cs: &mut CS) -> Result>(&self, cs: &mut CS) -> Result { generate_constraints::(cs, &self.asg.as_ref().unwrap(), &self.program_input) } /// /// Synthesizes the circuit for test functions with program input. /// - pub fn compile_test_constraints(self, input_pairs: InputPairs) -> Result<(u32, u32), LeoError { + pub fn compile_test_constraints(self, input_pairs: InputPairs) -> Result<(u32, u32), LeoError> { generate_test_constraints::(&self.asg.as_ref().unwrap(), input_pairs, &self.output_directory) } /// /// Returns a SHA256 checksum of the program file. /// - pub fn checksum(&self) -> Result Result { // Read in the main file as string - let unparsed_file = fs::read_to_string(&self.main_file_path) - .map_err(|e| LeoError::from(CompilerError::FileReadError(self.main_file_path.clone(), e)))?; + let unparsed_file = fs::read_to_string(&self.main_file_path).map_err(|e| { + LeoError::from(CompilerError::file_read_error( + self.main_file_path.clone(), + eyre!(e), + Backtrace::new(), + )) + })?; // Hash the file contents let mut hasher = Sha256::new(); @@ -342,8 +354,10 @@ impl<'a, F: PrimeField, G: GroupType> Compiler<'a, F, G> { pub fn verify_local_data_commitment( &self, system_parameters: &SystemParameters, - ) -> Result Result { + // TODO CONVERT STATE ERROR TO LEO ERROR + let result = verify_local_data_commitment(system_parameters, &self.program_input) + .map_err(|e| LeoError::from(SnarkVMError::from(eyre!(e))))?; Ok(result) } @@ -362,11 +376,12 @@ impl<'a, F: PrimeField, G: GroupType> ConstraintSynthesizer for Compiler<' /// /// Synthesizes the circuit with program input. /// - fn generate_constraints>(&self, cs: &mut CS) -> Result<(), LeoError> { + fn generate_constraints>(&self, cs: &mut CS) -> Result<(), SynthesisError> { let output_directory = self.output_directory.clone(); let package_name = self.program_name.clone(); + // TODO WHAT TO DO HERE let result = self.compile_constraints(cs).map_err(|e| { - tracing::error!("{}", e); + tracing::error!("Error: {}", e); SynthesisError::Unsatisfiable })?; diff --git a/compiler/src/console/assert.rs b/compiler/src/console/assert.rs index 22d38581e9..af4e09c573 100644 --- a/compiler/src/console/assert.rs +++ b/compiler/src/console/assert.rs @@ -16,12 +16,7 @@ //! Enforces an assert equals statement in a compiled Leo program. -use crate::{ - get_indicator_value, - program::ConstrainedProgram, - value::ConstrainedValue, - GroupType, -}; +use crate::{get_indicator_value, program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::Expression; use leo_errors::{CompilerError, LeoError, Span}; @@ -50,13 +45,14 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let result_option = match assert_expression { ConstrainedValue::Boolean(boolean) => boolean.get_value(), _ => { - return Err(LeoError::from(CompilerError::assertion_must_be_boolean(span))); + return Err(LeoError::from(CompilerError::console_assertion_must_be_boolean(span))); } }; - let result_bool = result_option.ok_or_else(|| LeoError::from(CompilerError::assertion_depends_on_input(span)))?; + let result_bool = + result_option.ok_or_else(|| LeoError::from(CompilerError::console_assertion_depends_on_input(span)))?; if !result_bool { - return Err(LeoError::from(CompilerError::assertion_failed(span))); + return Err(LeoError::from(CompilerError::console_assertion_failed(span))); } Ok(()) diff --git a/compiler/src/console/format.rs b/compiler/src/console/format.rs index 2651d0b431..b372da9dac 100644 --- a/compiler/src/console/format.rs +++ b/compiler/src/console/format.rs @@ -24,11 +24,7 @@ use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { - pub fn format>( - &mut self, - cs: &mut CS, - args: &ConsoleArgs<'a>, - ) -> Result { + pub fn format>(&mut self, cs: &mut CS, args: &ConsoleArgs<'a>) -> Result { let mut out = Vec::new(); let mut in_container = false; let mut substring = String::new(); @@ -54,7 +50,15 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { in_container = false; let parameter = match args.parameters.get(arg_index) { Some(index) => index, - None => return Err(LeoError::from(CompilerError::from(CompilerError::length(arg_index + 1, args.parameters.len(), &args.span)))), + None => { + return Err(LeoError::from(CompilerError::from( + CompilerError::console_container_parameter_length_mismatch( + arg_index + 1, + args.parameters.len(), + &args.span, + ), + ))); + } }; out.push(self.enforce_expression(cs, parameter.get())?.to_string()); arg_index += 1; @@ -65,12 +69,16 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { substring.push('}'); escape_right_bracket = true; } else { - return Err(LeoError::from(CompilerError::from(CompilerError::expected_escaped_right_brace(&args.span)))); + return Err(LeoError::from(CompilerError::from( + CompilerError::console_fmt_expected_escaped_right_brace(&args.span), + ))); } } } _ if in_container => { - return Err(LeoError::from(CompilerError::from(CompilerError::expected_left_or_right_brace(&args.span)))); + return Err(LeoError::from(CompilerError::from( + CompilerError::console_fmt_expected_left_or_right_brace(&args.span), + ))); } _ => substring.push(*scalar), }, @@ -84,7 +92,13 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { // Check that containers and parameters match if arg_index != args.parameters.len() { - return Err(LeoError::from(CompilerError::from(CompilerError::length(arg_index, args.parameters.len(), &args.span)))); + return Err(LeoError::from(CompilerError::from( + CompilerError::console_container_parameter_length_mismatch( + arg_index, + args.parameters.len(), + &args.span, + ), + ))); } Ok(out.join("")) diff --git a/compiler/src/constraints/constraints.rs b/compiler/src/constraints/constraints.rs index 857d32dcf8..b4a1f3dbfc 100644 --- a/compiler/src/constraints/constraints.rs +++ b/compiler/src/constraints/constraints.rs @@ -23,6 +23,7 @@ use leo_errors::{CompilerError, LeoError}; use leo_input::LeoInputParser; use leo_package::inputs::InputPairs; +use backtrace::Backtrace; use snarkvm_fields::PrimeField; use snarkvm_r1cs::{ConstraintSystem, TestConstraintSystem}; use std::path::Path; @@ -48,7 +49,7 @@ pub fn generate_constraints<'a, F: PrimeField, G: GroupType, CS: ConstraintSy let result = resolved_program.enforce_main_function(cs, &function, input)?; Ok(result) } - _ => Err(LeoError::from(CompilerError::NoMainFunction)), + _ => Err(CompilerError::no_main_function(Backtrace::new()).into()), } } @@ -102,10 +103,15 @@ pub fn generate_test_constraints<'a, F: PrimeField, G: GroupType>( .or_else(|| input.pairs.get(&file_name_kebab)) { Some(pair) => pair.to_owned(), - None => return Err(LeoError::from(CompilerError::InvalidTestContext(file_name.to_string()))), + None => { + return Err(LeoError::from(CompilerError::invalid_test_context( + file_name.to_string(), + Backtrace::new(), + ))); + } } } - None => default.ok_or(LeoError::from(CompilerError::NoTestInput))?, + None => default.ok_or(LeoError::from(CompilerError::no_test_input(Backtrace::new())))?, }; // parse input files to abstract syntax trees diff --git a/compiler/src/expression/arithmetic/bit_not.rs b/compiler/src/expression/arithmetic/bit_not.rs index ffe67c4b7d..ec84560fbc 100644 --- a/compiler/src/expression/arithmetic/bit_not.rs +++ b/compiler/src/expression/arithmetic/bit_not.rs @@ -25,5 +25,8 @@ pub fn evaluate_bit_not<'a, F: PrimeField, G: GroupType>( value: ConstrainedValue<'a, F, G>, span: &Span, ) -> Result, LeoError> { - Err(LeoError::from(CompilerError::cannot_evaluate(format!("!{}", value), span))) + Err(LeoError::from(CompilerError::cannot_evaluate_expression( + format!("!{}", value), + span, + ))) } diff --git a/compiler/src/expression/arithmetic/negate.rs b/compiler/src/expression/arithmetic/negate.rs index 7d380450f7..819982df88 100644 --- a/compiler/src/expression/arithmetic/negate.rs +++ b/compiler/src/expression/arithmetic/negate.rs @@ -31,6 +31,9 @@ pub fn enforce_negate<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem Ok(ConstrainedValue::Integer(integer.negate(cs, span)?)), ConstrainedValue::Field(field) => Ok(ConstrainedValue::Field(field.negate(cs, span)?)), ConstrainedValue::Group(group) => Ok(ConstrainedValue::Group(group.negate(cs, span)?)), - value => Err(LeoError::from(CompilerError::incompatible_types(format!("-{}", value), span))), + value => Err(LeoError::from(CompilerError::incompatible_types( + format!("-{}", value), + span, + ))), } } diff --git a/compiler/src/expression/array/access.rs b/compiler/src/expression/array/access.rs index a74450eacd..3b0c93375b 100644 --- a/compiler/src/expression/array/access.rs +++ b/compiler/src/expression/array/access.rs @@ -28,7 +28,7 @@ use crate::{ use leo_asg::{ConstInt, Expression}; use leo_errors::{CompilerError, LeoError, Span}; - +use eyre::eyre; use snarkvm_fields::PrimeField; use snarkvm_gadgets::{ boolean::Boolean, @@ -63,7 +63,13 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let mut unique_namespace = cs.ns(|| namespace_string); bounds_check .enforce_equal(&mut unique_namespace, &Boolean::Constant(true)) - .map_err(|e| LeoError::from(CompilerError::cannot_enforce("array bounds check".to_string(), e, span)))?; + .map_err(|e| { + LeoError::from(CompilerError::cannot_enforce_expression( + "array bounds check".to_string(), + eyre!(e), + span, + )) + })?; Ok(()) } @@ -83,12 +89,12 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let index_resolved = self.enforce_index(cs, index, span)?; if let Some(resolved) = index_resolved.to_usize() { if resolved >= array.len() { - return Err(LeoError::from(CompilerError::array_index_out_of_bounds(resolved, span));) + return Err(LeoError::from(CompilerError::array_index_out_of_bounds(resolved, span))); } Ok(array[resolved].to_owned()) } else { if array.is_empty() { - return Err(LeoError::from(CompilerError::array_index_out_of_bounds(0, span));) + return Err(LeoError::from(CompilerError::array_index_out_of_bounds(0, span))); } { let array_len: u32 = array @@ -109,13 +115,19 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let const_index = ConstInt::U32(index_bounded).cast_to(&index_resolved.get_type()); let index_comparison = index_resolved .evaluate_equal(eq_namespace, &Integer::new(&const_index)) - .map_err(|_| LeoError::from(CompilerError::cannot_evaluate("==".to_string(), span)))?; + .map_err(|_| LeoError::from(CompilerError::cannot_evaluate_expression("==".to_string(), span)))?; let unique_namespace = cs.ns(|| format!("select array access {} {}:{}", i, span.line_start, span.col_start)); let value = ConstrainedValue::conditionally_select(unique_namespace, &index_comparison, &item, ¤t_value) - .map_err(|e| LeoError::from(CompilerError::cannot_enforce("conditional select".to_string(), e, span)))?; + .map_err(|e| { + LeoError::from(CompilerError::cannot_enforce_expression( + "conditional select".to_string(), + eyre!(e), + span, + )) + })?; current_value = value; } Ok(current_value) @@ -184,7 +196,13 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let mut unique_namespace = cs.ns(|| namespace_string); calc_len .enforce_equal(&mut unique_namespace, &Integer::new(&ConstInt::U32(length as u32))) - .map_err(|e| LeoError::from(CompilerError::cannot_enforce("array length check".to_string(), e, span)))?; + .map_err(|e| { + LeoError::from(CompilerError::cannot_enforce_expression( + "array length check".to_string(), + eyre!(e), + span, + )) + })?; } { let bounds_check = evaluate_le::( @@ -204,7 +222,13 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let mut unique_namespace = cs.ns(|| namespace_string); bounds_check .enforce_equal(&mut unique_namespace, &Boolean::Constant(true)) - .map_err(|e| LeoError::from(CompilerError::cannot_enforce("array bounds check".to_string(), e, span)))?; + .map_err(|e| { + LeoError::from(CompilerError::cannot_enforce_expression( + "array bounds check".to_string(), + eyre!(e), + span, + )) + })?; } let mut windows = array.windows(length); let mut result = ConstrainedValue::Array(vec![]); @@ -233,7 +257,13 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let unique_namespace = unique_namespace.ns(|| format!("array index {} {}:{}", i, span.line_start, span.col_start)); result = ConstrainedValue::conditionally_select(unique_namespace, &equality, &array_value, &result) - .map_err(|e| LeoError::from(CompilerError::cannot_enforce("conditional select".to_string(), e, span)))?; + .map_err(|e| { + LeoError::from(CompilerError::cannot_enforce_expression( + "conditional select".to_string(), + eyre!(e), + span, + )) + })?; } result }) diff --git a/compiler/src/expression/array/array.rs b/compiler/src/expression/array/array.rs index 9a909cd6e4..6b2eee3a98 100644 --- a/compiler/src/expression/array/array.rs +++ b/compiler/src/expression/array/array.rs @@ -52,7 +52,11 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { if let Some(dimension) = expected_dimension { // Return an error if the expected dimension != the actual dimension. if dimension != result.len() { - return Err(LeoError::from(CompilerError::invalid_length(dimension, result.len(), span))); + return Err(LeoError::from(CompilerError::unexpected_array_length( + dimension, + result.len(), + span, + ))); } } diff --git a/compiler/src/expression/array/index.rs b/compiler/src/expression/array/index.rs index 64b75fcc84..588e84bc7f 100644 --- a/compiler/src/expression/array/index.rs +++ b/compiler/src/expression/array/index.rs @@ -20,7 +20,6 @@ use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType, Int use leo_asg::Expression; use leo_errors::{CompilerError, LeoError, Span}; - use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -33,7 +32,10 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { ) -> Result { match self.enforce_expression(cs, index)? { ConstrainedValue::Integer(number) => Ok(number), - value => Err(LeoError::from(CompilerError::invalid_index(value.to_string(), span))), + value => Err(LeoError::from(CompilerError::invalid_index_expression( + value.to_string(), + span, + ))), } } } diff --git a/compiler/src/expression/binary/binary.rs b/compiler/src/expression/binary/binary.rs index 1a78747ddf..f74d6ebfb8 100644 --- a/compiler/src/expression/binary/binary.rs +++ b/compiler/src/expression/binary/binary.rs @@ -20,7 +20,6 @@ use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::Expression; use leo_errors::LeoError; - use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; diff --git a/compiler/src/expression/circuit/access.rs b/compiler/src/expression/circuit/access.rs index 8ff3288cc0..fcaad49931 100644 --- a/compiler/src/expression/circuit/access.rs +++ b/compiler/src/expression/circuit/access.rs @@ -20,7 +20,6 @@ use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::{CircuitAccessExpression, Node}; use leo_errors::{CompilerError, LeoError}; - use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -40,11 +39,12 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { if let Some(member) = members.into_iter().find(|x| x.0.name == expr.member.name) { Ok(member.1) } else { - Err(LeoError::from(CompilerError::undefined_member_access( + Err(CompilerError::undefined_circuit_member_access( expr.circuit.get().name.borrow().to_string(), expr.member.to_string(), &expr.member.span, - ))) + ) + .into()) } } value => Err(LeoError::from(CompilerError::undefined_circuit( @@ -53,10 +53,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { ))), } } else { - Err(LeoError::from(CompilerError::invalid_static_access( - expr.member.to_string(), - &expr.member.span, - ))) + Err(CompilerError::invalid_circuit_static_member_access(expr.member.to_string(), &expr.member.span).into()) } } } diff --git a/compiler/src/expression/circuit/circuit.rs b/compiler/src/expression/circuit/circuit.rs index de1b86c8d1..e2926c9c27 100644 --- a/compiler/src/expression/circuit/circuit.rs +++ b/compiler/src/expression/circuit/circuit.rs @@ -49,7 +49,12 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let variable_value = self.enforce_expression(cs, inner.get())?; resolved_members.push(ConstrainedCircuitMember(name.clone(), variable_value)); } - _ => return Err(LeoError::from(CompilerError::expected_circuit_member(name.to_string(), span))), + _ => { + return Err(LeoError::from(CompilerError::expected_circuit_member( + name.to_string(), + span, + ))); + } } } diff --git a/compiler/src/expression/conditional/conditional.rs b/compiler/src/expression/conditional/conditional.rs index 1fe5faa491..fae9528672 100644 --- a/compiler/src/expression/conditional/conditional.rs +++ b/compiler/src/expression/conditional/conditional.rs @@ -20,7 +20,7 @@ use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::Expression; use leo_errors::{CompilerError, LeoError, Span}; - +use eyre::eyre; use snarkvm_fields::PrimeField; use snarkvm_gadgets::traits::select::CondSelectGadget; use snarkvm_r1cs::ConstraintSystem; @@ -38,7 +38,13 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { ) -> Result, LeoError> { let conditional_value = match self.enforce_expression(cs, conditional)? { ConstrainedValue::Boolean(resolved) => resolved, - value => return Err(LeoError::from(CompilerError::conditional_boolean(value.to_string(), span))), + value => { + return Err(CompilerError::conditional_boolean_expression_fails_to_resolve_to_bool( + value.to_string(), + span, + ) + .into()); + } }; let first_value = self.enforce_expression(cs, first)?; @@ -53,6 +59,8 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { }); ConstrainedValue::conditionally_select(unique_namespace, &conditional_value, &first_value, &second_value) - .map_err(|e| LeoError::from(CompilerError::cannot_enforce("conditional select".to_string(), e, span))) + .map_err(|e| { + CompilerError::cannot_enforce_expression("conditional select".to_string(), eyre!(e), span).into() + }) } } diff --git a/compiler/src/expression/expression.rs b/compiler/src/expression/expression.rs index 77579ce980..6a5acd0f67 100644 --- a/compiler/src/expression/expression.rs +++ b/compiler/src/expression/expression.rs @@ -27,7 +27,7 @@ use crate::{ GroupType, }; use leo_asg::{expression::*, ConstValue, Expression, Node}; -use leo_errors::{CompilerError, LeoError, Span}; +use leo_errors::{LeoError, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::boolean::Boolean; @@ -117,15 +117,10 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { BinaryOperation::Mul => enforce_mul(cs, resolved_left, resolved_right, span), BinaryOperation::Div => enforce_div(cs, resolved_left, resolved_right, span), BinaryOperation::Pow => enforce_pow(cs, resolved_left, resolved_right, span), - BinaryOperation::Or => { - enforce_or(cs, resolved_left, resolved_right, span).map_err(LeoError::from(CompilerError::BooleanError)) - } - BinaryOperation::And => { - enforce_and(cs, resolved_left, resolved_right, span).map_err(LeoError::from(CompilerError::BooleanError)) - } + BinaryOperation::Or => enforce_or(cs, resolved_left, resolved_right, span), + BinaryOperation::And => enforce_and(cs, resolved_left, resolved_right, span), BinaryOperation::Eq => evaluate_eq(cs, resolved_left, resolved_right, span), - BinaryOperation::Ne => evaluate_not(evaluate_eq(cs, resolved_left, resolved_right, span)?, span) - .map_err(LeoError::from(CompilerError::BooleanError)), + BinaryOperation::Ne => evaluate_not(evaluate_eq(cs, resolved_left, resolved_right, span)?, span), BinaryOperation::Ge => evaluate_ge(cs, resolved_left, resolved_right, span), BinaryOperation::Gt => evaluate_gt(cs, resolved_left, resolved_right, span), BinaryOperation::Le => evaluate_le(cs, resolved_left, resolved_right, span), diff --git a/compiler/src/expression/function/function.rs b/compiler/src/expression/function/function.rs index e71f41562d..c505b9f761 100644 --- a/compiler/src/expression/function/function.rs +++ b/compiler/src/expression/function/function.rs @@ -20,7 +20,7 @@ use std::cell::Cell; use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::{Expression, Function}; -use leo_errors::{CompilerError, LeoError, Span}; +use leo_errors::{LeoError, Span}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -44,9 +44,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { ) }; - let return_value = self - .enforce_function(&mut cs.ns(name_unique), &function, target, arguments) - .map_err(|error| LeoError::from(CompilerError::from(Box::new(error))))?; + let return_value = self.enforce_function(&mut cs.ns(name_unique), &function, target, arguments)?; Ok(return_value) } diff --git a/compiler/src/expression/logical/and.rs b/compiler/src/expression/logical/and.rs index 25c178eec8..e4a3400345 100644 --- a/compiler/src/expression/logical/and.rs +++ b/compiler/src/expression/logical/and.rs @@ -19,6 +19,7 @@ use crate::{value::ConstrainedValue, GroupType}; use leo_errors::{CompilerError, LeoError, Span}; +use eyre::eyre; use snarkvm_fields::PrimeField; use snarkvm_gadgets::boolean::Boolean; use snarkvm_r1cs::ConstraintSystem; @@ -37,10 +38,16 @@ pub fn enforce_and<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( &left_bool, &right_bool, ) - .map_err(|e| LeoError::from(CompilerError::cannot_enforce("&&".to_string(), e, span)))?; + .map_err(|e| { + LeoError::from(CompilerError::cannot_enforce_expression( + "&&".to_string(), + eyre!(e), + span, + )) + })?; return Ok(ConstrainedValue::Boolean(result)); } - Err(LeoError::from(CompilerError::cannot_evaluate(name, span))) + Err(LeoError::from(CompilerError::cannot_evaluate_expression(name, span))) } diff --git a/compiler/src/expression/logical/not.rs b/compiler/src/expression/logical/not.rs index a8b094bb64..8838ff5d97 100644 --- a/compiler/src/expression/logical/not.rs +++ b/compiler/src/expression/logical/not.rs @@ -27,6 +27,9 @@ pub fn evaluate_not<'a, F: PrimeField, G: GroupType>( ) -> Result, LeoError> { match value { ConstrainedValue::Boolean(boolean) => Ok(ConstrainedValue::Boolean(boolean.not())), - value => Err(LeoError::from(CompilerError::cannot_evaluate(format!("!{}", value), span)),) + value => Err(LeoError::from(CompilerError::cannot_evaluate_expression( + format!("!{}", value), + span, + ))), } } diff --git a/compiler/src/expression/logical/or.rs b/compiler/src/expression/logical/or.rs index 638a0b6608..799b15f8d2 100644 --- a/compiler/src/expression/logical/or.rs +++ b/compiler/src/expression/logical/or.rs @@ -19,6 +19,7 @@ use crate::{value::ConstrainedValue, GroupType}; use leo_errors::{CompilerError, LeoError, Span}; +use eyre::eyre; use snarkvm_fields::PrimeField; use snarkvm_gadgets::boolean::Boolean; use snarkvm_r1cs::ConstraintSystem; @@ -37,10 +38,16 @@ pub fn enforce_or<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( &left_bool, &right_bool, ) - .map_err(|e| LeoError::from(CompilerError::cannot_enforce("||".to_string(), e, span)))?; + .map_err(|e| { + LeoError::from(CompilerError::cannot_enforce_expression( + "||".to_string(), + eyre!(e), + span, + )) + })?; return Ok(ConstrainedValue::Boolean(result)); } - Err(LeoError::from(CompilerError::cannot_evaluate(name, span))) + Err(LeoError::from(CompilerError::cannot_evaluate_expression(name, span))) } diff --git a/compiler/src/expression/relational/eq.rs b/compiler/src/expression/relational/eq.rs index 52a2318c2c..c833523b9c 100644 --- a/compiler/src/expression/relational/eq.rs +++ b/compiler/src/expression/relational/eq.rs @@ -75,14 +75,14 @@ pub fn evaluate_eq<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( return Ok(current); } (val_1, val_2) => { - return Err(LeoError::from(CompilerError::incompatible_types( - format!("{} == {}", val_1, val_2,), - span, - ))); + return Err(CompilerError::incompatible_types(format!("{} == {}", val_1, val_2,), span).into()); } }; - let boolean = constraint_result.map_err(|_| LeoError::from(CompilerError::cannot_evaluate("==".to_string(), span)))?; + let boolean = match constraint_result { + Ok(boolean) => boolean, + _ => return Err(CompilerError::cannot_evaluate_expression("==".to_string(), span).into()), + }; Ok(ConstrainedValue::Boolean(boolean)) } diff --git a/compiler/src/expression/relational/ge.rs b/compiler/src/expression/relational/ge.rs index 261caabf2c..c1443bd33d 100644 --- a/compiler/src/expression/relational/ge.rs +++ b/compiler/src/expression/relational/ge.rs @@ -42,7 +42,8 @@ pub fn evaluate_ge<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( } }; - let boolean = constraint_result.map_err(|_| LeoError::from(CompilerError::cannot_evaluate(">=".to_string(), span)))?; + let boolean = constraint_result + .map_err(|_| LeoError::from(CompilerError::cannot_evaluate_expression(">=".to_string(), span)))?; Ok(ConstrainedValue::Boolean(boolean)) } diff --git a/compiler/src/expression/relational/gt.rs b/compiler/src/expression/relational/gt.rs index 079fcb94e9..8d51d6b45c 100644 --- a/compiler/src/expression/relational/gt.rs +++ b/compiler/src/expression/relational/gt.rs @@ -42,7 +42,8 @@ pub fn evaluate_gt<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( } }; - let boolean = constraint_result.map_err(|_| LeoError::from(CompilerError::cannot_evaluate(">".to_string(), span)))?; + let boolean = constraint_result + .map_err(|_| LeoError::from(CompilerError::cannot_evaluate_expression(">".to_string(), span)))?; Ok(ConstrainedValue::Boolean(boolean)) } diff --git a/compiler/src/expression/relational/le.rs b/compiler/src/expression/relational/le.rs index ef6ea15dc1..0e10eb172a 100644 --- a/compiler/src/expression/relational/le.rs +++ b/compiler/src/expression/relational/le.rs @@ -42,7 +42,8 @@ pub fn evaluate_le<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( } }; - let boolean = constraint_result.map_err(|_| LeoError::from(CompilerError::cannot_evaluate("<=".to_string(), span)))?; + let boolean = constraint_result + .map_err(|_| LeoError::from(CompilerError::cannot_evaluate_expression("<=".to_string(), span)))?; Ok(ConstrainedValue::Boolean(boolean)) } diff --git a/compiler/src/expression/relational/lt.rs b/compiler/src/expression/relational/lt.rs index 96308fee52..475a5ad84d 100644 --- a/compiler/src/expression/relational/lt.rs +++ b/compiler/src/expression/relational/lt.rs @@ -42,7 +42,8 @@ pub fn evaluate_lt<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( } }; - let boolean = constraint_result.map_err(|_| LeoError::from(CompilerError::cannot_evaluate("<".to_string(), span)))?; + let boolean = constraint_result + .map_err(|_| LeoError::from(CompilerError::cannot_evaluate_expression("<".to_string(), span)))?; Ok(ConstrainedValue::Boolean(boolean)) } diff --git a/compiler/src/expression/tuple/access.rs b/compiler/src/expression/tuple/access.rs index 6552b98a1b..66022e0baf 100644 --- a/compiler/src/expression/tuple/access.rs +++ b/compiler/src/expression/tuple/access.rs @@ -20,7 +20,6 @@ use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::Expression; use leo_errors::{CompilerError, LeoError, Span}; - use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; diff --git a/compiler/src/expression/tuple/tuple.rs b/compiler/src/expression/tuple/tuple.rs index 772a9d72d2..c707080460 100644 --- a/compiler/src/expression/tuple/tuple.rs +++ b/compiler/src/expression/tuple/tuple.rs @@ -22,7 +22,6 @@ use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::Expression; use leo_errors::LeoError; - use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; diff --git a/compiler/src/expression/variable_ref/variable_ref.rs b/compiler/src/expression/variable_ref/variable_ref.rs index 6c0ee2233b..26bd081f41 100644 --- a/compiler/src/expression/variable_ref/variable_ref.rs +++ b/compiler/src/expression/variable_ref/variable_ref.rs @@ -20,19 +20,23 @@ use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::VariableRef; use leo_errors::{CompilerError, LeoError}; - use snarkvm_fields::PrimeField; impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { /// Enforce a variable expression by getting the resolved value pub fn evaluate_ref(&mut self, variable_ref: &VariableRef) -> Result, LeoError> { // Evaluate the identifier name in the current function scope + let span = variable_ref.span.as_ref(); let variable = variable_ref.variable.borrow(); let result_value = if let Some(value) = self.get(variable.id) { value.clone() } else { - return Err(LeoError::from(CompilerError::undefined_identifier(variable.name.clone()))); + // TODO fix unwrap here. + return Err(LeoError::from(CompilerError::undefined_identifier( + &variable.name.clone().name, + span.unwrap(), + ))); // todo: probably can be a panic here instead }; diff --git a/compiler/src/function/function.rs b/compiler/src/function/function.rs index 6c9ac81dbb..501507badb 100644 --- a/compiler/src/function/function.rs +++ b/compiler/src/function/function.rs @@ -16,9 +16,10 @@ //! Enforces constraints on a function in a compiled Leo program. -use crate::{errors::FunctionError, program::ConstrainedProgram, value::ConstrainedValue, GroupType}; +use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::{Expression, Function, FunctionQualifier}; +use leo_errors::{CompilerError, LeoError}; use std::cell::Cell; use snarkvm_fields::PrimeField; @@ -47,10 +48,12 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { }; if function.arguments.len() != arguments.len() { - return Err(LeoError::from(CompilerError::input_not_found() + return Err(CompilerError::function_input_not_found( + function.name.borrow().name.to_string(), "arguments length invalid".to_string(), &function.span.clone().unwrap_or_default(), - )); + ) + .into()); } // Store input values as new variables in resolved program @@ -90,6 +93,5 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { // Conditionally select a result based on returned indicators Self::conditionally_select_result(cs, &output, results, &function.span.clone().unwrap_or_default()) - .map_err(LeoError::from(CompilerError::StatementError)) } } diff --git a/compiler/src/function/input/array.rs b/compiler/src/function/input/array.rs index a78ffbd718..3b346a83c6 100644 --- a/compiler/src/function/input/array.rs +++ b/compiler/src/function/input/array.rs @@ -70,7 +70,10 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { } } _ => { - return Err(LeoError::from(CompilerError::invalid_array(input_value.unwrap().to_string(), span))); + return Err(LeoError::from(CompilerError::invalid_function_input_array( + input_value.unwrap().to_string(), + span, + ))); } } diff --git a/compiler/src/function/input/input_keyword.rs b/compiler/src/function/input/input_keyword.rs index bf5d4a98be..a7d3dfd8f2 100644 --- a/compiler/src/function/input/input_keyword.rs +++ b/compiler/src/function/input/input_keyword.rs @@ -19,7 +19,6 @@ use leo_asg::{Circuit, CircuitMember, Type}; use leo_ast::{Identifier, Input}; use leo_errors::{LeoError, Span}; - use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; diff --git a/compiler/src/function/input/input_section.rs b/compiler/src/function/input/input_section.rs index 169062c090..47102850ad 100644 --- a/compiler/src/function/input/input_section.rs +++ b/compiler/src/function/input/input_section.rs @@ -19,7 +19,6 @@ use leo_asg::{Circuit, CircuitMember}; use leo_ast::{Identifier, InputValue, Parameter}; use leo_errors::{AsgError, LeoError}; - use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -42,14 +41,13 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { Some(CircuitMember::Variable(inner)) => inner, _ => continue, // present, but unused }; - let declared_type = self.asg.scope.resolve_ast_type(¶meter.type_)?; + let declared_type = self.asg.scope.resolve_ast_type(¶meter.type_, ¶meter.span)?; if !expected_type.is_assignable_from(&declared_type) { return Err(LeoError::from(AsgError::unexpected_type( &expected_type.to_string(), Some(&declared_type.to_string()), &identifier.span, - ) - .into())); + ))); } let member_name = parameter.variable.clone(); let member_value = self.allocate_main_function_input( diff --git a/compiler/src/function/input/main_function_input.rs b/compiler/src/function/input/main_function_input.rs index 9fde6b78d5..72aec024ed 100644 --- a/compiler/src/function/input/main_function_input.rs +++ b/compiler/src/function/input/main_function_input.rs @@ -35,7 +35,6 @@ use leo_asg::{ConstInt, Type}; use leo_ast::{Char, InputValue}; use leo_errors::{CompilerError, LeoError, Span}; - use snarkvm_fields::PrimeField; use snarkvm_gadgets::boolean::Boolean; use snarkvm_r1cs::ConstraintSystem; @@ -79,7 +78,13 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { input_option: Option, span: &Span, ) -> Result, LeoError> { - let input = input_option.ok_or_else(|| LeoError::from(CompilerError::input_not_found(name.to_string(), span)))?; + let input = input_option.ok_or_else(|| { + LeoError::from(CompilerError::function_input_not_found( + "main".to_string(), + name.to_string(), + span, + )) + })?; match (type_, input) { (Type::Address, InputValue::Address(addr)) => Ok(ConstrainedValue::Address(Address::constant(addr, span)?)), @@ -107,7 +112,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let parsed_type = parsed.get_int_type(); let input_type = input_type.into(); if std::mem::discriminant(&parsed_type) != std::mem::discriminant(&input_type) { - return Err(LeoError::from(CompilerError::integer_type_mismatch( + return Err(LeoError::from(CompilerError::integer_value_integer_type_mismatch( input_type.to_string(), parsed_type.to_string(), span, @@ -133,7 +138,11 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { } (Type::Tuple(types), InputValue::Tuple(values)) => { if values.len() != types.len() { - return Err(LeoError::from(CompilerError::tuple_size_mismatch(types.len(), values.len(), span))); + return Err(LeoError::from(CompilerError::input_tuple_size_mismatch( + types.len(), + values.len(), + span, + ))); } Ok(ConstrainedValue::Tuple( @@ -149,7 +158,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { (Type::Circuit(_), _) => unimplemented!("main function input not implemented for type {}", type_), // Should not happen. // Return an error if the input type and input value do not match. - (_, input) => Err(LeoError::from(CompilerError::input_type_mismatch( + (_, input) => Err(LeoError::from(CompilerError::input_variable_type_mismatch( type_.to_string(), input.to_string(), name.to_string(), diff --git a/compiler/src/function/input/tuple.rs b/compiler/src/function/input/tuple.rs index 204d4be89f..1bed0a3d2f 100644 --- a/compiler/src/function/input/tuple.rs +++ b/compiler/src/function/input/tuple.rs @@ -39,7 +39,11 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { match input_value { Some(InputValue::Tuple(values)) => { if values.len() != types.len() { - return Err(LeoError::from(CompilerError::tuple_size_mismatch(types.len(), values.len(), span))); + return Err(LeoError::from(CompilerError::input_tuple_size_mismatch( + types.len(), + values.len(), + span, + ))); } // Allocate each value in the tuple. @@ -58,7 +62,10 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { } } _ => { - return Err(LeoError::from(CompilerError::invalid_tuple(input_value.unwrap().to_string(), span))); + return Err(LeoError::from(CompilerError::invalid_function_input_tuple( + input_value.unwrap().to_string(), + span, + ))); } } diff --git a/compiler/src/function/main_function.rs b/compiler/src/function/main_function.rs index eeed11a946..b9160a57e8 100644 --- a/compiler/src/function/main_function.rs +++ b/compiler/src/function/main_function.rs @@ -16,10 +16,11 @@ //! Enforces constraints on the main function of a compiled Leo program. -use crate::{errors::FunctionError, program::ConstrainedProgram, GroupType, Output}; +use crate::{program::ConstrainedProgram, GroupType, Output}; use leo_asg::{Expression, Function, FunctionQualifier}; use leo_ast::Input; +use leo_errors::{CompilerError, LeoError}; use std::cell::Cell; use snarkvm_fields::PrimeField; @@ -65,10 +66,10 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { ) { // If variable is in both [main] and [constants] sections - error. (_, Some(_), Some(_)) => { - return Err(LeoError::from(CompilerError::double_input_declaration() + return Err(LeoError::from(CompilerError::double_input_declaration( name.to_string(), &input_variable.name.span, - )); + ))); } // If input option is found in [main] section and input is not const. (false, Some(input_option), _) => self.allocate_main_function_input( @@ -88,24 +89,25 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { )?, // Function argument is const, input is not. (true, Some(_), None) => { - return Err(LeoError::from(CompilerError::expected_const_input() + return Err(LeoError::from(CompilerError::expected_const_input_variable( name.to_string(), &input_variable.name.span, - )); + ))); } // Input is const, function argument is not. (false, None, Some(_)) => { - return Err(LeoError::from(CompilerError::expected_non_const_input() + return Err(LeoError::from(CompilerError::expected_non_const_input_variable( name.to_string(), &input_variable.name.span, - )); + ))); } // When not found - Error out. (_, _, _) => { - return Err(LeoError::from(CompilerError::input_not_found() + return Err(LeoError::from(CompilerError::function_input_not_found( + function.name.borrow().name.to_string(), name.to_string(), &input_variable.name.span, - )); + ))); } }; diff --git a/compiler/src/function/mut_target.rs b/compiler/src/function/mut_target.rs index a9a69c26c2..cd2dbc13cd 100644 --- a/compiler/src/function/mut_target.rs +++ b/compiler/src/function/mut_target.rs @@ -18,7 +18,7 @@ use std::cell::Cell; -use crate::{errors::StatementError, program::ConstrainedProgram, value::ConstrainedValue, GroupType}; +use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::{ ArrayAccessExpression, ArrayRangeAccessExpression, @@ -31,6 +31,7 @@ use leo_asg::{ TupleAccessExpression, Variable, }; +use leo_errors::LeoError; use snarkvm_fields::PrimeField; use snarkvm_gadgets::boolean::Boolean; diff --git a/compiler/src/function/result/result.rs b/compiler/src/function/result/result.rs index 2192349103..48d954260c 100644 --- a/compiler/src/function/result/result.rs +++ b/compiler/src/function/result/result.rs @@ -16,15 +16,10 @@ //! Enforces that one return value is produced in a compiled Leo program. -use crate::{ - errors::StatementError, - get_indicator_value, - program::ConstrainedProgram, - value::ConstrainedValue, - GroupType, -}; +use crate::{get_indicator_value, program::ConstrainedProgram, value::ConstrainedValue, GroupType}; -use leo_asg::{Span, Type}; +use leo_asg::Type; +use leo_errors::{CompilerError, LeoError, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::{boolean::Boolean, traits::select::CondSelectGadget}; @@ -60,7 +55,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { if get_indicator_value(&indicator) { // Error if we already have a return value. if return_value.is_some() { - return Err(LeoError::from(CompilerError::multiple_returns(span));) + return Err(CompilerError::statement_multiple_returns(span).into()); } else { // Set the function return value. return_value = Some(result); @@ -84,7 +79,13 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { &result, &value, ) - .map_err(|_| LeoError::from(CompilerError::select_fail(result.to_string(), value.to_string(), span)))?, + .map_err(|_| { + LeoError::from(CompilerError::statement_select_fail( + result.to_string(), + value.to_string(), + span, + )) + })?, ); } else { return_value = Some(result); // we ignore indicator for default -- questionable @@ -94,7 +95,8 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { if expected_return.is_unit() { Ok(ConstrainedValue::Tuple(vec![])) } else { - return_value.ok_or_else(|| LeoError::from(CompilerError::no_returns(&expected_return, span))) + return_value + .ok_or_else(|| LeoError::from(CompilerError::statement_no_returns(expected_return.to_string(), span))) } } } diff --git a/compiler/src/output/mod.rs b/compiler/src/output/mod.rs index 6d10ac741d..9df736a661 100644 --- a/compiler/src/output/mod.rs +++ b/compiler/src/output/mod.rs @@ -106,7 +106,7 @@ impl Output { // Return an error if we do not have enough return registers if register_values.len() < return_values.len() { - return Err(LeoError::from(CompilerError::not_enough_registers(span));) + return Err(LeoError::from(CompilerError::output_not_enough_registers(span))); } let mut registers = BTreeMap::new(); @@ -115,13 +115,13 @@ impl Output { let name = parameter.variable.name; // Check register type == return value type. - let register_type = program.scope.resolve_ast_type(¶meter.type_)?; + let register_type = program.scope.resolve_ast_type(¶meter.type_, ¶meter.span)?; let return_value_type = value.to_type(span)?; if !register_type.is_assignable_from(&return_value_type) { - return Err(LeoError::from(CompilerError::mismatched_output_types( - ®ister_type, - &return_value_type, + return Err(LeoError::from(CompilerError::output_mismatched_types( + register_type.to_string(), + return_value_type.to_string(), span, ))); } diff --git a/compiler/src/output/output_bytes.rs b/compiler/src/output/output_bytes.rs index 07f8af6644..66ae4f8ccc 100644 --- a/compiler/src/output/output_bytes.rs +++ b/compiler/src/output/output_bytes.rs @@ -55,7 +55,7 @@ impl OutputBytes { // Return an error if we do not have enough return registers if register_values.len() < return_values.len() { - return Err(LeoError::from(CompilerError::not_enough_registers(span));) + return Err(LeoError::from(CompilerError::output_not_enough_registers(span))); } // Manually construct result string @@ -69,13 +69,13 @@ impl OutputBytes { let name = parameter.variable.name; // Check register type == return value type. - let register_type = program.scope.resolve_ast_type(¶meter.type_)?; + let register_type = program.scope.resolve_ast_type(¶meter.type_, ¶meter.span)?; let return_value_type = value.to_type(span)?; if !register_type.is_assignable_from(&return_value_type) { - return Err(LeoError::from(CompilerError::mismatched_output_types( - ®ister_type, - &return_value_type, + return Err(LeoError::from(CompilerError::output_mismatched_types( + register_type.to_string(), + return_value_type.to_string(), span, ))); } diff --git a/compiler/src/output/output_file.rs b/compiler/src/output/output_file.rs index 60b4a3b372..b42b23de59 100644 --- a/compiler/src/output/output_file.rs +++ b/compiler/src/output/output_file.rs @@ -18,6 +18,8 @@ use leo_errors::{CompilerError, LeoError}; +use backtrace::Backtrace; +use eyre::eyre; use std::{ borrow::Cow, @@ -47,9 +49,12 @@ impl OutputFile { pub fn write(&self, path: &Path, bytes: &[u8]) -> Result<(), LeoError> { // create output file let path = self.setup_file_path(path); - let mut file = File::create(&path)?; + let mut file = File::create(&path) + .map_err(|e| LeoError::from(CompilerError::output_file_io_error(eyre!(e), Backtrace::new())))?; - Ok(file.write_all(bytes)?) + Ok(file + .write_all(bytes) + .map_err(|e| LeoError::from(CompilerError::output_file_io_error(eyre!(e), Backtrace::new())))?) } /// Removes the output file at the given path if it exists. Returns `true` on success, @@ -60,7 +65,12 @@ impl OutputFile { return Ok(false); } - fs::remove_file(&path).map_err(|_| LeoError::from(CompilerError::FileRemovalError(path.into_owned())))?; + fs::remove_file(&path).map_err(|_| { + LeoError::from(CompilerError::output_file_cannot_remove( + path.into_owned(), + Backtrace::new(), + )) + })?; Ok(true) } diff --git a/compiler/src/phases/phase.rs b/compiler/src/phases/phase.rs index b2c5c65348..69d32849ad 100644 --- a/compiler/src/phases/phase.rs +++ b/compiler/src/phases/phase.rs @@ -21,7 +21,6 @@ use leo_asg::Program as AsgProgram; use leo_ast::{Ast, Program as AstProgram, ReconstructingReducer}; use leo_errors::LeoError; - macro_rules! phase { ($phase_name:ident, $function:item) => { pub struct $phase_name { diff --git a/compiler/src/phases/reducing_director.rs b/compiler/src/phases/reducing_director.rs index 82b8bc6df5..5c1a5d61aa 100644 --- a/compiler/src/phases/reducing_director.rs +++ b/compiler/src/phases/reducing_director.rs @@ -147,11 +147,7 @@ impl CombineAstAsgDirector { self.ast_reducer.reduce_type(ast, new, span) } - pub fn reduce_expression( - &mut self, - ast: &AstExpression, - asg: &AsgExpression, - ) -> Result { + pub fn reduce_expression(&mut self, ast: &AstExpression, asg: &AsgExpression) -> Result { let new = match (ast, asg) { (AstExpression::Value(value), AsgExpression::Constant(const_)) => self.reduce_value(&value, &const_)?, (AstExpression::Binary(ast), AsgExpression::Binary(asg)) => { @@ -613,7 +609,11 @@ impl CombineAstAsgDirector { match &ast.function { AstConsoleFunction::Error(_) => AstConsoleFunction::Error(args), AstConsoleFunction::Log(_) => AstConsoleFunction::Log(args), - _ => return Err(LeoError::from(AstError::impossible_console_assert_call(&ast_console_args.span))), + _ => { + return Err(LeoError::from(AstError::impossible_console_assert_call( + &ast_console_args.span, + ))); + } } } _ => ast.function.clone(), diff --git a/compiler/src/prelude/blake2s.rs b/compiler/src/prelude/blake2s.rs index 5463921f12..328410d27b 100644 --- a/compiler/src/prelude/blake2s.rs +++ b/compiler/src/prelude/blake2s.rs @@ -19,6 +19,7 @@ use crate::{ConstrainedValue, GroupType, Integer}; use leo_asg::Function; use leo_errors::{CompilerError, LeoError, Span}; +use eyre::eyre; use snarkvm_fields::PrimeField; use snarkvm_gadgets::{ algorithms::prf::Blake2sGadget, @@ -62,13 +63,25 @@ impl<'a, F: PrimeField, G: GroupType> CoreCircuit<'a, F, G> for Blake2s { let input = unwrap_argument(arguments.remove(1)); let seed = unwrap_argument(arguments.remove(0)); - let digest = Blake2sGadget::check_evaluation_gadget(cs.ns(|| "blake2s hash"), &seed[..], &input[..]) - .map_err(|e| LeoError::from(CompilerError::cannot_enforce("Blake2s check evaluation gadget".to_owned(), e, span)))?; + let digest = + Blake2sGadget::check_evaluation_gadget(cs.ns(|| "blake2s hash"), &seed[..], &input[..]).map_err(|e| { + LeoError::from(CompilerError::cannot_enforce_expression( + "Blake2s check evaluation gadget".to_owned(), + eyre!(e), + span, + )) + })?; Ok(ConstrainedValue::Array( digest .to_bytes(cs) - .map_err(|e| LeoError::from(CompilerError::cannot_enforce("Vec ToBytes".to_owned(), e, span)))? + .map_err(|e| { + LeoError::from(CompilerError::cannot_enforce_expression( + "Vec ToBytes".to_owned(), + eyre!(e), + span, + )) + })? .into_iter() .map(Integer::U8) .map(ConstrainedValue::Integer) diff --git a/compiler/src/statement/assign/assign.rs b/compiler/src/statement/assign/assign.rs index 68d43ef0e5..3d5349dbf0 100644 --- a/compiler/src/statement/assign/assign.rs +++ b/compiler/src/statement/assign/assign.rs @@ -18,8 +18,7 @@ use crate::{arithmetic::*, program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::{AssignOperation, AssignStatement}; -use leo_errors::{CompilerError, LeoError}; - +use leo_errors::{CompilerError, LeoError, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::{boolean::Boolean, traits::select::CondSelectGadget}; @@ -60,7 +59,13 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { _ => unimplemented!("unimplemented assign operator"), }; let selected_value = ConstrainedValue::conditionally_select(cs.ns(|| scope), condition, &new_value, target) - .map_err(|_| LeoError::from(CompilerError::select_fail(new_value.to_string(), target.to_string(), span)))?; + .map_err(|_| { + LeoError::from(CompilerError::statement_select_fail( + new_value.to_string(), + target.to_string(), + span, + )) + })?; *target = selected_value; Ok(()) diff --git a/compiler/src/statement/assign/assignee/array_index.rs b/compiler/src/statement/assign/assignee/array_index.rs index 7b1fdf94cb..50a49edf24 100644 --- a/compiler/src/statement/assign/assignee/array_index.rs +++ b/compiler/src/statement/assign/assignee/array_index.rs @@ -18,16 +18,11 @@ use std::convert::TryInto; -use crate::{ - program::ConstrainedProgram, - value::ConstrainedValue, - GroupType, - Integer, -}; +use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType, Integer}; use leo_asg::{ConstInt, Expression, Node}; use leo_errors::{CompilerError, LeoError}; - +use eyre::eyre; use snarkvm_fields::PrimeField; use snarkvm_gadgets::traits::{eq::EvaluateEqGadget, select::CondSelectGadget}; use snarkvm_r1cs::ConstraintSystem; @@ -49,7 +44,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { ConstrainedValue::Array(input) => { if let Some(index) = index_resolved.to_usize() { if index >= input.len() { - Err(LeoError::from(CompilerError::array_assign_index_bounds( + Err(LeoError::from(CompilerError::statement_array_assign_index_bounds( index, input.len(), &context.span, @@ -86,7 +81,9 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let const_index = ConstInt::U32(index_bounded).cast_to(&index_resolved.get_type()); let index_comparison = index_resolved .evaluate_equal(eq_namespace, &Integer::new(&const_index)) - .map_err(|_| LeoError::from(CompilerError::cannot_evaluate("==".to_string(), &span)))?; + .map_err(|_| { + LeoError::from(CompilerError::cannot_evaluate_expression("==".to_string(), &span)) + })?; let mut unique_namespace = cs.ns(|| { format!( @@ -119,19 +116,27 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { &temp_item, &item, ) - .map_err(|e| LeoError::from(CompilerError::cannot_enforce("conditional select".to_string(), e, &span)))?; + .map_err(|e| { + LeoError::from(CompilerError::cannot_enforce_expression( + "conditional select".to_string(), + eyre!(e), + &span, + )) + })?; *item = value; } Ok(()) } } - _ => Err(LeoError::from(CompilerError::array_assign_interior_index(&context.span))), + _ => Err(LeoError::from(CompilerError::statement_array_assign_interior_index( + &context.span, + ))), } } else if context.from_range && input_len != 0 { context.from_range = false; if let Some(index) = index_resolved.to_usize() { if index >= input_len { - return Err(LeoError::from(CompilerError::array_assign_index_bounds( + return Err(LeoError::from(CompilerError::statement_array_assign_index_bounds( index, input_len, &context.span, @@ -170,7 +175,9 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let const_index = ConstInt::U32(index_bounded).cast_to(&index_resolved.get_type()); let index_comparison = index_resolved .evaluate_equal(eq_namespace, &Integer::new(&const_index)) - .map_err(|_| LeoError::from(CompilerError::cannot_evaluate("==".to_string(), &span)))?; + .map_err(|_| { + LeoError::from(CompilerError::cannot_evaluate_expression("==".to_string(), &span)) + })?; let mut unique_namespace = cs.ns(|| { format!( @@ -199,13 +206,21 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { }; let value = ConstrainedValue::conditionally_select(unique_namespace, &index_comparison, &temp_item, &item) - .map_err(|e| LeoError::from(CompilerError::cannot_enforce("conditional select".to_string(), e, &span)))?; + .map_err(|e| { + LeoError::from(CompilerError::cannot_enforce_expression( + "conditional select".to_string(), + eyre!(e), + &span, + )) + })?; **item = value; } Ok(()) } } else { - Err(LeoError::from(CompilerError::array_assign_interior_index(&context.span))) + Err(LeoError::from(CompilerError::statement_array_assign_interior_index( + &context.span, + ))) } } } diff --git a/compiler/src/statement/assign/assignee/array_range_index.rs b/compiler/src/statement/assign/assignee/array_range_index.rs index 511263bbdb..1312becf28 100644 --- a/compiler/src/statement/assign/assignee/array_range_index.rs +++ b/compiler/src/statement/assign/assignee/array_range_index.rs @@ -38,7 +38,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { .transpose()? .map(|x| { x.to_usize() - .ok_or_else(|| LeoError::from(CompilerError::array_assign_index_const(&context.span))) + .ok_or_else(|| LeoError::from(CompilerError::statement_array_assign_index_const(&context.span))) }) .transpose()?; let stop_index = stop @@ -46,7 +46,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { .transpose()? .map(|x| { x.to_usize() - .ok_or_else(|| LeoError::from(CompilerError::array_assign_index_const(&context.span))) + .ok_or_else(|| LeoError::from(CompilerError::statement_array_assign_index_const(&context.span))) }) .transpose()?; let start_index = start_index.unwrap_or(0); @@ -75,7 +75,9 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { } Ok(()) } - _ => Err(LeoError::from(CompilerError::array_assign_index(&context.span)),) + _ => Err(LeoError::from(CompilerError::statement_array_assign_index( + &context.span, + ))), } } else { // range of a range diff --git a/compiler/src/statement/assign/assignee/member.rs b/compiler/src/statement/assign/assignee/member.rs index fe537748f5..4e12879d2d 100644 --- a/compiler/src/statement/assign/assignee/member.rs +++ b/compiler/src/statement/assign/assignee/member.rs @@ -31,7 +31,9 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { name: &Identifier, ) -> Result<(), LeoError> { if context.input.len() != 1 { - return Err(LeoError::from(CompilerError::array_assign_interior_index(&context.span))); + return Err(LeoError::from(CompilerError::statement_array_assign_interior_index( + &context.span, + ))); } match context.input.remove(0) { ConstrainedValue::CircuitExpression(_variable, members) => { @@ -45,7 +47,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { } None => { // Throw an error if the circuit variable does not exist in the circuit - Err(LeoError::from(CompilerError::undefined_circuit_variable( + Err(LeoError::from(CompilerError::statement_undefined_circuit_variable( name.to_string(), &context.span, ))) @@ -53,7 +55,10 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { } } // Throw an error if the circuit definition does not exist in the file - x => Err(LeoError::from(CompilerError::undefined_circuit(x.to_string(), &context.span)),) + x => Err(LeoError::from(CompilerError::undefined_circuit( + x.to_string(), + &context.span, + ))), } } } diff --git a/compiler/src/statement/assign/assignee/mod.rs b/compiler/src/statement/assign/assignee/mod.rs index 9a4b96c153..2500dc7132 100644 --- a/compiler/src/statement/assign/assignee/mod.rs +++ b/compiler/src/statement/assign/assignee/mod.rs @@ -116,16 +116,22 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { span: &Span, ) -> Result<(), LeoError> { if stop_index < start_index { - Err(LeoError::from(CompilerError::array_assign_range_order( + Err(LeoError::from(CompilerError::statement_array_assign_range_order( start_index, stop_index, len, span, ))) } else if start_index > len { - Err(LeoError::from(CompilerError::array_assign_index_bounds(start_index, len, span))) + Err(LeoError::from(CompilerError::statement_array_assign_index_bounds( + start_index, + len, + span, + ))) } else if stop_index > len { - Err(LeoError::from(CompilerError::array_assign_index_bounds(stop_index, len, span))) + Err(LeoError::from(CompilerError::statement_array_assign_index_bounds( + stop_index, len, span, + ))) } else { Ok(()) } diff --git a/compiler/src/statement/assign/assignee/tuple.rs b/compiler/src/statement/assign/assignee/tuple.rs index c0145ab132..150b4ffbe6 100644 --- a/compiler/src/statement/assign/assignee/tuple.rs +++ b/compiler/src/statement/assign/assignee/tuple.rs @@ -30,12 +30,14 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { index: usize, ) -> Result<(), LeoError> { if context.input.len() != 1 { - return Err(LeoError::from(CompilerError::array_assign_interior_index(&context.span))); + return Err(LeoError::from(CompilerError::statement_array_assign_interior_index( + &context.span, + ))); } match context.input.remove(0) { ConstrainedValue::Tuple(old) => { if index > old.len() { - Err(LeoError::from(CompilerError::tuple_assign_index_bounds( + Err(LeoError::from(CompilerError::statement_tuple_assign_index_bounds( index, old.len(), &context.span, @@ -45,7 +47,9 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { self.resolve_target_access(cs, context) } } - _ => Err(LeoError::from(CompilerError::tuple_assign_index(&context.span))), + _ => Err(LeoError::from(CompilerError::statement_tuple_assign_index( + &context.span, + ))), } } } diff --git a/compiler/src/statement/conditional/conditional.rs b/compiler/src/statement/conditional/conditional.rs index 48169b42a4..957d13efaa 100644 --- a/compiler/src/statement/conditional/conditional.rs +++ b/compiler/src/statement/conditional/conditional.rs @@ -26,7 +26,6 @@ use crate::{ use leo_asg::ConditionalStatement; use leo_errors::{CompilerError, LeoError}; - use snarkvm_fields::PrimeField; use snarkvm_gadgets::boolean::Boolean; use snarkvm_r1cs::ConstraintSystem; @@ -58,7 +57,9 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let inner_indicator = match self.enforce_expression(cs, statement.condition.get())? { ConstrainedValue::Boolean(resolved) => resolved, value => { - return Err(LeoError::from(CompilerError::conditional_boolean(value.to_string(), &span))); + return Err(LeoError::from( + CompilerError::conditional_boolean_expression_fails_to_resolve_to_bool(value.to_string(), &span), + )); } }; @@ -74,7 +75,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { outer_indicator, &inner_indicator, ) - .map_err(|_| LeoError::from(CompilerError::indicator_calculation(branch_1_name, &span)))?; + .map_err(|_| LeoError::from(CompilerError::statement_indicator_calculation(branch_1_name, &span)))?; let mut results = vec![]; @@ -95,7 +96,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { &outer_indicator, &inner_indicator, ) - .map_err(|_| LeoError::from(CompilerError::indicator_calculation(branch_2_name, &span)))?; + .map_err(|_| LeoError::from(CompilerError::statement_indicator_calculation(branch_2_name, &span)))?; // Evaluate branch 2 let mut branch_2_result = match statement.next.get() { diff --git a/compiler/src/statement/definition/definition.rs b/compiler/src/statement/definition/definition.rs index 5c2fea7467..a84c0d09d3 100644 --- a/compiler/src/statement/definition/definition.rs +++ b/compiler/src/statement/definition/definition.rs @@ -31,7 +31,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { span: &Span, ) -> Result<(), LeoError> { if values.len() != variable_names.len() { - return Err(LeoError::from(CompilerError::invalid_number_of_definitions( + return Err(LeoError::from(CompilerError::statement_invalid_number_of_definitions( values.len(), variable_names.len(), span, @@ -64,7 +64,12 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let values = match expression { // ConstrainedValue::Return(values) => values, ConstrainedValue::Tuple(values) => values, - value => return Err(LeoError::from(CompilerError::multiple_definition(value.to_string(), &span))), + value => { + return Err(LeoError::from(CompilerError::statement_multiple_definition( + value.to_string(), + &span, + ))); + } }; self.enforce_multiple_definition(&statement.variables[..], values, &span) diff --git a/compiler/src/statement/iteration/iteration.rs b/compiler/src/statement/iteration/iteration.rs index b2f9b0df67..16bcd2e5da 100644 --- a/compiler/src/statement/iteration/iteration.rs +++ b/compiler/src/statement/iteration/iteration.rs @@ -28,7 +28,6 @@ use crate::{ use leo_asg::IterationStatement; use leo_errors::{CompilerError, LeoError}; - use snarkvm_fields::PrimeField; use snarkvm_gadgets::{boolean::Boolean, integers::uint::UInt32}; use snarkvm_r1cs::ConstraintSystem; @@ -48,11 +47,11 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let from = self .enforce_index(cs, statement.start.get(), &span)? .to_usize() - .ok_or_else(|| LeoError::from(CompilerError::loop_index_const(&span)))?; + .ok_or_else(|| LeoError::from(CompilerError::statement_loop_index_const(&span)))?; let to = self .enforce_index(cs, statement.stop.get(), &span)? .to_usize() - .ok_or_else(|| LeoError::from(CompilerError::loop_index_const(&span)))?; + .ok_or_else(|| LeoError::from(CompilerError::statement_loop_index_const(&span)))?; let iter: Box> = match (from < to, statement.inclusive) { (true, true) => Box::new(from..=to), diff --git a/compiler/src/statement/statement.rs b/compiler/src/statement/statement.rs index 59dca4941b..93462864f4 100644 --- a/compiler/src/statement/statement.rs +++ b/compiler/src/statement/statement.rs @@ -82,7 +82,9 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { } } _ => { - return Err(LeoError::from(CompilerError::unassigned(&statement.span.clone().unwrap_or_default()))); + return Err(LeoError::from(CompilerError::statement_unassigned( + &statement.span.clone().unwrap_or_default(), + ))); } } } diff --git a/compiler/src/test.rs b/compiler/src/test.rs index 5e7965ba43..82f77395e2 100644 --- a/compiler/src/test.rs +++ b/compiler/src/test.rs @@ -28,12 +28,7 @@ use leo_test_framework::{ use serde_yaml::Value; use snarkvm_curves::{bls12_377::Bls12_377, edwards_bls12::Fq}; -use crate::{ - compiler::Compiler, - targets::edwards_bls12::EdwardsGroupType, - AstSnapshotOptions, - Output, -}; +use crate::{compiler::Compiler, targets::edwards_bls12::EdwardsGroupType, AstSnapshotOptions, Output}; pub type EdwardsTestCompiler = Compiler<'static, Fq, EdwardsGroupType>; // pub type EdwardsConstrainedValue = ConstrainedValue<'static, Fq, EdwardsGroupType>; diff --git a/compiler/src/value/address/address.rs b/compiler/src/value/address/address.rs index 0d1fd83185..3733b25f6a 100644 --- a/compiler/src/value/address/address.rs +++ b/compiler/src/value/address/address.rs @@ -18,6 +18,7 @@ use crate::{ConstrainedValue, GroupType, IntegerTrait}; use leo_ast::InputValue; use leo_errors::{CompilerError, LeoError, Span}; +use eyre::eyre; use snarkvm_dpc::{account::Address as AleoAddress, testnet1::instantiated::Components}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::{ @@ -42,7 +43,8 @@ pub struct Address { impl Address { pub(crate) fn constant(address: String, span: &Span) -> Result { - let address = AleoAddress::from_str(&address).map_err(|error| LeoError::from(CompilerError::account_error(error, span)))?; + let address = AleoAddress::from_str(&address) + .map_err(|e| LeoError::from(CompilerError::address_value_account_error(eyre!(e), span)))?; let mut address_bytes = vec![]; address.write_le(&mut address_bytes).unwrap(); @@ -71,7 +73,10 @@ impl Address { if let InputValue::Address(string) = input { Some(string) } else { - return Err(LeoError::from(CompilerError::invalid_address(name.to_owned(), span))); + return Err(LeoError::from(CompilerError::address_value_invalid_address( + name.to_owned(), + span, + ))); } } None => None, @@ -81,7 +86,7 @@ impl Address { cs.ns(|| format!("`{}: address` {}:{}", name, span.line_start, span.col_start)), || address_value.ok_or(SynthesisError::AssignmentMissing), ) - .map_err(|_| LeoError::from(CompilerError::missing_address(span)))?; + .map_err(|_| LeoError::from(CompilerError::address_value_missing_address(span)))?; Ok(ConstrainedValue::Address(address)) } diff --git a/compiler/src/value/boolean/input.rs b/compiler/src/value/boolean/input.rs index c32268db64..3557f95560 100644 --- a/compiler/src/value/boolean/input.rs +++ b/compiler/src/value/boolean/input.rs @@ -20,7 +20,6 @@ use crate::{value::ConstrainedValue, GroupType}; use leo_ast::InputValue; use leo_errors::{CompilerError, LeoError, Span}; - use snarkvm_fields::PrimeField; use snarkvm_gadgets::{boolean::Boolean, traits::alloc::AllocGadget}; use snarkvm_r1cs::{ConstraintSystem, SynthesisError}; @@ -35,7 +34,12 @@ pub(crate) fn allocate_bool>( cs.ns(|| format!("`{}: bool` {}:{}", name, span.line_start, span.col_start)), || option.ok_or(SynthesisError::AssignmentMissing), ) - .map_err(|_| LeoError::from(CompilerError::missing_boolean(format!("{}: bool", name), span))) + .map_err(|_| { + LeoError::from(CompilerError::boolean_value_missing_boolean( + format!("{}: bool", name), + span, + )) + }) } pub(crate) fn bool_from_input<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( @@ -50,7 +54,10 @@ pub(crate) fn bool_from_input<'a, F: PrimeField, G: GroupType, CS: Constraint if let InputValue::Boolean(bool) = input { Some(bool) } else { - return Err(LeoError::from(CompilerError::invalid_boolean(name.to_owned(), span))); + return Err(LeoError::from(CompilerError::boolean_value_invalid_boolean( + name.to_owned(), + span, + ))); } } None => None, diff --git a/compiler/src/value/char/char.rs b/compiler/src/value/char/char.rs index 2835cfc690..ae131e1a97 100644 --- a/compiler/src/value/char/char.rs +++ b/compiler/src/value/char/char.rs @@ -160,7 +160,10 @@ pub(crate) fn char_from_input<'a, F: PrimeField, G: GroupType, CS: Constraint } } } else { - return Err(LeoError::from(CompilerError::invalid_char(input.to_string(), span))); + return Err(LeoError::from(CompilerError::char_value_invalid_char( + input.to_string(), + span, + ))); } } None => (CharType::Scalar(0 as char), None), diff --git a/compiler/src/value/field/field_type.rs b/compiler/src/value/field/field_type.rs index 4f9f836fc7..4e49368370 100644 --- a/compiler/src/value/field/field_type.rs +++ b/compiler/src/value/field/field_type.rs @@ -19,7 +19,7 @@ use crate::number_string_typing; use leo_errors::{CompilerError, LeoError, Span}; - +use eyre::eyre; use snarkvm_fields::PrimeField; use snarkvm_gadgets::{ bits::{ToBitsBEGadget, ToBytesGadget}, @@ -51,60 +51,76 @@ impl FieldType { let number_info = number_string_typing(&string); let value = match number_info { - (number, neg) if neg => { - -F::from_str(&number).map_err(|_| LeoError::from(CompilerError::invalid_field(string.clone(), span)))? - } - (number, _) => F::from_str(&number).map_err(|_| LeoError::from(CompilerError::invalid_field(string.clone(), span)))?, + (number, neg) if neg => -F::from_str(&number) + .map_err(|_| LeoError::from(CompilerError::field_value_invalid_field(string.clone(), span)))?, + (number, _) => F::from_str(&number) + .map_err(|_| LeoError::from(CompilerError::field_value_invalid_field(string.clone(), span)))?, }; - let value = FpGadget::alloc_constant(cs, || Ok(value)).map_err(|_| LeoError::from(CompilerError::invalid_field(string, span)))?; + let value = FpGadget::alloc_constant(cs, || Ok(value)) + .map_err(|_| LeoError::from(CompilerError::field_value_invalid_field(string, span)))?; Ok(FieldType(value)) } /// Returns a new `FieldType` by calling the `FpGadget` `negate` function. pub fn negate>(&self, cs: CS, span: &Span) -> Result { - let result = self.0.negate(cs).map_err(|e| LeoError::from(CompilerError::negate_operation(e, span)))?; + let result = self + .0 + .negate(cs) + .map_err(|e| LeoError::from(CompilerError::field_value_negate_operation(eyre!(e), span)))?; Ok(FieldType(result)) } /// Returns a new `FieldType` by calling the `FpGadget` `add` function. pub fn add>(&self, cs: CS, other: &Self, span: &Span) -> Result { - let value = self - .0 - .add(cs, &other.0) - .map_err(|e| LeoError::from(CompilerError::binary_operation("+".to_string(), e, span)))?; + let value = self.0.add(cs, &other.0).map_err(|e| { + LeoError::from(CompilerError::field_value_binary_operation( + "+".to_string(), + eyre!(e), + span, + )) + })?; Ok(FieldType(value)) } /// Returns a new `FieldType` by calling the `FpGadget` `sub` function. pub fn sub>(&self, cs: CS, other: &Self, span: &Span) -> Result { - let value = self - .0 - .sub(cs, &other.0) - .map_err(|e| LeoError::from(CompilerError::binary_operation("-".to_string(), e, span)))?; + let value = self.0.sub(cs, &other.0).map_err(|e| { + LeoError::from(CompilerError::field_value_binary_operation( + "-".to_string(), + eyre!(e), + span, + )) + })?; Ok(FieldType(value)) } /// Returns a new `FieldType` by calling the `FpGadget` `mul` function. pub fn mul>(&self, cs: CS, other: &Self, span: &Span) -> Result { - let value = self - .0 - .mul(cs, &other.0) - .map_err(|e| LeoError::from(CompilerError::binary_operation("*".to_string(), e, span)))?; + let value = self.0.mul(cs, &other.0).map_err(|e| { + LeoError::from(CompilerError::field_value_binary_operation( + "*".to_string(), + eyre!(e), + span, + )) + })?; Ok(FieldType(value)) } /// Returns a new `FieldType` by calling the `FpGadget` `inverse` function. pub fn inverse>(&self, cs: CS, span: &Span) -> Result { - let value = self - .0 - .inverse(cs) - .map_err(|e| LeoError::from(CompilerError::binary_operation("inv".to_string(), e, span)))?; + let value = self.0.inverse(cs).map_err(|e| { + LeoError::from(CompilerError::field_value_binary_operation( + "inv".to_string(), + eyre!(e), + span, + )) + })?; Ok(FieldType(value)) } diff --git a/compiler/src/value/field/input.rs b/compiler/src/value/field/input.rs index d2f966aaa2..7d71cd1639 100644 --- a/compiler/src/value/field/input.rs +++ b/compiler/src/value/field/input.rs @@ -20,7 +20,6 @@ use crate::{number_string_typing, value::ConstrainedValue, FieldType, GroupType} use leo_ast::InputValue; use leo_errors::{CompilerError, LeoError, Span}; - use snarkvm_fields::PrimeField; use snarkvm_gadgets::traits::alloc::AllocGadget; use snarkvm_r1cs::{ConstraintSystem, SynthesisError}; @@ -41,15 +40,28 @@ pub(crate) fn allocate_field>( || Some(number).ok_or(SynthesisError::AssignmentMissing), ) .map(|value| value.negate(cs, span)) - .map_err(|_| LeoError::from(CompilerError::missing_field(format!("{}: field", name), span)))?, + .map_err(|_| { + LeoError::from(CompilerError::field_value_missing_field( + format!("{}: field", name), + span, + )) + })?, (number, _) => FieldType::alloc( cs.ns(|| format!("`{}: field` {}:{}", name, span.line_start, span.col_start)), || Some(number).ok_or(SynthesisError::AssignmentMissing), ) - .map_err(|_| LeoError::from(CompilerError::missing_field(format!("{}: field", name), span))), + .map_err(|_| { + LeoError::from(CompilerError::field_value_missing_field( + format!("{}: field", name), + span, + )) + }), } } - None => Err(LeoError::from(CompilerError::missing_field(format!("{}: field", name), span))), + None => Err(LeoError::from(CompilerError::field_value_missing_field( + format!("{}: field", name), + span, + ))), } } @@ -65,7 +77,10 @@ pub(crate) fn field_from_input<'a, F: PrimeField, G: GroupType, CS: Constrain if let InputValue::Field(string) = input { Some(string) } else { - return Err(LeoError::from(CompilerError::invalid_field(input.to_string(), span))); + return Err(LeoError::from(CompilerError::field_value_invalid_field( + input.to_string(), + span, + ))); } } None => None, diff --git a/compiler/src/value/group/group_type.rs b/compiler/src/value/group/group_type.rs index 883f604bad..f7e9fb2401 100644 --- a/compiler/src/value/group/group_type.rs +++ b/compiler/src/value/group/group_type.rs @@ -19,7 +19,6 @@ use leo_asg::GroupValue; use leo_errors::{LeoError, Span}; - use snarkvm_fields::{Field, One}; use snarkvm_gadgets::{ bits::{ToBitsBEGadget, ToBytesGadget}, diff --git a/compiler/src/value/group/input.rs b/compiler/src/value/group/input.rs index bc11f54232..f8684f864a 100644 --- a/compiler/src/value/group/input.rs +++ b/compiler/src/value/group/input.rs @@ -21,7 +21,6 @@ use leo_asg::GroupValue; use leo_ast::InputValue; use leo_errors::{CompilerError, LeoError, Span}; - use snarkvm_fields::PrimeField; use snarkvm_r1cs::{ConstraintSystem, SynthesisError}; @@ -35,7 +34,12 @@ pub(crate) fn allocate_group, CS: ConstraintSyste cs.ns(|| format!("`{}: group` {}:{}", name, span.line_start, span.col_start)), || option.ok_or(SynthesisError::AssignmentMissing), ) - .map_err(|_| LeoError::from(CompilerError::missing_group(format!("{}: group", name), span))) + .map_err(|_| { + LeoError::from(CompilerError::group_value_missing_group( + format!("{}: group", name), + span, + )) + }) } pub(crate) fn group_from_input<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( @@ -50,7 +54,10 @@ pub(crate) fn group_from_input<'a, F: PrimeField, G: GroupType, CS: Constrain if let InputValue::Group(string) = input { Some(string) } else { - return Err(LeoError::from(CompilerError::invalid_group(input.to_string(), span))); + return Err(LeoError::from(CompilerError::group_value_missing_group( + input.to_string(), + span, + ))); } } None => None, diff --git a/compiler/src/value/group/targets/edwards_bls12.rs b/compiler/src/value/group/targets/edwards_bls12.rs index 0d334a706f..e136747082 100644 --- a/compiler/src/value/group/targets/edwards_bls12.rs +++ b/compiler/src/value/group/targets/edwards_bls12.rs @@ -18,6 +18,7 @@ use crate::{number_string_typing, GroupType}; use leo_asg::{GroupCoordinate, GroupValue}; use leo_errors::{CompilerError, LeoError, Span}; +use eyre::eyre; use snarkvm_curves::{ edwards_bls12::{EdwardsAffine, EdwardsParameters, Fq}, templates::twisted_edwards_extended::Affine, @@ -53,31 +54,31 @@ pub enum EdwardsGroupType { } impl GroupType for EdwardsGroupType { - fn constant(group: &GroupValue, span: &Span) -> Result { + fn constant(group: &GroupValue, span: &Span) -> Result { let value = Self::edwards_affine_from_value(group, span)?; Ok(EdwardsGroupType::Constant(value)) } - fn to_allocated>(&self, mut cs: CS, span: &Span) -> Result { + fn to_allocated>(&self, mut cs: CS, span: &Span) -> Result { self.allocated(cs.ns(|| format!("allocate affine point {}:{}", span.line_start, span.col_start))) .map(|ebg| EdwardsGroupType::Allocated(Box::new(ebg))) - .map_err(|error| LeoError::from(CompilerError::synthesis_error(error, span))) + .map_err(|e| LeoError::from(CompilerError::group_value_synthesis_error(eyre!(e), span))) } - fn negate>(&self, cs: CS, span: &Span) -> Result { + fn negate>(&self, cs: CS, span: &Span) -> Result { match self { EdwardsGroupType::Constant(group) => Ok(EdwardsGroupType::Constant(group.neg())), EdwardsGroupType::Allocated(group) => { let result = , Fq>>::negate(group, cs) - .map_err(|e| LeoError::from(CompilerError::negate_operation(e, span)))?; + .map_err(|e| LeoError::from(CompilerError::group_value_negate_operation(eyre!(e), span)))?; Ok(EdwardsGroupType::Allocated(Box::new(result))) } } } - fn add>(&self, cs: CS, other: &Self, span: &Span) -> Result { + fn add>(&self, cs: CS, other: &Self, span: &Span) -> Result { match (self, other) { (EdwardsGroupType::Constant(self_value), EdwardsGroupType::Constant(other_value)) => { Ok(EdwardsGroupType::Constant(self_value.add(other_value))) @@ -89,7 +90,13 @@ impl GroupType for EdwardsGroupType { cs, other_value, ) - .map_err(|e| LeoError::from(CompilerError::binary_operation("+".to_string(), e, span)))?; + .map_err(|e| { + LeoError::from(CompilerError::group_value_binary_operation( + "+".to_string(), + eyre!(e), + span, + )) + })?; Ok(EdwardsGroupType::Allocated(Box::new(result))) } @@ -97,15 +104,19 @@ impl GroupType for EdwardsGroupType { (EdwardsGroupType::Constant(constant_value), EdwardsGroupType::Allocated(allocated_value)) | (EdwardsGroupType::Allocated(allocated_value), EdwardsGroupType::Constant(constant_value)) => { Ok(EdwardsGroupType::Allocated(Box::new( - allocated_value - .add_constant(cs, constant_value) - .map_err(|e| LeoError::from(CompilerError::binary_operation("+".to_string(), e, span)))?, + allocated_value.add_constant(cs, constant_value).map_err(|e| { + LeoError::from(CompilerError::group_value_binary_operation( + "+".to_string(), + eyre!(e), + span, + )) + })?, ))) } } } - fn sub>(&self, cs: CS, other: &Self, span: &Span) -> Result { + fn sub>(&self, cs: CS, other: &Self, span: &Span) -> Result { match (self, other) { (EdwardsGroupType::Constant(self_value), EdwardsGroupType::Constant(other_value)) => { Ok(EdwardsGroupType::Constant(self_value.sub(other_value))) @@ -117,7 +128,13 @@ impl GroupType for EdwardsGroupType { cs, other_value, ) - .map_err(|e| LeoError::from(CompilerError::binary_operation("-".to_string(), e, span)))?; + .map_err(|e| { + LeoError::from(CompilerError::group_value_binary_operation( + "-".to_string(), + eyre!(e), + span, + )) + })?; Ok(EdwardsGroupType::Allocated(Box::new(result))) } @@ -125,9 +142,13 @@ impl GroupType for EdwardsGroupType { (EdwardsGroupType::Constant(constant_value), EdwardsGroupType::Allocated(allocated_value)) | (EdwardsGroupType::Allocated(allocated_value), EdwardsGroupType::Constant(constant_value)) => { Ok(EdwardsGroupType::Allocated(Box::new( - allocated_value - .sub_constant(cs, constant_value) - .map_err(|e| LeoError::from(CompilerError::binary_operation("-".to_string(), e, span)))?, + allocated_value.sub_constant(cs, constant_value).map_err(|e| { + LeoError::from(CompilerError::group_value_binary_operation( + "-".to_string(), + eyre!(e), + span, + )) + })?, ))) } } @@ -135,14 +156,14 @@ impl GroupType for EdwardsGroupType { } impl EdwardsGroupType { - pub fn edwards_affine_from_value(value: &GroupValue, span: &Span) -> Result { + pub fn edwards_affine_from_value(value: &GroupValue, span: &Span) -> Result { match value { GroupValue::Single(number, ..) => Self::edwards_affine_from_single(number, span), GroupValue::Tuple(x, y) => Self::edwards_affine_from_tuple(x, y, span), } } - pub fn edwards_affine_from_single(number: &str, span: &Span) -> Result { + pub fn edwards_affine_from_single(number: &str, span: &Span) -> Result { let number_info = number_string_typing(number); if number_info.0.eq("0") { @@ -150,8 +171,10 @@ impl EdwardsGroupType { } else { let one = edwards_affine_one(); let number_value = match number_info { - (number, neg) if neg => -Fp256::from_str(&number).map_err(|_| LeoError::from(CompilerError::n_group(number, span)))?, - (number, _) => Fp256::from_str(&number).map_err(|_| LeoError::from(CompilerError::n_group(number, span)))?, + (number, neg) if neg => -Fp256::from_str(&number) + .map_err(|_| LeoError::from(CompilerError::group_value_n_group(number, span)))?, + (number, _) => Fp256::from_str(&number) + .map_err(|_| LeoError::from(CompilerError::group_value_n_group(number, span)))?, }; let result: EdwardsAffine = one.mul(number_value); @@ -164,7 +187,7 @@ impl EdwardsGroupType { x: &GroupCoordinate, y: &GroupCoordinate, span: &Span, - ) -> Result { + ) -> Result { let x = x.clone(); let y = y.clone(); @@ -202,7 +225,10 @@ impl EdwardsGroupType { Self::edwards_affine_from_y_str(number_string_typing(&y_string), span, None, span) } // Invalid - (x, y) => Err(LeoError::from(CompilerError::invalid_group(format!("({}, {})", x, y), span)),) + (x, y) => Err(LeoError::from(CompilerError::group_value_invalid_group( + format!("({}, {})", x, y), + span, + ))), } } @@ -211,17 +237,19 @@ impl EdwardsGroupType { x_span: &Span, greatest: Option, element_span: &Span, - ) -> Result { + ) -> Result { let x = match x_info { - (x_str, neg) if neg => -Fq::from_str(&x_str).map_err(|_| LeoError::from(CompilerError::x_invalid(x_str, x_span)))?, - (x_str, _) => Fq::from_str(&x_str).map_err(|_| LeoError::from(CompilerError::x_invalid(x_str, x_span)))?, + (x_str, neg) if neg => -Fq::from_str(&x_str) + .map_err(|_| LeoError::from(CompilerError::group_value_x_invalid(x_str, x_span)))?, + (x_str, _) => { + Fq::from_str(&x_str).map_err(|_| LeoError::from(CompilerError::group_value_x_invalid(x_str, x_span)))? + } }; match greatest { // Sign provided - Some(greatest) => { - EdwardsAffine::from_x_coordinate(x, greatest).ok_or_else(|| LeoError::from(CompilerError::x_recover(element_span))) - } + Some(greatest) => EdwardsAffine::from_x_coordinate(x, greatest) + .ok_or_else(|| LeoError::from(CompilerError::group_value_x_recover(element_span))), // Sign inferred None => { // Attempt to recover with a sign_low bit. @@ -235,7 +263,7 @@ impl EdwardsGroupType { } // Otherwise return error. - Err(LeoError::from(CompilerError::x_recover(element_span))) + Err(LeoError::from(CompilerError::group_value_x_recover(element_span))) } } } @@ -245,17 +273,19 @@ impl EdwardsGroupType { y_span: &Span, greatest: Option, element_span: &Span, - ) -> Result { + ) -> Result { let y = match y_info { - (y_str, neg) if neg => -Fq::from_str(&y_str).map_err(|_| LeoError::from(CompilerError::y_invalid(y_str, y_span)))?, - (y_str, _) => Fq::from_str(&y_str).map_err(|_| LeoError::from(CompilerError::y_invalid(y_str, y_span)))?, + (y_str, neg) if neg => -Fq::from_str(&y_str) + .map_err(|_| LeoError::from(CompilerError::group_value_y_invalid(y_str, y_span)))?, + (y_str, _) => { + Fq::from_str(&y_str).map_err(|_| LeoError::from(CompilerError::group_value_y_invalid(y_str, y_span)))? + } }; match greatest { // Sign provided - Some(greatest) => { - EdwardsAffine::from_y_coordinate(y, greatest).ok_or_else(|| LeoError::from(CompilerError::y_recover(element_span))) - } + Some(greatest) => EdwardsAffine::from_y_coordinate(y, greatest) + .ok_or_else(|| LeoError::from(CompilerError::group_value_y_recover(element_span))), // Sign inferred None => { // Attempt to recover with a sign_low bit. @@ -269,7 +299,7 @@ impl EdwardsGroupType { } // Otherwise return error. - Err(LeoError::from(CompilerError::y_recover(element_span))) + Err(LeoError::from(CompilerError::group_value_y_recover(element_span))) } } } @@ -280,19 +310,19 @@ impl EdwardsGroupType { x_span: &Span, y_span: &Span, element_span: &Span, - ) -> Result { + ) -> Result { let x = match x_info { - (x_str, neg) if neg => { - -Fq::from_str(&x_str).map_err(|_| LeoError::from(CompilerError::x_invalid(x_str.to_string(), x_span)))? - } - (x_str, _) => Fq::from_str(&x_str).map_err(|_| LeoError::from(CompilerError::x_invalid(x_str.to_string(), x_span)))?, + (x_str, neg) if neg => -Fq::from_str(&x_str) + .map_err(|_| LeoError::from(CompilerError::group_value_x_invalid(x_str.to_string(), x_span)))?, + (x_str, _) => Fq::from_str(&x_str) + .map_err(|_| LeoError::from(CompilerError::group_value_x_invalid(x_str.to_string(), x_span)))?, }; let y = match y_info { - (y_str, neg) if neg => { - -Fq::from_str(&y_str).map_err(|_| LeoError::from(CompilerError::y_invalid(y_str.to_string(), y_span)))? - } - (y_str, _) => Fq::from_str(&y_str).map_err(|_| LeoError::from(CompilerError::y_invalid(y_str.to_string(), y_span)))?, + (y_str, neg) if neg => -Fq::from_str(&y_str) + .map_err(|_| LeoError::from(CompilerError::group_value_y_invalid(y_str.to_string(), y_span)))?, + (y_str, _) => Fq::from_str(&y_str) + .map_err(|_| LeoError::from(CompilerError::group_value_y_invalid(y_str.to_string(), y_span)))?, }; let element = EdwardsAffine::new(x, y); @@ -300,7 +330,10 @@ impl EdwardsGroupType { if element.is_on_curve() { Ok(element) } else { - Err(LeoError::from(CompilerError::not_on_curve(element.to_string(), element_span))) + Err(LeoError::from(CompilerError::group_value_not_on_curve( + element.to_string(), + element_span, + ))) } } diff --git a/compiler/src/value/integer/integer.rs b/compiler/src/value/integer/integer.rs index 6a6cf2f918..1a1ffb3f2e 100644 --- a/compiler/src/value/integer/integer.rs +++ b/compiler/src/value/integer/integer.rs @@ -20,6 +20,7 @@ use leo_asg::{ConstInt, IntegerType}; use leo_ast::InputValue; use leo_errors::{CompilerError, LeoError, Span}; +use eyre::eyre; use snarkvm_fields::{Field, PrimeField}; use snarkvm_gadgets::{ boolean::Boolean, @@ -161,7 +162,7 @@ impl Integer { if let InputValue::Integer(type_, number) = input { let asg_type = IntegerType::from(type_); if std::mem::discriminant(&asg_type) != std::mem::discriminant(integer_type) { - return Err(LeoError::from(CompilerError::integer_type_mismatch( + return Err(LeoError::from(CompilerError::integer_value_integer_type_mismatch( integer_type.to_string(), asg_type.to_string(), span, @@ -169,7 +170,10 @@ impl Integer { } Some(number) } else { - return Err(LeoError::from(CompilerError::invalid_integer(input.to_string(), span))); + return Err(LeoError::from(CompilerError::integer_value_invalid_integer( + input.to_string(), + span, + ))); } } None => None, @@ -178,18 +182,14 @@ impl Integer { Self::allocate_type(cs, integer_type, name, option, span) } - pub fn negate>( - self, - cs: &mut CS, - span: &Span, - ) -> Result { + pub fn negate>(self, cs: &mut CS, span: &Span) -> Result { let unique_namespace = format!("enforce -{} {}:{}", self, span.line_start, span.col_start); let a = self; let result = match_signed_integer!(a, span => a.neg(cs.ns(|| unique_namespace))); - result.ok_or_else(|| LeoError::from(CompilerError::invalid_unsigned_negate(span))) + result.ok_or_else(|| LeoError::from(CompilerError::integer_value_negate_operation(span))) } pub fn add>( @@ -205,7 +205,7 @@ impl Integer { let result = match_integers_span!((a, b), span => a.add(cs.ns(|| unique_namespace), &b)); - result.ok_or_else(|| LeoError::from(CompilerError::invalid_integer_binary_operation("+".to_string(), span))) + result.ok_or_else(|| LeoError::from(CompilerError::integer_value_binary_operation("+".to_string(), span))) } pub fn sub>( @@ -221,7 +221,7 @@ impl Integer { let result = match_integers_span!((a, b), span => a.sub(cs.ns(|| unique_namespace), &b)); - result.ok_or_else(|| LeoError::from(CompilerError::invalid_integer_binary_operation("-".to_string(), span))) + result.ok_or_else(|| LeoError::from(CompilerError::integer_value_binary_operation("-".to_string(), span))) } pub fn mul>( @@ -237,7 +237,7 @@ impl Integer { let result = match_integers_span!((a, b), span => a.mul(cs.ns(|| unique_namespace), &b)); - result.ok_or_else(|| LeoError::from(CompilerError::invalid_integer_binary_operation("*".to_string(), span))) + result.ok_or_else(|| LeoError::from(CompilerError::integer_value_binary_operation("*".to_string(), span))) } pub fn div>( @@ -253,7 +253,7 @@ impl Integer { let result = match_integers_span!((a, b), span => a.div(cs.ns(|| unique_namespace), &b)); - result.ok_or_else(|| LeoError::from(CompilerError::invalid_integer_binary_operation("÷".to_string(), span))) + result.ok_or_else(|| LeoError::from(CompilerError::integer_value_binary_operation("÷".to_string(), span))) } pub fn pow>( @@ -269,7 +269,7 @@ impl Integer { let result = match_integers_span!((a, b), span => a.pow(cs.ns(|| unique_namespace), &b)); - result.ok_or_else(|| LeoError::from(CompilerError::invalid_integer_binary_operation("**".to_string(), span))) + result.ok_or_else(|| LeoError::from(CompilerError::integer_value_binary_operation("**".to_string(), span))) } } diff --git a/compiler/src/value/integer/macros.rs b/compiler/src/value/integer/macros.rs index 30449c2bb2..bdaae8c6c6 100644 --- a/compiler/src/value/integer/macros.rs +++ b/compiler/src/value/integer/macros.rs @@ -3,7 +3,7 @@ // The Leo library is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License.to_string(), or +// the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // The Leo library is distributed in the hope that it will be useful, @@ -55,11 +55,31 @@ macro_rules! match_unsigned_integer { macro_rules! match_signed_integer { ($integer: ident, $span: ident => $expression: expr) => { match $integer { - Integer::I8($integer) => Some(Integer::I8($expression.map_err(|e| LeoError::from(CompilerError::signed(e.to_string(), $span)))?)), - Integer::I16($integer) => Some(Integer::I16($expression.map_err(|e| LeoError::from(CompilerError::signed(e.to_string(), $span)))?)), - Integer::I32($integer) => Some(Integer::I32($expression.map_err(|e| LeoError::from(CompilerError::signed(e.to_string(), $span)))?)), - Integer::I64($integer) => Some(Integer::I64($expression.map_err(|e| LeoError::from(CompilerError::signed(e.to_string(), $span)))?)), - Integer::I128($integer) => Some(Integer::I128($expression.map_err(|e| LeoError::from(CompilerError::signed(e.to_string(), $span)))?)), + Integer::I8($integer) => { + Some(Integer::I8($expression.map_err(|e| { + LeoError::from(CompilerError::integer_value_signed(eyre!(e), $span)) + })?)) + } + Integer::I16($integer) => { + Some(Integer::I16($expression.map_err(|e| { + LeoError::from(CompilerError::integer_value_signed(eyre!(e), $span)) + })?)) + } + Integer::I32($integer) => { + Some(Integer::I32($expression.map_err(|e| { + LeoError::from(CompilerError::integer_value_signed(eyre!(e), $span)) + })?)) + } + Integer::I64($integer) => { + Some(Integer::I64($expression.map_err(|e| { + LeoError::from(CompilerError::integer_value_signed(eyre!(e), $span)) + })?)) + } + Integer::I128($integer) => { + Some(Integer::I128($expression.map_err(|e| { + LeoError::from(CompilerError::integer_value_signed(eyre!(e), $span)) + })?)) + } _ => None, } @@ -91,35 +111,55 @@ macro_rules! match_integers_span { (($a: ident, $b: ident), $span: ident => $expression:expr) => { match ($a, $b) { (Integer::U8($a), Integer::U8($b)) => { - Some(Integer::U8($expression.map_err(|e| LeoError::from(CompilerError::unsigned(e.to_string(), $span)))?)) + Some(Integer::U8($expression.map_err(|e| { + LeoError::from(CompilerError::integer_value_unsigned(eyre!(e), $span)) + })?)) } (Integer::U16($a), Integer::U16($b)) => { - Some(Integer::U16($expression.map_err(|e| LeoError::from(CompilerError::unsigned(e.to_string(), $span)))?)) + Some(Integer::U16($expression.map_err(|e| { + LeoError::from(CompilerError::integer_value_unsigned(eyre!(e), $span)) + })?)) } (Integer::U32($a), Integer::U32($b)) => { - Some(Integer::U32($expression.map_err(|e| LeoError::from(CompilerError::unsigned(e.to_string(), $span)))?)) + Some(Integer::U32($expression.map_err(|e| { + LeoError::from(CompilerError::integer_value_unsigned(eyre!(e), $span)) + })?)) } (Integer::U64($a), Integer::U64($b)) => { - Some(Integer::U64($expression.map_err(|e| LeoError::from(CompilerError::unsigned(e.to_string(), $span)))?)) + Some(Integer::U64($expression.map_err(|e| { + LeoError::from(CompilerError::integer_value_unsigned(eyre!(e), $span)) + })?)) + } + (Integer::U128($a), Integer::U128($b)) => { + Some(Integer::U128($expression.map_err(|e| { + LeoError::from(CompilerError::integer_value_unsigned(eyre!(e), $span)) + })?)) } - (Integer::U128($a), Integer::U128($b)) => Some(Integer::U128( - $expression.map_err(|e| LeoError::from(CompilerError::unsigned(e.to_string(), $span)))?, - )), (Integer::I8($a), Integer::I8($b)) => { - Some(Integer::I8($expression.map_err(|e| LeoError::from(CompilerError::signed(e.to_string(), $span)))?)) + Some(Integer::I8($expression.map_err(|e| { + LeoError::from(CompilerError::integer_value_unsigned(eyre!(e), $span)) + })?)) } (Integer::I16($a), Integer::I16($b)) => { - Some(Integer::I16($expression.map_err(|e| LeoError::from(CompilerError::signed(e.to_string(), $span)))?)) + Some(Integer::I16($expression.map_err(|e| { + LeoError::from(CompilerError::integer_value_unsigned(eyre!(e), $span)) + })?)) } (Integer::I32($a), Integer::I32($b)) => { - Some(Integer::I32($expression.map_err(|e| LeoError::from(CompilerError::signed(e.to_string(), $span)))?)) + Some(Integer::I32($expression.map_err(|e| { + LeoError::from(CompilerError::integer_value_unsigned(eyre!(e), $span)) + })?)) } (Integer::I64($a), Integer::I64($b)) => { - Some(Integer::I64($expression.map_err(|e| LeoError::from(CompilerError::signed(e.to_string(), $span)))?)) + Some(Integer::I64($expression.map_err(|e| { + LeoError::from(CompilerError::integer_value_unsigned(eyre!(e), $span)) + })?)) } (Integer::I128($a), Integer::I128($b)) => { - Some(Integer::I128($expression.map_err(|e| LeoError::from(CompilerError::signed(e.to_string(), $span)))?)) + Some(Integer::I128($expression.map_err(|e| { + LeoError::from(CompilerError::integer_value_unsigned(eyre!(e), $span)) + })?)) } (_, _) => None, } @@ -131,7 +171,7 @@ macro_rules! allocate_type { let option = $option .map(|s| { s.parse::<$rust_ty>() - .map_err(|_| LeoError::from(CompilerError::invalid_integer(s, $span))) + .map_err(|_| LeoError::from(CompilerError::integer_value_invalid_integer(s, $span))) }) .transpose()?; @@ -147,7 +187,12 @@ macro_rules! allocate_type { }), || option.ok_or(SynthesisError::AssignmentMissing), ) - .map_err(|_| LeoError::from(CompilerError::missing_integer(format!("{}: {}", $name.to_string(), stringify!($rust_ty)), $span)))?; + .map_err(|_| { + LeoError::from(CompilerError::integer_value_missing_integer( + format!("{}: {}", $name.to_string(), stringify!($rust_ty)), + $span, + )) + })?; $leo_ty(result) }}; diff --git a/compiler/src/value/value.rs b/compiler/src/value/value.rs index 8d7bafb38d..5573dfe28a 100644 --- a/compiler/src/value/value.rs +++ b/compiler/src/value/value.rs @@ -18,8 +18,7 @@ use crate::{Address, Char, FieldType, GroupType, Integer}; use leo_asg::{Circuit, Identifier, Type}; -use leo_errors::{CompilerError, LeoError, Span}; - +use leo_errors::{LeoError, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::{ diff --git a/errors/Cargo.toml b/errors/Cargo.toml index 9e0dc6ea99..c3d2f3a048 100644 --- a/errors/Cargo.toml +++ b/errors/Cargo.toml @@ -17,6 +17,10 @@ include = [ "Cargo.toml", "src", "README.md", "LICENSE.md" ] license = "GPL-3.0" edition = "2018" +[dependencies.leo-input] +path = "../input" +version = "1.5.3" + [dependencies.derivative] version = "2.2.0" diff --git a/errors/src/asg/asg.rs b/errors/src/asg/asg.rs index 41ab7b5879..b2a6b01f66 100644 --- a/errors/src/asg/asg.rs +++ b/errors/src/asg/asg.rs @@ -21,18 +21,21 @@ create_errors!( exit_code_mask: 0u32, error_code_prefix: "G", + @formatted unresolved_circuit { args: (name: &str), msg: format!("failed to resolve circuit: '{}'", name), help: None, } + @formatted unresolved_import { args: (name: &str), msg: format!("failed to resolve import: '{}'", name), help: None, } + @formatted unresolved_circuit_member { args: (circuit_name: &str, name: &str), msg: format!( @@ -42,6 +45,7 @@ create_errors!( help: None, } + @formatted missing_circuit_member { args: (circuit_name: &str, name: &str), msg: format!( @@ -51,6 +55,7 @@ create_errors!( help: None, } + @formatted overridden_circuit_member { args: (circuit_name: &str, name: &str), msg: format!( @@ -60,6 +65,7 @@ create_errors!( help: None, } + @formatted redefined_circuit_member { args: (circuit_name: &str, name: &str), msg: format!( @@ -69,6 +75,7 @@ create_errors!( help: None, } + @formatted extra_circuit_member { args: (circuit_name: &str, name: &str), msg: format!( @@ -78,18 +85,21 @@ create_errors!( help: None, } + @formatted illegal_function_assign { args: (name: &str), msg: format!("attempt to assign to function '{}'", name), help: None, } + @formatted circuit_variable_call { args: (circuit_name: &str, name: &str), msg: format!("cannot call variable member '{}' of circuit '{}'", name, circuit_name), help: None, } + @formatted circuit_static_call_invalid { args: (circuit_name: &str, name: &str), msg: format!( @@ -99,6 +109,7 @@ create_errors!( help: None, } + @formatted circuit_member_mut_call_invalid { args: (circuit_name: &str, name: &str), msg: format!( @@ -108,6 +119,7 @@ create_errors!( help: None, } + @formatted circuit_member_call_invalid { args: (circuit_name: &str, name: &str), msg: format!( @@ -117,6 +129,7 @@ create_errors!( help: None, } + @formatted circuit_function_ref { args: (circuit_name: &str, name: &str), msg: format!( @@ -126,18 +139,21 @@ create_errors!( help: None, } + @formatted index_into_non_array { args: (name: &str), msg: format!("failed to index into non-array '{}'", name), help: None, } - + + @formatted invalid_assign_index { args: (name: &str, num: &str), msg: format!("failed to index array with invalid integer '{}'[{}]", name, num), help: None, } - + + @formatted invalid_backwards_assignment { args: (name: &str, left: usize, right: usize), msg: format!( @@ -147,6 +163,7 @@ create_errors!( help: None, } + @formatted invalid_const_assign { args: (name: &str), msg: format!( @@ -156,66 +173,77 @@ create_errors!( help: None, } + @formatted duplicate_function_definition { args: (name: &str), msg: format!("a function named \"{}\" already exists in this scope", name), help: None, } + @formatted duplicate_variable_definition { args: (name: &str), msg: format!("a variable named \"{}\" already exists in this scope", name), help: None, } + @formatted index_into_non_tuple { args: (name: &str), msg: format!("failed to index into non-tuple '{}'", name), help: None, } + @formatted tuple_index_out_of_bounds { args: (index: usize), msg: format!("tuple index out of bounds: '{}'", index), help: None, } + @formatted array_index_out_of_bounds { args: (index: usize), msg: format!("array index out of bounds: '{}'", index), help: None, } + @formatted ternary_different_types { args: (left: &str, right: &str), msg: format!("ternary sides had different types: left {}, right {}", left, right), help: None, } + @formatted unknown_array_size { args: (), msg: "array size cannot be inferred, add explicit types", help: None, } + @formatted unexpected_call_argument_count { args: (expected: usize, got: usize), msg: format!("function call expected {} arguments, got {}", expected, got), help: None, } + @formatted unresolved_function { args: (name: &str), msg: format!("failed to resolve function: '{}'", name), help: None, } + @formatted unresolved_type { args: (name: &str), msg: format!("failed to resolve type for variable definition '{}'", name), help: None, } + @formatted unexpected_type { args: (expected: &str, received: Option<&str>), msg: format!( @@ -226,108 +254,126 @@ create_errors!( help: None, } + @formatted unexpected_nonconst { args: (), msg: "expected const, found non-const value", help: None, } + @formatted unresolved_reference { args: (name: &str), msg: format!("failed to resolve variable reference '{}'", name), help: None, } + @formatted invalid_boolean { args: (value: &str), msg: format!("failed to parse boolean value '{}'", value), help: None, } + @formatted invalid_char { args: (value: &str), msg: format!("failed to parse char value '{}'", value), help: None, } + @formatted invalid_int { args: (value: &str), msg: format!("failed to parse int value '{}'", value), help: None, } + @formatted unsigned_negation { args: (), msg: "cannot negate unsigned integer", help: None, } + @formatted immutable_assignment { args: (name: &str), msg: format!("illegal assignment to immutable variable '{}'", name), help: None, } + @formatted function_missing_return { args: (name: &str), msg: format!("function '{}' missing return for all paths", name), help: None, } + @formatted function_return_validation { args: (name: &str, description: &str), msg: format!("function '{}' failed to validate return path: '{}'", name, description), help: None, } + @formatted input_ref_needs_type { args: (category: &str, name: &str), msg: format!("could not infer type for input in '{}': '{}'", category, name), help: None, } + @formatted invalid_self_in_global { args: (), - msg: "cannot have `mut self` or `self` arguments in global functions", + msg: "cannot have `mut self` or `self` arguments in global functions", help: None, } + @formatted call_test_function { args: (), msg: "cannot call test function", help: None, } + @formatted circuit_test_function { args: (), msg: "cannot have test function as member of circuit", help: None, } + @formatted parse_index_error { args: (), msg: "failed to parse index", help: None, } + @formatted parse_dimension_error { args: (), msg: "failed to parse dimension", help: None, } + @formatted reference_self_outside_circuit { args: (), msg: "referenced self outside of circuit function", help: None, } + @formatted illegal_ast_structure { args: (details: &str), msg: format!("illegal ast structure: {}", details), help: None, } + @formatted illegal_input_variable_reference { args: (details: &str), msg: format!("illegal ast structure: {}", details), diff --git a/errors/src/asg/mod.rs b/errors/src/asg/mod.rs index ad18104ffa..7aaaf5302f 100644 --- a/errors/src/asg/mod.rs +++ b/errors/src/asg/mod.rs @@ -15,4 +15,4 @@ // along with the Leo library. If not, see . pub mod asg; -pub use self::asg::*; \ No newline at end of file +pub use self::asg::*; diff --git a/errors/src/ast/ast.rs b/errors/src/ast/ast.rs index 0bbf4281eb..3648e92e1c 100644 --- a/errors/src/ast/ast.rs +++ b/errors/src/ast/ast.rs @@ -21,30 +21,35 @@ create_errors!( exit_code_mask: 1000u32, error_code_prefix: "T", + @formatted big_self_outside_of_circuit { args: (), msg: "cannot call keyword `Self` outside of a circuit function", help: None, } + @formatted invalid_array_dimension_size { args: (), msg: "received dimension size of 0, expected it to be 1 or larger.", help: None, } + @formatted asg_statement_not_block { args: (), msg: "AstStatement should be be a block", help: None, } + @formatted empty_string { args: (), msg: "Cannot constrcut an empty string: it has the type of [char; 0] which is not possible.", help: None, } + @formatted impossible_console_assert_call { args: (), msg: "Console::Assert cannot be matched here, its handled in another case.", diff --git a/errors/src/ast/mod.rs b/errors/src/ast/mod.rs index 902979095c..bd9112f016 100644 --- a/errors/src/ast/mod.rs +++ b/errors/src/ast/mod.rs @@ -15,4 +15,4 @@ // along with the Leo library. If not, see . pub mod ast; -pub use self::ast::*; \ No newline at end of file +pub use self::ast::*; diff --git a/errors/src/common/backtraced.rs b/errors/src/common/backtraced.rs new file mode 100644 index 0000000000..d426e3a1cd --- /dev/null +++ b/errors/src/common/backtraced.rs @@ -0,0 +1,94 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +use std::fmt; + +use backtrace::Backtrace; +use derivative::Derivative; + +pub const INDENT: &str = " "; + +/// Formatted compiler error type +/// undefined value `x` +/// --> file.leo: 2:8 +/// | +/// 2 | let a = x; +/// | ^ +/// | +/// = help: Initialize a variable `x` first. +#[derive(Derivative)] +#[derivative(Clone, Debug, Default, Hash, PartialEq)] +pub struct BacktracedError { + pub message: String, + pub help: Option, + pub exit_code: u32, + pub code_identifier: String, + pub error_type: String, + #[derivative(PartialEq = "ignore")] + #[derivative(Hash = "ignore")] + pub backtrace: Backtrace, +} + +impl BacktracedError { + pub fn new_from_backtrace( + message: S, + help: Option, + exit_code: u32, + code_identifier: String, + error_type: String, + backtrace: Backtrace, + ) -> Self + where + S: ToString, + { + Self { + message: message.to_string(), + help: help.map(|help| help.to_string()), + exit_code, + code_identifier, + error_type, + backtrace, + } + } +} + +impl fmt::Display for BacktracedError { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let error_message = format!( + "{indent }[E{error_type}{code_identifier}{exit_code}]: {message}\ + {indent } ", + indent = INDENT, + error_type = self.error_type, + code_identifier = self.code_identifier, + exit_code = self.exit_code, + message = self.message, + ); + + write!(f, "{}", error_message)?; + + if let Some(help) = &self.help { + write!(f, "{indent } = {help}", indent = INDENT, help = help)?; + } + + write!(f, "{:?}", self.backtrace) + } +} + +impl std::error::Error for BacktracedError { + fn description(&self) -> &str { + &self.message + } +} diff --git a/errors/src/common/formatted.rs b/errors/src/common/formatted.rs index 3849dd8259..e8626f3feb 100644 --- a/errors/src/common/formatted.rs +++ b/errors/src/common/formatted.rs @@ -14,13 +14,10 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::Span; +use crate::{BacktracedError, Span}; use std::{fmt, sync::Arc}; -use backtrace::Backtrace; -use derivative::Derivative; - pub const INDENT: &str = " "; /// Formatted compiler error type @@ -31,8 +28,7 @@ pub const INDENT: &str = " "; /// | ^ /// | /// = help: Initialize a variable `x` first. -#[derive(Derivative)] -#[derivative(Clone, Debug, Default, Hash, PartialEq)] +#[derive(Clone, Debug, Default, Hash, PartialEq)] pub struct FormattedError { pub line_start: usize, pub line_stop: usize, @@ -40,25 +36,21 @@ pub struct FormattedError { pub col_stop: usize, pub path: Arc, pub content: String, - pub message: String, - pub help: Option, - pub exit_code: u32, - pub code_identifier: String, - pub error_type: String, - #[derivative(PartialEq = "ignore")] - #[derivative(Hash = "ignore")] - pub backtrace: Backtrace, + pub backtrace: BacktracedError, } impl FormattedError { - pub fn new_from_span( - message: String, - help: Option, + pub fn new_from_span( + message: S, + help: Option, exit_code: u32, code_identifier: String, error_type: String, span: &Span, - ) -> Self { + ) -> Self + where + S: ToString, + { Self { line_start: span.line_start, line_stop: span.line_stop, @@ -66,12 +58,14 @@ impl FormattedError { col_stop: span.col_stop, path: span.path.clone(), content: span.content.to_string(), - message, - help, - exit_code, - code_identifier, - error_type, - backtrace: Backtrace::new(), + backtrace: BacktracedError::new_from_backtrace( + message.to_string(), + help.map(|help| help.to_string()), + exit_code, + code_identifier, + error_type, + span.backtrace.clone(), + ), } } } @@ -104,10 +98,10 @@ impl fmt::Display for FormattedError { {indent }--> {path}:{line_start}:{start}\n\ {indent } ", indent = INDENT, - error_type = self.error_type, - code_identifier = self.code_identifier, - exit_code = self.exit_code, - message = self.message, + error_type = self.backtrace.error_type, + code_identifier = self.backtrace.code_identifier, + exit_code = self.backtrace.exit_code, + message = self.backtrace.message, path = &*self.path, line_start = self.line_start, start = self.col_start, @@ -133,16 +127,16 @@ impl fmt::Display for FormattedError { underlined = underlined, )?; - if let Some(help) = &self.help { + if let Some(help) = &self.backtrace.help { write!(f, "{indent } = {help}", indent = INDENT, help = help)?; } - write!(f, "{:?}", self.backtrace,) + write!(f, "{:?}", self.backtrace) } } impl std::error::Error for FormattedError { fn description(&self) -> &str { - &self.message + &self.backtrace.message } } diff --git a/errors/src/common/macros.rs b/errors/src/common/macros.rs index 4affbaef15..98b1a69b2b 100644 --- a/errors/src/common/macros.rs +++ b/errors/src/common/macros.rs @@ -17,13 +17,18 @@ #[macro_export] macro_rules! create_errors { (@step $_code:expr,) => {}; - ($error_type:ident, exit_code_mask: $exit_code_mask:expr, error_code_prefix: $error_code_prefix:expr, $($names:ident { args: ($($arg_names:ident: $arg_types:ty$(,)?)*), msg: $messages:expr, help: $helps:expr, })*) => { - use crate::{ErrorCode, FormattedError, LeoErrorCode, Span}; + ($error_type:ident, exit_code_mask: $exit_code_mask:expr, error_code_prefix: $error_code_prefix:expr, $(@$formatted_or_backtraced_list:ident $names:ident { args: ($($arg_names:ident: $arg_types:ty$(,)?)*), msg: $messages:expr, help: $helps:expr, })*) => { + use crate::{BacktracedError, ErrorCode, FormattedError, LeoErrorCode, Span}; + + use backtrace::Backtrace; #[derive(Debug, Error)] pub enum $error_type { #[error(transparent)] FormattedError(#[from] FormattedError), + + #[error(transparent)] + BacktracedError(#[from] BacktracedError), } impl LeoErrorCode for $error_type {} @@ -33,36 +38,57 @@ macro_rules! create_errors { fn exit_code_mask() -> u32 { $exit_code_mask } - + #[inline(always)] fn error_type() -> String { $error_code_prefix.to_string() } - - fn new_from_span(message: T, help: Option, exit_code: u32, span: &Span) -> Self - where T: ToString { - Self::FormattedError(FormattedError::new_from_span( - message.to_string(), + + fn new_from_backtrace(message: S, help: Option, exit_code: u32, backtrace: Backtrace) -> Self + where + S: ToString { + BacktracedError::new_from_backtrace( + message, + help, + exit_code + Self::exit_code_mask(), + Self::code_identifier(), + Self::error_type(), + backtrace, + ).into() + } + + fn new_from_span(message: S, help: Option, exit_code: u32, span: &Span) -> Self + where S: ToString { + FormattedError::new_from_span( + message, help, exit_code + Self::exit_code_mask(), Self::code_identifier(), Self::error_type(), span, - )) - } + ).into() + } } - + impl $error_type { - create_errors!(@step 0u32, $(($names($($arg_names: $arg_types,)*), $messages, $helps),)*); + create_errors!(@step 0u32, $(($formatted_or_backtraced_list, $names($($arg_names: $arg_types,)*), $messages, $helps),)*); } }; - (@step $code:expr, ($error_name:ident($($arg_names:ident: $arg_types:ty,)*), $message:expr, $help:expr), $(($names:ident($($tail_arg_names:ident: $tail_arg_types:ty,)*), $messages:expr, $helps:expr),)*) => { + (@step $code:expr, (formatted, $error_name:ident($($arg_names:ident: $arg_types:ty,)*), $message:expr, $help:expr), $(($formatted_or_backtraced_tail:ident, $names:ident($($tail_arg_names:ident: $tail_arg_types:ty,)*), $messages:expr, $helps:expr),)*) => { pub fn $error_name($($arg_names: $arg_types,)* span: &Span) -> Self { - + Self::new_from_span($message, $help, $code, span) } - create_errors!(@step $code + 1u32, $(($names($($tail_arg_names: $tail_arg_types,)*), $messages, $helps),)*); + create_errors!(@step $code + 1u32, $(($formatted_or_backtraced_tail, $names($($tail_arg_names: $tail_arg_types,)*), $messages, $helps),)*); + }; + (@step $code:expr, (backtraced, $error_name:ident($($arg_names:ident: $arg_types:ty,)*), $message:expr, $help:expr), $(($formatted_or_backtraced_tail:ident, $names:ident($($tail_arg_names:ident: $tail_arg_types:ty,)*), $messages:expr, $helps:expr),)*) => { + pub fn $error_name($($arg_names: $arg_types,)* backtrace: Backtrace) -> Self { + + Self::new_from_backtrace($message, $help, $code, backtrace) + } + + create_errors!(@step $code + 1u32, $(($formatted_or_backtraced_tail, $names($($tail_arg_names: $tail_arg_types,)*), $messages, $helps),)*); }; -} \ No newline at end of file +} diff --git a/errors/src/common/mod.rs b/errors/src/common/mod.rs index df44577b24..79ee8225cb 100644 --- a/errors/src/common/mod.rs +++ b/errors/src/common/mod.rs @@ -14,6 +14,9 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . +pub mod backtraced; +pub use self::backtraced::*; + pub mod formatted; pub use self::formatted::*; @@ -28,4 +31,4 @@ pub mod tendril_json; pub use self::tendril_json::*; pub mod traits; -pub use self::traits::*; \ No newline at end of file +pub use self::traits::*; diff --git a/errors/src/common/traits.rs b/errors/src/common/traits.rs index 09ff8ac19b..57486748f2 100644 --- a/errors/src/common/traits.rs +++ b/errors/src/common/traits.rs @@ -16,13 +16,20 @@ use crate::Span; +use backtrace::Backtrace; + pub trait ErrorCode: Sized { fn exit_code_mask() -> u32; fn error_type() -> String; - fn new_from_span(message: T, help: Option, exit_code: u32, span: &Span) -> Self - where T: ToString; + fn new_from_backtrace(message: S, help: Option, exit_code: u32, backtrace: Backtrace) -> Self + where + S: ToString; + + fn new_from_span(message: S, help: Option, exit_code: u32, span: &Span) -> Self + where + S: ToString; } pub trait LeoErrorCode: ErrorCode { diff --git a/errors/src/compiler/compiler.rs b/errors/src/compiler/compiler.rs index 7705a8ed97..2667e3eb6f 100644 --- a/errors/src/compiler/compiler.rs +++ b/errors/src/compiler/compiler.rs @@ -16,397 +16,732 @@ use crate::create_errors; +use eyre::ErrReport; + create_errors!( CompilerError, exit_code_mask: 2000u32, - error_code_prefix: "G", + error_code_prefix: "C", + + @backtraced + invalid_test_context { + args: (name: String), + msg: format!("Cannot find input files with context name `{}`", name), + help: None, + } + + @backtraced + file_read_error { + args: (path: std::path::PathBuf, error: ErrReport), + msg: format!("Cannot read from the provided file path '{:?}': {}", path, error), + help: None, + } + + @backtraced + no_main_function { + args: (), + msg: "There must be a function named `main`", + help: None, + } + + @backtraced + no_test_input { + args: (), + msg: "Failed to find input files for the current test", + help: None, + } + + @formatted + console_fmt_expected_left_or_right_brace { + args: (), + msg: "Formatter given a {. Expected a { or } after", + help: None, + } + + @formatted + console_fmt_expected_escaped_right_brace { + args: (), + msg: "Formatter given a }. Expected a container {} or }}", + help: None, + } + + @formatted + console_container_parameter_length_mismatch { + args: (containers: usize, parameters: usize), + msg: format!( + "Formatter given {} containers and found {} parameters", + containers, parameters + ), + help: None, + } + + @formatted + console_assertion_depends_on_input { + args: (), + msg: "console.assert() does not produce constraints and cannot use inputs. \ + Assertions should only be used in @test functions", + help: None, + } + + @formatted + console_assertion_failed { + args: (), + msg: "console.assert(...) failed", + help: None, + } + + @formatted + console_assertion_must_be_boolean { + args: (), + msg: "Assertion expression must evaluate to a boolean value", + help: None, + } + + @formatted + cannot_enforce_expression { + args: (operation: String, error: ErrReport), + msg: format!( + "the gadget operation `{}` failed due to synthesis error `{:?}`", + operation, error, + ), + help: None, + } + + @formatted + cannot_evaluate_expression { + args: (operation: String), + msg: format!("Mismatched types found for operation `{}`", operation), + help: None, + } + + @formatted + array_length_out_of_bounds { + args: (), + msg: "array length cannot be >= 2^32", + help: None, + } + + @formatted + array_index_out_of_legal_bounds { + args: (), + msg: "array index cannot be >= 2^32", + help: None, + } + + @formatted + conditional_boolean_expression_fails_to_resolve_to_bool { + args: (actual: String), + msg: format!("if, else conditional must resolve to a boolean, found `{}`", actual), + help: None, + } + + @formatted + expected_circuit_member { + args: (expected: String), + msg: format!("expected circuit member `{}`, not found", expected), + help: None, + } + + @formatted + incompatible_types { + args: (operation: String), + msg: format!("no implementation for `{}`", operation), + help: None, + } + + @formatted + tuple_index_out_of_bounds { + args: (index: usize), + msg: format!("cannot access index {} of tuple out of bounds", index), + help: None, + } + + @formatted + array_index_out_of_bounds { + args: (index: usize), + msg: format!("cannot access index {} of array out of bounds", index), + help: None, + } + + @formatted + array_invalid_slice_length { + args: (), + msg: "illegal length of slice", + help: None, + } + + @formatted + invalid_index_expression { + args: (actual: String), + msg: format!("index must resolve to an integer, found `{}`", actual), + help: None, + } + + @formatted + unexpected_array_length { + args: (expected: usize, actual: usize), + msg: format!("expected array length {}, found one with length {}", expected, actual), + help: None, + } + + @formatted + invalid_circuit_static_member_access { + args: (member: String), + msg: format!("invalid circuit static member `{}` must be accessed using `::` syntax", member), + help: None, + } + + @formatted + undefined_array { + args: (actual: String), + msg: format!("array `{}` must be declared before it is used in an expression", actual), + help: None, + } + + @formatted + undefined_circuit { + args: (actual: String), + msg: format!( + "circuit `{}` must be declared before it is used in an expression", + actual + ), + help: None, + } + + @formatted + undefined_identifier { + args: (name: &str), + msg: format!("Cannot find value `{}` in this scope", name), + help: None, + } + + @formatted + undefined_circuit_member_access { + args: (circuit: String, member: String), + msg: format!("Circuit `{}` has no member `{}`", circuit, member), + help: None, + } + + @formatted + input_variable_type_mismatch { + args: (expected: String, actual: String, variable: String), + msg: format!( + "Expected input variable `{}` to be type `{}`, found type `{}`", + variable, expected, actual + ), + help: None, + } + + @formatted + expected_const_input_variable { + args: (variable: String), + msg: format!( + "Expected input variable `{}` to be constant. Move input variable `{}` to [constants] section of input file", + variable, variable + ), + help: None, + } + + @formatted + expected_non_const_input_variable { + args: (variable: String), + msg: format!( + "Expected input variable `{}` to be non-constant. Move input variable `{}` to [main] section of input file", + variable, variable + ), + help: None, + } + + @formatted + invalid_function_input_array { + args: (actual: String), + msg: format!("Expected function input array, found `{}`", actual), + help: None, + } + + @formatted + invalid_input_array_dimensions { + args: (expected: usize, actual: usize), + msg: format!( + "Input array dimensions mismatch expected {}, found array dimensions {}", + expected, actual + ), + help: None, + } + + @formatted + input_tuple_size_mismatch { + args: (expected: usize, actual: usize), + msg: format!( + "Input tuple size mismatch expected {}, found tuple with length {}", + expected, actual + ), + help: None, + } + + @formatted + invalid_function_input_tuple { + args: (actual: String), + msg: format!("Expected function input tuple, found `{}`", actual), + help: None, + } + + @formatted + function_input_not_found { + args: (function: String, expected: String), + msg: format!("function `{}` input {} not found", function, expected), + help: None, + } + + @formatted + double_input_declaration { + args: (input_name: String), + msg: format!("Input variable {} declared twice", input_name), + help: None, + } + + @formatted + output_not_enough_registers { + args: (), + msg: "number of input registers must be greater than or equal to output registers", + help: None, + } + + @formatted + output_mismatched_types { + args: (left: String, right: String), + msg: format!( + "Mismatched types. Expected register output type `{}`, found type `{}`.", + left, right + ), + help: None, + } + + @backtraced + output_file_error { + args: (error: ErrReport), + msg: error, + help: None, + } + + @backtraced + output_file_io_error { + args: (error: ErrReport), + msg: error, + help: None, + } + + @backtraced + output_file_cannot_read { + args: (path: std::path::PathBuf), + msg: format!("Cannot read the provided ouput file - {:?}", path), + help: None, + } + + @backtraced + output_file_cannot_remove { + args: (path: std::path::PathBuf), + msg: format!("Cannot remove the provided ouput file - {:?}", path), + help: None, + } + + @formatted + statement_array_assign_index { + args: (), + msg: "Cannot assign single index to array of values", + help: None, + } + + @formatted + statement_array_assign_index_const { + args: (), + msg: "Cannot assign to non-const array index", + help: None, + } + + @formatted + statement_array_assign_interior_index { + args: (), + msg: "Cannot assign single index to interior of array of values", + help: None, + } + + @formatted + statement_array_assign_range { + args: (), + msg: "Cannot assign range of array values to single value", + help: None, + } + + @formatted + statement_array_assign_index_bounds { + args: (index: usize, length: usize), + msg: format!( + "Array assign index `{}` out of range for array of length `{}`", + index, length + ), + help: None, + } + + @formatted + statement_array_assign_range_order { + args: (start: usize, stop: usize, length: usize), + msg: format!( + "Array assign range `{}`..`{}` out of range for array of length `{}`", + start, stop, length + ), + help: None, + } + + @formatted + statement_conditional_boolean_fails_to_resolve_to_boolean { + args: (actual: String), + msg: format!("If, else conditional must resolve to a boolean, found `{}`", actual), + help: None, + } + + @formatted + statement_indicator_calculation { + args: (name: String), + msg: format!( + "Constraint system failed to evaluate branch selection indicator `{}`", + name + ), + help: None, + } + + @formatted + statement_invalid_number_of_definitions { + args: (expected: usize, actual: usize), + msg: format!( + "Multiple definition statement expected {} return values, found {} values", + expected, actual + ), + help: None, + } + + @formatted + statement_multiple_definition { + args: (value: String), + msg: format!("cannot assign multiple variables to a single value: {}", value), + help: None, + } + + @formatted + statement_multiple_returns { + args: (), + msg: "This function returns multiple times and produces unreachable circuits with undefined behavior.", + help: None, + } + + @formatted + statement_no_returns { + args: (expected: String), + msg: format!( + "function expected `{}` return type but no valid branches returned a result", + expected + ), + help: None, + } + + @formatted + statement_select_fail { + args: (first: String, second: String), + msg: format!( + "Conditional select gadget failed to select between `{}` or `{}`", + first, second + ), + help: None, + } + + @formatted + statement_tuple_assign_index { + args: (), + msg: "Cannot assign single index to tuple of values", + help: None, + } + + @formatted + statement_tuple_assign_index_bounds { + args: (index: usize, length: usize), + msg: format!( + "Tuple assign index `{}` out of range for tuple of length `{}`", + index, length + ), + help: None, + } + + @formatted + statement_unassigned { + args: (), + msg: "Expected assignment of return values for expression", + help: None, + } + + @formatted + statement_undefined_variable { + args: (name: String), + msg: format!("Attempted to assign to unknown variable `{}`", name), + help: None, + } + + @formatted + statement_undefined_circuit_variable { + args: (name: String), + msg: format!("Attempted to assign to unknown circuit member variable `{}`", name), + help: None, + } + + @formatted + statement_loop_index_const { + args: (), + msg: "iteration range must be const", + help: None, + } + + @formatted + address_value_account_error { + args: (error: ErrReport), + msg: format!("account creation failed due to `{}`", error), + help: None, + } + + @formatted + address_value_invalid_address { + args: (actual: String), + msg: format!("expected address input type, found `{}`", actual), + help: None, + } + + @formatted + address_value_missing_address { + args: (), + msg: "expected address input not found", + help: None, + } + + @formatted + boolean_value_cannot_enforce { + args: (operation: String, error: ErrReport), + msg: format!( + "the boolean operation `{}` failed due to the synthesis error `{}`", + operation, error, + ), + help: None, + } + + @formatted + boolean_value_cannot_evaluate { + args: (operation: String), + msg: format!("no implementation found for `{}`", operation), + help: None, + } + + @formatted + boolean_value_invalid_boolean { + args: (actual: String), + msg: format!("expected boolean input type, found `{}`", actual), + help: None, + } + + @formatted + boolean_value_missing_boolean { + args: (expected: String), + msg: format!("expected boolean input `{}` not found", expected), + help: None, + } + + @formatted + char_value_invalid_char { + args: (actual: String), + msg: format!("expected char element input type, found `{}`", actual), + help: None, + } + + @formatted + field_value_negate_operation { + args: (error: ErrReport), + msg: format!("field negation failed due to synthesis error `{}`", error), + help: None, + } + + @formatted + field_value_binary_operation { + args: (operation: String, error: ErrReport), + msg: format!( + "the field binary operation `{}` failed due to synthesis error `{}`", + operation, error, + ), + help: None, + } + + @formatted + field_value_invalid_field { + args: (actual: String), + msg: format!("expected field element input type, found `{}`", actual), + help: None, + } + + @formatted + field_value_missing_field { + args: (expected: String), + msg: format!("expected field input `{}` not found", expected), + help: None, + } + + @formatted + field_value_no_inverse { + args: (field: String), + msg: format!("no multiplicative inverse found for field `{}`", field), + help: None, + } + + @formatted + group_value_negate_operation { + args: (error: ErrReport), + msg: format!("group negation failed due to the synthesis error `{}`", error), + help: None, + } + + @formatted + group_value_binary_operation { + args: (operation: String, error: ErrReport), + msg: format!( + "the group binary operation `{}` failed due to the synthesis error `{}`", + operation, error, + ), + help: None, + } + + @formatted + group_value_invalid_group { + args: (actual: String), + msg: format!("expected group affine point input type, found `{}`", actual), + help: None, + } + + @formatted + group_value_missing_group { + args: (expected: String), + msg: format!("expected group input `{}` not found", expected), + help: None, + } + + @formatted + group_value_synthesis_error { + args: (error: ErrReport), + msg: format!("compilation failed due to group synthesis error `{}`", error), + help: None, + } + + @formatted + group_value_x_invalid { + args: (x: String), + msg: format!("invalid x coordinate `{}`", x), + help: None, + } + + @formatted + group_value_y_invalid { + args: (y: String), + msg: format!("invalid y coordinate `{}`", y), + help: None, + } + + @formatted + group_value_not_on_curve { + args: (element: String), + msg: format!("group element `{}` is not on the supported curve", element), + help: None, + } + + @formatted + group_value_x_recover { + args: (), + msg: "could not recover group element from x coordinate", + help: None, + } + + @formatted + group_value_y_recover { + args: (), + msg: "could not recover group element from y coordinate", + help: None, + } + + @formatted + group_value_n_group { + args: (number: String), + msg: format!("cannot multiply group generator by \"{}\"", number), + help: None, + } + + @formatted + integer_value_signed { + args: (error: ErrReport), + msg: format!("integer operation failed due to the signed integer error `{}`", error), + help: None, + } + + @formatted + integer_value_unsigned { + args: (error: ErrReport), + msg: format!( + "integer operation failed due to the unsigned integer error `{}`", + error + ), + help: None, + } + + @formatted + integer_value_synthesis { + args: (error: ErrReport), + msg: format!("integer operation failed due to the synthesis error `{}`", error), + help: None, + } + + @formatted + integer_value_negate_operation { + args: (), + msg: "integer negation can only be enforced on signed integers", + help: None, + } + + @formatted + integer_value_binary_operation { + args: (operation: String), + msg: format!( + "the integer binary operation `{}` can only be enforced on integers of the same type", + operation + ), + help: None, + } + + @formatted + integer_value_integer_type_mismatch { + args: (expected: String, received: String), + msg: format!("expected data type `{}`, found `{}`", expected, received), + help: None, + } + + @formatted + integer_value_invalid_integer { + args: (actual: String), + msg: format!("failed to parse `{}` as expected integer type", actual), + help: None, + } + + @formatted + integer_value_missing_integer { + args: (expected: String), + msg: format!("expected integer input `{}` not found", expected), + help: None, + } + + @formatted + integer_value_cannot_evaluate { + args: (operation: String), + msg: format!("no implementation found for `{}`", operation), + help: None, + } ); - -// impl CompilerError { -// pub fn expected_left_or_right_brace(span: &Span) -> Self { -// let message = "Formatter given a {. Expected a { or } after".to_string(); - -// Self::new_from_span(message, None, 0, span) -// } - -// pub fn expected_escaped_right_brace(span: &Span) -> Self { -// let message = "Formatter given a }. Expected a container {} or }}".to_string(); - -// Self::new_from_span(message, None, 1, span) -// } - -// pub fn length(containers: usize, parameters: usize, span: &Span) -> Self { -// let message = format!( -// "Formatter given {} containers and found {} parameters", -// containers, parameters -// ); - -// Self::new_from_span(message, None, 2, span) -// } - -// pub fn assertion_depends_on_input(span: &Span) -> Self { -// let message = "console.assert() does not produce constraints and cannot use inputs. \ -// Assertions should only be used in @test functions" -// .to_string(); - -// Self::new_from_span(message, None, 3, span) -// } - -// pub fn assertion_failed(span: &Span) -> Self { -// let message = "Assertion failed".to_string(); - -// Self::new_from_span(message, None, 4, span) -// } - -// pub fn assertion_must_be_boolean(span: &Span) -> Self { -// let message = "Assertion expression must evaluate to a boolean value".to_string(); - -// Self::new_from_span(message, None, 5, span) -// } - -// pub fn cannot_enforce(operation: String, error: String, span: &Span) -> Self { -// let message = format!( -// "the gadget operation `{}` failed due to synthesis error `{}`", -// operation, error, -// ); - -// Self::new_from_span(message, None, 6, span) -// } - -// pub fn cannot_evaluate(operation: String, span: &Span) -> Self { -// let message = format!("Mismatched types found for operation `{}`", operation); - -// Self::new_from_span(message, None, 7, span) -// } - -// pub fn array_length_out_of_bounds(span: &Span) -> Self { -// let message = "array length cannot be >= 2^32".to_string(); - -// Self::new_from_span(message, None, 8, span) -// } - -// pub fn array_index_out_of_legal_bounds(span: &Span) -> Self { -// let message = "array index cannot be >= 2^32".to_string(); - -// Self::new_from_span(message, None, 9, span) -// } - -// pub fn conditional_boolean(actual: String, span: &Span) -> Self { -// let message = format!("if, else conditional must resolve to a boolean, found `{}`", actual); - -// Self::new_from_span(message, None, 10, span) -// } - -// pub fn expected_circuit_member(expected: String, span: &Span) -> Self { -// let message = format!("expected circuit member `{}`, not found", expected); - -// Self::new_from_span(message, None, 11, span) -// } - -// pub fn incompatible_types(operation: String, span: &Span) -> Self { -// let message = format!("no implementation for `{}`", operation); - -// Self::new_from_span(message, None, 12, span) -// } - -// pub fn tuple_index_out_of_bounds(index: usize, span: &Span) -> Self { -// let message = format!("cannot access index {} of tuple out of bounds", index); - -// Self::new_from_span(message, None, 13, span) -// } - -// pub fn array_index_out_of_bounds(index: usize, span: &Span) -> Self { -// let message = format!("cannot access index {} of array out of bounds", index); - -// Self::new_from_span(message, None, 14, span) -// } - -// pub fn array_invalid_slice_length(span: &Span) -> Self { -// let message = "illegal length of slice".to_string(); - -// Self::new_from_span(message, None, 15, span) -// } - -// pub fn invalid_index(actual: String, span: &Span) -> Self { -// let message = format!("index must resolve to an integer, found `{}`", actual); - -// Self::new_from_span(message, None, 16, span) -// } - -// pub fn invalid_length(expected: usize, actual: usize, span: &Span) -> Self { -// let message = format!("expected array length {}, found one with length {}", expected, actual); - -// Self::new_from_span(message, None, 17, span) -// } - -// pub fn invalid_static_access(member: String, span: &Span) -> Self { -// let message = format!("static member `{}` must be accessed using `::` syntax", member); - -// Self::new_from_span(message, None, 18, span) -// } - -// pub fn undefined_array(actual: String, span: &Span) -> Self { -// let message = format!("array `{}` must be declared before it is used in an expression", actual); - -// Self::new_from_span(message, None, 19, span) -// } - -// pub fn undefined_circuit(actual: String, span: &Span) -> Self { -// let message = format!( -// "circuit `{}` must be declared before it is used in an expression", -// actual -// ); - -// Self::new_from_span(message, None, 20, span) -// } - -// pub fn undefined_identifier(name: &str, span: &Span) -> Self { -// let message = format!("Cannot find value `{}` in this scope", name); - -// Self::new_from_span(message, None, 21, span) -// } - -// pub fn undefined_member_access(circuit: String, member: String, span: &Span) -> Self { -// let message = format!("Circuit `{}` has no member `{}`", circuit, member); - -// Self::new_from_span(message, None, 22, span) -// } - -// pub fn input_type_mismatch(expected: String, actual: String, variable: String, span: &Span) -> Self { -// let message = format!( -// "Expected input variable `{}` to be type `{}`, found type `{}`", -// variable, expected, actual -// ); - -// Self::new_from_span(message, None, 23, span) -// } - -// pub fn expected_const_input(variable: String, span: &Span) -> Self { -// let message = format!( -// "Expected input variable `{}` to be constant. Move input variable `{}` to [constants] section of input file", -// variable, variable -// ); - -// Self::new_from_span(message, None, 24, span) -// } - -// pub fn expected_non_const_input(variable: String, span: &Span) -> Self { -// let message = format!( -// "Expected input variable `{}` to be non-constant. Move input variable `{}` to [main] section of input file", -// variable, variable -// ); - -// Self::new_from_span(message, None, 25, span) -// } - -// pub fn invalid_array(actual: String, span: &Span) -> Self { -// let message = format!("Expected function input array, found `{}`", actual); - -// Self::new_from_span(message, None, 26, span) -// } - -// pub fn invalid_input_array_dimensions(expected: usize, actual: usize, span: &Span) -> Self { -// let message = format!( -// "Input array dimensions mismatch expected {}, found array dimensions {}", -// expected, actual -// ); - -// Self::new_from_span(message, None, 27, span) -// } - -// pub fn tuple_size_mismatch(expected: usize, actual: usize, span: &Span) -> Self { -// let message = format!( -// "Input tuple size mismatch expected {}, found tuple with length {}", -// expected, actual -// ); - -// Self::new_from_span(message, None, 28, span) -// } - -// pub fn invalid_tuple(actual: String, span: &Span) -> Self { -// let message = format!("Expected function input tuple, found `{}`", actual); - -// Self::new_from_span(message, None, 29, span) -// } - -// pub fn input_not_found(expected: String, span: &Span) -> Self { -// let message = format!("main function input {} not found", expected); - -// Self::new_from_span(message, None, 30, span) -// } - -// pub fn double_input_declaration(input_name: String, span: &Span) -> Self { -// let message = format!("Input variable {} declared twice", input_name); - -// Self::new_from_span(message, None, 31, span) -// } - -// pub fn not_enough_registers(span: &Span) -> Self { -// let message = "number of input registers must be greater than or equal to output registers".to_string(); - -// Self::new_from_span(message, None, 32, span) -// } - -// pub fn mismatched_output_types(left: &str, right: &str, span: &Span) -> Self { -// let message = format!( -// "Mismatched types. Expected register output type `{}`, found type `{}`.", -// left, right -// ); - -// Self::new_from_span(message, None, 33, span) -// } - -// pub fn account_error(error: String, span: &Span) -> Self { -// let message = format!("account creation failed due to `{}`", error); - -// Self::new_from_span(message, None, 34, span) -// } - -// pub fn invalid_address(actual: String, span: &Span) -> Self { -// let message = format!("expected address input type, found `{}`", actual); - -// Self::new_from_span(message, None, 35, span) -// } - -// pub fn missing_address(span: &Span) -> Self { -// let message = "expected address input not found".to_string(); - -// Self::new_from_span(message, None, 36, span) -// } - -// pub fn negate_operation(error: String, span: &Span) -> Self { -// let message = format!("field negation failed due to synthesis error `{:?}`", error,); - -// Self::new_from_span(message, None, 37, span) -// } - -// pub fn binary_operation(operation: String, error: String, span: &Span) -> Self { -// let message = format!( -// "the field binary operation `{}` failed due to synthesis error `{:?}`", -// operation, error, -// ); - -// Self::new_from_span(message, None, 38, span) -// } - -// pub fn invalid_field(actual: String, span: &Span) -> Self { -// let message = format!("expected field element input type, found `{}`", actual); - -// Self::new_from_span(message, None, 39, span) -// } - -// pub fn missing_field(expected: String, span: &Span) -> Self { -// let message = format!("expected field input `{}` not found", expected); - -// Self::new_from_span(message, None, 40, span) -// } - -// pub fn no_inverse(field: String, span: &Span) -> Self { -// let message = format!("no multiplicative inverse found for field `{}`", field); - -// Self::new_from_span(message, None, 41, span) -// } - -// pub fn x_invalid(x: String, span: &Span) -> Self { -// let message = format!("invalid x coordinate `{}`", x); - -// Self::new_from_span(message, None, 42, span) -// } - -// pub fn y_invalid(y: String, span: &Span) -> Self { -// let message = format!("invalid y coordinate `{}`", y); - -// Self::new_from_span(message, None, 43, span) -// } - -// pub fn not_on_curve(element: String, span: &Span) -> Self { -// let message = format!("group element `{}` is not on the supported curve", element); - -// Self::new_from_span(message, None, 44, span) -// } - -// pub fn x_recover(span: &Span) -> Self { -// let message = "could not recover group element from x coordinate".to_string(); - -// Self::new_from_span(message, None, 45, span) -// } - -// pub fn y_recover(span: &Span) -> Self { -// let message = "could not recover group element from y coordinate".to_string(); - -// Self::new_from_span(message, None, 46, span) -// } - -// pub fn n_group(number: String, span: &Span) -> Self { -// let message = format!("cannot multiply group generator by \"{}\"", number); - -// Self::new_from_span(message, None, 47, span) -// } - -// pub fn signed(error: String, span: &Span) -> Self { -// let message = format!("integer operation failed due to the signed integer error `{:?}`", error); - -// Self::new_from_span(message, None, 48, span) -// } - -// pub fn unsigned(error: String, span: &Span) -> Self { -// let message = format!( -// "integer operation failed due to the unsigned integer error `{:?}`", -// error -// ); - -// Self::new_from_span(message, None, 49, span) -// } - -// pub fn integer_synthesis(error: String, span: &Span) -> Self { -// let message = format!("integer operation failed due to the synthesis error `{}`", error); - -// Self::new_from_span(message, None, 50, span) -// } - -// pub fn invalid_unsigned_negate(span: &Span) -> Self { -// let message = "integer negation can only be enforced on signed integers".to_string(); - -// Self::new_from_span(message, None, 51, span) -// } - -// pub fn invalid_integer_binary_operation(operation: String, span: &Span) -> Self { -// let message = format!( -// "the integer binary operation `{}` can only be enforced on integers of the same type", -// operation -// ); - -// Self::new_from_span(message, None, 52, span) -// } - -// pub fn integer_type_mismatch(expected: String, received: String, span: &Span) -> Self { -// let message = format!("expected data type `{}`, found `{}`", expected, received); - -// Self::new_from_span(message, None, 53, span) -// } - -// pub fn invalid_integer(actual: String, span: &Span) -> Self { -// let message = format!("failed to parse `{}` as expected integer type", actual); - -// Self::new_from_span(message, None, 54, span) -// } - -// pub fn missing_integer(expected: String, span: &Span) -> Self { -// let message = format!("expected integer input `{}` not found", expected); - -// Self::new_from_span(message, None, 55, span) -// } - -// pub fn invalid_group(actual: String, span: &Span) -> Self { -// let message = format!("expected group affine point input type, found `{}`", actual); - -// Self::new_from_span(message, None, 56, span) -// } - -// pub fn missing_group(expected: String, span: &Span) -> Self { -// let message = format!("expected group input `{}` not found", expected); - -// Self::new_from_span(message, None, 57, span) -// } - -// } diff --git a/errors/src/compiler/mod.rs b/errors/src/compiler/mod.rs index 9abfa1c6f1..20aa01efca 100644 --- a/errors/src/compiler/mod.rs +++ b/errors/src/compiler/mod.rs @@ -15,4 +15,4 @@ // along with the Leo library. If not, see . pub mod compiler; -pub use self::compiler::*; \ No newline at end of file +pub use self::compiler::*; diff --git a/errors/src/import/import.rs b/errors/src/import/import.rs index 590cad03e8..d01d36f34c 100644 --- a/errors/src/import/import.rs +++ b/errors/src/import/import.rs @@ -22,12 +22,14 @@ create_errors!( error_code_prefix: "I", // An imported package has the same name as an imported core_package. + @formatted conflicting_imports { args: (name: &str), msg: format!("conflicting imports found for `{}`.", name), help: None, } + @formatted recursive_imports { args: (package: &str), msg: format!("recursive imports for `{}`.", package), @@ -35,6 +37,7 @@ create_errors!( } // Failed to convert a file path into an os string. + @formatted convert_os_string { args: (), msg: "Failed to convert file string name, maybe an illegal character?", @@ -42,6 +45,7 @@ create_errors!( } // Failed to find the directory of the current file. + @formatted current_directory_error { args: (error: std::io::Error), msg: format!("Compilation failed trying to find current directory - {:?}.", error), @@ -49,6 +53,7 @@ create_errors!( } // Failed to open or get the name of a directory. + @formatted directory_error { args: (error: std::io::Error, path: &std::path::Path), msg: format!( @@ -60,6 +65,7 @@ create_errors!( } // Failed to find a main file for the current package. + @formatted expected_main_file { args: (entry: String), msg: format!("Expected main file at `{}`.", entry), @@ -67,6 +73,7 @@ create_errors!( } // Failed to import a package name. + @formatted unknown_package { args: (name: &str), msg: format!( @@ -76,9 +83,10 @@ create_errors!( help: None, } + @formatted io_error { args: (path: &str, error: std::io::Error), msg: format!("cannot read imported file '{}': {:?}", path, error), help: None, } -); \ No newline at end of file +); diff --git a/errors/src/import/mod.rs b/errors/src/import/mod.rs index 7b1d5d2296..2b4341c2d0 100644 --- a/errors/src/import/mod.rs +++ b/errors/src/import/mod.rs @@ -15,4 +15,4 @@ // along with the Leo library. If not, see . pub mod import; -pub use self::import::*; \ No newline at end of file +pub use self::import::*; diff --git a/errors/src/lib.rs b/errors/src/lib.rs index 587d38e470..aff03bc907 100644 --- a/errors/src/lib.rs +++ b/errors/src/lib.rs @@ -45,6 +45,8 @@ pub use self::state::*; #[macro_use] extern crate thiserror; +use leo_input::InputParserError; + use eyre::ErrReport; #[derive(Debug, Error)] @@ -57,10 +59,16 @@ pub enum LeoError { #[error(transparent)] CompilerError(#[from] CompilerError), - + #[error(transparent)] ImportError(#[from] ImportError), + #[error(transparent)] + InputError(#[from] InputParserError), + + #[error(transparent)] + PackageError(#[from] PackageError), + #[error(transparent)] ParserError(#[from] ParserError), diff --git a/errors/src/package/mod.rs b/errors/src/package/mod.rs index 0cecae3330..a225a46a7f 100644 --- a/errors/src/package/mod.rs +++ b/errors/src/package/mod.rs @@ -15,4 +15,4 @@ // along with the Leo library. If not, see . pub mod package; -pub use self::package::*; \ No newline at end of file +pub use self::package::*; diff --git a/errors/src/package/package.rs b/errors/src/package/package.rs index a2bafa453b..3a84b4927f 100644 --- a/errors/src/package/package.rs +++ b/errors/src/package/package.rs @@ -15,9 +15,411 @@ // along with the Leo library. If not, see . use crate::create_errors; +use std::{ffi::OsString, path::PathBuf}; + +use eyre::ErrReport; create_errors!( PackageError, exit_code_mask: 4000u32, error_code_prefix: "PA", + + @backtraced + failed_to_create_imports_directory { + args: (error: ErrReport), + msg: format!("failed creating imports directory {}", error), + help: None, + } + + @backtraced + import_does_not_exist { + args: (package: String), + msg: format!("package {} does not exist as an import", package), + help: None, + } + + @backtraced + failed_to_remove_imports_directory { + args: (error: ErrReport), + msg: format!("failed removing imports directory {}", error), + help: None, + } + + @backtraced + failed_to_create_inputs_directory { + args: (error: ErrReport), + msg: format!("failed creating inputs directory {}", error), + help: None, + } + + @backtraced + failed_to_get_input_file_entry { + args: (error: ErrReport), + msg: format!("failed to get input file entry: {}", error), + help: None, + } + + @backtraced + failed_to_get_input_file_name { + args: (file: OsString), + msg: format!("failed to get input file name: {:?}", file), + help: None, + } + + @backtraced + failed_to_get_input_file_type { + args: (file: OsString, error: ErrReport), + msg: format!("failed to get input file `{:?}` type: {}", file, error), + help: None, + } + + @backtraced + invalid_input_file_type { + args: (file: OsString, type_: std::fs::FileType), + msg: format!("input file `{:?}` has invalid type: {:?}", file, type_), + help: None, + } + + @backtraced + failed_to_read_inputs_directory { + args: (error: ErrReport), + msg: format!("failed reading inputs directory {}", error), + help: None, + } + + @backtraced + failed_to_read_input_file { + args: (path: PathBuf), + msg: format!("Cannot read input file from the provided file path - {:?}", path), + help: None, + } + + @backtraced + io_error_input_file { + args: (error: ErrReport), + msg: format!("IO error input file from the provided file path - {}", error), + help: None, + } + + @backtraced + failed_to_read_state_file { + args: (path: PathBuf), + msg: format!("Cannot read state file from the provided file path - {:?}", path), + help: None, + } + + @backtraced + io_error_state_file { + args: (error: ErrReport), + msg: format!("IO error state file from the provided file path - {}", error), + help: None, + } + + @backtraced + failed_to_read_checksum_file { + args: (path: PathBuf), + msg: format!("Cannot read checksum file from the provided file path - {:?}", path), + help: None, + } + + @backtraced + failed_to_remove_checksum_file { + args: (path: PathBuf), + msg: format!("Cannot remove checksum file from the provided file path - {:?}", path), + help: None, + } + + @backtraced + io_error_checksum_file { + args: (error: ErrReport), + msg: format!("IO cannot read checksum file from the provided file path - {}", error), + help: None, + } + + @backtraced + failed_to_read_circuit_file { + args: (path: PathBuf), + msg: format!("Cannot read circuit file from the provided file path - {:?}", path), + help: None, + } + + @backtraced + failed_to_remove_circuit_file { + args: (path: PathBuf), + msg: format!("Cannot remove circuit file from the provided file path - {:?}", path), + help: None, + } + + @backtraced + io_error_circuit_file { + args: (error: ErrReport), + msg: format!("IO error circuit file from the provided file path - {}", error), + help: None, + } + + @backtraced + failed_to_create_outputs_directory { + args: (error: ErrReport), + msg: format!("failed creating outputs directory {}", error), + help: None, + } + + @backtraced + failed_to_remove_outputs_directory { + args: (error: ErrReport), + msg: format!("failed removing outputs directory {}", error), + help: None, + } + + @backtraced + failed_to_read_proof_file { + args: (path: PathBuf), + msg: format!("Cannot read proof file from the provided file path - {:?}", path), + help: None, + } + + @backtraced + failed_to_remove_proof_file { + args: (path: PathBuf), + msg: format!("Cannot remove proof file from the provided file path - {:?}", path), + help: None, + } + + @backtraced + io_error_proof_file { + args: (error: ErrReport), + msg: format!("IO error proof file from the provided file path - {}", error), + help: None, + } + + @backtraced + failed_to_read_proving_key_file { + args: (path: PathBuf), + msg: format!("Cannot read prooving key file from the provided file path - {:?}", path), + help: None, + } + + @backtraced + failed_to_remove_proving_key_file { + args: (path: PathBuf), + msg: format!("Cannot remove prooving key file from the provided file path - {:?}", path), + help: None, + } + + @backtraced + io_error_proving_key_file { + args: (error: ErrReport), + msg: format!("IO error prooving key file from the provided file path - {}", error), + help: None, + } + + @backtraced + failed_to_read_verification_key_file { + args: (path: PathBuf), + msg: format!("Cannot read verification key file from the provided file path - {:?}", path), + help: None, + } + + @backtraced + failed_to_remove_verification_key_file { + args: (path: PathBuf), + msg: format!("Cannot remove verification key file from the provided file path - {:?}", path), + help: None, + } + + @backtraced + io_error_verification_key_file { + args: (error: ErrReport), + msg: format!("IO error verification key file from the provided file path - {}", error), + help: None, + } + + @backtraced + io_error_gitignore_file { + args: (error: ErrReport), + msg: format!("IO error gitignore file from the provided file path - {}", error), + help: None, + } + + @backtraced + failed_to_create_manifest_file { + args: (filename: &str, error: ErrReport), + msg: format!("failed creating manifest file `{}` {}", filename, error), + help: None, + } + + @backtraced + failed_to_get_manifest_metadata_file { + args: (filename: &str, error: ErrReport), + msg: format!("failed getting manifest file metadata `{}` {}", filename, error), + help: None, + } + + @backtraced + failed_to_open_manifest_file { + args: (filename: &str, error: ErrReport), + msg: format!("failed openining manifest file `{}` {}", filename, error), + help: None, + } + + @backtraced + failed_to_parse_manifest_file { + args: (filename: &str, error: ErrReport), + msg: format!("failed parsing manifest file `{}` {}", filename, error), + help: None, + } + + @backtraced + failed_to_read_manifest_file { + args: (filename: &str, error: ErrReport), + msg: format!("failed reading manifest file `{}` {}", filename, error), + help: None, + } + + @backtraced + failed_to_write_manifest_file { + args: (filename: &str, error: ErrReport), + msg: format!("failed writing manifest file `{}` {}", filename, error), + help: None, + } + + @backtraced + io_error_manifest_file { + args: (error: ErrReport), + msg: format!("IO error manifest file from the provided file path - {}", error), + help: None, + } + + @backtraced + io_error_readme_file { + args: (error: ErrReport), + msg: format!("IO error readme file from the provided file path - {}", error), + help: None, + } + + @backtraced + failed_to_create_zip_file { + args: (error: ErrReport), + msg: format!("failed creating zip file {}", error), + help: None, + } + + @backtraced + failed_to_open_zip_file { + args: (error: ErrReport), + msg: format!("failed opening zip file {}", error), + help: None, + } + + @backtraced + failed_to_read_zip_file { + args: (error: ErrReport), + msg: format!("failed reading zip file {}", error), + help: None, + } + + @backtraced + failed_to_write_zip_file { + args: (error: ErrReport), + msg: format!("failed writing zip file {}", error), + help: None, + } + + @backtraced + failed_to_remove_zip_file { + args: (path: PathBuf), + msg: format!("failed removing zip file from the provided file path - {:?}", path), + help: None, + } + + @backtraced + failed_to_zip { + args: (error: ErrReport), + msg: error, + help: None, + } + + @backtraced + io_error_zip_file { + args: (error: ErrReport), + msg: format!("IO error zip file from the provided file path - {}", error), + help: None, + } + + @backtraced + io_error_library_file { + args: (error: ErrReport), + msg: format!("IO error library file from the provided file path - {}", error), + help: None, + } + + @backtraced + io_error_main_file { + args: (error: ErrReport), + msg: format!("IO error main file from the provided file path - {}", error), + help: None, + } + + @backtraced + failed_to_create_source_directory { + args: (error: ErrReport), + msg: format!("failed creating source directory {}", error), + help: None, + } + + @backtraced + failed_to_get_source_file_entry { + args: (error: ErrReport), + msg: format!("failed to get input file entry: {}", error), + help: None, + } + + @backtraced + failed_to_get_source_file_extension { + args: (extension: OsString), + msg: format!("failed to get source file extension: {:?}", extension), + help: None, + } + + @backtraced + failed_to_get_source_file_type { + args: (file: OsString, error: ErrReport), + msg: format!("failed to get source file `{:?}` type: {}", file, error), + help: None, + } + + @backtraced + invalid_source_file_extension { + args: (file: OsString, extension: OsString), + msg: format!("source file `{:?}` has invalid extension: {:?}", file, extension), + help: None, + } + + @backtraced + invalid_source_file_type { + args: (file: OsString, type_: std::fs::FileType), + msg: format!("source file `{:?}` has invalid type: {:?}", file, type_), + help: None, + } + + @backtraced + failed_to_read_source_directory { + args: (error: ErrReport), + msg: format!("failed reading source directory {}", error), + help: None, + } + + @backtraced + failed_to_initialize_package { + args: (package: String, path: OsString), + msg: format!("failed to initialize package {} {:?}", package, path), + help: None, + } + + @backtraced + invalid_package_name { + args: (package: String), + msg: format!("invalid project name {}", package), + help: None, + } ); diff --git a/errors/src/parser/mod.rs b/errors/src/parser/mod.rs index 16be3e3ee4..fa69fb4eb3 100644 --- a/errors/src/parser/mod.rs +++ b/errors/src/parser/mod.rs @@ -15,4 +15,4 @@ // along with the Leo library. If not, see . pub mod parser; -pub use self::parser::*; \ No newline at end of file +pub use self::parser::*; diff --git a/errors/src/parser/parser.rs b/errors/src/parser/parser.rs index 361a4463bf..4792dcea16 100644 --- a/errors/src/parser/parser.rs +++ b/errors/src/parser/parser.rs @@ -21,48 +21,56 @@ create_errors!( exit_code_mask: 5000u32, error_code_prefix: "P", + @formatted unexpected_token { args: (message: String, help: String), msg: message, help: Some(help), } + @formatted invalid_address_lit { args: (token: &str), msg: format!("invalid address literal: '{}'", token), help: None, } + @formatted invalid_import_list { args: (), msg: "Cannot import empty list", help: None, } + @formatted unexpected_eof { args: (), msg: "unexpected EOF", help: None, } + @formatted unexpected_whitespace { args: (left: &str, right: &str), msg: format!("Unexpected white space between terms {} and {}", left, right), help: None, } + @formatted unexpected { args: (got: String, expected: String), msg: format!("expected {} -- got '{}'", expected, got), help: None, } + @formatted mixed_commas_and_semicolons { args: (), msg: "Cannot mix use of commas and semi-colons for circuit member variable declarations.", help: None, } + @formatted unexpected_ident { args: (got: &str, expected: &[&str]), msg: format!( @@ -77,63 +85,73 @@ create_errors!( help: None, } + @formatted unexpected_statement { args: (got: String, expected: &str), msg: format!("unexpected statement: expected '{}', got '{}'", expected, got), help: None, } + @formatted unexpected_str { args: (got: String, expected: &str), msg: format!("unexpected string: expected '{}', got '{}'", expected, got), help: None, } + @formatted spread_in_array_init { args: (), msg: "illegal spread in array initializer", help: None, } + @formatted invalid_assignment_target { args: (), msg: "invalid assignment target", help: None, } + @formatted invalid_package_name { args: (), msg: "package names must be lowercase alphanumeric ascii with underscores and singular dashes", help: None, } + @formatted illegal_self_const { args: (), msg: "cannot have const self", help: None, } + @formatted mut_function_input { args: (), msg: "function func(mut a: u32) { ... } is deprecated. Passed variables are mutable by default.", help: None, } + @formatted let_mut_statement { args: (), msg: "let mut = ... is deprecated. `let` keyword implies mutabality by default.", help: None, } + @formatted test_function { args: (), msg: "\"test function...\" is deprecated. Did you mean @test annotation?", help: None, } + @formatted context_annotation { args: (), msg: "\"@context(...)\" is deprecated. Did you mean @test annotation?", help: None, } -); \ No newline at end of file +); diff --git a/errors/src/snarkvm/mod.rs b/errors/src/snarkvm/mod.rs index fb6052c2ab..bbfa19aada 100644 --- a/errors/src/snarkvm/mod.rs +++ b/errors/src/snarkvm/mod.rs @@ -15,4 +15,4 @@ // along with the Leo library. If not, see . pub mod snarkvm; -pub use self::snarkvm::*; \ No newline at end of file +pub use self::snarkvm::*; diff --git a/errors/src/state/mod.rs b/errors/src/state/mod.rs index 8f466c87e3..ab6647e473 100644 --- a/errors/src/state/mod.rs +++ b/errors/src/state/mod.rs @@ -15,4 +15,4 @@ // along with the Leo library. If not, see . pub mod state; -pub use self::state::*; \ No newline at end of file +pub use self::state::*; diff --git a/errors/src/state/state.rs b/errors/src/state/state.rs index 86ef583dd6..a58d6f454e 100644 --- a/errors/src/state/state.rs +++ b/errors/src/state/state.rs @@ -17,7 +17,7 @@ use crate::create_errors; create_errors!( - PackageError, + StateError, exit_code_mask: 6000u32, error_code_prefix: "S", ); diff --git a/imports/src/parser/parse_package.rs b/imports/src/parser/parse_package.rs index 4bc71a2419..2a06913e5a 100644 --- a/imports/src/parser/parse_package.rs +++ b/imports/src/parser/parse_package.rs @@ -111,23 +111,16 @@ impl<'a> ImportParser<'a> { // Check if the package name was found in both the source and imports directory. match (matched_source_entry, matched_import_entry) { - (Some(_), Some(_)) => Err(LeoError::from(ImportError::conflicting_imports( - package_name, - &span, - ))), + (Some(_), Some(_)) => Err(LeoError::from(ImportError::conflicting_imports(package_name, &span))), (Some(source_entry), None) => self.parse_package_access(context, &source_entry, &segments[1..], span), (None, Some(import_entry)) => self.parse_package_access(context, &import_entry, &segments[1..], span), - (None, None) => Err(LeoError::from(ImportError::unknown_package( - package_name, - &span, - ))), + (None, None) => Err(LeoError::from(ImportError::unknown_package(package_name, &span))), } } else { // Enforce local package access with no found imports directory match matched_source_entry { Some(source_entry) => self.parse_package_access(context, &source_entry, &segments[1..], span), - None => Err(LeoError::from(ImportError::unknown_package(package_name, &span, - ))), + None => Err(LeoError::from(ImportError::unknown_package(package_name, &span))), } } } diff --git a/imports/src/parser/parse_symbol.rs b/imports/src/parser/parse_symbol.rs index c76cf0544f..34ff8cc027 100644 --- a/imports/src/parser/parse_symbol.rs +++ b/imports/src/parser/parse_symbol.rs @@ -53,8 +53,8 @@ impl<'a> ImportParser<'a> { let file_path_str = file_path.to_str().unwrap_or_default(); // Build the package abstract syntax tree. - let program_string = - &std::fs::read_to_string(&file_path).map_err(|x| LeoError::from(ImportError::io_error(file_path_str, x, span)))?; + let program_string = &std::fs::read_to_string(&file_path) + .map_err(|x| LeoError::from(ImportError::io_error(file_path_str, x, span)))?; let mut program = leo_parser::parse(&file_path_str, &program_string)?; program.name = file_name; let mut ast = leo_ast::Ast::new(program); diff --git a/package/Cargo.toml b/package/Cargo.toml index 807f015829..d8f051020a 100644 --- a/package/Cargo.toml +++ b/package/Cargo.toml @@ -17,13 +17,21 @@ include = [ "Cargo.toml", "src", "README.md", "LICENSE.md" ] license = "GPL-3.0" edition = "2018" +[dependencies.leo-errors] +path = "../errors" +version = "1.5.3" + +[dependencies.eyre] +version = "0.6.5" +default-features = false + +[dependencies.backtrace] +version = "0.3.61" + [dependencies.serde] version = "1.0" features = [ "derive" ] -[dependencies.thiserror] -version = "1.0" - [dependencies.toml] version = "0.5" diff --git a/package/src/imports/directory.rs b/package/src/imports/directory.rs index 1f01597d2e..82ef4afe75 100644 --- a/package/src/imports/directory.rs +++ b/package/src/imports/directory.rs @@ -14,27 +14,31 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::errors::ImportsDirectoryError; +use leo_errors::{LeoError, PackageError}; use std::{borrow::Cow, fs, path::Path}; +use backtrace::Backtrace; +use eyre::eyre; + pub static IMPORTS_DIRECTORY_NAME: &str = "imports/"; pub struct ImportsDirectory; impl ImportsDirectory { /// Creates a directory at the provided path with the default directory name. - pub fn create(path: &Path) -> Result<(), ImportsDirectoryError> { + pub fn create(path: &Path) -> Result<(), LeoError> { let mut path = Cow::from(path); if path.is_dir() && !path.ends_with(IMPORTS_DIRECTORY_NAME) { path.to_mut().push(IMPORTS_DIRECTORY_NAME); } - fs::create_dir_all(&path).map_err(ImportsDirectoryError::Creating) + fs::create_dir_all(&path) + .map_err(|e| PackageError::failed_to_create_imports_directory(eyre!(e), Backtrace::new()).into()) } /// Removes an imported package in the imports directory at the provided path. - pub fn remove_import(path: &Path, package_name: &str) -> Result<(), ImportsDirectoryError> { + pub fn remove_import(path: &Path, package_name: &str) -> Result<(), LeoError> { let mut path = Cow::from(path); if path.is_dir() && !path.ends_with(IMPORTS_DIRECTORY_NAME) { path.to_mut().push(IMPORTS_DIRECTORY_NAME); @@ -43,10 +47,11 @@ impl ImportsDirectory { path.to_mut().push(package_name); if !path.exists() || !path.is_dir() { - return Err(ImportsDirectoryError::ImportDoesNotExist(package_name.into())); + return Err(PackageError::import_does_not_exist(package_name.into(), Backtrace::new()).into()); } - fs::remove_dir_all(&path).map_err(ImportsDirectoryError::Removing)?; + fs::remove_dir_all(&path) + .map_err(|e| PackageError::failed_to_remove_imports_directory(eyre!(e), Backtrace::new()))?; Ok(()) } diff --git a/package/src/inputs/directory.rs b/package/src/inputs/directory.rs index 77b4701501..3b85b1aaee 100644 --- a/package/src/inputs/directory.rs +++ b/package/src/inputs/directory.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::errors::InputsDirectoryError; +use leo_errors::{LeoError, PackageError}; use std::{ borrow::Cow, @@ -23,26 +23,35 @@ use std::{ path::{Path, PathBuf}, }; +use backtrace::Backtrace; +use eyre::eyre; + pub static INPUTS_DIRECTORY_NAME: &str = "inputs/"; pub struct InputsDirectory; impl InputsDirectory { /// Creates a directory at the provided path with the default directory name. - pub fn create(path: &Path) -> Result<(), InputsDirectoryError> { + pub fn create(path: &Path) -> Result<(), LeoError> { let mut path = Cow::from(path); if path.is_dir() && !path.ends_with(INPUTS_DIRECTORY_NAME) { path.to_mut().push(INPUTS_DIRECTORY_NAME); } - fs::create_dir_all(&path).map_err(InputsDirectoryError::Creating) + fs::create_dir_all(&path) + .map_err(|e| PackageError::failed_to_create_inputs_directory(eyre!(e), Backtrace::new()).into()) } /// Returns a list of files in the input directory. - pub fn files(path: &Path) -> Result, InputsDirectoryError> { + pub fn files(path: &Path) -> Result, LeoError> { let mut path = path.to_owned(); path.push(INPUTS_DIRECTORY_NAME); - let directory = fs::read_dir(&path).map_err(InputsDirectoryError::Reading)?; + + // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. + let directory = match fs::read_dir(&path) { + Ok(read_dir) => read_dir, + Err(e) => return Err(PackageError::failed_to_read_inputs_directory(eyre!(e), Backtrace::new()).into()), + }; let mut file_paths = Vec::new(); parse_file_paths(directory, &mut file_paths)?; @@ -51,25 +60,35 @@ impl InputsDirectory { } } -fn parse_file_paths(directory: ReadDir, file_paths: &mut Vec) -> Result<(), InputsDirectoryError> { +fn parse_file_paths(directory: ReadDir, file_paths: &mut Vec) -> Result<(), LeoError> { for file_entry in directory.into_iter() { - let file_entry = file_entry.map_err(InputsDirectoryError::GettingFileEntry)?; + // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. + let file_entry = match file_entry { + Ok(dir_entry) => dir_entry, + Err(e) => return Err(PackageError::failed_to_get_input_file_entry(eyre!(e), Backtrace::new()).into()), + }; let file_path = file_entry.path(); // Verify that the entry is structured as a valid file or directory - let file_type = file_entry - .file_type() - .map_err(|error| InputsDirectoryError::GettingFileType(file_path.as_os_str().to_owned(), error))?; + let file_type = file_entry.file_type().map_err(|e| { + PackageError::failed_to_get_input_file_type(file_path.as_os_str().to_owned(), eyre!(e), Backtrace::new()) + })?; if file_type.is_dir() { - let directory = fs::read_dir(&file_path).map_err(InputsDirectoryError::Reading)?; + // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. + let directory = match fs::read_dir(&file_path) { + Ok(read_dir) => read_dir, + Err(e) => return Err(PackageError::failed_to_read_inputs_directory(eyre!(e), Backtrace::new()).into()), + }; parse_file_paths(directory, file_paths)?; continue; } else if !file_type.is_file() { - return Err(InputsDirectoryError::InvalidFileType( + return Err(PackageError::invalid_input_file_type( file_path.as_os_str().to_owned(), file_type, - )); + Backtrace::new(), + ) + .into()); } file_paths.push(file_path); diff --git a/package/src/inputs/input.rs b/package/src/inputs/input.rs index 3e01cbbe5d..4cc9d03b24 100644 --- a/package/src/inputs/input.rs +++ b/package/src/inputs/input.rs @@ -16,8 +16,12 @@ //! The `program.in` file. -use crate::{errors::InputFileError, inputs::INPUTS_DIRECTORY_NAME}; +use crate::inputs::INPUTS_DIRECTORY_NAME; +use leo_errors::{LeoError, PackageError}; + +use backtrace::Backtrace; +use eyre::eyre; use serde::Deserialize; use std::{ borrow::Cow, @@ -53,21 +57,30 @@ impl InputFile { } /// Reads the program input variables from the given file path if it exists. - pub fn read_from<'a>(&self, path: &'a Path) -> Result<(String, Cow<'a, Path>), InputFileError> { + pub fn read_from<'a>(&self, path: &'a Path) -> Result<(String, Cow<'a, Path>), LeoError> { let path = self.setup_file_path(path); match fs::read_to_string(&path) { Ok(input) => Ok((input, path)), - Err(_) => Err(InputFileError::FileReadError(path.into_owned())), + Err(_) => Err(PackageError::failed_to_read_input_file(path.into_owned(), Backtrace::new()).into()), } } /// Writes the standard input format to a file. - pub fn write_to(self, path: &Path) -> Result<(), InputFileError> { + pub fn write_to(self, path: &Path) -> Result<(), LeoError> { let path = self.setup_file_path(path); - let mut file = File::create(&path)?; - Ok(file.write_all(self.template().as_bytes())?) + // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. + let mut file = match File::create(&path) { + Ok(file) => file, + Err(e) => return Err(PackageError::io_error_input_file(eyre!(e), Backtrace::new()).into()), + }; + + // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. + match file.write_all(self.template().as_bytes()) { + Ok(_) => return Ok(()), + Err(e) => return Err(PackageError::io_error_input_file(eyre!(e), Backtrace::new()).into()), + } } fn template(&self) -> String { diff --git a/package/src/inputs/pairs.rs b/package/src/inputs/pairs.rs index 0d21e7c7f4..adf1acbdcf 100644 --- a/package/src/inputs/pairs.rs +++ b/package/src/inputs/pairs.rs @@ -14,13 +14,13 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{ - inputs::{InputFile, InputsDirectory, StateFile, INPUT_FILE_EXTENSION, STATE_FILE_EXTENSION}, - InputsDirectoryError, -}; +use crate::inputs::{InputFile, InputsDirectory, StateFile, INPUT_FILE_EXTENSION, STATE_FILE_EXTENSION}; +use leo_errors::{LeoError, PackageError}; use std::{collections::HashMap, convert::TryFrom, path::Path}; +use backtrace::Backtrace; + #[derive(Default)] pub struct InputPairs { /// Maps file names to input file pairs @@ -40,7 +40,7 @@ impl InputPairs { } impl TryFrom<&Path> for InputPairs { - type Error = InputsDirectoryError; + type Error = LeoError; fn try_from(directory: &Path) -> Result { let files = InputsDirectory::files(directory)?; @@ -55,11 +55,26 @@ impl TryFrom<&Path> for InputPairs { None => continue, }; - let file_name = file - .file_stem() - .ok_or_else(|| InputsDirectoryError::GettingFileName(file.as_os_str().to_owned()))? - .to_str() - .ok_or_else(|| InputsDirectoryError::GettingFileName(file.as_os_str().to_owned()))?; + // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. + let file_name = match file.file_stem() { + Some(stem) => match stem.to_str() { + Some(file_name) => file_name, + None => { + return Err(PackageError::failed_to_get_input_file_name( + file.as_os_str().to_owned(), + Backtrace::new(), + ) + .into()); + } + }, + None => { + return Err(PackageError::failed_to_get_input_file_name( + file.as_os_str().to_owned(), + Backtrace::new(), + ) + .into()); + } + }; if file_extension == INPUT_FILE_EXTENSION.trim_start_matches('.') { let input_file = InputFile::new(file_name).read_from(&file)?.0; diff --git a/package/src/inputs/state.rs b/package/src/inputs/state.rs index 7bda80ceb7..f2fc4c899d 100644 --- a/package/src/inputs/state.rs +++ b/package/src/inputs/state.rs @@ -16,8 +16,11 @@ //! The `program.state` file. -use crate::{errors::StateFileError, inputs::INPUTS_DIRECTORY_NAME}; +use crate::inputs::INPUTS_DIRECTORY_NAME; +use leo_errors::{LeoError, PackageError}; +use backtrace::Backtrace; +use eyre::eyre; use serde::Deserialize; use std::{ borrow::Cow, @@ -53,21 +56,30 @@ impl StateFile { } /// Reads the state input variables from the given file path if it exists. - pub fn read_from<'a>(&self, path: &'a Path) -> Result<(String, Cow<'a, Path>), StateFileError> { + pub fn read_from<'a>(&self, path: &'a Path) -> Result<(String, Cow<'a, Path>), LeoError> { let path = self.setup_file_path(path); match fs::read_to_string(&path) { Ok(input) => Ok((input, path)), - Err(_) => Err(StateFileError::FileReadError(path.into_owned())), + Err(_) => Err(PackageError::failed_to_read_state_file(path.into_owned(), Backtrace::new()).into()), } } /// Writes the standard input format to a file. - pub fn write_to(self, path: &Path) -> Result<(), StateFileError> { + pub fn write_to(self, path: &Path) -> Result<(), LeoError> { let path = self.setup_file_path(path); - let mut file = File::create(&path)?; - Ok(file.write_all(self.template().as_bytes())?) + // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. + let mut file = match File::create(&path) { + Ok(file) => file, + Err(e) => return Err(PackageError::io_error_state_file(eyre!(e), Backtrace::new()).into()), + }; + + // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. + match file.write_all(self.template().as_bytes()) { + Ok(_) => return Ok(()), + Err(e) => return Err(PackageError::io_error_state_file(eyre!(e), Backtrace::new()).into()), + } } fn template(&self) -> String { diff --git a/package/src/lib.rs b/package/src/lib.rs index b3acb13176..a4f55605dc 100644 --- a/package/src/lib.rs +++ b/package/src/lib.rs @@ -23,11 +23,13 @@ pub mod source; use std::path::Path; +use leo_errors::LeoError; + pub struct LeoPackage; impl LeoPackage { /// Initializes a Leo package at the given path. - pub fn initialize(package_name: &str, path: &Path, author: Option) -> Result<(), PackageError> { + pub fn initialize(package_name: &str, path: &Path, author: Option) -> Result<(), LeoError> { package::Package::initialize(package_name, path, author) } @@ -37,7 +39,7 @@ impl LeoPackage { } /// Removes an imported Leo package - pub fn remove_imported_package(package_name: &str, path: &Path) -> Result<(), PackageError> { + pub fn remove_imported_package(package_name: &str, path: &Path) -> Result<(), LeoError> { package::Package::remove_imported_package(package_name, path) } } diff --git a/package/src/outputs/checksum.rs b/package/src/outputs/checksum.rs index 9352429973..f3dd174676 100644 --- a/package/src/outputs/checksum.rs +++ b/package/src/outputs/checksum.rs @@ -16,8 +16,11 @@ //! The build checksum file. -use crate::{errors::ChecksumFileError, outputs::OUTPUTS_DIRECTORY_NAME}; +use crate::outputs::OUTPUTS_DIRECTORY_NAME; +use leo_errors::{LeoError, PackageError}; +use backtrace::Backtrace; +use eyre::eyre; use serde::Deserialize; use std::{ borrow::Cow, @@ -49,32 +52,45 @@ impl ChecksumFile { } /// Reads the checksum from the given file path if it exists. - pub fn read_from(&self, path: &Path) -> Result { + pub fn read_from(&self, path: &Path) -> Result { let path = self.setup_file_path(path); - fs::read_to_string(&path).map_err(|_| ChecksumFileError::FileReadError(path.into_owned())) + fs::read_to_string(&path) + .map_err(|_| PackageError::failed_to_read_checksum_file(path.into_owned(), Backtrace::new()).into()) } /// Writes the given checksum to a file. - pub fn write_to(&self, path: &Path, checksum: String) -> Result<(), ChecksumFileError> { + pub fn write_to(&self, path: &Path, checksum: String) -> Result<(), LeoError> { let path = self.setup_file_path(path); - let mut file = File::create(&path)?; - file.write_all(checksum.as_bytes())?; + // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. + let mut file = match File::create(&path) { + Ok(file) => file, + Err(e) => return Err(PackageError::io_error_checksum_file(eyre!(e), Backtrace::new()).into()), + }; - Ok(()) + // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. + match file.write_all(checksum.as_bytes()) { + Ok(v) => Ok(v), + Err(e) => Err(PackageError::io_error_checksum_file(eyre!(e), Backtrace::new()).into()), + } } /// Removes the checksum at the given path if it exists. Returns `true` on success, /// `false` if the file doesn't exist, and `Error` if the file system fails during operation. - pub fn remove(&self, path: &Path) -> Result { + pub fn remove(&self, path: &Path) -> Result { let path = self.setup_file_path(path); if !path.exists() { return Ok(false); } - fs::remove_file(&path).map_err(|_| ChecksumFileError::FileRemovalError(path.into_owned()))?; - Ok(true) + // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. + match fs::remove_file(&path) { + Ok(_) => Ok(true), + Err(_) => { + return Err(PackageError::failed_to_remove_checksum_file(path.into_owned(), Backtrace::new()).into()); + } + } } fn setup_file_path<'a>(&self, path: &'a Path) -> Cow<'a, Path> { diff --git a/package/src/outputs/circuit.rs b/package/src/outputs/circuit.rs index d9d0e8cced..94ffdbacfe 100644 --- a/package/src/outputs/circuit.rs +++ b/package/src/outputs/circuit.rs @@ -16,8 +16,11 @@ //! The serialized circuit output file. -use crate::{errors::CircuitFileError, outputs::OUTPUTS_DIRECTORY_NAME}; +use crate::outputs::OUTPUTS_DIRECTORY_NAME; +use leo_errors::{LeoError, PackageError}; +use backtrace::Backtrace; +use eyre::eyre; use serde::Deserialize; use std::{ borrow::Cow, @@ -49,32 +52,45 @@ impl CircuitFile { } /// Reads the serialized circuit from the given file path if it exists. - pub fn read_from(&self, path: &Path) -> Result { + pub fn read_from(&self, path: &Path) -> Result { let path = self.setup_file_path(path); - fs::read_to_string(&path).map_err(|_| CircuitFileError::FileReadError(path.into_owned())) + fs::read_to_string(&path) + .map_err(|_| PackageError::failed_to_read_circuit_file(path.into_owned(), Backtrace::new()).into()) } /// Writes the given serialized circuit to a file. - pub fn write_to(&self, path: &Path, circuit: String) -> Result<(), CircuitFileError> { + pub fn write_to(&self, path: &Path, circuit: String) -> Result<(), LeoError> { let path = self.setup_file_path(path); - let mut file = File::create(&path)?; - file.write_all(circuit.as_bytes())?; + // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. + let mut file = match File::create(&path) { + Ok(file) => file, + Err(e) => return Err(PackageError::io_error_circuit_file(eyre!(e), Backtrace::new()).into()), + }; - Ok(()) + // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. + match file.write_all(circuit.as_bytes()) { + Ok(_) => Ok(()), + Err(e) => Err(PackageError::io_error_circuit_file(eyre!(e), Backtrace::new()).into()), + } } /// Removes the serialized circuit at the given path if it exists. Returns `true` on success, /// `false` if the file doesn't exist, and `Error` if the file system fails during operation. - pub fn remove(&self, path: &Path) -> Result { + pub fn remove(&self, path: &Path) -> Result { let path = self.setup_file_path(path); if !path.exists() { return Ok(false); } - fs::remove_file(&path).map_err(|_| CircuitFileError::FileRemovalError(path.into_owned()))?; - Ok(true) + // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. + match fs::remove_file(&path) { + Ok(_) => Ok(true), + Err(_) => { + return Err(PackageError::failed_to_remove_circuit_file(path.into_owned(), Backtrace::new()).into()); + } + } } fn setup_file_path<'a>(&self, path: &'a Path) -> Cow<'a, Path> { diff --git a/package/src/outputs/directory.rs b/package/src/outputs/directory.rs index e2557f343c..05088d92c1 100644 --- a/package/src/outputs/directory.rs +++ b/package/src/outputs/directory.rs @@ -14,8 +14,10 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::errors::OutputsDirectoryError; +use leo_errors::{LeoError, PackageError}; +use backtrace::Backtrace; +use eyre::eyre; use std::{borrow::Cow, fs, path::Path}; pub static OUTPUTS_DIRECTORY_NAME: &str = "outputs/"; @@ -24,24 +26,27 @@ pub struct OutputsDirectory; impl OutputsDirectory { /// Creates a directory at the provided path with the default directory name. - pub fn create(path: &Path) -> Result<(), OutputsDirectoryError> { + pub fn create(path: &Path) -> Result<(), LeoError> { let mut path = Cow::from(path); if path.is_dir() && !path.ends_with(OUTPUTS_DIRECTORY_NAME) { path.to_mut().push(OUTPUTS_DIRECTORY_NAME); } - fs::create_dir_all(&path).map_err(OutputsDirectoryError::Creating) + fs::create_dir_all(&path) + .map_err(|e| PackageError::failed_to_create_inputs_directory(eyre!(e), Backtrace::new()).into()) } /// Removes the directory at the provided path. - pub fn remove(path: &Path) -> Result<(), OutputsDirectoryError> { + pub fn remove(path: &Path) -> Result<(), LeoError> { let mut path = Cow::from(path); if path.is_dir() && !path.ends_with(OUTPUTS_DIRECTORY_NAME) { path.to_mut().push(OUTPUTS_DIRECTORY_NAME); } if path.exists() { - fs::remove_dir_all(&path).map_err(OutputsDirectoryError::Removing)?; + if let Err(e) = fs::remove_dir_all(&path) { + return Err(PackageError::failed_to_create_inputs_directory(eyre!(e), Backtrace::new()).into()); + } } Ok(()) diff --git a/package/src/outputs/proof.rs b/package/src/outputs/proof.rs index 815d6048be..289e01a4a4 100644 --- a/package/src/outputs/proof.rs +++ b/package/src/outputs/proof.rs @@ -16,8 +16,11 @@ //! The proof file. -use crate::{errors::ProofFileError, outputs::OUTPUTS_DIRECTORY_NAME}; +use crate::outputs::OUTPUTS_DIRECTORY_NAME; +use leo_errors::{LeoError, PackageError}; +use backtrace::Backtrace; +use eyre::eyre; use serde::Deserialize; use std::{ borrow::Cow, @@ -49,19 +52,27 @@ impl ProofFile { } /// Reads the proof from the given file path if it exists. - pub fn read_from(&self, path: &Path) -> Result { + pub fn read_from(&self, path: &Path) -> Result { let path = self.setup_file_path(path); - let proof = fs::read_to_string(&path).map_err(|_| ProofFileError::FileReadError(path.into_owned()))?; - Ok(proof) + fs::read_to_string(&path) + .map_err(|_| PackageError::failed_to_read_proof_file(path.into_owned(), Backtrace::new()).into()) } /// Writes the given proof to a file. - pub fn write_to(&self, path: &Path, proof: &[u8]) -> Result<(), ProofFileError> { + pub fn write_to(&self, path: &Path, proof: &[u8]) -> Result<(), LeoError> { let path = self.setup_file_path(path); - let mut file = File::create(&path)?; - file.write_all(proof)?; + // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. + let mut file = match File::create(&path) { + Ok(file) => file, + Err(e) => return Err(PackageError::io_error_proof_file(eyre!(e), Backtrace::new()).into()), + }; + + // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. + if let Err(e) = file.write_all(proof) { + return Err(PackageError::io_error_proof_file(eyre!(e), Backtrace::new()).into()); + }; tracing::info!("Saving proof... ({:?})", path); @@ -70,14 +81,19 @@ impl ProofFile { /// Removes the proof at the given path if it exists. Returns `true` on success, /// `false` if the file doesn't exist, and `Error` if the file system fails during operation. - pub fn remove(&self, path: &Path) -> Result { + pub fn remove(&self, path: &Path) -> Result { let path = self.setup_file_path(path); if !path.exists() { return Ok(false); } - fs::remove_file(&path).map_err(|_| ProofFileError::FileRemovalError(path.into_owned()))?; - Ok(true) + // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. + match fs::remove_file(&path) { + Ok(_) => Ok(true), + Err(_) => { + return Err(PackageError::failed_to_remove_proof_file(path.into_owned(), Backtrace::new()).into()); + } + } } fn setup_file_path<'a>(&self, path: &'a Path) -> Cow<'a, Path> { diff --git a/package/src/outputs/proving_key.rs b/package/src/outputs/proving_key.rs index 7e2d938bd7..a28fc2a073 100644 --- a/package/src/outputs/proving_key.rs +++ b/package/src/outputs/proving_key.rs @@ -16,8 +16,11 @@ //! The proving key file. -use crate::{errors::ProvingKeyFileError, outputs::OUTPUTS_DIRECTORY_NAME}; +use crate::outputs::OUTPUTS_DIRECTORY_NAME; +use leo_errors::{LeoError, PackageError}; +use backtrace::Backtrace; +use eyre::eyre; use serde::Deserialize; use std::{ borrow::Cow, @@ -53,32 +56,47 @@ impl ProvingKeyFile { } /// Reads the proving key from the given file path if it exists. - pub fn read_from(&self, path: &Path) -> Result, ProvingKeyFileError> { + pub fn read_from(&self, path: &Path) -> Result, LeoError> { let path = self.setup_file_path(path); - fs::read(&path).map_err(|_| ProvingKeyFileError::FileReadError(path.into_owned())) + fs::read(&path) + .map_err(|_| PackageError::failed_to_read_proving_key_file(path.into_owned(), Backtrace::new()).into()) } /// Writes the given proving key to a file. - pub fn write_to<'a>(&self, path: &'a Path, proving_key: &[u8]) -> Result, ProvingKeyFileError> { + pub fn write_to<'a>(&self, path: &'a Path, proving_key: &[u8]) -> Result, LeoError> { let path = self.setup_file_path(path); - let mut file = File::create(&path)?; - file.write_all(proving_key)?; + // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. + let mut file = match File::create(&path) { + Ok(file) => file, + Err(e) => return Err(PackageError::io_error_proving_key_file(eyre!(e), Backtrace::new()).into()), + }; - Ok(path) + // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. + match file.write_all(proving_key) { + Ok(_) => Ok(path), + Err(e) => Err(PackageError::io_error_proving_key_file(eyre!(e), Backtrace::new()).into()), + } } /// Removes the proving key at the given path if it exists. Returns `true` on success, /// `false` if the file doesn't exist, and `Error` if the file system fails during operation. - pub fn remove(&self, path: &Path) -> Result { + pub fn remove(&self, path: &Path) -> Result { let path = self.setup_file_path(path); if !path.exists() { return Ok(false); } - fs::remove_file(&path).map_err(|_| ProvingKeyFileError::FileRemovalError(path.into_owned()))?; - Ok(true) + // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. + match fs::remove_file(&path) { + Ok(_) => Ok(true), + Err(_) => { + return Err( + PackageError::failed_to_remove_proving_key_file(path.into_owned(), Backtrace::new()).into(), + ); + } + } } fn setup_file_path<'a>(&self, path: &'a Path) -> Cow<'a, Path> { diff --git a/package/src/outputs/verification_key.rs b/package/src/outputs/verification_key.rs index 6f7fca8797..3791d9a104 100644 --- a/package/src/outputs/verification_key.rs +++ b/package/src/outputs/verification_key.rs @@ -16,8 +16,11 @@ //! The verification key file. -use crate::{errors::VerificationKeyFileError, outputs::OUTPUTS_DIRECTORY_NAME}; +use crate::outputs::OUTPUTS_DIRECTORY_NAME; +use leo_errors::{LeoError, PackageError}; +use backtrace::Backtrace; +use eyre::eyre; use serde::Deserialize; use std::{ borrow::Cow, @@ -53,36 +56,47 @@ impl VerificationKeyFile { } /// Reads the verification key from the given file path if it exists. - pub fn read_from(&self, path: &Path) -> Result, VerificationKeyFileError> { + pub fn read_from(&self, path: &Path) -> Result, LeoError> { let path = self.setup_file_path(path); - fs::read(&path).map_err(|_| VerificationKeyFileError::FileReadError(path.into_owned())) + fs::read(&path) + .map_err(|_| PackageError::failed_to_read_verification_key_file(path.into_owned(), Backtrace::new()).into()) } /// Writes the given verification key to a file. - pub fn write_to<'a>( - &self, - path: &'a Path, - verification_key: &[u8], - ) -> Result, VerificationKeyFileError> { + pub fn write_to<'a>(&self, path: &'a Path, verification_key: &[u8]) -> Result, LeoError> { let path = self.setup_file_path(path); - let mut file = File::create(&path)?; - file.write_all(verification_key)?; + // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. + let mut file = match File::create(&path) { + Ok(file) => file, + Err(e) => return Err(PackageError::io_error_verification_key_file(eyre!(e), Backtrace::new()).into()), + }; - Ok(path) + // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. + match file.write_all(verification_key) { + Ok(_) => Ok(path), + Err(e) => Err(PackageError::io_error_verification_key_file(eyre!(e), Backtrace::new()).into()), + } } /// Removes the verification key at the given path if it exists. Returns `true` on success, /// `false` if the file doesn't exist, and `Error` if the file system fails during operation. - pub fn remove(&self, path: &Path) -> Result { + pub fn remove(&self, path: &Path) -> Result { let path = self.setup_file_path(path); if !path.exists() { return Ok(false); } - fs::remove_file(&path).map_err(|_| VerificationKeyFileError::FileRemovalError(path.into_owned()))?; - Ok(true) + // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. + match fs::remove_file(&path) { + Ok(_) => Ok(true), + Err(_) => { + return Err( + PackageError::failed_to_remove_verification_key_file(path.into_owned(), Backtrace::new()).into(), + ); + } + } } fn setup_file_path<'a>(&self, path: &'a Path) -> Cow<'a, Path> { diff --git a/package/src/package.rs b/package/src/package.rs index 8a7fb861e7..93c9e85477 100644 --- a/package/src/package.rs +++ b/package/src/package.rs @@ -15,13 +15,15 @@ // along with the Leo library. If not, see . use crate::{ - errors::PackageError, imports::ImportsDirectory, inputs::{InputFile, InputsDirectory, StateFile}, root::{Gitignore, Manifest, README}, source::{MainFile, SourceDirectory}, }; +use leo_errors::{LeoError, PackageError}; + +use backtrace::Backtrace; use serde::Deserialize; use std::path::Path; @@ -34,10 +36,10 @@ pub struct Package { } impl Package { - pub fn new(package_name: &str) -> Result { + pub fn new(package_name: &str) -> Result { // Check that the package name is valid. if !Self::is_package_name_valid(package_name) { - return Err(PackageError::InvalidPackageName(package_name.to_string())); + return Err(PackageError::invalid_package_name(package_name.to_string(), Backtrace::new()).into()); } Ok(Self { @@ -182,14 +184,16 @@ impl Package { } /// Creates a package at the given path - pub fn initialize(package_name: &str, path: &Path, author: Option) -> Result<(), PackageError> { + pub fn initialize(package_name: &str, path: &Path, author: Option) -> Result<(), LeoError> { // First, verify that this directory is not already initialized as a Leo package. { if !Self::can_initialize(package_name, path) { - return Err(PackageError::FailedToInitialize( + return Err(PackageError::failed_to_initialize_package( package_name.to_owned(), path.as_os_str().to_owned(), - )); + Backtrace::new(), + ) + .into()); } } // Next, initialize this directory as a Leo package. @@ -227,10 +231,12 @@ impl Package { // Next, verify that a valid Leo package has been initialized in this directory { if !Self::is_initialized(package_name, path) { - return Err(PackageError::FailedToInitialize( + return Err(PackageError::failed_to_initialize_package( package_name.to_owned(), path.as_os_str().to_owned(), - )); + Backtrace::new(), + ) + .into()); } } @@ -238,7 +244,7 @@ impl Package { } /// Removes the package at the given path - pub fn remove_imported_package(package_name: &str, path: &Path) -> Result<(), PackageError> { + pub fn remove_imported_package(package_name: &str, path: &Path) -> Result<(), LeoError> { Ok(ImportsDirectory::remove_import(path, package_name)?) } } diff --git a/package/src/root/gitignore.rs b/package/src/root/gitignore.rs index 756c51be05..dd18daf4e6 100644 --- a/package/src/root/gitignore.rs +++ b/package/src/root/gitignore.rs @@ -16,8 +16,10 @@ //! The `.gitignore` file. -use crate::errors::GitignoreError; +use leo_errors::{LeoError, PackageError}; +use backtrace::Backtrace; +use eyre::eyre; use serde::Deserialize; use std::{borrow::Cow, fs::File, io::Write, path::Path}; @@ -39,14 +41,23 @@ impl Gitignore { path.exists() } - pub fn write_to(self, path: &Path) -> Result<(), GitignoreError> { + pub fn write_to(self, path: &Path) -> Result<(), LeoError> { let mut path = Cow::from(path); if path.is_dir() { path.to_mut().push(GITIGNORE_FILENAME); } - let mut file = File::create(&path)?; - Ok(file.write_all(self.template().as_bytes())?) + // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. + let mut file = match File::create(&path) { + Ok(file) => file, + Err(e) => return Err(PackageError::io_error_gitignore_file(eyre!(e), Backtrace::new()).into()), + }; + + // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. + match file.write_all(self.template().as_bytes()) { + Ok(v) => Ok(v), + Err(e) => Err(PackageError::io_error_gitignore_file(eyre!(e), Backtrace::new()).into()), + } } fn template(&self) -> String { diff --git a/package/src/root/manifest.rs b/package/src/root/manifest.rs index 9167f402bb..e22744ed05 100644 --- a/package/src/root/manifest.rs +++ b/package/src/root/manifest.rs @@ -14,8 +14,11 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{errors::ManifestError, package::Package}; +use crate::package::Package; +use leo_errors::{LeoError, PackageError}; +use backtrace::Backtrace; +use eyre::eyre; use serde::Deserialize; use std::{ borrow::Cow, @@ -40,7 +43,7 @@ pub struct Manifest { } impl Manifest { - pub fn new(package_name: &str, author: Option) -> Result { + pub fn new(package_name: &str, author: Option) -> Result { Ok(Self { project: Package::new(package_name)?, remote: author.map(|author| Remote { author }), @@ -79,15 +82,30 @@ impl Manifest { self.remote.clone() } - pub fn write_to(self, path: &Path) -> Result<(), ManifestError> { + pub fn write_to(self, path: &Path) -> Result<(), LeoError> { let mut path = Cow::from(path); if path.is_dir() { path.to_mut().push(MANIFEST_FILENAME); } - let mut file = File::create(&path).map_err(|error| ManifestError::Creating(MANIFEST_FILENAME, error))?; - file.write_all(self.template().as_bytes()) - .map_err(|error| ManifestError::Writing(MANIFEST_FILENAME, error)) + // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. + let mut file = match File::create(&path) { + Ok(file) => file, + Err(e) => { + return Err(PackageError::failed_to_create_manifest_file( + MANIFEST_FILENAME, + eyre!(e), + Backtrace::new(), + ) + .into()); + } + }; + + // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. + match file.write_all(self.template().as_bytes()) { + Ok(v) => return Ok(v), + Err(e) => return Err(PackageError::io_error_manifest_file(eyre!(e), Backtrace::new()).into()), + } } fn template(&self) -> String { @@ -113,7 +131,7 @@ author = "{author}" # Add your Aleo Package Manager username or team name. } impl TryFrom<&Path> for Manifest { - type Error = ManifestError; + type Error = PackageError; fn try_from(path: &Path) -> Result { let mut path = Cow::from(path); @@ -121,15 +139,36 @@ impl TryFrom<&Path> for Manifest { path.to_mut().push(MANIFEST_FILENAME); } - let mut file = File::open(path.clone()).map_err(|error| ManifestError::Opening(MANIFEST_FILENAME, error))?; - let size = file - .metadata() - .map_err(|error| ManifestError::Metadata(MANIFEST_FILENAME, error))? - .len() as usize; + // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. + let mut file = match File::open(path.clone()) { + Ok(file) => file, + Err(e) => { + return Err( + PackageError::failed_to_open_manifest_file(MANIFEST_FILENAME, eyre!(e), Backtrace::new()).into(), + ); + } + }; + + // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. + let size = match file.metadata() { + Ok(metadata) => metadata.len() as usize, + Err(e) => { + return Err(PackageError::failed_to_get_manifest_metadata_file( + MANIFEST_FILENAME, + eyre!(e), + Backtrace::new(), + ) + .into()); + } + }; let mut buffer = String::with_capacity(size); - file.read_to_string(&mut buffer) - .map_err(|error| ManifestError::Reading(MANIFEST_FILENAME, error))?; + // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. + if let Err(e) = file.read_to_string(&mut buffer) { + return Err( + PackageError::failed_to_read_manifest_file(MANIFEST_FILENAME, eyre!(e), Backtrace::new()).into(), + ); + } // Determine if the old remote format is being used, and update to new convention @@ -215,12 +254,29 @@ author = "{author}" // Rewrite the toml file if it has been updated if buffer != refactored_toml { - let mut file = File::create(&path).map_err(|error| ManifestError::Creating(MANIFEST_FILENAME, error))?; - file.write_all(refactored_toml.as_bytes()) - .map_err(|error| ManifestError::Writing(MANIFEST_FILENAME, error))?; + let mut file = match File::create(&path) { + Ok(file) => file, + Err(e) => { + return Err(PackageError::failed_to_create_manifest_file( + MANIFEST_FILENAME, + eyre!(e), + Backtrace::new(), + ) + .into()); + } + }; + + // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. + if let Err(e) = file.write_all(refactored_toml.as_bytes()) { + return Err( + PackageError::failed_to_write_manifest_file(MANIFEST_FILENAME, eyre!(e), Backtrace::new()).into(), + ); + } } // Read the toml file - toml::from_str(&final_toml).map_err(|error| ManifestError::Parsing(MANIFEST_FILENAME, error)) + toml::from_str(&final_toml).map_err(|e| { + PackageError::failed_to_parse_manifest_file(MANIFEST_FILENAME, eyre!(e), Backtrace::new()).into() + }) } } diff --git a/package/src/root/readme.rs b/package/src/root/readme.rs index ad4d6190f2..1cd5865e02 100644 --- a/package/src/root/readme.rs +++ b/package/src/root/readme.rs @@ -17,8 +17,10 @@ //! The `README.md` file. -use crate::errors::READMEError; +use leo_errors::{LeoError, PackageError}; +use backtrace::Backtrace; +use eyre::eyre; use serde::Deserialize; use std::{borrow::Cow, fs::File, io::Write, path::Path}; @@ -48,14 +50,23 @@ impl README { path.exists() } - pub fn write_to(self, path: &Path) -> Result<(), READMEError> { + pub fn write_to(self, path: &Path) -> Result<(), LeoError> { let mut path = Cow::from(path); if path.is_dir() { path.to_mut().push(README_FILENAME); } - let mut file = File::create(&path)?; - Ok(file.write_all(self.template().as_bytes())?) + // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. + let mut file = match File::create(&path) { + Ok(file) => file, + Err(e) => return Err(PackageError::io_error_readme_file(eyre!(e), Backtrace::new()).into()), + }; + + // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. + match file.write_all(self.template().as_bytes()) { + Ok(v) => Ok(v), + Err(e) => Err(PackageError::io_error_readme_file(eyre!(e), Backtrace::new()).into()), + } } fn template(&self) -> String { diff --git a/package/src/root/zip.rs b/package/src/root/zip.rs index 6286b125d0..228764bdf8 100644 --- a/package/src/root/zip.rs +++ b/package/src/root/zip.rs @@ -17,7 +17,6 @@ //! The program package zip file. use crate::{ - errors::ZipFileError, imports::IMPORTS_DIRECTORY_NAME, inputs::{INPUTS_DIRECTORY_NAME, INPUT_FILE_EXTENSION, STATE_FILE_EXTENSION}, outputs::{ @@ -31,6 +30,10 @@ use crate::{ root::{MANIFEST_FILENAME, README_FILENAME}, source::{SOURCE_DIRECTORY_NAME, SOURCE_FILE_EXTENSION}, }; +use leo_errors::{LeoError, PackageError}; + +use backtrace::Backtrace; +use eyre::eyre; use serde::Deserialize; use std::{ @@ -69,21 +72,25 @@ impl ZipFile { } // /// Reads the program bytes from the given file path if it exists. - // pub fn read_from(&self, path: &Path) -> Result, ZipFileError> { + // pub fn read_from(&self, path: &Path) -> Result, LeoError> { // let path = self.setup_file_path(path); // - // Ok(fs::read(&path).map_err(|_| ZipFileError::FileReadError(path.clone()))?) + // Ok(fs::read(&path).map_err(|_| PackageError::FileReadError(path.clone()))?) // } /// Writes the current package contents to a zip file. - pub fn write(&self, src_dir: &Path) -> Result<(), ZipFileError> { + pub fn write(&self, src_dir: &Path) -> Result<(), LeoError> { // Build walkdir iterator from current package let walkdir = WalkDir::new(src_dir); // Create zip file let path = self.setup_file_path(src_dir); - let file = &mut File::create(&path)?; + // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. + let file = match File::create(&path) { + Ok(file) => file, + Err(e) => return Err(PackageError::failed_to_create_zip_file(eyre!(e), Backtrace::new()).into()), + }; let mut zip = ZipWriter::new(file); let options = FileOptions::default() .compression_method(zip::CompressionMethod::Stored) @@ -107,22 +114,43 @@ impl ZipFile { if path.is_file() { tracing::info!("Adding file {:?} as {:?}", path, name); #[allow(deprecated)] - zip.start_file_from_path(name, options)?; - let mut f = File::open(path)?; + // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. + if let Err(e) = zip.start_file_from_path(name, options) { + return Err(PackageError::io_error_zip_file(eyre!(e), Backtrace::new()).into()); + } + + // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. + let mut f = match File::open(path) { + Ok(file) => file, + Err(e) => return Err(PackageError::failed_to_open_zip_file(eyre!(e), Backtrace::new()).into()), + }; + + // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. + if let Err(e) = f.read_to_end(&mut buffer) { + return Err(PackageError::failed_to_read_zip_file(eyre!(e), Backtrace::new()).into()); + } + + // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. + if let Err(e) = zip.write_all(&*buffer) { + return Err(PackageError::failed_to_write_zip_file(eyre!(e), Backtrace::new()).into()); + } - f.read_to_end(&mut buffer)?; - zip.write_all(&*buffer)?; buffer.clear(); } else if !name.as_os_str().is_empty() { // Only if not root Avoids path spec / warning // and mapname conversion failed error on unzip tracing::info!("Adding directory {:?} as {:?}", path, name); #[allow(deprecated)] - zip.add_directory_from_path(name, options)?; + // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. + if let Err(e) = zip.add_directory_from_path(name, options) { + return Err(PackageError::io_error_zip_file(eyre!(e), Backtrace::new()).into()); + } } } - zip.finish()?; + if let Err(e) = zip.finish() { + return Err(PackageError::io_error_zip_file(eyre!(e), Backtrace::new()).into()); + } tracing::info!("Package zip file created successfully {:?}", path); @@ -131,13 +159,17 @@ impl ZipFile { /// Removes the zip file at the given path if it exists. Returns `true` on success, /// `false` if the file doesn't exist, and `Error` if the file system fails during operation. - pub fn remove(&self, path: &Path) -> Result { + pub fn remove(&self, path: &Path) -> Result { let path = self.setup_file_path(path); if !path.exists() { return Ok(false); } - fs::remove_file(&path).map_err(|_| ZipFileError::FileRemovalError(path.into_owned()))?; + // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. + if let Err(_) = fs::remove_file(&path) { + return Err(PackageError::failed_to_remove_zip_file(path.into_owned(), Backtrace::new()).into()); + } + Ok(true) } diff --git a/package/src/source/directory.rs b/package/src/source/directory.rs index 5764f972df..c238fb36cf 100644 --- a/package/src/source/directory.rs +++ b/package/src/source/directory.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::errors::SourceDirectoryError; +use leo_errors::{LeoError, PackageError}; use std::{ borrow::Cow, @@ -22,6 +22,9 @@ use std::{ path::{Path, PathBuf}, }; +use backtrace::Backtrace; +use eyre::eyre; + pub static SOURCE_DIRECTORY_NAME: &str = "src/"; pub static SOURCE_FILE_EXTENSION: &str = ".leo"; @@ -30,46 +33,61 @@ pub struct SourceDirectory; impl SourceDirectory { /// Creates a directory at the provided path with the default directory name. - pub fn create(path: &Path) -> Result<(), SourceDirectoryError> { + pub fn create(path: &Path) -> Result<(), LeoError> { let mut path = Cow::from(path); if path.is_dir() && !path.ends_with(SOURCE_DIRECTORY_NAME) { path.to_mut().push(SOURCE_DIRECTORY_NAME); } - fs::create_dir_all(&path).map_err(SourceDirectoryError::Creating) + fs::create_dir_all(&path) + .map_err(|e| PackageError::failed_to_create_source_directory(eyre!(e), Backtrace::new()).into()) } /// Returns a list of files in the source directory. - pub fn files(path: &Path) -> Result, SourceDirectoryError> { + pub fn files(path: &Path) -> Result, LeoError> { let mut path = Cow::from(path); path.to_mut().push(SOURCE_DIRECTORY_NAME); - let directory = fs::read_dir(&path).map_err(SourceDirectoryError::Reading)?; + + // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. + let directory = match fs::read_dir(&path) { + Ok(read_dir) => read_dir, + Err(e) => return Err(PackageError::failed_to_read_inputs_directory(eyre!(e), Backtrace::new()).into()), + }; let mut file_paths = Vec::new(); for file_entry in directory.into_iter() { - let file_entry = file_entry.map_err(SourceDirectoryError::GettingFileEntry)?; + let file_entry = + file_entry.map_err(|e| PackageError::failed_to_get_source_file_entry(eyre!(e), Backtrace::new()))?; let file_path = file_entry.path(); // Verify that the entry is structured as a valid file - let file_type = file_entry - .file_type() - .map_err(|error| SourceDirectoryError::GettingFileType(file_path.as_os_str().to_owned(), error))?; + let file_type = file_entry.file_type().map_err(|e| { + PackageError::failed_to_get_source_file_type( + file_path.as_os_str().to_owned(), + eyre!(e), + Backtrace::new(), + ) + })?; if !file_type.is_file() { - return Err(SourceDirectoryError::InvalidFileType( + return Err(PackageError::invalid_source_file_type( file_path.as_os_str().to_owned(), file_type, - )); + Backtrace::new(), + ) + .into()); } // Verify that the file has the default file extension - let file_extension = file_path - .extension() - .ok_or_else(|| SourceDirectoryError::GettingFileExtension(file_path.as_os_str().to_owned()))?; + let file_extension = file_path.extension().ok_or_else(|| { + PackageError::failed_to_get_source_file_extension(file_path.as_os_str().to_owned(), Backtrace::new()) + })?; if file_extension != SOURCE_FILE_EXTENSION.trim_start_matches('.') { - return Err(SourceDirectoryError::InvalidFileExtension( + return Err(PackageError::invalid_source_file_extension( file_path.as_os_str().to_owned(), file_extension.to_owned(), - )); + Backtrace::new(), + ) + .into()); } file_paths.push(file_path); diff --git a/package/src/source/main.rs b/package/src/source/main.rs index 842c85c7eb..d0beab8f63 100644 --- a/package/src/source/main.rs +++ b/package/src/source/main.rs @@ -16,8 +16,11 @@ //! The `main.leo` file. -use crate::{errors::MainFileError, source::directory::SOURCE_DIRECTORY_NAME}; +use crate::source::directory::SOURCE_DIRECTORY_NAME; +use leo_errors::{LeoError, PackageError}; +use backtrace::Backtrace; +use eyre::eyre; use serde::Deserialize; use std::{borrow::Cow, fs::File, io::Write, path::Path}; @@ -50,7 +53,7 @@ impl MainFile { path.exists() } - pub fn write_to(self, path: &Path) -> Result<(), MainFileError> { + pub fn write_to(self, path: &Path) -> Result<(), LeoError> { let mut path = Cow::from(path); if path.is_dir() { if !path.ends_with(SOURCE_DIRECTORY_NAME) { @@ -59,8 +62,10 @@ impl MainFile { path.to_mut().push(MAIN_FILENAME); } - let mut file = File::create(&path)?; - Ok(file.write_all(self.template().as_bytes())?) + let mut file = File::create(&path).map_err(|e| PackageError::io_error_main_file(eyre!(e), Backtrace::new()))?; + Ok(file + .write_all(self.template().as_bytes()) + .map_err(|e| PackageError::io_error_main_file(eyre!(e), Backtrace::new()))?) } fn template(&self) -> String { diff --git a/parser/src/test.rs b/parser/src/test.rs index 26d5f9a7d0..74352bb573 100644 --- a/parser/src/test.rs +++ b/parser/src/test.rs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use leo_ast::{Expression, ExpressionStatement, Span, Statement, ValueExpression}; +use leo_ast::{Expression, ExpressionStatement, Statement, ValueExpression}; +use leo_errors::Span; use leo_test_framework::{ runner::{Namespace, ParseType, Runner}, Test, diff --git a/synthesizer/src/serialized_circuit.rs b/synthesizer/src/serialized_circuit.rs index 100c216ebb..a70ba5e3ec 100644 --- a/synthesizer/src/serialized_circuit.rs +++ b/synthesizer/src/serialized_circuit.rs @@ -125,7 +125,8 @@ impl TryFrom for CircuitSynthesizer { let mut deserialized = OptionalVec::with_capacity(assignments.len()); for serialized_assignment in assignments { - let field = ::Fr::try_from(serialized_assignment).map_err(|e| LeoError::from(SnarkVMError::from(eyre!(e))))?; + let field = ::Fr::try_from(serialized_assignment) + .map_err(|e| LeoError::from(SnarkVMError::from(eyre!(e))))?; deserialized.insert(field); } @@ -143,7 +144,8 @@ impl TryFrom for CircuitSynthesizer { let mut deserialized = Vec::with_capacity(constraints.len()); for &(ref serialized_coeff, ref serialized_index) in constraints { - let field = ::Fr::try_from(serialized_coeff).map_err(|e| LeoError::from(SnarkVMError::from(eyre!(e))))?; + let field = ::Fr::try_from(serialized_coeff) + .map_err(|e| LeoError::from(SnarkVMError::from(eyre!(e))))?; let index = Index::from(serialized_index); deserialized.push((field, index)); From 88e0e323177919824b97b59acb4e6870028a960d Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Tue, 3 Aug 2021 04:49:07 -0700 Subject: [PATCH 05/58] formatting fixes, regen outs, still have a few things to do --- compiler/src/compiler.rs | 2 +- errors/src/common/backtraced.rs | 2 +- errors/src/common/formatted.rs | 6 +- parser/tests/serialization/json.rs | 6 +- .../array/array_range_access_fail.leo.out | 2 +- .../array/array_size_zero_fail.leo.out | 2 +- .../array/input_nested_3x2_fail.leo.out | 2 +- .../array/multi_fail_initializer.leo.out | 2 +- .../compiler/array/multi_fail_inline.leo.out | 2 +- .../array/multi_initializer_fail.leo.out | 2 +- .../array/nested_3x2_value_fail.leo.out | 2 +- .../array/tuple_3x2_value_fail.leo.out | 2 +- .../compiler/compiler/array/type_fail.leo.out | 2 +- .../type_nested_value_nested_3x2_fail.leo.out | 2 +- ...ype_nested_value_nested_4x3x2_fail.leo.out | 2 +- .../type_nested_value_tuple_3x2_fail.leo.out | 2 +- ...type_nested_value_tuple_4x3x2_fail.leo.out | 2 +- .../type_tuple_value_nested_3x2_fail.leo.out | 2 +- ...type_tuple_value_nested_4x3x2_fail.leo.out | 2 +- .../type_tuple_value_tuple_3x2_fail.leo.out | 2 +- .../type_tuple_value_tuple_4x3x2_fail.leo.out | 2 +- .../array/variable_slice_fail.leo.out | 2 +- .../compiler/char/invalid_char.leo.out | 2 +- .../big_self_outside_circuit_fail.leo.out | 2 +- .../circuits/const_self_variable_fail.leo.out | 2 +- .../compiler/circuits/inline_fail.leo.out | 2 +- .../circuits/inline_member_fail.leo.out | 2 +- .../circuits/inline_undefined.leo.out | 2 +- .../circuits/member_function_fail.leo.out | 2 +- .../circuits/member_function_invalid.leo.out | 2 +- .../member_static_function_invalid.leo.out | 2 +- .../member_static_function_undefined.leo.out | 2 +- .../circuits/member_variable_fail.leo.out | 2 +- .../circuits/mut_function_fail.leo.out | 2 +- .../circuits/mut_self_function_fail.leo.out | 2 +- .../mut_self_static_function_fail.leo.out | 2 +- .../circuits/mut_self_variable_fail.leo.out | 2 +- .../circuits/mut_static_function_fail.leo.out | 2 +- .../circuits/mut_variable_fail.leo.out | 2 +- .../compiler/circuits/self_circuit.leo.out | 2 +- .../compiler/circuits/self_fail.leo.out | 2 +- .../circuits/self_member_invalid.leo.out | 2 +- .../circuits/self_member_undefined.leo.out | 2 +- .../compiler/console/log_fail.leo.out | 2 +- .../console/log_parameter_fail_empty.leo.out | 2 +- .../console/log_parameter_fail_none.leo.out | 2 +- .../log_parameter_fail_unknown.leo.out | 2 +- .../core/core_circuit_invalid.leo.out | 2 +- .../core/core_circuit_star_fail.leo.out | 2 +- .../core/core_package_invalid.leo.out | 2 +- .../core_unstable_package_invalid.leo.out | 2 +- .../field/no_space_between_literal.leo.out | 2 +- .../duplicate_definition_fail.leo.out | 2 +- .../function/multiple_returns_fail.leo.out | 2 +- .../multiple_returns_fail_conditional.leo.out | 2 +- .../function/return_array_nested_fail.leo.out | 2 +- .../function/return_array_tuple_fail.leo.out | 2 +- .../compiler/function/scope_fail.leo.out | 2 +- .../compiler/function/undefined.leo.out | 2 +- .../global_consts/modify_global_const.leo.out | 2 +- .../const_input_non_const.leo.out | 2 +- .../const_var_in_both_sections_fail.leo.out | 2 +- .../program_input/main_array_fail.leo.out | 2 +- .../program_input/main_tuple_fail.leo.out | 2 +- .../non_const_input_const.leo.out | 2 +- .../var_in_both_sections_fail.leo.out | 2 +- .../main_array_fail.leo.out | 2 +- .../main_tuple_fail.leo.out | 2 +- .../program_registers/registers_fail.leo.out | 2 +- .../compiler/integers/i128/max_fail.leo.out | 2 +- .../compiler/integers/i128/min_fail.leo.out | 2 +- .../i128/no_space_between_literal.leo.out | 2 +- .../compiler/integers/i16/max_fail.leo.out | 2 +- .../compiler/integers/i16/min_fail.leo.out | 2 +- .../i16/no_space_between_literal.leo.out | 2 +- .../compiler/integers/i32/max_fail.leo.out | 2 +- .../compiler/integers/i32/min_fail.leo.out | 2 +- .../i32/no_space_between_literal.leo.out | 2 +- .../compiler/integers/i64/max_fail.leo.out | 2 +- .../compiler/integers/i64/min_fail.leo.out | 2 +- .../i64/no_space_between_literal.leo.out | 2 +- .../compiler/integers/i8/max_fail.leo.out | 2 +- .../compiler/integers/i8/min_fail.leo.out | 2 +- .../compiler/integers/i8/negate_min.leo.out | 2 +- .../i8/no_space_between_literal.leo.out | 2 +- .../compiler/integers/u128/max_fail.leo.out | 2 +- .../compiler/integers/u128/min_fail.leo.out | 2 +- .../integers/u128/negative_input_fail.leo.out | 2 +- .../u128/no_space_between_literal.leo.out | 2 +- .../compiler/integers/u16/max_fail.leo.out | 2 +- .../compiler/integers/u16/min_fail.leo.out | 2 +- .../integers/u16/negative_input_fail.leo.out | 2 +- .../u16/no_space_between_literal.leo.out | 2 +- .../compiler/integers/u32/max_fail.leo.out | 2 +- .../compiler/integers/u32/min_fail.leo.out | 2 +- .../integers/u32/negative_input_fail.leo.out | 2 +- .../u32/no_space_between_literal.leo.out | 2 +- .../compiler/integers/u64/max_fail.leo.out | 2 +- .../compiler/integers/u64/min_fail.leo.out | 2 +- .../integers/u64/negative_input_fail.leo.out | 2 +- .../u64/no_space_between_literal.leo.out | 2 +- .../compiler/integers/u8/max_fail.leo.out | 2 +- .../compiler/integers/u8/min_fail.leo.out | 2 +- .../integers/u8/negative_input_fail.leo.out | 2 +- .../u8/no_space_between_literal.leo.out | 2 +- .../compiler/mutability/array_fail.leo.out | 2 +- .../compiler/mutability/circuit_fail.leo.out | 2 +- .../mutability/circuit_function_const.leo.out | 2 +- .../circuit_static_function_mut_fail.leo.out | 2 +- .../compiler/mutability/const.leo.out | 2 +- .../mutability/function_input.leo.out | 2 +- .../compiler/mutability/let_fail.leo.out | 2 +- .../statements/assign_ternary.leo.out | 2 +- .../statements/duplicate_variable.leo.out | 2 +- .../statements/ternary_non_const_fail.leo.out | 2 +- .../parser/circuits/fields_fail.leo.out | 2 +- .../parser/expression/array_init_fail.leo.out | 4 +- .../expression/array_inline_fail.leo.out | 10 +-- .../expression/circuit_init_fail.leo.out | 22 +++--- .../expression/literal/address_fail.leo.out | 18 ++--- .../expression/literal/char_fail.leo.out | 70 +++++++++---------- .../expression/literal/group_fail.leo.out | 8 +-- .../expression/literal/string_fail.leo.out | 14 ++-- .../parser/functions/annotated_fail.leo.out | 2 +- .../parser/functions/const_input_fail.leo.out | 2 +- .../import/import_empty_list_fail.leo.out | 2 +- .../parser/parser/import/invalid.leo.out | 2 +- .../parser/statement/conditional_fail.leo.out | 2 +- .../parser/statement/definition_fail.leo.out | 46 ++++++------ .../parser/statement/return_fail.leo.out | 6 +- 130 files changed, 224 insertions(+), 224 deletions(-) diff --git a/compiler/src/compiler.rs b/compiler/src/compiler.rs index d97590a6c7..0fcdb6d9a4 100644 --- a/compiler/src/compiler.rs +++ b/compiler/src/compiler.rs @@ -381,7 +381,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstraintSynthesizer for Compiler<' let package_name = self.program_name.clone(); // TODO WHAT TO DO HERE let result = self.compile_constraints(cs).map_err(|e| { - tracing::error!("Error: {}", e); + tracing::error!("Error {}", e); SynthesisError::Unsatisfiable })?; diff --git a/errors/src/common/backtraced.rs b/errors/src/common/backtraced.rs index d426e3a1cd..9a96847040 100644 --- a/errors/src/common/backtraced.rs +++ b/errors/src/common/backtraced.rs @@ -83,7 +83,7 @@ impl fmt::Display for BacktracedError { write!(f, "{indent } = {help}", indent = INDENT, help = help)?; } - write!(f, "{:?}", self.backtrace) + write!(f, "stack backtrace:\n{:?}", self.backtrace) } } diff --git a/errors/src/common/formatted.rs b/errors/src/common/formatted.rs index e8626f3feb..07184f2f72 100644 --- a/errors/src/common/formatted.rs +++ b/errors/src/common/formatted.rs @@ -94,8 +94,8 @@ impl fmt::Display for FormattedError { let underlined = underline(self.col_start, self.col_start); let error_message = format!( - "{indent }[E{error_type}{code_identifier}{exit_code}]: {message}\ - {indent }--> {path}:{line_start}:{start}\n\ + "[E{error_type}{code_identifier}{exit_code:0>4}]: {message}\n\ + --> {path}:{line_start}:{start}\n\ {indent } ", indent = INDENT, error_type = self.backtrace.error_type, @@ -131,7 +131,7 @@ impl fmt::Display for FormattedError { write!(f, "{indent } = {help}", indent = INDENT, help = help)?; } - write!(f, "{:?}", self.backtrace) + write!(f, "stack backtrace:\n{:?}", self.backtrace.backtrace) } } diff --git a/parser/tests/serialization/json.rs b/parser/tests/serialization/json.rs index 9e62f65072..eb19310a9a 100644 --- a/parser/tests/serialization/json.rs +++ b/parser/tests/serialization/json.rs @@ -17,11 +17,11 @@ use leo_ast::Ast; #[cfg(not(feature = "ci_skip"))] use leo_ast::Program; -use leo_parser::SyntaxError; +use leo_errors::LeoError; use std::path::{Path, PathBuf}; -fn to_ast(program_filepath: &Path) -> Result { +fn to_ast(program_filepath: &Path) -> Result { let program_string = std::fs::read_to_string(program_filepath).expect("failed to open test"); // Parses the Leo file and constructs a leo ast. @@ -96,7 +96,7 @@ fn test_generic_parser_error() { to_ast(&program_filepath) } - .map_err(|err| matches!(err, SyntaxError::Error(_))); + .map_err(|err| matches!(err, LeoError::ParserError(_))); assert!(error_result.err().unwrap()); } diff --git a/tests/expectations/compiler/compiler/array/array_range_access_fail.leo.out b/tests/expectations/compiler/compiler/array/array_range_access_fail.leo.out index 4fa4f71894..16fdd8468b 100644 --- a/tests/expectations/compiler/compiler/array/array_range_access_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/array_range_access_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:7:24\n |\n 7 | const z: [u8; 2] = y[..1u32][..x];\n | ^^^^^^^^^^^^^^\n |\n = array index out of bounds: '0'" + - "[EG0370021]: array index out of bounds: '0'\n--> compiler-test:7:24\n |\n 7 | const z: [u8; 2] = y[..1u32][..x];\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/array/array_size_zero_fail.leo.out b/tests/expectations/compiler/compiler/array/array_size_zero_fail.leo.out index f76f2e73a4..111f7f6b12 100644 --- a/tests/expectations/compiler/compiler/array/array_size_zero_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/array_size_zero_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:13\n |\n 4 | let a = [true; (0)];\n | ^^^^^^^^^^^\n |\n = received dimension size of 0, expected it to be 1 or larger." + - "[ET0371001]: received dimension size of 0, expected it to be 1 or larger.\n--> compiler-test:4:13\n |\n 4 | let a = [true; (0)];\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/array/input_nested_3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/input_nested_3x2_fail.leo.out index 35898c7997..d6bd0c041f 100644 --- a/tests/expectations/compiler/compiler/array/input_nested_3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/input_nested_3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:29\n |\n 4 | return a == [[0u8; 2]; 3)]; // This should be written the right way as this test is for the input file.\n | ^\n |\n = expected ']' -- got ')'" + - "[EP0375005]: expected ] -- got ')'\n--> compiler-test:4:29\n |\n 4 | return a == [[0u8; 2]; 3)]; // This should be written the right way as this test is for the input file.\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/array/multi_fail_initializer.leo.out b/tests/expectations/compiler/compiler/array/multi_fail_initializer.leo.out index c4b0fe28b7..ca6d92b8de 100644 --- a/tests/expectations/compiler/compiler/array/multi_fail_initializer.leo.out +++ b/tests/expectations/compiler/compiler/array/multi_fail_initializer.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:31\n |\n 4 | const arr: [u8; (2, 2)] = [[1u8; 2]; 1]; // incorrect dimensions\n | ^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 2', received: 'array of length 1'" + - "[EG0370027]: unexpected type, expected: 'array of length 2', received: 'array of length 1'\n--> compiler-test:4:31\n |\n 4 | const arr: [u8; (2, 2)] = [[1u8; 2]; 1]; // incorrect dimensions\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/array/multi_fail_inline.leo.out b/tests/expectations/compiler/compiler/array/multi_fail_inline.leo.out index d753b40f73..f3734cfa9f 100644 --- a/tests/expectations/compiler/compiler/array/multi_fail_inline.leo.out +++ b/tests/expectations/compiler/compiler/array/multi_fail_inline.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:5:35\n |\n 5 | [1u8]]; // incorrect dimensions\n | ^^^^^\n |\n = unexpected type, expected: 'array of length 2', received: 'array of length 1'" + - "[EG0370027]: unexpected type, expected: 'array of length 2', received: 'array of length 1'\n--> compiler-test:5:35\n |\n 5 | [1u8]]; // incorrect dimensions\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/array/multi_initializer_fail.leo.out b/tests/expectations/compiler/compiler/array/multi_initializer_fail.leo.out index 9a4256a73b..6fc1bc3925 100644 --- a/tests/expectations/compiler/compiler/array/multi_initializer_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/multi_initializer_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:31\n |\n 4 | const arr: [u8; (2, 2)] = [1u8; (2, 1)]; // incorrect dimensions\n | ^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 2', received: 'array of length 1'" + - "[EG0370027]: unexpected type, expected: 'array of length 2', received: 'array of length 1'\n--> compiler-test:4:31\n |\n 4 | const arr: [u8; (2, 2)] = [1u8; (2, 1)]; // incorrect dimensions\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/array/nested_3x2_value_fail.leo.out b/tests/expectations/compiler/compiler/array/nested_3x2_value_fail.leo.out index 75fe9847d8..7a656d8dbb 100644 --- a/tests/expectations/compiler/compiler/array/nested_3x2_value_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/nested_3x2_value_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:6:30\n |\n 6 | const a: [u32; (3, 2)] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 3', received: 'array of length 2'" + - "[EG0370027]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n--> compiler-test:6:30\n |\n 6 | const a: [u32; (3, 2)] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering)\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/array/tuple_3x2_value_fail.leo.out b/tests/expectations/compiler/compiler/array/tuple_3x2_value_fail.leo.out index 307ef63fb6..9aea1c38b6 100644 --- a/tests/expectations/compiler/compiler/array/tuple_3x2_value_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/tuple_3x2_value_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:5:30\n |\n 5 | const a: [u32; (3, 2)] = [0; (2, 3)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 3', received: 'array of length 2'" + - "[EG0370027]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n--> compiler-test:5:30\n |\n 5 | const a: [u32; (3, 2)] = [0; (2, 3)]; // initializer (incorrectly reversed ordering)\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/array/type_fail.leo.out b/tests/expectations/compiler/compiler/array/type_fail.leo.out index c836958daa..a0d318ff81 100644 --- a/tests/expectations/compiler/compiler/array/type_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:19\n |\n 4 | const a: [u8; -2] = [0u32; 2];\n | ^\n |\n = expected '(' -- got '-'" + - "[EP0375005]: expected ( -- got '-'\n--> compiler-test:4:19\n |\n 4 | const a: [u8; -2] = [0u32; 2];\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2_fail.leo.out index c2e1c7b7eb..43a12bcde7 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:29\n |\n 4 | const b: [[u8; 2]; 3] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 3', received: 'array of length 2'" + - "[EG0370027]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n--> compiler-test:4:29\n |\n 4 | const b: [[u8; 2]; 3] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering)\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2_fail.leo.out index d6ca2e6d93..9a34b581f9 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:34\n |\n 4 | const b: [[[u8; 2]; 3]; 4] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 4', received: 'array of length 2'" + - "[EG0370027]: unexpected type, expected: 'array of length 4', received: 'array of length 2'\n--> compiler-test:4:34\n |\n 4 | const b: [[[u8; 2]; 3]; 4] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering)\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2_fail.leo.out index 830aec9ce6..323480f909 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:29\n |\n 4 | const b: [[u8; 2]; 3] = [0; (2, 3)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 3', received: 'array of length 2'" + - "[EG0370027]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n--> compiler-test:4:29\n |\n 4 | const b: [[u8; 2]; 3] = [0; (2, 3)]; // initializer (incorrectly reversed ordering)\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2_fail.leo.out index cead027c67..ca579c845a 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:34\n |\n 4 | const b: [[[u8; 2]; 3]; 4] = [0; (2, 3, 4)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 4', received: 'array of length 2'" + - "[EG0370027]: unexpected type, expected: 'array of length 4', received: 'array of length 2'\n--> compiler-test:4:34\n |\n 4 | const b: [[[u8; 2]; 3]; 4] = [0; (2, 3, 4)]; // initializer (incorrectly reversed ordering)\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2_fail.leo.out index d04b4519f4..73f32accb4 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:29\n |\n 4 | const b: [u8; (2, 3)] = [[0; 2]; 3]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 2', received: 'array of length 3'" + - "[EG0370027]: unexpected type, expected: 'array of length 2', received: 'array of length 3'\n--> compiler-test:4:29\n |\n 4 | const b: [u8; (2, 3)] = [[0; 2]; 3]; // initializer (incorrectly reversed ordering)\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2_fail.leo.out index e3d2fe1df3..40ea58b4f2 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:32\n |\n 4 | const b: [u8; (4, 3, 2)] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 4', received: 'array of length 2'" + - "[EG0370027]: unexpected type, expected: 'array of length 4', received: 'array of length 2'\n--> compiler-test:4:32\n |\n 4 | const b: [u8; (4, 3, 2)] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering)\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2_fail.leo.out index 574ecb8b5d..df5f6c6451 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:29\n |\n 4 | const b: [u8; (2, 3)] = [0; (3, 2)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 2', received: 'array of length 3'" + - "[EG0370027]: unexpected type, expected: 'array of length 2', received: 'array of length 3'\n--> compiler-test:4:29\n |\n 4 | const b: [u8; (2, 3)] = [0; (3, 2)]; // initializer (incorrectly reversed ordering)\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2_fail.leo.out index 88fe3146e2..36d6f7eb47 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:32\n |\n 4 | const b: [u8; (4, 3, 2)] = [0; (2, 3, 4)]; // initializer (incorrectly reversed order)\n | ^^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 4', received: 'array of length 2'" + - "[EG0370027]: unexpected type, expected: 'array of length 4', received: 'array of length 2'\n--> compiler-test:4:32\n |\n 4 | const b: [u8; (4, 3, 2)] = [0; (2, 3, 4)]; // initializer (incorrectly reversed order)\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/array/variable_slice_fail.leo.out b/tests/expectations/compiler/compiler/array/variable_slice_fail.leo.out index b38b3bbbf2..46678a84f7 100644 --- a/tests/expectations/compiler/compiler/array/variable_slice_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/variable_slice_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:7:17\n |\n 7 | console.debug(\"{}\", x);\n | ^^^^^\n |\n = expected identifier 'assert', 'error', 'log' -- got 'debug'" + - "[EP0375007]: unexpected identifier: expected 'assert', 'error', 'log' -- got 'debug'\n--> compiler-test:7:17\n |\n 7 | console.debug(\"{}\", x);\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/char/invalid_char.leo.out b/tests/expectations/compiler/compiler/char/invalid_char.leo.out index c529e663ae..6f760386c5 100644 --- a/tests/expectations/compiler/compiler/char/invalid_char.leo.out +++ b/tests/expectations/compiler/compiler/char/invalid_char.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:23\n |\n 4 | const not_valid = '';\n | ^\n |\n = unexpected token: '''" + - "[EP0375000]: '\n--> compiler-test:4:23\n |\n 4 | const not_valid = '';\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:88\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/circuits/big_self_outside_circuit_fail.leo.out b/tests/expectations/compiler/compiler/circuits/big_self_outside_circuit_fail.leo.out index e5395fd2d6..5495dd7ca7 100644 --- a/tests/expectations/compiler/compiler/circuits/big_self_outside_circuit_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/big_self_outside_circuit_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:16:3\n |\n 16 | let foo: Self = Foo::new();\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = cannot call keyword `Self` outside of a circuit function" + - "[ET0371000]: cannot call keyword `Self` outside of a circuit function\n--> compiler-test:16:3\n |\n 16 | let foo: Self = Foo::new();\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/circuits/const_self_variable_fail.leo.out b/tests/expectations/compiler/compiler/circuits/const_self_variable_fail.leo.out index 8a8dcf0be6..1d0273cc78 100644 --- a/tests/expectations/compiler/compiler/circuits/const_self_variable_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/const_self_variable_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:7:9\n |\n 7 | self.a = new;\n | ^^^^^^^^^^^^\n |\n = illegal assignment to immutable variable 'self'" + - "[EG0370034]: illegal assignment to immutable variable 'self'\n--> compiler-test:7:9\n |\n 7 | self.a = new;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/circuits/inline_fail.leo.out b/tests/expectations/compiler/compiler/circuits/inline_fail.leo.out index f64e632faa..58996f5dcb 100644 --- a/tests/expectations/compiler/compiler/circuits/inline_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/inline_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:9:15\n |\n 9 | const a = Foo { y: 0u32 };\n | ^^^^^^^^^^^^^^^\n |\n = missing circuit member 'x' for initialization of circuit 'Foo'" + - "[EG0370003]: missing circuit member 'x' for initialization of circuit 'Foo'\n--> compiler-test:9:15\n |\n 9 | const a = Foo { y: 0u32 };\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/circuits/inline_member_fail.leo.out b/tests/expectations/compiler/compiler/circuits/inline_member_fail.leo.out index c87d98a1e2..3017368c40 100644 --- a/tests/expectations/compiler/compiler/circuits/inline_member_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/inline_member_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:9:15\n |\n 9 | const a = Foo { y };\n | ^^^^^^^^^\n |\n = missing circuit member 'x' for initialization of circuit 'Foo'" + - "[EG0370003]: missing circuit member 'x' for initialization of circuit 'Foo'\n--> compiler-test:9:15\n |\n 9 | const a = Foo { y };\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/circuits/inline_undefined.leo.out b/tests/expectations/compiler/compiler/circuits/inline_undefined.leo.out index 0a3ab75cf6..8395501938 100644 --- a/tests/expectations/compiler/compiler/circuits/inline_undefined.leo.out +++ b/tests/expectations/compiler/compiler/circuits/inline_undefined.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:15\n |\n 4 | const a = Foo { };\n | ^^^\n |\n = failed to resolve circuit: 'Foo'" + - "[EG0370000]: failed to resolve circuit: 'Foo'\n--> compiler-test:4:15\n |\n 4 | const a = Foo { };\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/circuits/member_function_fail.leo.out b/tests/expectations/compiler/compiler/circuits/member_function_fail.leo.out index 48e4365950..5c7bcc81af 100644 --- a/tests/expectations/compiler/compiler/circuits/member_function_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_function_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:11:17\n |\n 11 | const err = a.echoed(1u32);\n | ^^^^^^^^\n |\n = illegal reference to non-existant member 'echoed' of circuit 'Foo'" + - "[EG0370002]: illegal reference to non-existant member 'echoed' of circuit 'Foo'\n--> compiler-test:11:17\n |\n 11 | const err = a.echoed(1u32);\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/circuits/member_function_invalid.leo.out b/tests/expectations/compiler/compiler/circuits/member_function_invalid.leo.out index acf65fe3b4..cd5b7ee0ef 100644 --- a/tests/expectations/compiler/compiler/circuits/member_function_invalid.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_function_invalid.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:11:17\n |\n 11 | const err = a.echo(1u32); // echo is a static function and must be accessed using `::`\n | ^^^^^^\n |\n = cannot call static function 'echo' of circuit 'Foo' from target" + - "[EG0370009]: cannot call static function 'echo' of circuit 'Foo' from target\n--> compiler-test:11:17\n |\n 11 | const err = a.echo(1u32); // echo is a static function and must be accessed using `::`\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/circuits/member_static_function_invalid.leo.out b/tests/expectations/compiler/compiler/circuits/member_static_function_invalid.leo.out index b41d2c24b2..146329845d 100644 --- a/tests/expectations/compiler/compiler/circuits/member_static_function_invalid.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_static_function_invalid.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:10:17\n |\n 10 | const err = Foo.echo(1u32); // Invalid, echo is a static function and must be accessed using `::`\n | ^^^\n |\n = failed to resolve variable reference 'Foo'" + - "[EG0370029]: failed to resolve variable reference 'Foo'\n--> compiler-test:10:17\n |\n 10 | const err = Foo.echo(1u32); // Invalid, echo is a static function and must be accessed using `::`\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/circuits/member_static_function_undefined.leo.out b/tests/expectations/compiler/compiler/circuits/member_static_function_undefined.leo.out index 2291504352..1a990a8ee1 100644 --- a/tests/expectations/compiler/compiler/circuits/member_static_function_undefined.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_static_function_undefined.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:10:17\n |\n 10 | const err = Foo::echoed(1u32);\n | ^^^^^^^^^^^\n |\n = illegal reference to non-existant member 'echoed' of circuit 'Foo'" + - "[EG0370002]: illegal reference to non-existant member 'echoed' of circuit 'Foo'\n--> compiler-test:10:17\n |\n 10 | const err = Foo::echoed(1u32);\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/circuits/member_variable_fail.leo.out b/tests/expectations/compiler/compiler/circuits/member_variable_fail.leo.out index d2d815b44f..c4f351a57a 100644 --- a/tests/expectations/compiler/compiler/circuits/member_variable_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_variable_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:9:17\n |\n 9 | const err = a.y;\n | ^^^\n |\n = illegal reference to non-existant member 'y' of circuit 'Foo'" + - "[EG0370002]: illegal reference to non-existant member 'y' of circuit 'Foo'\n--> compiler-test:9:17\n |\n 9 | const err = a.y;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/circuits/mut_function_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_function_fail.leo.out index bf07411499..a0db34475c 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_function_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_function_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:12:5\n |\n 12 | f.bar = 1u8;\n | ^^^^^^^^^^^\n |\n = attempt to assign to function 'bar'" + - "[EG0370007]: attempt to assign to function 'bar'\n--> compiler-test:12:5\n |\n 12 | f.bar = 1u8;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_function_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_function_fail.leo.out index 3ccde3f13b..3552eec3d2 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_self_function_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_self_function_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:9:9\n |\n 9 | self.bar = new;\n | ^^^^^^^^^^^^^^\n |\n = attempt to assign to function 'bar'" + - "[EG0370007]: attempt to assign to function 'bar'\n--> compiler-test:9:9\n |\n 9 | self.bar = new;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_static_function_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_static_function_fail.leo.out index 3ccde3f13b..3552eec3d2 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_self_static_function_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_self_static_function_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:9:9\n |\n 9 | self.bar = new;\n | ^^^^^^^^^^^^^^\n |\n = attempt to assign to function 'bar'" + - "[EG0370007]: attempt to assign to function 'bar'\n--> compiler-test:9:9\n |\n 9 | self.bar = new;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_variable_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_variable_fail.leo.out index 8a8dcf0be6..1d0273cc78 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_self_variable_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_self_variable_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:7:9\n |\n 7 | self.a = new;\n | ^^^^^^^^^^^^\n |\n = illegal assignment to immutable variable 'self'" + - "[EG0370034]: illegal assignment to immutable variable 'self'\n--> compiler-test:7:9\n |\n 7 | self.a = new;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/circuits/mut_static_function_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_static_function_fail.leo.out index 7bb9b25530..f27f252b82 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_static_function_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_static_function_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:8:19\n |\n 8 | let f = Foo { a: 0u8 };\n | ^\n |\n = extra circuit member 'a' for initialization of circuit 'Foo' is not allowed" + - "[EG0370006]: extra circuit member 'a' for initialization of circuit 'Foo' is not allowed\n--> compiler-test:8:19\n |\n 8 | let f = Foo { a: 0u8 };\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/circuits/mut_variable_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_variable_fail.leo.out index e2080bf108..eba788f645 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_variable_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_variable_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:10:5\n |\n 10 | f.a = 1u8;\n | ^^^^^^^^^\n |\n = illegal assignment to immutable variable 'f'" + - "[EG0370034]: illegal assignment to immutable variable 'f'\n--> compiler-test:10:5\n |\n 10 | f.a = 1u8;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/circuits/self_circuit.leo.out b/tests/expectations/compiler/compiler/circuits/self_circuit.leo.out index 646f2b94dc..200079122d 100644 --- a/tests/expectations/compiler/compiler/circuits/self_circuit.leo.out +++ b/tests/expectations/compiler/compiler/circuits/self_circuit.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:5:5\n |\n 5 | static function new() -> Self {\n | ^^^^^^\n |\n = expected 'ident', got 'static'" + - "[EP0375009]: unexpected string: expected 'ident', got 'static'\n--> compiler-test:5:5\n |\n 5 | static function new() -> Self {\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/circuits/self_fail.leo.out b/tests/expectations/compiler/compiler/circuits/self_fail.leo.out index b6d62471c5..ec095b577c 100644 --- a/tests/expectations/compiler/compiler/circuits/self_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/self_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:5\n |\n 4 | Self::main();\n | ^^^^\n |\n = failed to resolve circuit: 'Self'" + - "[EG0370000]: failed to resolve circuit: 'Self'\n--> compiler-test:4:5\n |\n 4 | Self::main();\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/circuits/self_member_invalid.leo.out b/tests/expectations/compiler/compiler/circuits/self_member_invalid.leo.out index f18b421ed4..a023a76258 100644 --- a/tests/expectations/compiler/compiler/circuits/self_member_invalid.leo.out +++ b/tests/expectations/compiler/compiler/circuits/self_member_invalid.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:13:17\n |\n 13 | const err = foo.bar();\n | ^^^^^^^\n |\n = cannot call static function 'bar' of circuit 'Foo' from target" + - "[EG0370009]: cannot call static function 'bar' of circuit 'Foo' from target\n--> compiler-test:13:17\n |\n 13 | const err = foo.bar();\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/circuits/self_member_undefined.leo.out b/tests/expectations/compiler/compiler/circuits/self_member_undefined.leo.out index 45370e3df4..67e3433049 100644 --- a/tests/expectations/compiler/compiler/circuits/self_member_undefined.leo.out +++ b/tests/expectations/compiler/compiler/circuits/self_member_undefined.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:11:17\n |\n 11 | const err = foo.bar();\n | ^^^^^^^\n |\n = cannot call static function 'bar' of circuit 'Foo' from target" + - "[EG0370009]: cannot call static function 'bar' of circuit 'Foo' from target\n--> compiler-test:11:17\n |\n 11 | const err = foo.bar();\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/console/log_fail.leo.out b/tests/expectations/compiler/compiler/console/log_fail.leo.out index f601bdcdd7..43606de39e 100644 --- a/tests/expectations/compiler/compiler/console/log_fail.leo.out +++ b/tests/expectations/compiler/compiler/console/log_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:18\n |\n 4 | console.log( hello );\n | ^^^^^\n |\n = expected 'formatted string', got 'hello'" + - "[EP0375009]: unexpected string: expected 'formatted string', got 'hello'\n--> compiler-test:4:18\n |\n 4 | console.log( hello );\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/console/log_parameter_fail_empty.leo.out b/tests/expectations/compiler/compiler/console/log_parameter_fail_empty.leo.out index 6ebd98b417..0e63c76c25 100644 --- a/tests/expectations/compiler/compiler/console/log_parameter_fail_empty.leo.out +++ b/tests/expectations/compiler/compiler/console/log_parameter_fail_empty.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:17\n |\n 4 | console.log(\"{}\");\n | ^^^^\n |\n = Formatter given 1 containers and found 0 parameters" + - "[EC0372006]: Formatter given 1 containers and found 0 parameters\n--> compiler-test:4:17\n |\n 4 | console.log(\"{}\");\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/console/log_parameter_fail_none.leo.out b/tests/expectations/compiler/compiler/console/log_parameter_fail_none.leo.out index f7007ccf5f..4ccb1cbea8 100644 --- a/tests/expectations/compiler/compiler/console/log_parameter_fail_none.leo.out +++ b/tests/expectations/compiler/compiler/console/log_parameter_fail_none.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:17\n |\n 4 | console.log(\"\", 1u32);\n | ^^^^^^^^\n |\n = Formatter given 0 containers and found 1 parameters" + - "[EC0372006]: Formatter given 0 containers and found 1 parameters\n--> compiler-test:4:17\n |\n 4 | console.log(\"\", 1u32);\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/console/log_parameter_fail_unknown.leo.out b/tests/expectations/compiler/compiler/console/log_parameter_fail_unknown.leo.out index f61ef70fb7..1d18c8ad90 100644 --- a/tests/expectations/compiler/compiler/console/log_parameter_fail_unknown.leo.out +++ b/tests/expectations/compiler/compiler/console/log_parameter_fail_unknown.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:23\n |\n 4 | console.log(\"{}\", a);\n | ^\n |\n = failed to resolve variable reference 'a'" + - "[EG0370029]: failed to resolve variable reference 'a'\n--> compiler-test:4:23\n |\n 4 | console.log(\"{}\", a);\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/core/core_circuit_invalid.leo.out b/tests/expectations/compiler/compiler/core/core_circuit_invalid.leo.out index 07c482845a..02c207717d 100644 --- a/tests/expectations/compiler/compiler/core/core_circuit_invalid.leo.out +++ b/tests/expectations/compiler/compiler/core/core_circuit_invalid.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:3:30\n |\n 3 | import core.unstable.blake2s.BadCircuit; // `BadCircuit` is not included in the blake2s package\n | ^^^^^^^^^^\n |\n = failed to resolve import: 'core.unstable.blake2s.BadCircuit'" + - "[EG0370001]: failed to resolve import: 'core.unstable.blake2s.BadCircuit'\n--> compiler-test:3:30\n |\n 3 | import core.unstable.blake2s.BadCircuit; // `BadCircuit` is not included in the blake2s package\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/core/core_circuit_star_fail.leo.out b/tests/expectations/compiler/compiler/core/core_circuit_star_fail.leo.out index 9bb7631c2d..cdb58f435d 100644 --- a/tests/expectations/compiler/compiler/core/core_circuit_star_fail.leo.out +++ b/tests/expectations/compiler/compiler/core/core_circuit_star_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> :0:0\n |\n |\n = failed to resolve import: 'core'" + - "[EG0370001]: failed to resolve import: 'core'\n--> :0:0\n |\n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: backtrace::capture::{{impl}}::default\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:410\n 5: leo_errors::common::span::{{impl}}::default\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:25\n 6: leo_asg::program::Program::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\asg\\src\\program\\mod.rs:169\n 7: leo_asg::Asg::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\asg\\src\\lib.rs:98\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/core/core_package_invalid.leo.out b/tests/expectations/compiler/compiler/core/core_package_invalid.leo.out index 9bb7631c2d..cdb58f435d 100644 --- a/tests/expectations/compiler/compiler/core/core_package_invalid.leo.out +++ b/tests/expectations/compiler/compiler/core/core_package_invalid.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> :0:0\n |\n |\n = failed to resolve import: 'core'" + - "[EG0370001]: failed to resolve import: 'core'\n--> :0:0\n |\n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: backtrace::capture::{{impl}}::default\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:410\n 5: leo_errors::common::span::{{impl}}::default\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:25\n 6: leo_asg::program::Program::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\asg\\src\\program\\mod.rs:169\n 7: leo_asg::Asg::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\asg\\src\\lib.rs:98\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/core/core_unstable_package_invalid.leo.out b/tests/expectations/compiler/compiler/core/core_unstable_package_invalid.leo.out index 2493893de3..1ab97685b9 100644 --- a/tests/expectations/compiler/compiler/core/core_unstable_package_invalid.leo.out +++ b/tests/expectations/compiler/compiler/core/core_unstable_package_invalid.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> :0:0\n |\n |\n = failed to resolve import: 'core.unstable'" + - "[EG0370001]: failed to resolve import: 'core.unstable'\n--> :0:0\n |\n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: backtrace::capture::{{impl}}::default\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:410\n 5: leo_errors::common::span::{{impl}}::default\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:25\n 6: leo_asg::program::Program::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\asg\\src\\program\\mod.rs:169\n 7: leo_asg::Asg::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\asg\\src\\lib.rs:98\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/field/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/field/no_space_between_literal.leo.out index ad72f642e2..cbf770d9aa 100644 --- a/tests/expectations/compiler/compiler/field/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/field/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:13\n |\n 4 | const f = 1 field;\n | ^\n |\n = Unexpected white space between terms 1 and field" + - "[EP0375004]: Unexpected white space between terms 1 and field\n--> compiler-test:4:13\n |\n 4 | const f = 1 field;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/function/duplicate_definition_fail.leo.out b/tests/expectations/compiler/compiler/function/duplicate_definition_fail.leo.out index f76592d7fd..9c5a333a63 100644 --- a/tests/expectations/compiler/compiler/function/duplicate_definition_fail.leo.out +++ b/tests/expectations/compiler/compiler/function/duplicate_definition_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:8:1\n |\n 8 | function main() {\n|\n 9 | ...\n|\n 10 | }\n | ^\n |\n = a function named \"main\" already exists in this scope" + - "[EG0370017]: a function named \"main\" already exists in this scope\n--> compiler-test:8:1\n |\n 8 | function main() {\n|\n 9 | ...\n|\n 10 | }\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/function/multiple_returns_fail.leo.out b/tests/expectations/compiler/compiler/function/multiple_returns_fail.leo.out index 6738b2788e..f414fca87b 100644 --- a/tests/expectations/compiler/compiler/function/multiple_returns_fail.leo.out +++ b/tests/expectations/compiler/compiler/function/multiple_returns_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:5\n |\n 4 | if true {\n|\n 5 | ...\n|\n 6 | }\n | ^\n |\n = function 'main' failed to validate return path: 'cannot have asymmetrical return in if statement'" + - "[EG0370036]: function 'main' failed to validate return path: 'cannot have asymmetrical return in if statement'\n--> compiler-test:4:5\n |\n 4 | if true {\n|\n 5 | ...\n|\n 6 | }\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/function/multiple_returns_fail_conditional.leo.out b/tests/expectations/compiler/compiler/function/multiple_returns_fail_conditional.leo.out index ee103c4030..4c58918fa8 100644 --- a/tests/expectations/compiler/compiler/function/multiple_returns_fail_conditional.leo.out +++ b/tests/expectations/compiler/compiler/function/multiple_returns_fail_conditional.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:3:1\n |\n 3 | function main() -> bool {\n|\n 4 | ...\n|\n 5 | }\n|\n 6 | \n|\n 7 | \n|\n 8 | \n|\n 9 | \n|\n 10 | \n | ^\n |\n = function 'main' missing return for all paths" + - "[EG0370035]: function 'main' missing return for all paths\n--> compiler-test:3:1\n |\n 3 | function main() -> bool {\n|\n 4 | ...\n|\n 5 | }\n|\n 6 | \n|\n 7 | \n|\n 8 | \n|\n 9 | \n|\n 10 | \n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/function/return_array_nested_fail.leo.out b/tests/expectations/compiler/compiler/function/return_array_nested_fail.leo.out index cb86704670..854dd7cbd1 100644 --- a/tests/expectations/compiler/compiler/function/return_array_nested_fail.leo.out +++ b/tests/expectations/compiler/compiler/function/return_array_nested_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:12\n |\n 4 | return [0u8; (2, 3)]; // The correct 3x2 array tuple is `[0u8; (3, 2)]`\n | ^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 3', received: 'array of length 2'" + - "[EG0370027]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n--> compiler-test:4:12\n |\n 4 | return [0u8; (2, 3)]; // The correct 3x2 array tuple is `[0u8; (3, 2)]`\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/function/return_array_tuple_fail.leo.out b/tests/expectations/compiler/compiler/function/return_array_tuple_fail.leo.out index d3eb890c94..c40801cdac 100644 --- a/tests/expectations/compiler/compiler/function/return_array_tuple_fail.leo.out +++ b/tests/expectations/compiler/compiler/function/return_array_tuple_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:12\n |\n 4 | return [[0u8; 3]; 2]; // The correct 3x2 nested array is `[0u8; 2]; 3]`\n | ^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 3', received: 'array of length 2'" + - "[EG0370027]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n--> compiler-test:4:12\n |\n 4 | return [[0u8; 3]; 2]; // The correct 3x2 nested array is `[0u8; 2]; 3]`\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/function/scope_fail.leo.out b/tests/expectations/compiler/compiler/function/scope_fail.leo.out index db3439c953..ae12d6d16d 100644 --- a/tests/expectations/compiler/compiler/function/scope_fail.leo.out +++ b/tests/expectations/compiler/compiler/function/scope_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:5:12\n |\n 5 | return myGlobal;\n | ^^^^^^^^\n |\n = failed to resolve variable reference 'myGlobal'" + - "[EG0370029]: failed to resolve variable reference 'myGlobal'\n--> compiler-test:5:12\n |\n 5 | return myGlobal;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/function/undefined.leo.out b/tests/expectations/compiler/compiler/function/undefined.leo.out index df282cd43c..fc31d3a7a4 100644 --- a/tests/expectations/compiler/compiler/function/undefined.leo.out +++ b/tests/expectations/compiler/compiler/function/undefined.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:5:5\n |\n 5 | my_function();\n | ^^^^^^^^^^^\n |\n = failed to resolve function: 'my_function'" + - "[EG0370025]: failed to resolve function: 'my_function'\n--> compiler-test:5:5\n |\n 5 | my_function();\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/global_consts/modify_global_const.leo.out b/tests/expectations/compiler/compiler/global_consts/modify_global_const.leo.out index dd80c5e6bc..6889d4e293 100644 --- a/tests/expectations/compiler/compiler/global_consts/modify_global_const.leo.out +++ b/tests/expectations/compiler/compiler/global_consts/modify_global_const.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:7:5\n |\n 7 | basic = 2u32;\n | ^^^^^^^^^^^^\n |\n = illegal assignment to immutable variable 'basic'" + - "[EG0370034]: illegal assignment to immutable variable 'basic'\n--> compiler-test:7:5\n |\n 7 | basic = 2u32;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/const_input_non_const.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/const_input_non_const.leo.out index 4859c4e575..8c36e50267 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/const_input_non_const.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/const_input_non_const.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:3:15\n |\n 3 | function main(a: u32) {\n | ^\n |\n = Expected input variable `a` to be non-constant. Move input variable `a` to [main] section of input file" + - "[EC0372029]: Expected input variable `a` to be non-constant. Move input variable `a` to [main] section of input file\n--> compiler-test:3:15\n |\n 3 | function main(a: u32) {\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/const_var_in_both_sections_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/const_var_in_both_sections_fail.leo.out index bb3c808a15..78d8ee5ae1 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/const_var_in_both_sections_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/const_var_in_both_sections_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:3:21\n |\n 3 | function main(const a: u32) {\n | ^\n |\n = Input variable a declared twice" + - "[EC0372035]: Input variable a declared twice\n--> compiler-test:3:21\n |\n 3 | function main(const a: u32) {\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_array_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_array_fail.leo.out index 8f284636c0..4d88b55ef4 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_array_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_array_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:3:15\n |\n 3 | function main(x: [i16; 2]) {\n | ^\n |\n = Input array dimensions mismatch expected 1, found array dimensions 2" + - "[EC0372031]: Input array dimensions mismatch expected 1, found array dimensions 2\n--> compiler-test:3:15\n |\n 3 | function main(x: [i16; 2]) {\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_tuple_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_tuple_fail.leo.out index 20d32da413..8115fcf8b5 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_tuple_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_tuple_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:3:15\n |\n 3 | function main(x: (u8, bool, u8)) {\n | ^\n |\n = Input tuple size mismatch expected 3, found tuple with length 2" + - "[EC0372032]: Input tuple size mismatch expected 3, found tuple with length 2\n--> compiler-test:3:15\n |\n 3 | function main(x: (u8, bool, u8)) {\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/non_const_input_const.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/non_const_input_const.leo.out index 26e1da8cfe..38f1193c17 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/non_const_input_const.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/non_const_input_const.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:17\n |\n 4 | let b = a * 2;\n | ^\n |\n = failed to resolve type for variable definition 'unknown'" + - "[EG0370026]: failed to resolve type for variable definition 'unknown'\n--> compiler-test:4:17\n |\n 4 | let b = a * 2;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/var_in_both_sections_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/var_in_both_sections_fail.leo.out index 3bfbdf310e..d0e082ede3 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/var_in_both_sections_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/var_in_both_sections_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:3:15\n |\n 3 | function main(a: u32) {\n | ^\n |\n = Input variable a declared twice" + - "[EC0372035]: Input variable a declared twice\n--> compiler-test:3:15\n |\n 3 | function main(a: u32) {\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array_fail.leo.out index eeb175895f..2bd5928a38 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:3:21\n |\n 3 | function main(const x: [i16; 2]) {\n | ^\n |\n = Input array dimensions mismatch expected 2, found array dimensions 1" + - "[EC0372031]: Input array dimensions mismatch expected 2, found array dimensions 1\n--> compiler-test:3:21\n |\n 3 | function main(const x: [i16; 2]) {\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple_fail.leo.out index f4642c5005..4cbd0ec64a 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:3:21\n |\n 3 | function main(const x: (u8, bool, u8)) {\n | ^\n |\n = Input tuple size mismatch expected 3, found tuple with length 2" + - "[EC0372032]: Input tuple size mismatch expected 3, found tuple with length 2\n--> compiler-test:3:21\n |\n 3 | function main(const x: (u8, bool, u8)) {\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/input_files/program_registers/registers_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_registers/registers_fail.leo.out index 6609ce03a3..9fa7853395 100644 --- a/tests/expectations/compiler/compiler/input_files/program_registers/registers_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_registers/registers_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:3:1\n |\n 3 | function main() -> bool {\n|\n 4 | ...\n|\n 5 | }\n | ^\n |\n = Mismatched types. Expected register output type `u8`, found type `bool`." + - "[EC0372037]: Mismatched types. Expected register output type `u8`, found type `bool`.\n--> compiler-test:3:1\n |\n 3 | function main() -> bool {\n|\n 4 | ...\n|\n 5 | }\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/integers/i128/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/i128/max_fail.leo.out index 5c2d445743..76f9a4641f 100644 --- a/tests/expectations/compiler/compiler/integers/i128/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:21\n |\n 4 | const a: i128 = 170141183460469231731687303715884105728;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = failed to parse int value '170141183460469231731687303715884105728'" + - "[EG0370032]: failed to parse int value '170141183460469231731687303715884105728'\n--> compiler-test:4:21\n |\n 4 | const a: i128 = 170141183460469231731687303715884105728;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/integers/i128/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/i128/min_fail.leo.out index 13921defb2..e832bcb8ee 100644 --- a/tests/expectations/compiler/compiler/integers/i128/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:21\n |\n 4 | const a: i128 = -170141183460469231731687303715884105729;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = failed to parse int value '-170141183460469231731687303715884105729'" + - "[EG0370032]: failed to parse int value '-170141183460469231731687303715884105729'\n--> compiler-test:4:21\n |\n 4 | const a: i128 = -170141183460469231731687303715884105729;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/integers/i128/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/i128/no_space_between_literal.leo.out index 972dbae802..4604fafad6 100644 --- a/tests/expectations/compiler/compiler/integers/i128/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:15\n |\n 4 | const i = 1 i128;\n | ^\n |\n = Unexpected white space between terms 1 and i128" + - "[EP0375004]: Unexpected white space between terms 1 and i128\n--> compiler-test:4:15\n |\n 4 | const i = 1 i128;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/integers/i16/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/i16/max_fail.leo.out index bec67bdb3e..b5172ad948 100644 --- a/tests/expectations/compiler/compiler/integers/i16/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:20\n |\n 4 | const a: i16 = 32768;\n | ^^^^^\n |\n = failed to parse int value '32768'" + - "[EG0370032]: failed to parse int value '32768'\n--> compiler-test:4:20\n |\n 4 | const a: i16 = 32768;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/integers/i16/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/i16/min_fail.leo.out index 7422740b9a..3ebb425832 100644 --- a/tests/expectations/compiler/compiler/integers/i16/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:20\n |\n 4 | const a: i16 = -32769;\n | ^^^^^^\n |\n = failed to parse int value '-32769'" + - "[EG0370032]: failed to parse int value '-32769'\n--> compiler-test:4:20\n |\n 4 | const a: i16 = -32769;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/integers/i16/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/i16/no_space_between_literal.leo.out index 47680bf6ac..5e6c6a64e5 100644 --- a/tests/expectations/compiler/compiler/integers/i16/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:15\n |\n 4 | const i = 1 i16;\n | ^\n |\n = Unexpected white space between terms 1 and i16" + - "[EP0375004]: Unexpected white space between terms 1 and i16\n--> compiler-test:4:15\n |\n 4 | const i = 1 i16;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/integers/i32/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/i32/max_fail.leo.out index f0de883d3d..cc6a0c2eb3 100644 --- a/tests/expectations/compiler/compiler/integers/i32/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:20\n |\n 4 | const a: i32 = 2147483648;\n | ^^^^^^^^^^\n |\n = failed to parse int value '2147483648'" + - "[EG0370032]: failed to parse int value '2147483648'\n--> compiler-test:4:20\n |\n 4 | const a: i32 = 2147483648;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/integers/i32/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/i32/min_fail.leo.out index 211afb26eb..f542d52182 100644 --- a/tests/expectations/compiler/compiler/integers/i32/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:20\n |\n 4 | const a: i32 = -2147483649;\n | ^^^^^^^^^^^\n |\n = failed to parse int value '-2147483649'" + - "[EG0370032]: failed to parse int value '-2147483649'\n--> compiler-test:4:20\n |\n 4 | const a: i32 = -2147483649;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/integers/i32/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/i32/no_space_between_literal.leo.out index 6a9d5f0913..7bb6482417 100644 --- a/tests/expectations/compiler/compiler/integers/i32/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:15\n |\n 4 | const i = 1 i32;\n | ^\n |\n = Unexpected white space between terms 1 and i32" + - "[EP0375004]: Unexpected white space between terms 1 and i32\n--> compiler-test:4:15\n |\n 4 | const i = 1 i32;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/integers/i64/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/i64/max_fail.leo.out index 7e8eb2c7de..a210347a96 100644 --- a/tests/expectations/compiler/compiler/integers/i64/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:20\n |\n 4 | const a: i64 = 9223372036854775808;\n | ^^^^^^^^^^^^^^^^^^^\n |\n = failed to parse int value '9223372036854775808'" + - "[EG0370032]: failed to parse int value '9223372036854775808'\n--> compiler-test:4:20\n |\n 4 | const a: i64 = 9223372036854775808;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/integers/i64/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/i64/min_fail.leo.out index 0e07cabdcc..8a02d6d2a9 100644 --- a/tests/expectations/compiler/compiler/integers/i64/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:20\n |\n 4 | const a: i64 = -9223372036854775809;\n | ^^^^^^^^^^^^^^^^^^^^\n |\n = failed to parse int value '-9223372036854775809'" + - "[EG0370032]: failed to parse int value '-9223372036854775809'\n--> compiler-test:4:20\n |\n 4 | const a: i64 = -9223372036854775809;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/integers/i64/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/i64/no_space_between_literal.leo.out index 8ad4c3a497..e40437348b 100644 --- a/tests/expectations/compiler/compiler/integers/i64/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:15\n |\n 4 | const i = 1 i64;\n | ^\n |\n = Unexpected white space between terms 1 and i64" + - "[EP0375004]: Unexpected white space between terms 1 and i64\n--> compiler-test:4:15\n |\n 4 | const i = 1 i64;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/integers/i8/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/i8/max_fail.leo.out index beec6ea364..a29df73f16 100644 --- a/tests/expectations/compiler/compiler/integers/i8/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:19\n |\n 4 | const a: i8 = 128;\n | ^^^\n |\n = failed to parse int value '128'" + - "[EG0370032]: failed to parse int value '128'\n--> compiler-test:4:19\n |\n 4 | const a: i8 = 128;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/integers/i8/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/i8/min_fail.leo.out index b56ece00d3..9499b51580 100644 --- a/tests/expectations/compiler/compiler/integers/i8/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:19\n |\n 4 | const a: i8 = -129;\n | ^^^^\n |\n = failed to parse int value '-129'" + - "[EG0370032]: failed to parse int value '-129'\n--> compiler-test:4:19\n |\n 4 | const a: i8 = -129;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/integers/i8/negate_min.leo.out b/tests/expectations/compiler/compiler/integers/i8/negate_min.leo.out index 1e357b60db..e0cf3bd98f 100644 --- a/tests/expectations/compiler/compiler/integers/i8/negate_min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/negate_min.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:5:15\n |\n 5 | const b = -a;\n | ^^\n |\n = integer operation failed due to the signed integer error `Overflow`" + - "[EC0372085]: integer operation failed due to the signed integer error `Integer overflow`\n--> compiler-test:5:15\n |\n 5 | const b = -a;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/integers/i8/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/i8/no_space_between_literal.leo.out index cd1c85e431..60bba3bb40 100644 --- a/tests/expectations/compiler/compiler/integers/i8/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:15\n |\n 4 | const i = 1 i8;\n | ^\n |\n = Unexpected white space between terms 1 and i8" + - "[EP0375004]: Unexpected white space between terms 1 and i8\n--> compiler-test:4:15\n |\n 4 | const i = 1 i8;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/integers/u128/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/u128/max_fail.leo.out index 99e37f107e..9e0b42b670 100644 --- a/tests/expectations/compiler/compiler/integers/u128/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:21\n |\n 4 | const a: u128 = 340282366920938463463374607431768211456;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = failed to parse int value '340282366920938463463374607431768211456'" + - "[EG0370032]: failed to parse int value '340282366920938463463374607431768211456'\n--> compiler-test:4:21\n |\n 4 | const a: u128 = 340282366920938463463374607431768211456;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/integers/u128/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/u128/min_fail.leo.out index 3ec7269953..293c64784e 100644 --- a/tests/expectations/compiler/compiler/integers/u128/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:21\n |\n 4 | const a: u128 = -1;\n | ^^\n |\n = failed to parse int value '-1'" + - "[EG0370032]: failed to parse int value '-1'\n--> compiler-test:4:21\n |\n 4 | const a: u128 = -1;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/integers/u128/negative_input_fail.leo.out b/tests/expectations/compiler/compiler/integers/u128/negative_input_fail.leo.out index a8c26c2513..96d2d2bd91 100644 --- a/tests/expectations/compiler/compiler/integers/u128/negative_input_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/negative_input_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:3:15\n |\n 3 | function main(a: u128) {}\n | ^\n |\n = failed to parse `-2` as expected integer type" + - "[EC0372091]: failed to parse `-2` as expected integer type\n--> compiler-test:3:15\n |\n 3 | function main(a: u128) {}\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/integers/u128/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/u128/no_space_between_literal.leo.out index 3283c7d907..03de9f5243 100644 --- a/tests/expectations/compiler/compiler/integers/u128/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:15\n |\n 4 | const i = 1 u128;\n | ^\n |\n = Unexpected white space between terms 1 and u128" + - "[EP0375004]: Unexpected white space between terms 1 and u128\n--> compiler-test:4:15\n |\n 4 | const i = 1 u128;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/integers/u16/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/u16/max_fail.leo.out index 4d3de310ca..a05fda5072 100644 --- a/tests/expectations/compiler/compiler/integers/u16/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:20\n |\n 4 | const a: u16 = 65536;\n | ^^^^^\n |\n = failed to parse int value '65536'" + - "[EG0370032]: failed to parse int value '65536'\n--> compiler-test:4:20\n |\n 4 | const a: u16 = 65536;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/integers/u16/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/u16/min_fail.leo.out index d227adfb91..fd4a0145ae 100644 --- a/tests/expectations/compiler/compiler/integers/u16/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:20\n |\n 4 | const a: u16 = -1;\n | ^^\n |\n = failed to parse int value '-1'" + - "[EG0370032]: failed to parse int value '-1'\n--> compiler-test:4:20\n |\n 4 | const a: u16 = -1;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/integers/u16/negative_input_fail.leo.out b/tests/expectations/compiler/compiler/integers/u16/negative_input_fail.leo.out index 26835ff1a3..50ce2e5e3b 100644 --- a/tests/expectations/compiler/compiler/integers/u16/negative_input_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/negative_input_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:3:15\n |\n 3 | function main(a: u16) {}\n | ^\n |\n = failed to parse `-2` as expected integer type" + - "[EC0372091]: failed to parse `-2` as expected integer type\n--> compiler-test:3:15\n |\n 3 | function main(a: u16) {}\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/integers/u16/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/u16/no_space_between_literal.leo.out index 1a5abecdc0..06821b00b9 100644 --- a/tests/expectations/compiler/compiler/integers/u16/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:15\n |\n 4 | const i = 1 u16;\n | ^\n |\n = Unexpected white space between terms 1 and u16" + - "[EP0375004]: Unexpected white space between terms 1 and u16\n--> compiler-test:4:15\n |\n 4 | const i = 1 u16;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/integers/u32/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/u32/max_fail.leo.out index 137aa789b5..9d978b5ed8 100644 --- a/tests/expectations/compiler/compiler/integers/u32/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:20\n |\n 4 | const a: u32 = 4294967296;\n | ^^^^^^^^^^\n |\n = failed to parse int value '4294967296'" + - "[EG0370032]: failed to parse int value '4294967296'\n--> compiler-test:4:20\n |\n 4 | const a: u32 = 4294967296;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/integers/u32/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/u32/min_fail.leo.out index 2971bc63a3..42ebd6043e 100644 --- a/tests/expectations/compiler/compiler/integers/u32/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:20\n |\n 4 | const a: u32 = -1;\n | ^^\n |\n = failed to parse int value '-1'" + - "[EG0370032]: failed to parse int value '-1'\n--> compiler-test:4:20\n |\n 4 | const a: u32 = -1;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/integers/u32/negative_input_fail.leo.out b/tests/expectations/compiler/compiler/integers/u32/negative_input_fail.leo.out index 571a550017..1ae5f015cc 100644 --- a/tests/expectations/compiler/compiler/integers/u32/negative_input_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/negative_input_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:3:15\n |\n 3 | function main(a: u32) {}\n | ^\n |\n = failed to parse `-2` as expected integer type" + - "[EC0372091]: failed to parse `-2` as expected integer type\n--> compiler-test:3:15\n |\n 3 | function main(a: u32) {}\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/integers/u32/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/u32/no_space_between_literal.leo.out index b778c57782..2cecade5c2 100644 --- a/tests/expectations/compiler/compiler/integers/u32/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:15\n |\n 4 | const i = 1 u32;\n | ^\n |\n = Unexpected white space between terms 1 and u32" + - "[EP0375004]: Unexpected white space between terms 1 and u32\n--> compiler-test:4:15\n |\n 4 | const i = 1 u32;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/integers/u64/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/u64/max_fail.leo.out index 94fb8ff65e..8fafe6e389 100644 --- a/tests/expectations/compiler/compiler/integers/u64/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:20\n |\n 4 | const a: u64 = 18446744073709551616;\n | ^^^^^^^^^^^^^^^^^^^^\n |\n = failed to parse int value '18446744073709551616'" + - "[EG0370032]: failed to parse int value '18446744073709551616'\n--> compiler-test:4:20\n |\n 4 | const a: u64 = 18446744073709551616;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/integers/u64/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/u64/min_fail.leo.out index 297cf5e8df..0966802430 100644 --- a/tests/expectations/compiler/compiler/integers/u64/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:20\n |\n 4 | const a: u64 = -1;\n | ^^\n |\n = failed to parse int value '-1'" + - "[EG0370032]: failed to parse int value '-1'\n--> compiler-test:4:20\n |\n 4 | const a: u64 = -1;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/integers/u64/negative_input_fail.leo.out b/tests/expectations/compiler/compiler/integers/u64/negative_input_fail.leo.out index 28cac501d3..37e529b137 100644 --- a/tests/expectations/compiler/compiler/integers/u64/negative_input_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/negative_input_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:3:15\n |\n 3 | function main(a: u64) {}\n | ^\n |\n = failed to parse `-2` as expected integer type" + - "[EC0372091]: failed to parse `-2` as expected integer type\n--> compiler-test:3:15\n |\n 3 | function main(a: u64) {}\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/integers/u64/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/u64/no_space_between_literal.leo.out index ab434da400..30921de251 100644 --- a/tests/expectations/compiler/compiler/integers/u64/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:15\n |\n 4 | const i = 1 u64;\n | ^\n |\n = Unexpected white space between terms 1 and u64" + - "[EP0375004]: Unexpected white space between terms 1 and u64\n--> compiler-test:4:15\n |\n 4 | const i = 1 u64;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/integers/u8/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/u8/max_fail.leo.out index eff5422487..9dcc32d939 100644 --- a/tests/expectations/compiler/compiler/integers/u8/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:19\n |\n 4 | const a: u8 = 256;\n | ^^^\n |\n = failed to parse int value '256'" + - "[EG0370032]: failed to parse int value '256'\n--> compiler-test:4:19\n |\n 4 | const a: u8 = 256;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/integers/u8/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/u8/min_fail.leo.out index da94b82b2b..77ef052100 100644 --- a/tests/expectations/compiler/compiler/integers/u8/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:19\n |\n 4 | const a: u8 = -1;\n | ^^\n |\n = failed to parse int value '-1'" + - "[EG0370032]: failed to parse int value '-1'\n--> compiler-test:4:19\n |\n 4 | const a: u8 = -1;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/integers/u8/negative_input_fail.leo.out b/tests/expectations/compiler/compiler/integers/u8/negative_input_fail.leo.out index 1c0677422b..8a4cafcce9 100644 --- a/tests/expectations/compiler/compiler/integers/u8/negative_input_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/negative_input_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:3:15\n |\n 3 | function main(a: u8) {}\n | ^\n |\n = failed to parse `-2` as expected integer type" + - "[EC0372091]: failed to parse `-2` as expected integer type\n--> compiler-test:3:15\n |\n 3 | function main(a: u8) {}\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/integers/u8/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/u8/no_space_between_literal.leo.out index ced5132f3b..cdf7c0ecdc 100644 --- a/tests/expectations/compiler/compiler/integers/u8/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:15\n |\n 4 | const i = 1 u8;\n | ^\n |\n = Unexpected white space between terms 1 and u8" + - "[EP0375004]: Unexpected white space between terms 1 and u8\n--> compiler-test:4:15\n |\n 4 | const i = 1 u8;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/mutability/array_fail.leo.out b/tests/expectations/compiler/compiler/mutability/array_fail.leo.out index 0efd7b76a8..f3ba6435f9 100644 --- a/tests/expectations/compiler/compiler/mutability/array_fail.leo.out +++ b/tests/expectations/compiler/compiler/mutability/array_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:5:5\n |\n 5 | a[0] = 0;\n | ^^^^^^^^\n |\n = illegal assignment to immutable variable 'a'" + - "[EG0370034]: illegal assignment to immutable variable 'a'\n--> compiler-test:5:5\n |\n 5 | a[0] = 0;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/mutability/circuit_fail.leo.out b/tests/expectations/compiler/compiler/mutability/circuit_fail.leo.out index f00b41889f..dcc819aba0 100644 --- a/tests/expectations/compiler/compiler/mutability/circuit_fail.leo.out +++ b/tests/expectations/compiler/compiler/mutability/circuit_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:10:5\n |\n 10 | a.x = 0;\n | ^^^^^^^\n |\n = illegal assignment to immutable variable 'a'" + - "[EG0370034]: illegal assignment to immutable variable 'a'\n--> compiler-test:10:5\n |\n 10 | a.x = 0;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/mutability/circuit_function_const.leo.out b/tests/expectations/compiler/compiler/mutability/circuit_function_const.leo.out index 461b7c8b18..4162ab538a 100644 --- a/tests/expectations/compiler/compiler/mutability/circuit_function_const.leo.out +++ b/tests/expectations/compiler/compiler/mutability/circuit_function_const.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:15:5\n |\n 15 | a.foo();\n | ^^^^^\n |\n = cannot call mutable member function 'foo' of circuit 'Foo' from immutable context" + - "[EG0370010]: cannot call mutable member function 'foo' of circuit 'Foo' from immutable context\n--> compiler-test:15:5\n |\n 15 | a.foo();\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/mutability/circuit_static_function_mut_fail.leo.out b/tests/expectations/compiler/compiler/mutability/circuit_static_function_mut_fail.leo.out index 9eb3929726..a442cd2df0 100644 --- a/tests/expectations/compiler/compiler/mutability/circuit_static_function_mut_fail.leo.out +++ b/tests/expectations/compiler/compiler/mutability/circuit_static_function_mut_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:8:19\n |\n 8 | let a = Foo { x: 1 };\n | ^\n |\n = extra circuit member 'x' for initialization of circuit 'Foo' is not allowed" + - "[EG0370006]: extra circuit member 'x' for initialization of circuit 'Foo' is not allowed\n--> compiler-test:8:19\n |\n 8 | let a = Foo { x: 1 };\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/mutability/const.leo.out b/tests/expectations/compiler/compiler/mutability/const.leo.out index 2b510f9d57..834a167f30 100644 --- a/tests/expectations/compiler/compiler/mutability/const.leo.out +++ b/tests/expectations/compiler/compiler/mutability/const.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:6:5\n |\n 6 | a = 0;\n | ^^^^^\n |\n = illegal assignment to immutable variable 'a'" + - "[EG0370034]: illegal assignment to immutable variable 'a'\n--> compiler-test:6:5\n |\n 6 | a = 0;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/mutability/function_input.leo.out b/tests/expectations/compiler/compiler/mutability/function_input.leo.out index 6f64decd33..646b2eade6 100644 --- a/tests/expectations/compiler/compiler/mutability/function_input.leo.out +++ b/tests/expectations/compiler/compiler/mutability/function_input.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:5:5\n |\n 5 | a = false;\n | ^\n |\n = failed to resolve variable reference 'a'" + - "[EG0370029]: failed to resolve variable reference 'a'\n--> compiler-test:5:5\n |\n 5 | a = false;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/mutability/let_fail.leo.out b/tests/expectations/compiler/compiler/mutability/let_fail.leo.out index 2b510f9d57..834a167f30 100644 --- a/tests/expectations/compiler/compiler/mutability/let_fail.leo.out +++ b/tests/expectations/compiler/compiler/mutability/let_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:6:5\n |\n 6 | a = 0;\n | ^^^^^\n |\n = illegal assignment to immutable variable 'a'" + - "[EG0370034]: illegal assignment to immutable variable 'a'\n--> compiler-test:6:5\n |\n 6 | a = 0;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/statements/assign_ternary.leo.out b/tests/expectations/compiler/compiler/statements/assign_ternary.leo.out index 6518a49fff..a1cc4fc1cc 100644 --- a/tests/expectations/compiler/compiler/statements/assign_ternary.leo.out +++ b/tests/expectations/compiler/compiler/statements/assign_ternary.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:4:13\n |\n 4 | let x = true ? x: true;\n | ^^^^^^^^^^^^^^\n |\n = ternary sides had different types: left u32, right bool" + - "[EG0370022]: ternary sides had different types: left u32, right bool\n--> compiler-test:4:13\n |\n 4 | let x = true ? x: true;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/statements/duplicate_variable.leo.out b/tests/expectations/compiler/compiler/statements/duplicate_variable.leo.out index a313c9602a..7f9f709224 100644 --- a/tests/expectations/compiler/compiler/statements/duplicate_variable.leo.out +++ b/tests/expectations/compiler/compiler/statements/duplicate_variable.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:5:3\n |\n 5 | let x = true;\n | ^^^^^^^^^^^^\n |\n = a variable named \"x\" already exists in this scope" + - "[EG0370018]: a variable named \"x\" already exists in this scope\n--> compiler-test:5:3\n |\n 5 | let x = true;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/compiler/compiler/statements/ternary_non_const_fail.leo.out b/tests/expectations/compiler/compiler/statements/ternary_non_const_fail.leo.out index c32c26b9f2..f3f036ee12 100644 --- a/tests/expectations/compiler/compiler/statements/ternary_non_const_fail.leo.out +++ b/tests/expectations/compiler/compiler/statements/ternary_non_const_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> compiler-test:5:5\n |\n 5 | const y = x > 2u8? 1u8 : 2u8;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = failed to create const variable(s) 'y' with non constant values." + - "[EG0370016]: failed to create const variable(s) 'y' with non constant values.\n--> compiler-test:5:5\n |\n 5 | const y = x > 2u8? 1u8 : 2u8;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" diff --git a/tests/expectations/parser/parser/circuits/fields_fail.leo.out b/tests/expectations/parser/parser/circuits/fields_fail.leo.out index 006159e9d5..d371f382e6 100644 --- a/tests/expectations/parser/parser/circuits/fields_fail.leo.out +++ b/tests/expectations/parser/parser/circuits/fields_fail.leo.out @@ -2,4 +2,4 @@ namespace: Parse expectation: Fail outputs: - - " --> test:10:11\n |\n 10 | y: u32;\n | ^\n |\n = Cannot mix use of commas and semi-colons for circuit member variable declarations." + - "[EP0375006]: Cannot mix use of commas and semi-colons for circuit member variable declarations.\n--> test:10:11\n |\n 10 | y: u32;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:127\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" diff --git a/tests/expectations/parser/parser/expression/array_init_fail.leo.out b/tests/expectations/parser/parser/expression/array_init_fail.leo.out index 3e6e920477..fbc3ca82a8 100644 --- a/tests/expectations/parser/parser/expression/array_init_fail.leo.out +++ b/tests/expectations/parser/parser/expression/array_init_fail.leo.out @@ -2,5 +2,5 @@ namespace: ParseExpression expectation: Fail outputs: - - " --> test:1:1\n |\n 1 | [...0u8; 1]\n | ^^^^^^^\n |\n = illegal spread in array initializer" - - " --> test:1:1\n |\n 1 | [...0; 1]\n | ^^^^^\n |\n = illegal spread in array initializer" + - "[EP0375010]: illegal spread in array initializer\n--> test:1:1\n |\n 1 | [...0u8; 1]\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:71\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375010]: illegal spread in array initializer\n--> test:1:1\n |\n 1 | [...0; 1]\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:71\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" diff --git a/tests/expectations/parser/parser/expression/array_inline_fail.leo.out b/tests/expectations/parser/parser/expression/array_inline_fail.leo.out index 3565e3e59c..da63124d2f 100644 --- a/tests/expectations/parser/parser/expression/array_inline_fail.leo.out +++ b/tests/expectations/parser/parser/expression/array_inline_fail.leo.out @@ -2,8 +2,8 @@ namespace: ParseExpression expectation: Fail outputs: - - " --> test:1:2\n |\n 1 | [,]\n | ^\n |\n = expected 'expression', got ','" - - " --> test:1:2\n |\n 1 | [,,]\n | ^\n |\n = expected 'expression', got ','" - - " --> test:1:4\n |\n 1 | [0,,]\n | ^\n |\n = expected 'expression', got ','" - - " --> test:1:2\n |\n 1 | [,0]\n | ^\n |\n = expected 'expression', got ','" - - " --> test:1:2\n |\n 1 | [,0,]\n | ^\n |\n = expected 'expression', got ','" + - "[EP0375009]: unexpected string: expected 'expression', got ','\n--> test:1:2\n |\n 1 | [,]\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:71\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375009]: unexpected string: expected 'expression', got ','\n--> test:1:2\n |\n 1 | [,,]\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:71\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375009]: unexpected string: expected 'expression', got ','\n--> test:1:4\n |\n 1 | [0,,]\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:71\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375009]: unexpected string: expected 'expression', got ','\n--> test:1:2\n |\n 1 | [,0]\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:71\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375009]: unexpected string: expected 'expression', got ','\n--> test:1:2\n |\n 1 | [,0,]\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:71\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" diff --git a/tests/expectations/parser/parser/expression/circuit_init_fail.leo.out b/tests/expectations/parser/parser/expression/circuit_init_fail.leo.out index 3aae92971f..6e5b7a391f 100644 --- a/tests/expectations/parser/parser/expression/circuit_init_fail.leo.out +++ b/tests/expectations/parser/parser/expression/circuit_init_fail.leo.out @@ -2,15 +2,15 @@ namespace: ParseExpression expectation: Fail outputs: - - " --> test:1:3\n |\n 1 | x {\n | ^\n |\n = unexpected EOF" + - "[EP0375003]: unexpected EOF\n--> test:1:3\n |\n 1 | x {\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:71\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - "did not consume all input: '}' @ 1:3-4\n" - - " --> test:1:4\n |\n 1 | x {,}\n | ^\n |\n = expected 'ident', got ','" - - " --> test:1:5\n |\n 1 | x { , }\n | ^\n |\n = expected 'ident', got ','" - - " --> test:1:4\n |\n 1 | x {,,,}\n | ^\n |\n = expected 'ident', got ','" - - " --> test:1:6\n |\n 1 | x {x,,}\n | ^\n |\n = expected 'ident', got ','" - - " --> test:1:4\n |\n 1 | x {,,x}\n | ^\n |\n = expected 'ident', got ','" - - " --> test:1:4\n |\n 1 | x {,x}\n | ^\n |\n = expected 'ident', got ','" - - " --> test:1:8\n |\n 1 | x {x:y,,}\n | ^\n |\n = expected 'ident', got ','" - - " --> test:1:4\n |\n 1 | x {,,x:y}\n | ^\n |\n = expected 'ident', got ','" - - " --> test:1:4\n |\n 1 | x {,x:y}\n | ^\n |\n = expected 'ident', got ','" - - " --> test:1:6\n |\n 1 | x {x:}\n | ^\n |\n = expected 'expression', got '}'" + - "[EP0375009]: unexpected string: expected 'ident', got ','\n--> test:1:4\n |\n 1 | x {,}\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:71\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375009]: unexpected string: expected 'ident', got ','\n--> test:1:5\n |\n 1 | x { , }\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:71\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375009]: unexpected string: expected 'ident', got ','\n--> test:1:4\n |\n 1 | x {,,,}\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:71\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375009]: unexpected string: expected 'ident', got ','\n--> test:1:6\n |\n 1 | x {x,,}\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:71\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375009]: unexpected string: expected 'ident', got ','\n--> test:1:4\n |\n 1 | x {,,x}\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:71\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375009]: unexpected string: expected 'ident', got ','\n--> test:1:4\n |\n 1 | x {,x}\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:71\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375009]: unexpected string: expected 'ident', got ','\n--> test:1:8\n |\n 1 | x {x:y,,}\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:71\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375009]: unexpected string: expected 'ident', got ','\n--> test:1:4\n |\n 1 | x {,,x:y}\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:71\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375009]: unexpected string: expected 'ident', got ','\n--> test:1:4\n |\n 1 | x {,x:y}\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:71\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375009]: unexpected string: expected 'expression', got '}'\n--> test:1:6\n |\n 1 | x {x:}\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:71\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" diff --git a/tests/expectations/parser/parser/expression/literal/address_fail.leo.out b/tests/expectations/parser/parser/expression/literal/address_fail.leo.out index c0fc912fd4..d6b3a4abf5 100644 --- a/tests/expectations/parser/parser/expression/literal/address_fail.leo.out +++ b/tests/expectations/parser/parser/expression/literal/address_fail.leo.out @@ -2,12 +2,12 @@ namespace: Token expectation: Fail outputs: - - " --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1'" - - " --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6Z2eu975wnpz2925ntjccd5cfqxtyu8sta57J9\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6Z2eu975wnpz2925ntjccd5cfqxtyu8sta57J9'" - - " --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d'" - - " --> test:1:1\n |\n 1 | aleo1\n | ^^^^^\n |\n = invalid address literal: 'aleo1'" - - " --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st'" - - " --> test:1:1\n |\n 1 | aleo1\n | ^^^^^\n |\n = invalid address literal: 'aleo1'" - - " --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1'" - - " --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d11\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d11'" - - " --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1x\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1x'" + - "[EP0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1'\n--> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6Z2eu975wnpz2925ntjccd5cfqxtyu8sta57J9'\n--> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6Z2eu975wnpz2925ntjccd5cfqxtyu8sta57J9\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d'\n--> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375001]: invalid address literal: 'aleo1'\n--> test:1:1\n |\n 1 | aleo1\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st'\n--> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375001]: invalid address literal: 'aleo1'\n--> test:1:1\n |\n 1 | aleo1\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1'\n--> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d11'\n--> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d11\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1x'\n--> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1x\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" diff --git a/tests/expectations/parser/parser/expression/literal/char_fail.leo.out b/tests/expectations/parser/parser/expression/literal/char_fail.leo.out index 30bb2b78e6..acd3972314 100644 --- a/tests/expectations/parser/parser/expression/literal/char_fail.leo.out +++ b/tests/expectations/parser/parser/expression/literal/char_fail.leo.out @@ -2,38 +2,38 @@ namespace: Token expectation: Fail outputs: - - " --> test:1:1\n |\n 1 | '\\'\n | ^\n |\n = unexpected token: '''" - - " --> test:1:1\n |\n 1 | 'a\n | ^\n |\n = unexpected token: '''" - - " --> test:1:1\n |\n 1 | ''\n | ^\n |\n = unexpected token: '''" - - " --> test:1:1\n |\n 1 | '\\x9A'\n | ^\n |\n = unexpected token: '''" - - " --> test:1:1\n |\n 1 | '\\x7'\n | ^\n |\n = unexpected token: '''" - - " --> test:1:1\n |\n 1 | '\\x7g'\n | ^\n |\n = unexpected token: '''" - - " --> test:1:1\n |\n 1 | '\\xz'\n | ^\n |\n = unexpected token: '''" - - " --> test:1:1\n |\n 1 | '\\x80'\n | ^\n |\n = unexpected token: '''" - - " --> test:1:1\n |\n 1 | '\\xc1'\n | ^\n |\n = unexpected token: '''" - - " --> test:1:1\n |\n 1 | '\\xc2'\n | ^\n |\n = unexpected token: '''" - - " --> test:1:1\n |\n 1 | '\\xDF'\n | ^\n |\n = unexpected token: '''" - - " --> test:1:1\n |\n 1 | '\\xC0'\n | ^\n |\n = unexpected token: '''" - - " --> test:1:1\n |\n 1 | '\\xe0'\n | ^\n |\n = unexpected token: '''" - - " --> test:1:1\n |\n 1 | '\\x9f'\n | ^\n |\n = unexpected token: '''" - - " --> test:1:1\n |\n 1 | 'abcdefg'\n | ^\n |\n = unexpected token: '''" - - " --> test:1:1\n |\n 1 | '\\t\\t'\n | ^\n |\n = unexpected token: '''" - - " --> test:1:1\n |\n 1 | '\\a'\n | ^\n |\n = unexpected token: '''" - - " --> test:1:1\n |\n 1 | '\\z'\n | ^\n |\n = unexpected token: '''" - - " --> test:1:1\n |\n 1 | '\\A'\n | ^\n |\n = unexpected token: '''" - - " --> test:1:1\n |\n 1 | '\\Z'\n | ^\n |\n = unexpected token: '''" - - " --> test:1:1\n |\n 1 | '\\1'\n | ^\n |\n = unexpected token: '''" - - " --> test:1:1\n |\n 1 | '\\9'\n | ^\n |\n = unexpected token: '''" - - " --> test:1:1\n |\n 1 | '\\*'\n | ^\n |\n = unexpected token: '''" - - " --> test:1:1\n |\n 1 | '\\x'\n | ^\n |\n = unexpected token: '''" - - " --> test:1:1\n |\n 1 | '\\u'\n | ^\n |\n = unexpected token: '''" - - " --> test:1:1\n |\n 1 | '\\u{bbbbb}\\u{aaaa}'\n | ^\n |\n = unexpected token: '''" - - " --> test:1:1\n |\n 1 | '\\uz'\n | ^\n |\n = unexpected token: '''" - - " --> test:1:1\n |\n 1 | '\\u1'\n | ^\n |\n = unexpected token: '''" - - " --> test:1:1\n |\n 1 | '\\u123'\n | ^\n |\n = unexpected token: '''" - - " --> test:1:1\n |\n 1 | '\\u{2764z'\n | ^\n |\n = unexpected token: '''" - - " --> test:1:1\n |\n 1 | '\\u{276g}'\n | ^\n |\n = unexpected token: '''" - - " --> test:1:1\n |\n 1 | '\\u00000000'\n | ^\n |\n = unexpected token: '''" - - " --> test:1:1\n |\n 1 | '\\u01000000'\n | ^\n |\n = unexpected token: '''" - - " --> test:1:1\n |\n 1 | '\\u9999999'\n | ^\n |\n = unexpected token: '''" - - " --> test:1:1\n |\n 1 | '😭😂😘'\n | ^\n |\n = unexpected token: '''" + - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375000]: '\n--> test:1:1\n |\n 1 | 'a\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375000]: '\n--> test:1:1\n |\n 1 | ''\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\x9A'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\x7'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\x7g'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\xz'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\x80'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\xc1'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\xc2'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\xDF'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\xC0'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\xe0'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\x9f'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375000]: '\n--> test:1:1\n |\n 1 | 'abcdefg'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\t\\t'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\a'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\z'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\A'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\Z'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\1'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\9'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\*'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\x'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\u'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\u{bbbbb}\\u{aaaa}'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\uz'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\u1'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\u123'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\u{2764z'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\u{276g}'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\u00000000'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\u01000000'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\u9999999'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '😭😂😘'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" diff --git a/tests/expectations/parser/parser/expression/literal/group_fail.leo.out b/tests/expectations/parser/parser/expression/literal/group_fail.leo.out index da65de24fa..8e195b8408 100644 --- a/tests/expectations/parser/parser/expression/literal/group_fail.leo.out +++ b/tests/expectations/parser/parser/expression/literal/group_fail.leo.out @@ -2,12 +2,12 @@ namespace: ParseExpression expectation: Fail outputs: - - " --> test:1:1\n |\n 1 | group\n | ^^^^^\n |\n = expected 'expression', got 'group'" + - "[EP0375009]: unexpected string: expected 'expression', got 'group'\n--> test:1:1\n |\n 1 | group\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:71\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - "did not consume all input: 'group' @ 1:3-8\n" - "did not consume all input: 'group' @ 1:6-11\n" - - " --> test:1:2\n |\n 1 | (,)group\n | ^\n |\n = expected 'expression', got ','" - - " --> test:1:2\n |\n 1 | (+, -,)group\n | ^\n |\n = expected 'expression', got '+'" - - " --> test:1:2\n |\n 1 | (,+, -)group\n | ^\n |\n = expected 'expression', got ','" + - "[EP0375009]: unexpected string: expected 'expression', got ','\n--> test:1:2\n |\n 1 | (,)group\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:71\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375009]: unexpected string: expected 'expression', got '+'\n--> test:1:2\n |\n 1 | (+, -,)group\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:71\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375009]: unexpected string: expected 'expression', got ','\n--> test:1:2\n |\n 1 | (,+, -)group\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:71\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - "did not consume all input: 'group' @ 1:6-11\n" - "did not consume all input: 'group' @ 1:12-17\n" - "did not consume all input: 'group' @ 1:15-20\n" diff --git a/tests/expectations/parser/parser/expression/literal/string_fail.leo.out b/tests/expectations/parser/parser/expression/literal/string_fail.leo.out index 891ec74b3c..851b5eeda8 100644 --- a/tests/expectations/parser/parser/expression/literal/string_fail.leo.out +++ b/tests/expectations/parser/parser/expression/literal/string_fail.leo.out @@ -2,10 +2,10 @@ namespace: Token expectation: Fail outputs: - - " --> test:1:1\n |\n 1 | \"Hello world!\n | ^\n |\n = unexpected token: '\"'" - - " --> test:1:1\n |\n 1 | \"\\\"\n | ^\n |\n = unexpected token: '\"'" - - " --> test:1:1\n |\n 1 | \"\\l\"\n | ^\n |\n = unexpected token: '\"'" - - " --> test:1:1\n |\n 1 | \"\\uaaa\"\n | ^\n |\n = unexpected token: '\"'" - - " --> test:1:1\n |\n 1 | \"\\u\"\n | ^\n |\n = unexpected token: '\"'" - - " --> test:1:1\n |\n 1 | \"\\xFF\"\n | ^\n |\n = unexpected token: '\"'" - - " --> test:1:1\n |\n 1 | \"\\x\"\n | ^\n |\n = unexpected token: '\"'" + - "[EP0375000]: \"\n--> test:1:1\n |\n 1 | \"Hello world!\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375000]: \"\n--> test:1:1\n |\n 1 | \"\\\"\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375000]: \"\n--> test:1:1\n |\n 1 | \"\\l\"\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375000]: \"\n--> test:1:1\n |\n 1 | \"\\uaaa\"\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375000]: \"\n--> test:1:1\n |\n 1 | \"\\u\"\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375000]: \"\n--> test:1:1\n |\n 1 | \"\\xFF\"\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375000]: \"\n--> test:1:1\n |\n 1 | \"\\x\"\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" diff --git a/tests/expectations/parser/parser/functions/annotated_fail.leo.out b/tests/expectations/parser/parser/functions/annotated_fail.leo.out index b4b2bc739d..9cc7daff3a 100644 --- a/tests/expectations/parser/parser/functions/annotated_fail.leo.out +++ b/tests/expectations/parser/parser/functions/annotated_fail.leo.out @@ -2,4 +2,4 @@ namespace: Parse expectation: Fail outputs: - - " --> test:3:12\n |\n 3 | @test(test,)\n | ^\n |\n = expected 'identifier', 'number' -- got ')'" + - "[EP0375005]: expected 'identifier', 'number' -- got ')'\n--> test:3:12\n |\n 3 | @test(test,)\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:127\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" diff --git a/tests/expectations/parser/parser/functions/const_input_fail.leo.out b/tests/expectations/parser/parser/functions/const_input_fail.leo.out index 468e683fd9..800a71cad2 100644 --- a/tests/expectations/parser/parser/functions/const_input_fail.leo.out +++ b/tests/expectations/parser/parser/functions/const_input_fail.leo.out @@ -2,4 +2,4 @@ namespace: Parse expectation: Fail outputs: - - " --> test:3:18\n |\n 3 | function x(const input) {\n | ^^^^^\n |\n = expected 'ident', got 'input'" + - "[EP0375009]: unexpected string: expected 'ident', got 'input'\n--> test:3:18\n |\n 3 | function x(const input) {\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:127\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" diff --git a/tests/expectations/parser/parser/import/import_empty_list_fail.leo.out b/tests/expectations/parser/parser/import/import_empty_list_fail.leo.out index 5b3301be42..580e624263 100644 --- a/tests/expectations/parser/parser/import/import_empty_list_fail.leo.out +++ b/tests/expectations/parser/parser/import/import_empty_list_fail.leo.out @@ -2,4 +2,4 @@ namespace: Parse expectation: Fail outputs: - - " --> test:3:8\n |\n 3 | import a.();\n | ^\n |\n = Cannot import empty list" + - "[EP0375002]: Cannot import empty list\n--> test:3:8\n |\n 3 | import a.();\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:127\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" diff --git a/tests/expectations/parser/parser/import/invalid.leo.out b/tests/expectations/parser/parser/import/invalid.leo.out index 941b1887cd..b10b73d41d 100644 --- a/tests/expectations/parser/parser/import/invalid.leo.out +++ b/tests/expectations/parser/parser/import/invalid.leo.out @@ -2,4 +2,4 @@ namespace: Parse expectation: Fail outputs: - - " --> test:3:18\n |\n 3 | import foo as bar;\n | ^\n |\n = expected '.' -- got ';'" + - "[EP0375005]: expected . -- got ';'\n--> test:3:18\n |\n 3 | import foo as bar;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:127\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" diff --git a/tests/expectations/parser/parser/statement/conditional_fail.leo.out b/tests/expectations/parser/parser/statement/conditional_fail.leo.out index c54b2c1841..836886a52a 100644 --- a/tests/expectations/parser/parser/statement/conditional_fail.leo.out +++ b/tests/expectations/parser/parser/statement/conditional_fail.leo.out @@ -2,4 +2,4 @@ namespace: ParseStatement expectation: Fail outputs: - - " --> test:1:17\n |\n 1 | if true {} else let x = 2;\n | ^^^^^^^^^\n |\n = expected 'Block or Conditional', got 'let mut x = 2;'" + - "[EP0375008]: unexpected statement: expected 'Block or Conditional', got 'let mut x = 2;'\n--> test:1:17\n |\n 1 | if true {} else let x = 2;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" diff --git a/tests/expectations/parser/parser/statement/definition_fail.leo.out b/tests/expectations/parser/parser/statement/definition_fail.leo.out index fcb8db8960..c7f4ef3bef 100644 --- a/tests/expectations/parser/parser/statement/definition_fail.leo.out +++ b/tests/expectations/parser/parser/statement/definition_fail.leo.out @@ -2,26 +2,26 @@ namespace: ParseStatement expectation: Fail outputs: - - " --> test:1:0\n |\n 1 | let mut x = expr;\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | let mut x = ();\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | let mut x = x+y;\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | let mut x = (x,y);\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | let mut x = x();\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | const mut x = expr;\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | const mut x = ();\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | const mut x = x+y;\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | const mut x = (x,y);\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | const mut x = x();\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | let mut x: u32 = expr;\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | let mut x: u32 = ();\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | let mut x: u32 = x+y;\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | let mut x: u32 = (x,y);\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | let mut x: u32 = x();\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | const mut x: u32 = expr;\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | const mut x: u32 = ();\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | const mut x: u32 = x+y;\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | const mut x: u32 = (x,y);\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | const mut x: u32 = x();\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:10\n |\n 1 | let (x,y,,) = ();\n | ^\n |\n = expected 'ident', got ','" - - " --> test:1:6\n |\n 1 | let (,x,y) = ();\n | ^\n |\n = expected 'ident', got ','" - - " --> test:1:8\n |\n 1 | let (x,,y) = ();\n | ^\n |\n = expected 'ident', got ','" + - "[EP0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n--> test:1:1\n |\n 1 | let mut x = expr;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n--> test:1:1\n |\n 1 | let mut x = ();\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n--> test:1:1\n |\n 1 | let mut x = x+y;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n--> test:1:1\n |\n 1 | let mut x = (x,y);\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n--> test:1:1\n |\n 1 | let mut x = x();\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n--> test:1:1\n |\n 1 | const mut x = expr;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n--> test:1:1\n |\n 1 | const mut x = ();\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n--> test:1:1\n |\n 1 | const mut x = x+y;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n--> test:1:1\n |\n 1 | const mut x = (x,y);\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n--> test:1:1\n |\n 1 | const mut x = x();\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n--> test:1:1\n |\n 1 | let mut x: u32 = expr;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n--> test:1:1\n |\n 1 | let mut x: u32 = ();\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n--> test:1:1\n |\n 1 | let mut x: u32 = x+y;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n--> test:1:1\n |\n 1 | let mut x: u32 = (x,y);\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n--> test:1:1\n |\n 1 | let mut x: u32 = x();\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n--> test:1:1\n |\n 1 | const mut x: u32 = expr;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n--> test:1:1\n |\n 1 | const mut x: u32 = ();\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n--> test:1:1\n |\n 1 | const mut x: u32 = x+y;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n--> test:1:1\n |\n 1 | const mut x: u32 = (x,y);\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n--> test:1:1\n |\n 1 | const mut x: u32 = x();\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375009]: unexpected string: expected 'ident', got ','\n--> test:1:10\n |\n 1 | let (x,y,,) = ();\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375009]: unexpected string: expected 'ident', got ','\n--> test:1:6\n |\n 1 | let (,x,y) = ();\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375009]: unexpected string: expected 'ident', got ','\n--> test:1:8\n |\n 1 | let (x,,y) = ();\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" diff --git a/tests/expectations/parser/parser/statement/return_fail.leo.out b/tests/expectations/parser/parser/statement/return_fail.leo.out index 9f5a9e7204..ab2cb23b98 100644 --- a/tests/expectations/parser/parser/statement/return_fail.leo.out +++ b/tests/expectations/parser/parser/statement/return_fail.leo.out @@ -2,6 +2,6 @@ namespace: ParseStatement expectation: Fail outputs: - - " --> test:1:1\n |\n 1 | return\n | ^^^^^^\n |\n = unexpected EOF" - - " --> test:1:8\n |\n 1 | return 5\n | ^\n |\n = unexpected EOF" - - " --> test:2:1\n |\n 2 | if x {}\n | ^^\n |\n = expected 'expression', got 'if'" + - "[EP0375003]: unexpected EOF\n--> test:1:1\n |\n 1 | return\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375003]: unexpected EOF\n--> test:1:8\n |\n 1 | return 5\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EP0375009]: unexpected string: expected 'expression', got 'if'\n--> test:2:1\n |\n 2 | if x {}\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" From 87db1bfdb6fc3507814efb3e10d1457c8603923a Mon Sep 17 00:00:00 2001 From: Alessandro Coglio Date: Tue, 3 Aug 2021 13:28:57 -0700 Subject: [PATCH 06/58] [RFC] Add an RFC for bit and byte conversions. --- docs/rfc/009-bit-byte-conversions.md | 265 +++++++++++++++++++++++++++ 1 file changed, 265 insertions(+) create mode 100644 docs/rfc/009-bit-byte-conversions.md diff --git a/docs/rfc/009-bit-byte-conversions.md b/docs/rfc/009-bit-byte-conversions.md new file mode 100644 index 0000000000..513b408b94 --- /dev/null +++ b/docs/rfc/009-bit-byte-conversions.md @@ -0,0 +1,265 @@ +# Leo RFC 009: Conversions with Bits and Bytes + +## Authors + +- Max Bruce +- Collin Chin +- Alessandro Coglio +- Eric McCarthy +- Jon Pavlik +- Damir Shamanaev +- Damon Sicore +- Howard Wu + +## Status + +DRAFT + +# Summary + +This RFC proposes the addition of natively implemented global functions to perform conversions +between Leo integer values and sequences of bits or bytes in big endian or little endian order. +This RFC also proposes a future transition from these functions to methods associated to the integer types. + +# Motivation + +Conversions of integers to bits and bytes are fairly common in programming languages. +Use case include communication with the external world +(since external data is sometimes represented as bits and bytes rather than higher-level data structures), +and serialization/deserialization for cryptographic purposes (e.g. hashing data). + +# Design + +## Concepts + +The Leo integer values can be thought of sequences of bits. +Therefore, it makes sense to convert between integer values and their corresponding sequences of bits; +the sequences of bits can be in little or big endian order (i.e. least vs. most significant bit first), +naturally leading to two possible conversions. +Obviously, the bits represent the integers in base 2. + +Since all the Leo integer values consist of multiples of 8 bits, +it also makes sense to convert between integer values and squences of bytes, +which represents the integers in base 256. +Again, the bytes may be in little or big endian order. + +It could also make sense to convert between integers consisting of `N` bits +and sequences of "words" of `M` bits if `N` is a multiple of `M`, +e.g. convert a `u32` into a sequence of two `u16`s, or convert a `u128` into a sequence of four `u32`s. +However, the case in which `M` is 1 (bits) or 8 (bytes) is by far the most common, +and therefore the initial focus of this RFC; +nonetheless, it seems valuable to keep these possible generalizations in mind as we work though this initial design. + +Another possible generalization is to lift these conversions to sequences, +e.g. converting from a sequence of integer values to a sequence of bits or bytes +by concatenating the results of converting the integer values, +and converting from a sequence of bits or bytes to a sequence of integer values +by grouping the bits or bytes into chunks and converting each chunk into an integer. +For instance, a sequence of 4 `u32` values can be turned into a sequence of 32 bytes or a sequence of 128 bits. +Note that, in these cases, the endianness only applies to the individual element conversion, +not to the ordering of the integer values, which should be preserved by the conversion. + +Besides integers, it could make sense to consider converting other Leo values between bits and bytes, +namely characters, field elements, group elements, and addresses (but perhaps not booleans). +If this is further extended to aggregate values (tuples, arrays, and circuits), +then this moves towards a general serialization/deserialization library for Leo, which could be a separate feature. + +## Representation of Bits + +In Leo's current type system, bits can be represented as `bool` values. +These are not quite the numbers 0 and 1, but they are isomorphic, and it is easy to convert between booleans and bits: +```ts +// convert a boolean x to a bit: +(x ? 1 : 0) + +// convert f bit y to a boolean: +(y == 1) +``` + +If Leo had a type `u1` for unsigned 1-bit integers, we could use that instead of `bool`. +Separately from this RFC, such a type could be added. +There is also an outstanding proposal (not in an RFC currently) to support types `uN` and `iN` for every positive `N`, +in which case `u1` would be an instance of that. + +## Representation of Bytes + +The type `u8` is the natural way to represent a byte. +The type `i8` is isomorphic to that, but we tend to think of bytes as unsigned. + +## Representation of Sequences + +This applies to the sequence of bits or bytes that a Leo integer converts to or from. +E.g. a `u32` is converted to/from a sequence of bits or bytes. + +Sequences in Leo may be ntaurally represented as arrays or tuples. +Arrays are more flexible; in particular, they allow indexing via expressions rather than just numbers, unlike tuples. +Thus, arrays are the natural choice to represent these sequences. + +## Conversion Functions + +We propose the following global functions, +for which we write declarations without bodies below, +since the implementation is native. +(It is a separate issue whether the syntax below should be allowed, +in order to represent natively implemented functions, +or whether there should be a more explicit indication such as `native` in Java). + +These are tentative names, which we can tweak. +What is more important is the selection of operations, and their input/output types. + +### Conversions between Integers and Bits + +```ts +// unsigned to bits, little and big endian +function u8_to_bits_le(x: u8) -> [bool; 8]; +function u8_to_bits_be(x: u8) -> [bool; 8]; +function u16_to_bits_le(x: u16) -> [bool; 16]; +function u16_to_bits_be(x: u16) -> [bool; 16]; +function u32_to_bits_le(x: u32) -> [bool; 32]; +function u32_to_bits_be(x: u32) -> [bool; 32]; +function u64_to_bits_le(x: u64) -> [bool; 64]; +function u64_to_bits_be(x: u64) -> [bool; 64]; +function u128_to_bits_le(x: u128) -> [bool; 128]; +function u128_to_bits_be(x: u128) -> [bool; 128]; + +// signed to bits, little and big endian +function i8_to_bits_le(x: i8) -> [bool; 8]; +function i8_to_bits_be(x: i8) -> [bool; 8]; +function i16_to_bits_le(x: i16) -> [bool; 16]; +function i16_to_bits_be(x: i16) -> [bool; 16]; +function i32_to_bits_le(x: i32) -> [bool; 32]; +function i32_to_bits_be(x: i32) -> [bool; 32]; +function i64_to_bits_le(x: i64) -> [bool; 64]; +function i64_to_bits_be(x: i64) -> [bool; 64]; +function i128_to_bits_le(x: i128) -> [bool; 128]; +function i128_to_bits_be(x: i128) -> [bool; 128]; + +// unsigned from bits, little and big endian +function u8_from_bits_le(x: [bool; 8]) -> u8; +function u8_from_bits_be(x: [bool; 8]) -> u8; +function u16_from_bits_le(x: [bool; 16]) -> u16; +function u16_from_bits_be(x: [bool; 16]) -> u16; +function u32_from_bits_le(x: [bool; 32]) -> u32; +function u32_from_bits_be(x: [bool; 32]) -> u32; +function u64_from_bits_le(x: [bool; 64]) -> u64; +function u64_from_bits_be(x: [bool; 64]) -> u64; +function u128_from_bits_le(x: [bool; 128]) -> u128; +function u128_from_bits_be(x: [bool; 128]) -> u128; + +// signed from bits, little and big endian +function i8_from_bits_le(x: [bool; 8]) -> i8; +function i8_from_bits_be(x: [bool; 8]) -> i8; +function i16_from_bits_le(x: [bool; 16]) -> i16; +function i16_from_bits_be(x: [bool; 16]) -> i16; +function i32_from_bits_le(x: [bool; 32]) -> i32; +function i32_from_bits_be(x: [bool; 32]) -> i32; +function i64_from_bits_le(x: [bool; 64]) -> i64; +function i64_from_bits_be(x: [bool; 64]) -> i64; +function i128_from_bits_le(x: [bool; 128]) -> i128; +function i128_from_bits_be(x: [bool; 128]) -> i128; +``` + +### Conversions between Integers and Bytes + +```ts +// unsigned to bytes, little and big endian +function u16_to_bytes_le(x: u16) -> [u8; 2]; +function u16_to_bytes_be(x: u16) -> [u8; 2]; +function u32_to_bytes_le(x: u32) -> [u8; 4]; +function u32_to_bytes_be(x: u32) -> [u8; 4]; +function u64_to_bytes_le(x: u64) -> [u8; 8]; +function u64_to_bytes_be(x: u64) -> [u8; 8]; +function u128_to_bytes_le(x: u128) -> [u8; 16]; +function u128_to_bytes_be(x: u128) -> [u8; 16]; + +// signed to bytes, little and big endian +function i16_to_bytes_le(x: i16) -> [u8; 2]; +function i16_to_bytes_be(x: i16) -> [u8; 2]; +function i32_to_bytes_le(x: i32) -> [u8; 4]; +function i32_to_bytes_be(x: i32) -> [u8; 4]; +function i64_to_bytes_le(x: i64) -> [u8; 8]; +function i64_to_bytes_be(x: i64) -> [u8; 8]; +function i128_to_bytes_le(x: i128) -> [u8; 16]; +function i128_to_bytes_be(x: i128) -> [u8; 16]; + +// unsigned from bytes, little and big endian +function u16_from_bytes_le(x: [u8; 2]) -> u16; +function u16_from_bytes_be(x: [u8; 2]) -> u16; +function u32_from_bytes_le(x: [u8; 4]) -> u32; +function u32_from_bytes_be(x: [u8; 4]) -> u32; +function u64_from_bytes_le(x: [u8; 8]) -> u64; +function u64_from_bytes_be(x: [u8; 8]) -> u64; +function u128_from_bytes_le(x: [u8; 16]) -> u128; +function u128_from_bytes_be(x: [u8; 16]) -> u128; + +// signed from bytes, little and big endian +function i16_from_bytes_le(x: [u8; 2]) -> i16; +function i16_from_bytes_be(x: [u8; 2]) -> i16; +function i32_from_bytes_le(x: [u8; 4]) -> i32; +function i32_from_bytes_be(x: [u8; 4]) -> i32; +function i64_from_bytes_le(x: [u8; 8]) -> i64; +function i64_from_bytes_be(x: [u8; 8]) -> i64; +function i128_from_bytes_le(x: [u8; 16]) -> i128; +function i128_from_bytes_be(x: [u8; 16]) -> i128; +``` + +## Transition to Methods + +Once a separate proposal for adding methods to Leo scalar types is realized, +we may want to turn the global functions listed above into methods, +deprecating the global functions, and eventually eliminating them. + +Conversions to bits or bytes will be instance methods of the integer types, +e.g. `u8` will include an instance method `to_bits_le` that takes no arguments and that returns a `[bool; 8]`. +Example: +```ts +let int: u8 = 12; +let bits: [bool; 8] = int.to_bits_le(); +console.assert(bits == [false, false, true, true, false, false, false, false]); // 00110000 (little endian) +``` + +Conversions from bits or bytes will be static methods of the integer types, +e.g. `u8` will include a static metod `from_bits_le` that takes a `[bool; 8]` argument and returns a `u8`. +Example: +```ts +let bits: [bool; 8] = [false, false, true, true, false, false, false, false]; // 00110000 (little endian) +let int = u8::from_bits_le(bits); +console.assert(int == 12); +``` + +# Drawbacks + +This does not seem to bring any drawbacks. + +# Effect on Ecosystem + +None. + +# Alternatives + +## Pure Leo Implementation + +These conversions can be realized in Leo (i.e. without native implementations), +provided that Leo is extended with certain operations that are already separately planned: +* Integer division and remainder, along with type casts, could be used. +* Bitwise shifts and masks, along with type casts, could be used. + +However, compiling the Leo code that realizes the conversions may result in less efficient R1CS than the native ones. + +## Naming Bit and Byte Types Explicitly + +Names like `u8_to_bits_le` and `u32_to_bytes_le` talk about bits and bytes, +therefore relying on a choice of representation for bits and bytes, +which is `bool` for bits and `u8` for bytes as explained above. +An alternative is to have names like `u8_to_bools_le` and `u32_to_u8s_le`, +which explicate the representation of bits and bytes in the name, +and open the door to additional conversions to different representations. +In particular, if and when Leo is extended with a type `u1` for bits, +there could be additional operations like `u8_to_u1s_le`. + +This more explicit naming scheme also provides a path towards extending +bit and byte conversions to more generic "word" conversions, +such as `u64_to_u16s_le`, which would turn a `u64` into a `[u16; 4]`. +In general, it makes sense to convert between `uN` or `iN` and `[uM; P]` when `N == M * P`. +If Leo were extended with types `uN` and `iN` for all positive `N` as proposed elsewhere, +there could be a family of all such conversions. From 162949185fe5648c3362cb1c0ba88e88ee662609 Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Wed, 4 Aug 2021 00:42:48 -0700 Subject: [PATCH 07/58] code cleanup --- Cargo.lock | 8 +- Cargo.toml | 4 + asg/src/const_value.rs | 60 ++----- asg/src/expression/array_access.rs | 10 +- asg/src/expression/array_init.rs | 34 ++-- asg/src/expression/array_inline.rs | 20 +-- asg/src/expression/array_range_access.rs | 37 ++--- asg/src/expression/binary.rs | 42 ++--- asg/src/expression/call.rs | 76 ++++----- asg/src/expression/cast.rs | 6 +- asg/src/expression/circuit_access.rs | 38 ++--- asg/src/expression/circuit_init.rs | 24 +-- asg/src/expression/constant.rs | 58 ++----- asg/src/expression/ternary.rs | 6 +- asg/src/expression/tuple_access.rs | 8 +- asg/src/expression/tuple_init.rs | 14 +- asg/src/expression/unary.rs | 20 +-- asg/src/expression/variable_ref.rs | 14 +- asg/src/program/circuit.rs | 12 +- asg/src/program/function.rs | 13 +- asg/src/program/mod.rs | 22 +-- asg/src/scope.rs | 8 +- asg/src/statement/assign.rs | 57 +++---- asg/src/statement/definition.rs | 26 ++-- asg/src/statement/iteration.rs | 10 +- ast/Cargo.toml | 11 +- ast/src/lib.rs | 22 ++- ast/src/reducer/canonicalization.rs | 10 +- ast/src/reducer/reconstructing_director.rs | 2 +- compiler/Cargo.toml | 4 - compiler/src/compiler.rs | 25 +-- compiler/src/console/assert.rs | 7 +- compiler/src/console/format.rs | 32 ++-- compiler/src/constraints/constraints.rs | 9 +- compiler/src/expression/arithmetic/add.rs | 4 +- compiler/src/expression/arithmetic/bit_not.rs | 5 +- compiler/src/expression/arithmetic/div.rs | 4 +- compiler/src/expression/arithmetic/mul.rs | 4 +- compiler/src/expression/arithmetic/negate.rs | 5 +- compiler/src/expression/arithmetic/pow.rs | 4 +- compiler/src/expression/arithmetic/sub.rs | 4 +- compiler/src/expression/array/access.rs | 62 ++------ compiler/src/expression/array/array.rs | 8 +- compiler/src/expression/array/index.rs | 5 +- compiler/src/expression/circuit/access.rs | 18 ++- compiler/src/expression/circuit/circuit.rs | 5 +- .../src/expression/conditional/conditional.rs | 15 +- compiler/src/expression/logical/and.rs | 11 +- compiler/src/expression/logical/not.rs | 5 +- compiler/src/expression/logical/or.rs | 11 +- compiler/src/expression/relational/eq.rs | 10 +- compiler/src/expression/relational/ge.rs | 7 +- compiler/src/expression/relational/gt.rs | 7 +- compiler/src/expression/relational/le.rs | 7 +- compiler/src/expression/relational/lt.rs | 7 +- compiler/src/expression/tuple/access.rs | 4 +- .../expression/variable_ref/variable_ref.rs | 9 +- compiler/src/function/function.rs | 7 +- compiler/src/function/input/array.rs | 9 +- compiler/src/function/input/input_section.rs | 6 +- .../src/function/input/main_function_input.rs | 31 ++-- compiler/src/function/input/tuple.rs | 9 +- compiler/src/function/main_function.rs | 23 ++- compiler/src/function/result/result.rs | 13 +- compiler/src/output/mod.rs | 10 +- compiler/src/output/output_bytes.rs | 10 +- compiler/src/output/output_file.rs | 16 +- compiler/src/prelude/blake2s.rs | 19 +-- compiler/src/statement/assign/assign.rs | 8 +- .../statement/assign/assignee/array_index.rs | 49 ++---- .../assign/assignee/array_range_index.rs | 8 +- .../src/statement/assign/assignee/member.rs | 14 +- compiler/src/statement/assign/assignee/mod.rs | 12 +- .../src/statement/assign/assignee/tuple.rs | 12 +- .../src/statement/conditional/conditional.rs | 13 +- .../src/statement/definition/definition.rs | 9 +- compiler/src/statement/iteration/iteration.rs | 6 +- compiler/src/statement/statement.rs | 4 +- compiler/src/value/address/address.rs | 12 +- compiler/src/value/boolean/input.rs | 14 +- compiler/src/value/char/char.rs | 5 +- compiler/src/value/field/field_type.rs | 59 +++---- compiler/src/value/field/input.rs | 20 +-- compiler/src/value/group/input.rs | 14 +- .../src/value/group/targets/edwards_bls12.rs | 105 +++++-------- compiler/src/value/integer/integer.rs | 26 ++-- compiler/src/value/integer/macros.rs | 126 ++++++--------- errors/src/asg/asg_errors.rs | 78 +++++----- errors/src/ast/ast_errors.rs | 36 +++++ errors/src/common/backtraced.rs | 18 ++- errors/src/common/formatted.rs | 20 ++- errors/src/common/macros.rs | 34 ++-- errors/src/common/mod.rs | 5 + errors/src/common/traits.rs | 10 +- errors/src/compiler/compiler_errors.rs | 147 +++++++++--------- errors/src/import/import_errors.rs | 25 +-- errors/src/lib.rs | 24 ++- errors/src/package/package_errors.rs | 120 +++++++------- errors/src/parser/parser_errors.rs | 16 +- imports/src/parser/import_parser.rs | 2 +- imports/src/parser/parse_package.rs | 14 +- imports/src/parser/parse_symbol.rs | 13 +- leo/main.rs | 1 + package/Cargo.toml | 4 - package/src/imports/directory.rs | 10 +- package/src/inputs/directory.rs | 31 ++-- package/src/inputs/input.rs | 23 +-- package/src/inputs/pairs.rs | 10 +- package/src/inputs/state.rs | 23 +-- package/src/outputs/checksum.rs | 29 ++-- package/src/outputs/circuit.rs | 28 ++-- package/src/outputs/directory.rs | 10 +- package/src/outputs/proof.rs | 27 +--- package/src/outputs/proving_key.rs | 28 ++-- package/src/outputs/verification_key.rs | 32 ++-- package/src/package.rs | 18 +-- package/src/root/gitignore.rs | 16 +- package/src/root/manifest.rs | 89 +++-------- package/src/root/readme.rs | 15 +- package/src/root/zip.rs | 50 ++---- package/src/source/directory.rs | 26 +--- package/src/source/main.rs | 5 +- parser/Cargo.toml | 3 - parser/src/parser/context.rs | 20 +-- parser/src/parser/expression.rs | 16 +- parser/src/parser/file.rs | 53 +++---- parser/src/parser/mod.rs | 6 +- parser/src/parser/statement.rs | 24 +-- parser/src/parser/type_.rs | 8 +- parser/src/tokenizer/mod.rs | 8 +- 130 files changed, 1087 insertions(+), 1727 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 29ebf4fc7e..da2eccdadb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1210,9 +1210,8 @@ dependencies = [ name = "leo-ast" version = "1.5.3" dependencies = [ - "anyhow", + "backtrace", "criterion", - "eyre", "indexmap", "leo-errors", "leo-input", @@ -1220,7 +1219,6 @@ dependencies = [ "serde", "serde_json", "tendril", - "thiserror", ] [[package]] @@ -1229,7 +1227,6 @@ version = "1.5.3" dependencies = [ "backtrace", "bincode", - "eyre", "hex", "indexmap", "leo-asg", @@ -1318,6 +1315,7 @@ dependencies = [ "lazy_static", "leo-ast", "leo-compiler", + "leo-errors", "leo-imports", "leo-input", "leo-package", @@ -1355,7 +1353,6 @@ name = "leo-package" version = "1.5.3" dependencies = [ "backtrace", - "eyre", "lazy_static", "leo-errors", "serde", @@ -1379,7 +1376,6 @@ dependencies = [ "serde_json", "serde_yaml", "tendril", - "thiserror", "tracing", ] diff --git a/Cargo.toml b/Cargo.toml index d371ac88a7..ffe2e1880b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -50,6 +50,10 @@ version = "1.5.3" path = "./compiler" version = "1.5.3" +[dependencies.leo-errors] +path = "./errors" +version = "1.5.3" + [dependencies.leo-imports] path = "./imports" version = "1.5.3" diff --git a/asg/src/const_value.rs b/asg/src/const_value.rs index 81cc84a26e..8f5d33f9f3 100644 --- a/asg/src/const_value.rs +++ b/asg/src/const_value.rs @@ -316,56 +316,16 @@ impl ConstInt { pub fn parse(int_type: &IntegerType, value: &str, span: &Span) -> Result { Ok(match int_type { - IntegerType::I8 => ConstInt::I8( - value - .parse() - .map_err(|_| LeoError::from(AsgError::invalid_int(value, span)))?, - ), - IntegerType::I16 => ConstInt::I16( - value - .parse() - .map_err(|_| LeoError::from(AsgError::invalid_int(value, span)))?, - ), - IntegerType::I32 => ConstInt::I32( - value - .parse() - .map_err(|_| LeoError::from(AsgError::invalid_int(value, span)))?, - ), - IntegerType::I64 => ConstInt::I64( - value - .parse() - .map_err(|_| LeoError::from(AsgError::invalid_int(value, span)))?, - ), - IntegerType::I128 => ConstInt::I128( - value - .parse() - .map_err(|_| LeoError::from(AsgError::invalid_int(value, span)))?, - ), - IntegerType::U8 => ConstInt::U8( - value - .parse() - .map_err(|_| LeoError::from(AsgError::invalid_int(value, span)))?, - ), - IntegerType::U16 => ConstInt::U16( - value - .parse() - .map_err(|_| LeoError::from(AsgError::invalid_int(value, span)))?, - ), - IntegerType::U32 => ConstInt::U32( - value - .parse() - .map_err(|_| LeoError::from(AsgError::invalid_int(value, span)))?, - ), - IntegerType::U64 => ConstInt::U64( - value - .parse() - .map_err(|_| LeoError::from(AsgError::invalid_int(value, span)))?, - ), - IntegerType::U128 => ConstInt::U128( - value - .parse() - .map_err(|_| LeoError::from(AsgError::invalid_int(value, span)))?, - ), + IntegerType::I8 => ConstInt::I8(value.parse().map_err(|_| AsgError::invalid_int(value, span))?), + IntegerType::I16 => ConstInt::I16(value.parse().map_err(|_| AsgError::invalid_int(value, span))?), + IntegerType::I32 => ConstInt::I32(value.parse().map_err(|_| AsgError::invalid_int(value, span))?), + IntegerType::I64 => ConstInt::I64(value.parse().map_err(|_| AsgError::invalid_int(value, span))?), + IntegerType::I128 => ConstInt::I128(value.parse().map_err(|_| AsgError::invalid_int(value, span))?), + IntegerType::U8 => ConstInt::U8(value.parse().map_err(|_| AsgError::invalid_int(value, span))?), + IntegerType::U16 => ConstInt::U16(value.parse().map_err(|_| AsgError::invalid_int(value, span))?), + IntegerType::U32 => ConstInt::U32(value.parse().map_err(|_| AsgError::invalid_int(value, span))?), + IntegerType::U64 => ConstInt::U64(value.parse().map_err(|_| AsgError::invalid_int(value, span))?), + IntegerType::U128 => ConstInt::U128(value.parse().map_err(|_| AsgError::invalid_int(value, span))?), }) } } diff --git a/asg/src/expression/array_access.rs b/asg/src/expression/array_access.rs index 37aa5cf940..7336947fa0 100644 --- a/asg/src/expression/array_access.rs +++ b/asg/src/expression/array_access.rs @@ -93,11 +93,11 @@ impl<'a> FromAst<'a, leo_ast::ArrayAccessExpression> for ArrayAccessExpression<' let array_len = match array.get_type() { Some(Type::Array(_, len)) => len, type_ => { - return Err(LeoError::from(AsgError::unexpected_type( + return Err(AsgError::unexpected_type( "array", - type_.map(|x| x.to_string()).as_deref(), + type_.map(|x| x.to_string()).unwrap_or("unknown".to_string()), &value.span, - ))); + ))?; } }; @@ -113,10 +113,10 @@ impl<'a> FromAst<'a, leo_ast::ArrayAccessExpression> for ArrayAccessExpression<' .flatten() { if index >= array_len { - return Err(LeoError::from(AsgError::array_index_out_of_bounds( + return Err(AsgError::array_index_out_of_bounds( index, &array.span().cloned().unwrap_or_default(), - ))); + ))?; } } diff --git a/asg/src/expression/array_init.rs b/asg/src/expression/array_init.rs index e1af3f2bf9..362504d518 100644 --- a/asg/src/expression/array_init.rs +++ b/asg/src/expression/array_init.rs @@ -74,11 +74,7 @@ impl<'a> FromAst<'a, leo_ast::ArrayInitExpression> for ArrayInitExpression<'a> { Some(PartialType::Array(item, dims)) => (item.map(|x| *x), dims), None => (None, None), Some(type_) => { - return Err(LeoError::from(AsgError::unexpected_type( - &type_.to_string(), - Some("array"), - &value.span, - ))); + return Err(AsgError::unexpected_type(type_, "array", &value.span))?; } }; let dimensions = value @@ -86,22 +82,22 @@ impl<'a> FromAst<'a, leo_ast::ArrayInitExpression> for ArrayInitExpression<'a> { .0 .iter() .map(|x| { - x.value + Ok(x.value .parse::() - .map_err(|_| LeoError::from(AsgError::parse_dimension_error(&value.span))) + .map_err(|_| AsgError::parse_dimension_error(&value.span))?) }) .collect::, LeoError>>()?; let len = *dimensions .get(0) - .ok_or_else(|| LeoError::from(AsgError::parse_dimension_error(&value.span)))?; + .ok_or_else(|| AsgError::parse_dimension_error(&value.span))?; if let Some(expected_len) = expected_len { if expected_len != len { - return Err(LeoError::from(AsgError::unexpected_type( - &*format!("array of length {}", expected_len), - Some(&*format!("array of length {}", len)), + return Err(AsgError::unexpected_type( + format!("array of length {}", expected_len), + format!("array of length {}", len), &value.span, - ))); + ))?; } } @@ -110,11 +106,11 @@ impl<'a> FromAst<'a, leo_ast::ArrayInitExpression> for ArrayInitExpression<'a> { Some(PartialType::Array(item, len)) => { if let Some(len) = len { if len != dimension { - return Err(LeoError::from(AsgError::unexpected_type( - &*format!("array of length {}", dimension), - Some(&*format!("array of length {}", len)), + return Err(AsgError::unexpected_type( + format!("array of length {}", dimension), + format!("array of length {}", len), &value.span, - ))); + ))?; } } @@ -122,11 +118,7 @@ impl<'a> FromAst<'a, leo_ast::ArrayInitExpression> for ArrayInitExpression<'a> { } None => None, Some(type_) => { - return Err(LeoError::from(AsgError::unexpected_type( - "array", - Some(&type_.to_string()), - &value.span, - ))); + return Err(AsgError::unexpected_type("array", type_, &value.span))?; } } } diff --git a/asg/src/expression/array_inline.rs b/asg/src/expression/array_inline.rs index 54ea10930c..ae26dc4164 100644 --- a/asg/src/expression/array_inline.rs +++ b/asg/src/expression/array_inline.rs @@ -109,11 +109,7 @@ impl<'a> FromAst<'a, leo_ast::ArrayInlineExpression> for ArrayInlineExpression<' Some(PartialType::Array(item, dims)) => (item.map(|x| *x), dims), None => (None, None), Some(type_) => { - return Err(LeoError::from(AsgError::unexpected_type( - &type_.to_string(), - Some("array"), - &value.span, - ))); + return Err(AsgError::unexpected_type(type_, "array", &value.span))?; } }; @@ -170,15 +166,15 @@ impl<'a> FromAst<'a, leo_ast::ArrayInlineExpression> for ArrayInlineExpression<' len += spread_len; } type_ => { - return Err(LeoError::from(AsgError::unexpected_type( + return Err(AsgError::unexpected_type( expected_item .as_ref() .map(|x| x.to_string()) .as_deref() .unwrap_or("unknown"), - type_.map(|x| x.to_string()).as_deref(), + type_.map(|x| x.to_string()).unwrap_or("unknown".to_string()), &value.span, - ))); + ))?; } } Ok((Cell::new(expr), true)) @@ -188,11 +184,11 @@ impl<'a> FromAst<'a, leo_ast::ArrayInlineExpression> for ArrayInlineExpression<' }; if let Some(expected_len) = expected_len { if len != expected_len { - return Err(LeoError::from(AsgError::unexpected_type( - &*format!("array of length {}", expected_len), - Some(&*format!("array of length {}", len)), + return Err(AsgError::unexpected_type( + format!("array of length {}", expected_len), + format!("array of length {}", len), &value.span, - ))); + ))?; } } Ok(output) diff --git a/asg/src/expression/array_range_access.rs b/asg/src/expression/array_range_access.rs index 99f3701d9f..4fdd32cd5f 100644 --- a/asg/src/expression/array_range_access.rs +++ b/asg/src/expression/array_range_access.rs @@ -108,11 +108,7 @@ impl<'a> FromAst<'a, leo_ast::ArrayRangeAccessExpression> for ArrayRangeAccessEx Some(PartialType::Array(element, len)) => (Some(PartialType::Array(element, None)), len), None => (None, None), Some(x) => { - return Err(LeoError::from(AsgError::unexpected_type( - &x.to_string(), - Some("array"), - &value.span, - ))); + return Err(AsgError::unexpected_type(x, "array", &value.span))?; } }; let array = <&Expression<'a>>::from_ast(scope, &*value.array, expected_array)?; @@ -120,11 +116,11 @@ impl<'a> FromAst<'a, leo_ast::ArrayRangeAccessExpression> for ArrayRangeAccessEx let (parent_element, parent_size) = match array_type { Some(Type::Array(inner, size)) => (inner, size), type_ => { - return Err(LeoError::from(AsgError::unexpected_type( + return Err(AsgError::unexpected_type( "array", - type_.map(|x| x.to_string()).as_deref(), + type_.map(|x| x.to_string()).unwrap_or("unknown".to_string()), &value.span, - ))); + ))?; } }; @@ -158,10 +154,7 @@ impl<'a> FromAst<'a, leo_ast::ArrayRangeAccessExpression> for ArrayRangeAccessEx } else { value.span.clone() }; - return Err(LeoError::from(AsgError::array_index_out_of_bounds( - inner_value, - &error_span, - ))); + return Err(AsgError::array_index_out_of_bounds(inner_value, &error_span))?; } else if let Some(left) = const_left { if left > inner_value { let error_span = if let Some(right) = right { @@ -169,10 +162,7 @@ impl<'a> FromAst<'a, leo_ast::ArrayRangeAccessExpression> for ArrayRangeAccessEx } else { value.span.clone() }; - return Err(LeoError::from(AsgError::array_index_out_of_bounds( - inner_value, - &error_span, - ))); + return Err(AsgError::array_index_out_of_bounds(inner_value, &error_span))?; } } } @@ -192,11 +182,11 @@ impl<'a> FromAst<'a, leo_ast::ArrayRangeAccessExpression> for ArrayRangeAccessEx if let Some(length) = length { if length != expected_len { let concrete_type = Type::Array(parent_element, length); - return Err(LeoError::from(AsgError::unexpected_type( - &expected_type.as_ref().unwrap().to_string(), - Some(&concrete_type.to_string()), + return Err(AsgError::unexpected_type( + expected_type.as_ref().unwrap(), + concrete_type, &value.span, - ))); + ))?; } } if let Some(left_value) = const_left { @@ -206,16 +196,13 @@ impl<'a> FromAst<'a, leo_ast::ArrayRangeAccessExpression> for ArrayRangeAccessEx } else { value.span.clone() }; - return Err(LeoError::from(AsgError::array_index_out_of_bounds( - left_value, - &error_span, - ))); + return Err(AsgError::array_index_out_of_bounds(left_value, &error_span))?; } } length = Some(expected_len); } if length.is_none() { - return Err(LeoError::from(AsgError::unknown_array_size(&value.span))); + return Err(AsgError::unknown_array_size(&value.span))?; } Ok(ArrayRangeAccessExpression { diff --git a/asg/src/expression/binary.rs b/asg/src/expression/binary.rs index e20b07b904..df6f444720 100644 --- a/asg/src/expression/binary.rs +++ b/asg/src/expression/binary.rs @@ -123,11 +123,7 @@ impl<'a> FromAst<'a, leo_ast::BinaryExpression> for BinaryExpression<'a> { BinaryOperationClass::Boolean => match expected_type { Some(PartialType::Type(Type::Boolean)) | None => None, Some(x) => { - return Err(LeoError::from(AsgError::unexpected_type( - &x.to_string(), - Some(&*Type::Boolean.to_string()), - &value.span, - ))); + return Err(AsgError::unexpected_type(x, Type::Boolean, &value.span))?; } }, BinaryOperationClass::Numeric => match expected_type { @@ -135,11 +131,7 @@ impl<'a> FromAst<'a, leo_ast::BinaryExpression> for BinaryExpression<'a> { Some(x @ PartialType::Type(Type::Field)) => Some(x), Some(x @ PartialType::Type(Type::Group)) => Some(x), Some(x) => { - return Err(LeoError::from(AsgError::unexpected_type( - &x.to_string(), - Some("integer, field, or group"), - &value.span, - ))); + return Err(AsgError::unexpected_type(x, "integer, field, or group", &value.span))?; } None => None, }, @@ -188,33 +180,25 @@ impl<'a> FromAst<'a, leo_ast::BinaryExpression> for BinaryExpression<'a> { } Some(Type::Field) if value.op == BinaryOperation::Mul || value.op == BinaryOperation::Div => (), type_ => { - return Err(LeoError::from(AsgError::unexpected_type( + return Err(AsgError::unexpected_type( "integer", - type_.map(|x| x.to_string()).as_deref(), + type_.map(|x| x.to_string()).unwrap_or("unknown".to_string()), &value.span, - ))); + ))?; } }, BinaryOperationClass::Boolean => match &value.op { BinaryOperation::And | BinaryOperation::Or => match left_type { Some(Type::Boolean) | None => (), Some(x) => { - return Err(LeoError::from(AsgError::unexpected_type( - &x.to_string(), - Some(&*Type::Boolean.to_string()), - &value.span, - ))); + return Err(AsgError::unexpected_type(x, Type::Boolean, &value.span))?; } }, BinaryOperation::Eq | BinaryOperation::Ne => (), // all types allowed _ => match left_type { Some(Type::Integer(_)) | None => (), Some(x) => { - return Err(LeoError::from(AsgError::unexpected_type( - &x.to_string(), - Some("integer"), - &value.span, - ))); + return Err(AsgError::unexpected_type(x, "integer", &value.span))?; } }, }, @@ -225,19 +209,11 @@ impl<'a> FromAst<'a, leo_ast::BinaryExpression> for BinaryExpression<'a> { match (left_type, right_type) { (Some(left_type), Some(right_type)) => { if !left_type.is_assignable_from(&right_type) { - return Err(LeoError::from(AsgError::unexpected_type( - &left_type.to_string(), - Some(&*right_type.to_string()), - &value.span, - ))); + return Err(AsgError::unexpected_type(left_type, right_type, &value.span))?; } } (None, None) => { - return Err(LeoError::from(AsgError::unexpected_type( - "any type", - Some("unknown type"), - &value.span, - ))); + return Err(AsgError::unexpected_type("any type", "unknown type", &value.span))?; } (_, _) => (), } diff --git a/asg/src/expression/call.rs b/asg/src/expression/call.rs index 24834359cb..51453541a1 100644 --- a/asg/src/expression/call.rs +++ b/asg/src/expression/call.rs @@ -94,7 +94,7 @@ impl<'a> FromAst<'a, leo_ast::CallExpression> for CallExpression<'a> { None, scope .resolve_function(&name.name) - .ok_or_else(|| LeoError::from(AsgError::unresolved_function(&name.name, &name.span)))?, + .ok_or_else(|| AsgError::unresolved_function(&name.name, &name.span))?, ), leo_ast::Expression::CircuitMemberAccess(leo_ast::CircuitMemberAccessExpression { circuit: ast_circuit, @@ -105,41 +105,33 @@ impl<'a> FromAst<'a, leo_ast::CallExpression> for CallExpression<'a> { let circuit = match target.get_type() { Some(Type::Circuit(circuit)) => circuit, type_ => { - return Err(LeoError::from(AsgError::unexpected_type( + return Err(AsgError::unexpected_type( "circuit", - type_.map(|x| x.to_string()).as_deref(), + type_.map(|x| x.to_string()).unwrap_or("unknown".to_string()), span, - ))); + ))?; } }; let circuit_name = circuit.name.borrow().name.clone(); let member = circuit.members.borrow(); - let member = member.get(name.name.as_ref()).ok_or_else(|| { - LeoError::from(AsgError::unresolved_circuit_member(&circuit_name, &name.name, span)) - })?; + let member = member + .get(name.name.as_ref()) + .ok_or_else(|| AsgError::unresolved_circuit_member(&circuit_name, &name.name, span))?; match member { CircuitMember::Function(body) => { if body.qualifier == FunctionQualifier::Static { - return Err(LeoError::from(AsgError::circuit_static_call_invalid( - &circuit_name, - &name.name, - span, - ))); + return Err(AsgError::circuit_static_call_invalid(&circuit_name, &name.name, span))?; } else if body.qualifier == FunctionQualifier::MutSelfRef && !target.is_mut_ref() { - return Err(LeoError::from(AsgError::circuit_member_mut_call_invalid( - &circuit_name, + return Err(AsgError::circuit_member_mut_call_invalid( + circuit_name, &name.name, span, - ))); + ))?; } (Some(target), *body) } CircuitMember::Variable(_) => { - return Err(LeoError::from(AsgError::circuit_variable_call( - &circuit_name, - &name.name, - span, - ))); + return Err(AsgError::circuit_variable_call(circuit_name, &name.name, span))?; } } } @@ -149,61 +141,49 @@ impl<'a> FromAst<'a, leo_ast::CallExpression> for CallExpression<'a> { span, }) => { let circuit = if let leo_ast::Expression::Identifier(circuit_name) = &**ast_circuit { - scope.resolve_circuit(&circuit_name.name).ok_or_else(|| { - LeoError::from(AsgError::unresolved_circuit(&circuit_name.name, &circuit_name.span)) - })? + scope + .resolve_circuit(&circuit_name.name) + .ok_or_else(|| AsgError::unresolved_circuit(&circuit_name.name, &circuit_name.span))? } else { - return Err(LeoError::from(AsgError::unexpected_type("circuit", None, span))); + return Err(AsgError::unexpected_type("circuit", "unknown", span))?; }; let circuit_name = circuit.name.borrow().name.clone(); let member = circuit.members.borrow(); - let member = member.get(name.name.as_ref()).ok_or_else(|| { - LeoError::from(AsgError::unresolved_circuit_member(&circuit_name, &name.name, span)) - })?; + let member = member + .get(name.name.as_ref()) + .ok_or_else(|| AsgError::unresolved_circuit_member(&circuit_name, &name.name, span))?; match member { CircuitMember::Function(body) => { if body.qualifier != FunctionQualifier::Static { - return Err(LeoError::from(AsgError::circuit_member_call_invalid( - &circuit_name, - &name.name, - span, - ))); + return Err(AsgError::circuit_member_call_invalid(circuit_name, &name.name, span))?; } (None, *body) } CircuitMember::Variable(_) => { - return Err(LeoError::from(AsgError::circuit_variable_call( - &circuit_name, - &name.name, - span, - ))); + return Err(AsgError::circuit_variable_call(circuit_name, &name.name, span))?; } } } _ => { - return Err(LeoError::from(AsgError::illegal_ast_structure( + return Err(AsgError::illegal_ast_structure( "non Identifier/CircuitMemberAccess/CircuitStaticFunctionAccess as call target", &value.span, - ))); + ))?; } }; if let Some(expected) = expected_type { let output: Type = function.output.clone(); if !expected.matches(&output) { - return Err(LeoError::from(AsgError::unexpected_type( - &expected.to_string(), - Some(&*output.to_string()), - &value.span, - ))); + return Err(AsgError::unexpected_type(expected, output, &value.span))?; } } if value.arguments.len() != function.arguments.len() { - return Err(LeoError::from(AsgError::unexpected_call_argument_count( + return Err(AsgError::unexpected_call_argument_count( function.arguments.len(), value.arguments.len(), &value.span, - ))); + ))?; } let arguments = value @@ -214,14 +194,14 @@ impl<'a> FromAst<'a, leo_ast::CallExpression> for CallExpression<'a> { let argument = argument.get().borrow(); let converted = <&Expression<'a>>::from_ast(scope, expr, Some(argument.type_.clone().partial()))?; if argument.const_ && !converted.is_consty() { - return Err(LeoError::from(AsgError::unexpected_nonconst(expr.span()))); + return Err(AsgError::unexpected_nonconst(expr.span()))?; } Ok(Cell::new(converted)) }) .collect::, LeoError>>()?; if function.is_test() { - return Err(LeoError::from(AsgError::call_test_function(&value.span))); + return Err(AsgError::call_test_function(&value.span))?; } Ok(CallExpression { parent: Cell::new(None), diff --git a/asg/src/expression/cast.rs b/asg/src/expression/cast.rs index ab642693a6..80f53e79c8 100644 --- a/asg/src/expression/cast.rs +++ b/asg/src/expression/cast.rs @@ -80,11 +80,7 @@ impl<'a> FromAst<'a, leo_ast::CastExpression> for CastExpression<'a> { let target_type = scope.resolve_ast_type(&value.target_type, &value.span)?; if let Some(expected_type) = &expected_type { if !expected_type.matches(&target_type) { - return Err(LeoError::from(AsgError::unexpected_type( - &expected_type.to_string(), - Some(&target_type.to_string()), - &value.span, - ))); + return Err(AsgError::unexpected_type(expected_type, target_type, &value.span))?; } } diff --git a/asg/src/expression/circuit_access.rs b/asg/src/expression/circuit_access.rs index d14b470a1d..df09cfe0ab 100644 --- a/asg/src/expression/circuit_access.rs +++ b/asg/src/expression/circuit_access.rs @@ -107,11 +107,11 @@ impl<'a> FromAst<'a, leo_ast::CircuitMemberAccessExpression> for CircuitAccessEx let circuit = match target.get_type() { Some(Type::Circuit(circuit)) => circuit, x => { - return Err(LeoError::from(AsgError::unexpected_type( + return Err(AsgError::unexpected_type( "circuit", - x.map(|x| x.to_string()).as_deref(), + x.map(|x| x.to_string()).unwrap_or("unknown".to_string()), &value.span, - ))); + ))?; } }; @@ -122,11 +122,7 @@ impl<'a> FromAst<'a, leo_ast::CircuitMemberAccessExpression> for CircuitAccessEx if let CircuitMember::Variable(type_) = &member { let type_: Type = type_.clone(); if !expected_type.matches(&type_) { - return Err(LeoError::from(AsgError::unexpected_type( - &expected_type.to_string(), - Some(&type_.to_string()), - &value.span, - ))); + return Err(AsgError::unexpected_type(expected_type, type_, &value.span))?; } } // used by call expression } @@ -146,18 +142,18 @@ impl<'a> FromAst<'a, leo_ast::CircuitMemberAccessExpression> for CircuitAccessEx CircuitMember::Variable(expected_type.clone()), ); } else { - return Err(LeoError::from(AsgError::input_ref_needs_type( + return Err(AsgError::input_ref_needs_type( &circuit.name.borrow().name, &value.name.name, &value.span, - ))); + ))?; } } else { - return Err(LeoError::from(AsgError::unresolved_circuit_member( + return Err(AsgError::unresolved_circuit_member( &circuit.name.borrow().name, &value.name.name, &value.span, - ))); + ))?; } Ok(CircuitAccessExpression { @@ -179,32 +175,24 @@ impl<'a> FromAst<'a, leo_ast::CircuitStaticFunctionAccessExpression> for Circuit let circuit = match &*value.circuit { leo_ast::Expression::Identifier(name) => scope .resolve_circuit(&name.name) - .ok_or_else(|| LeoError::from(AsgError::unresolved_circuit(&name.name, &name.span)))?, + .ok_or_else(|| AsgError::unresolved_circuit(&name.name, &name.span))?, _ => { - return Err(LeoError::from(AsgError::unexpected_type( - "circuit", - Some("unknown"), - &value.span, - ))); + return Err(AsgError::unexpected_type("circuit", "unknown", &value.span))?; } }; if let Some(expected_type) = expected_type { - return Err(LeoError::from(AsgError::unexpected_type( - &expected_type.to_string(), - Some("none"), - &value.span, - ))); + return Err(AsgError::unexpected_type(expected_type, "none", &value.span))?; } if let Some(CircuitMember::Function(_)) = circuit.members.borrow().get(value.name.name.as_ref()) { // okay } else { - return Err(LeoError::from(AsgError::unresolved_circuit_member( + return Err(AsgError::unresolved_circuit_member( &circuit.name.borrow().name, &value.name.name, &value.span, - ))); + ))?; } Ok(CircuitAccessExpression { diff --git a/asg/src/expression/circuit_init.rs b/asg/src/expression/circuit_init.rs index 287f5b5cab..249fa77ebb 100644 --- a/asg/src/expression/circuit_init.rs +++ b/asg/src/expression/circuit_init.rs @@ -96,16 +96,16 @@ impl<'a> FromAst<'a, leo_ast::CircuitInitExpression> for CircuitInitExpression<' ) -> Result, LeoError> { let circuit = scope .resolve_circuit(&value.name.name) - .ok_or_else(|| LeoError::from(AsgError::unresolved_circuit(&value.name.name, &value.name.span)))?; + .ok_or_else(|| AsgError::unresolved_circuit(&value.name.name, &value.name.span))?; match expected_type { Some(PartialType::Type(Type::Circuit(expected_circuit))) if expected_circuit == circuit => (), None => (), Some(x) => { - return Err(LeoError::from(AsgError::unexpected_type( - &x.to_string(), - Some(&circuit.name.borrow().name), + return Err(AsgError::unexpected_type( + x, + circuit.name.borrow().name.to_string(), &value.span, - ))); + ))?; } } let members: IndexMap<&str, (&Identifier, Option<&leo_ast::Expression>)> = value @@ -121,11 +121,11 @@ impl<'a> FromAst<'a, leo_ast::CircuitInitExpression> for CircuitInitExpression<' let circuit_members = circuit.members.borrow(); for (name, member) in circuit_members.iter() { if defined_variables.contains(name) { - return Err(LeoError::from(AsgError::overridden_circuit_member( + return Err(AsgError::overridden_circuit_member( &circuit.name.borrow().name, name, &value.span, - ))); + ))?; } defined_variables.insert(name.clone()); let type_: Type = if let CircuitMember::Variable(type_) = &member { @@ -145,21 +145,21 @@ impl<'a> FromAst<'a, leo_ast::CircuitInitExpression> for CircuitInitExpression<' }; values.push(((*identifier).clone(), Cell::new(received))); } else { - return Err(LeoError::from(AsgError::missing_circuit_member( + return Err(AsgError::missing_circuit_member( &circuit.name.borrow().name, name, &value.span, - ))); + ))?; } } for (name, (identifier, _expression)) in members.iter() { if circuit_members.get(*name).is_none() { - return Err(LeoError::from(AsgError::extra_circuit_member( + return Err(AsgError::extra_circuit_member( &circuit.name.borrow().name, - *name, + name, &identifier.span, - ))); + ))?; } } } diff --git a/asg/src/expression/constant.rs b/asg/src/expression/constant.rs index 13ad0ee3a4..3de0f77d51 100644 --- a/asg/src/expression/constant.rs +++ b/asg/src/expression/constant.rs @@ -85,11 +85,7 @@ impl<'a> FromAst<'a, leo_ast::ValueExpression> for Constant<'a> { match expected_type.map(PartialType::full).flatten() { Some(Type::Address) | None => (), Some(x) => { - return Err(LeoError::from(AsgError::unexpected_type( - &x.to_string(), - Some(&*Type::Address.to_string()), - span, - ))); + return Err(AsgError::unexpected_type(x, Type::Address, span))?; } } Constant { @@ -102,11 +98,7 @@ impl<'a> FromAst<'a, leo_ast::ValueExpression> for Constant<'a> { match expected_type.map(PartialType::full).flatten() { Some(Type::Boolean) | None => (), Some(x) => { - return Err(LeoError::from(AsgError::unexpected_type( - &x.to_string(), - Some(&*Type::Boolean.to_string()), - span, - ))); + return Err(AsgError::unexpected_type(x, Type::Boolean, span))?; } } Constant { @@ -115,7 +107,7 @@ impl<'a> FromAst<'a, leo_ast::ValueExpression> for Constant<'a> { value: ConstValue::Boolean( value .parse::() - .map_err(|_| LeoError::from(AsgError::invalid_boolean(value, span)))?, + .map_err(|_| AsgError::invalid_boolean(value, span))?, ), } } @@ -123,11 +115,7 @@ impl<'a> FromAst<'a, leo_ast::ValueExpression> for Constant<'a> { match expected_type.map(PartialType::full).flatten() { Some(Type::Char) | None => (), Some(x) => { - return Err(LeoError::from(AsgError::unexpected_type( - &x.to_string(), - Some(&*Type::Char.to_string()), - value.span(), - ))); + return Err(AsgError::unexpected_type(x, Type::Char, value.span()))?; } } @@ -141,32 +129,20 @@ impl<'a> FromAst<'a, leo_ast::ValueExpression> for Constant<'a> { match expected_type.map(PartialType::full).flatten() { Some(Type::Field) | None => (), Some(x) => { - return Err(LeoError::from(AsgError::unexpected_type( - &x.to_string(), - Some(&*Type::Field.to_string()), - span, - ))); + return Err(AsgError::unexpected_type(x, Type::Field, span))?; } } Constant { parent: Cell::new(None), span: Some(span.clone()), - value: ConstValue::Field( - value - .parse() - .map_err(|_| LeoError::from(AsgError::invalid_int(value, span)))?, - ), + value: ConstValue::Field(value.parse().map_err(|_| AsgError::invalid_int(value, span))?), } } Group(value) => { match expected_type.map(PartialType::full).flatten() { Some(Type::Group) | None => (), Some(x) => { - return Err(LeoError::from(AsgError::unexpected_type( - &x.to_string(), - Some(&*Type::Group.to_string()), - value.span(), - ))); + return Err(AsgError::unexpected_type(x, Type::Group, value.span()))?; } } Constant { @@ -183,7 +159,7 @@ impl<'a> FromAst<'a, leo_ast::ValueExpression> for Constant<'a> { } } Implicit(value, span) => match expected_type { - None => return Err(LeoError::from(AsgError::unresolved_type("unknown", span))), + None => return Err(AsgError::unresolved_type("unknown", span))?, Some(PartialType::Integer(Some(sub_type), _)) | Some(PartialType::Integer(None, Some(sub_type))) => { Constant { parent: Cell::new(None), @@ -194,11 +170,7 @@ impl<'a> FromAst<'a, leo_ast::ValueExpression> for Constant<'a> { Some(PartialType::Type(Type::Field)) => Constant { parent: Cell::new(None), span: Some(span.clone()), - value: ConstValue::Field( - value - .parse() - .map_err(|_| LeoError::from(AsgError::invalid_int(value, span)))?, - ), + value: ConstValue::Field(value.parse().map_err(|_| AsgError::invalid_int(value, span))?), }, Some(PartialType::Type(Type::Group)) => Constant { parent: Cell::new(None), @@ -211,11 +183,7 @@ impl<'a> FromAst<'a, leo_ast::ValueExpression> for Constant<'a> { value: ConstValue::Address(value.clone()), }, Some(x) => { - return Err(LeoError::from(AsgError::unexpected_type( - &x.to_string(), - Some("unknown"), - span, - ))); + return Err(AsgError::unexpected_type(x, "unknown", span))?; } }, Integer(int_type, value, span) => { @@ -224,11 +192,7 @@ impl<'a> FromAst<'a, leo_ast::ValueExpression> for Constant<'a> { Some(PartialType::Integer(None, Some(_))) => (), None => (), Some(x) => { - return Err(LeoError::from(AsgError::unexpected_type( - &x.to_string(), - Some(&*int_type.to_string()), - span, - ))); + return Err(AsgError::unexpected_type(x, int_type, span))?; } } Constant { diff --git a/asg/src/expression/ternary.rs b/asg/src/expression/ternary.rs index faee9fa739..af8956a060 100644 --- a/asg/src/expression/ternary.rs +++ b/asg/src/expression/ternary.rs @@ -91,11 +91,7 @@ impl<'a> FromAst<'a, leo_ast::TernaryExpression> for TernaryExpression<'a> { let right = if_false.get().get_type().unwrap().into(); if left != right { - return Err(LeoError::from(AsgError::ternary_different_types( - &left.to_string(), - &right.to_string(), - &value.span, - ))); + return Err(AsgError::ternary_different_types(left, right, &value.span))?; } Ok(TernaryExpression { diff --git a/asg/src/expression/tuple_access.rs b/asg/src/expression/tuple_access.rs index e556022411..c594c441cf 100644 --- a/asg/src/expression/tuple_access.rs +++ b/asg/src/expression/tuple_access.rs @@ -80,7 +80,7 @@ impl<'a> FromAst<'a, leo_ast::TupleAccessExpression> for TupleAccessExpression<' .index .value .parse::() - .map_err(|_| LeoError::from(AsgError::parse_index_error(&value.span)))?; + .map_err(|_| AsgError::parse_index_error(&value.span))?; let mut expected_tuple = vec![None; index + 1]; expected_tuple[index] = expected_type; @@ -89,11 +89,11 @@ impl<'a> FromAst<'a, leo_ast::TupleAccessExpression> for TupleAccessExpression<' let tuple_type = tuple.get_type(); if let Some(Type::Tuple(_items)) = tuple_type { } else { - return Err(LeoError::from(AsgError::unexpected_type( + return Err(AsgError::unexpected_type( "a tuple", - tuple_type.map(|x| x.to_string()).as_deref(), + tuple_type.map(|x| x.to_string()).unwrap_or("unknown".to_string()), &value.span, - ))); + ))?; } Ok(TupleAccessExpression { diff --git a/asg/src/expression/tuple_init.rs b/asg/src/expression/tuple_init.rs index e10d93d82b..20c7ff041a 100644 --- a/asg/src/expression/tuple_init.rs +++ b/asg/src/expression/tuple_init.rs @@ -86,11 +86,11 @@ impl<'a> FromAst<'a, leo_ast::TupleInitExpression> for TupleInitExpression<'a> { Some(PartialType::Tuple(sub_types)) => Some(sub_types), None => None, x => { - return Err(LeoError::from(AsgError::unexpected_type( + return Err(AsgError::unexpected_type( "tuple", - x.map(|x| x.to_string()).as_deref(), + x.map(|x| x.to_string()).unwrap_or("unknown".to_string()), &value.span, - ))); + ))?; } }; @@ -98,11 +98,11 @@ impl<'a> FromAst<'a, leo_ast::TupleInitExpression> for TupleInitExpression<'a> { // Expected type can be equal or less than actual size of a tuple. // Size of expected tuple can be based on accessed index. if tuple_types.len() > value.elements.len() { - return Err(LeoError::from(AsgError::unexpected_type( - &*format!("tuple of length {}", tuple_types.len()), - Some(&*format!("tuple of length {}", value.elements.len())), + return Err(AsgError::unexpected_type( + format!("tuple of length {}", tuple_types.len()), + format!("tuple of length {}", value.elements.len()), &value.span, - ))); + ))?; } } diff --git a/asg/src/expression/unary.rs b/asg/src/expression/unary.rs index b6873644b3..73809e3dbc 100644 --- a/asg/src/expression/unary.rs +++ b/asg/src/expression/unary.rs @@ -95,11 +95,7 @@ impl<'a> FromAst<'a, leo_ast::UnaryExpression> for UnaryExpression<'a> { UnaryOperation::Not => match expected_type.map(|x| x.full()).flatten() { Some(Type::Boolean) | None => Some(Type::Boolean), Some(type_) => { - return Err(LeoError::from(AsgError::unexpected_type( - &type_.to_string(), - Some(&*Type::Boolean.to_string()), - &value.span, - ))); + return Err(AsgError::unexpected_type(type_, Type::Boolean, &value.span))?; } }, UnaryOperation::Negate => match expected_type.map(|x| x.full()).flatten() { @@ -108,22 +104,14 @@ impl<'a> FromAst<'a, leo_ast::UnaryExpression> for UnaryExpression<'a> { Some(Type::Field) => Some(Type::Field), None => None, Some(type_) => { - return Err(LeoError::from(AsgError::unexpected_type( - &type_.to_string(), - Some("integer, group, field"), - &value.span, - ))); + return Err(AsgError::unexpected_type(type_, "integer, group, field", &value.span))?; } }, UnaryOperation::BitNot => match expected_type.map(|x| x.full()).flatten() { Some(type_ @ Type::Integer(_)) => Some(type_), None => None, Some(type_) => { - return Err(LeoError::from(AsgError::unexpected_type( - &type_.to_string(), - Some("integer"), - &value.span, - ))); + return Err(AsgError::unexpected_type(type_, "integer", &value.span))?; } }, }; @@ -138,7 +126,7 @@ impl<'a> FromAst<'a, leo_ast::UnaryExpression> for UnaryExpression<'a> { }) .unwrap_or(false); if is_expr_unsigned { - return Err(LeoError::from(AsgError::unsigned_negation(&value.span))); + return Err(AsgError::unsigned_negation(&value.span))?; } } Ok(UnaryExpression { diff --git a/asg/src/expression/variable_ref.rs b/asg/src/expression/variable_ref.rs index 40780c4045..6035a8c4f1 100644 --- a/asg/src/expression/variable_ref.rs +++ b/asg/src/expression/variable_ref.rs @@ -140,10 +140,10 @@ impl<'a> FromAst<'a, leo_ast::Identifier> for &'a Expression<'a> { if let Some(input) = scope.resolve_input() { input.container } else { - return Err(LeoError::from(AsgError::illegal_input_variable_reference( + return Err(AsgError::illegal_input_variable_reference( "attempted to reference input when none is in scope", &value.span, - ))); + ))?; } } else { match scope.resolve_variable(&value.name) { @@ -156,7 +156,7 @@ impl<'a> FromAst<'a, leo_ast::Identifier> for &'a Expression<'a> { value: ConstValue::Address(value.name.clone()), }))); } - return Err(LeoError::from(AsgError::unresolved_reference(&value.name, &value.span))); + return Err(AsgError::unresolved_reference(&value.name, &value.span))?; } } }; @@ -171,13 +171,9 @@ impl<'a> FromAst<'a, leo_ast::Identifier> for &'a Expression<'a> { if let Some(expected_type) = expected_type { let type_ = expression .get_type() - .ok_or_else(|| LeoError::from(AsgError::unresolved_reference(&value.name, &value.span)))?; + .ok_or_else(|| AsgError::unresolved_reference(&value.name, &value.span))?; if !expected_type.matches(&type_) { - return Err(LeoError::from(AsgError::unexpected_type( - &expected_type.to_string(), - Some(&*type_.to_string()), - &value.span, - ))); + return Err(AsgError::unexpected_type(expected_type, type_, &value.span))?; } } diff --git a/asg/src/program/circuit.rs b/asg/src/program/circuit.rs index e7e1bd6f8b..7f504670f9 100644 --- a/asg/src/program/circuit.rs +++ b/asg/src/program/circuit.rs @@ -71,11 +71,11 @@ impl<'a> Circuit<'a> { for member in value.members.iter() { if let leo_ast::CircuitMember::CircuitVariable(name, type_) = member { if members.contains_key(name.name.as_ref()) { - return Err(LeoError::from(AsgError::redefined_circuit_member( + return Err(AsgError::redefined_circuit_member( &value.circuit_name.name, &name.name, &name.span, - ))); + ))?; } members.insert( name.name.to_string(), @@ -98,18 +98,16 @@ impl<'a> Circuit<'a> { for member in value.members.iter() { if let leo_ast::CircuitMember::CircuitFunction(function) = member { if members.contains_key(function.identifier.name.as_ref()) { - return Err(LeoError::from(AsgError::redefined_circuit_member( + return Err(AsgError::redefined_circuit_member( &value.circuit_name.name, &function.identifier.name, &function.identifier.span, - ))); + ))?; } let asg_function = Function::init(new_scope, function)?; asg_function.circuit.replace(Some(circuit)); if asg_function.is_test() { - return Err(LeoError::from(AsgError::circuit_test_function( - &function.identifier.span, - ))); + return Err(AsgError::circuit_test_function(&function.identifier.span))?; } members.insert( function.identifier.name.to_string(), diff --git a/asg/src/program/function.rs b/asg/src/program/function.rs index 1c23d064ee..c0c3fc4883 100644 --- a/asg/src/program/function.rs +++ b/asg/src/program/function.rs @@ -107,7 +107,7 @@ impl<'a> Function<'a> { } } if qualifier != FunctionQualifier::Static && scope.circuit_self.get().is_none() { - return Err(LeoError::from(AsgError::invalid_self_in_global(&value.span))); + return Err(AsgError::invalid_self_in_global(&value.span))?; } let function = scope.context.alloc_function(Function { id: scope.context.get_id(), @@ -151,19 +151,16 @@ impl<'a> Function<'a> { let main_block = BlockStatement::from_ast(self.scope, &value.block, None)?; let mut director = MonoidalDirector::new(ReturnPathReducer::new()); if !director.reduce_block(&main_block).0 && !self.output.is_unit() { - return Err(LeoError::from(AsgError::function_missing_return( - &self.name.borrow().name, - &value.span, - ))); + return Err(AsgError::function_missing_return(&self.name.borrow().name, &value.span))?; } #[allow(clippy::never_loop)] // TODO @Protryon: How should we return multiple errors? for (span, error) in director.reducer().errors { - return Err(LeoError::from(AsgError::function_return_validation( + return Err(AsgError::function_return_validation( &self.name.borrow().name, - &error, + error, &span, - ))); + ))?; } self.body diff --git a/asg/src/program/mod.rs b/asg/src/program/mod.rs index d21a7a9bea..5f5a446ab6 100644 --- a/asg/src/program/mod.rs +++ b/asg/src/program/mod.rs @@ -164,10 +164,7 @@ impl<'a> Program<'a> { )? { Some(x) => x, None => { - return Err(LeoError::from(AsgError::unresolved_import( - &*pretty_package, - &Span::default(), - ))); + return Err(AsgError::unresolved_import(pretty_package, &Span::default()))?; } }; @@ -199,10 +196,10 @@ impl<'a> Program<'a> { } else if let Some(global_const) = resolved_package.global_consts.get(&name) { imported_global_consts.insert(name.clone(), *global_const); } else { - return Err(LeoError::from(AsgError::unresolved_import( - &*format!("{}.{}", pretty_package, name), + return Err(AsgError::unresolved_import( + format!("{}.{}", pretty_package, name), &span, - ))); + ))?; } } ImportSymbol::Alias(name, alias) => { @@ -213,10 +210,10 @@ impl<'a> Program<'a> { } else if let Some(global_const) = resolved_package.global_consts.get(&name) { imported_global_consts.insert(alias.clone(), *global_const); } else { - return Err(LeoError::from(AsgError::unresolved_import( - &*format!("{}.{}", pretty_package, name), + return Err(AsgError::unresolved_import( + format!("{}.{}", pretty_package, name), &span, - ))); + ))?; } } } @@ -307,10 +304,7 @@ impl<'a> Program<'a> { let name = name.name.to_string(); if functions.contains_key(&name) { - return Err(LeoError::from(AsgError::duplicate_function_definition( - &name, - &function.span, - ))); + return Err(AsgError::duplicate_function_definition(name, &function.span))?; } functions.insert(name, asg_function); diff --git a/asg/src/scope.rs b/asg/src/scope.rs index af5c8a79cd..c932021ccc 100644 --- a/asg/src/scope.rs +++ b/asg/src/scope.rs @@ -189,7 +189,7 @@ impl<'a> Scope<'a> { let dimension = dimension .value .parse::() - .map_err(|_| LeoError::from(AsgError::parse_index_error(span)))?; + .map_err(|_| AsgError::parse_index_error(span))?; item = Box::new(Type::Array(item, dimension)); } *item @@ -202,15 +202,15 @@ impl<'a> Scope<'a> { ), Circuit(name) if name.name.as_ref() == "Self" => Type::Circuit( self.resolve_circuit_self() - .ok_or_else(|| LeoError::from(AsgError::unresolved_circuit(&name.name, &name.span)))?, + .ok_or_else(|| AsgError::unresolved_circuit(&name.name, &name.span))?, ), SelfType => Type::Circuit( self.resolve_circuit_self() - .ok_or_else(|| LeoError::from(AsgError::reference_self_outside_circuit(span)))?, + .ok_or_else(|| AsgError::reference_self_outside_circuit(span))?, ), Circuit(name) => Type::Circuit( self.resolve_circuit(&name.name) - .ok_or_else(|| LeoError::from(AsgError::unresolved_circuit(&name.name, &name.span)))?, + .ok_or_else(|| AsgError::unresolved_circuit(&name.name, &name.span))?, ), }) } diff --git a/asg/src/statement/assign.rs b/asg/src/statement/assign.rs index fa24e9d28a..b697d9a32d 100644 --- a/asg/src/statement/assign.rs +++ b/asg/src/statement/assign.rs @@ -66,25 +66,28 @@ impl<'a> FromAst<'a, leo_ast::AssignStatement> for &'a Statement<'a> { statement: &leo_ast::AssignStatement, _expected_type: Option>, ) -> Result { - let (name, span) = (&statement.assignee.identifier.name, &statement.assignee.identifier.span); + let (name, span) = ( + &statement.assignee.identifier.name.clone(), + &statement.assignee.identifier.span, + ); let variable = if name.as_ref() == "input" { if let Some(input) = scope.resolve_input() { input.container } else { - return Err(LeoError::from(AsgError::illegal_input_variable_reference( + return Err(AsgError::illegal_input_variable_reference( "attempted to reference input when none is in scope", &statement.span, - ))); + ))?; } } else { scope .resolve_variable(name) - .ok_or_else(|| LeoError::from(AsgError::unresolved_reference(name, span)))? + .ok_or_else(|| AsgError::unresolved_reference(name, span))? }; if !variable.borrow().mutable { - return Err(LeoError::from(AsgError::immutable_assignment(name, &statement.span))); + return Err(AsgError::immutable_assignment(name, &statement.span))?; } let mut target_type: Option = Some(variable.borrow().type_.clone().into()); @@ -119,37 +122,29 @@ impl<'a> FromAst<'a, leo_ast::AssignStatement> for &'a Statement<'a> { ) { let left = match left { ConstValue::Int(x) => x.to_usize().ok_or_else(|| { - LeoError::from(AsgError::invalid_assign_index( - name, - &x.to_string(), - &statement.span, - )) + AsgError::invalid_assign_index(name, x.to_string(), &statement.span) })?, _ => unimplemented!(), }; let right = match right { ConstValue::Int(x) => x.to_usize().ok_or_else(|| { - LeoError::from(AsgError::invalid_assign_index( - name, - &x.to_string(), - &statement.span, - )) + AsgError::invalid_assign_index(name, x.to_string(), &statement.span) })?, _ => unimplemented!(), }; if right >= left { target_type = Some(PartialType::Array(item.clone(), Some((right - left) as usize))) } else { - return Err(LeoError::from(AsgError::invalid_backwards_assignment( + return Err(AsgError::invalid_backwards_assignment( name, left, right, &statement.span, - ))); + ))?; } } } - _ => return Err(LeoError::from(AsgError::index_into_non_array(name, &statement.span))), + _ => return Err(AsgError::index_into_non_array(name, &statement.span))?, } AssignAccess::ArrayRange(Cell::new(left), Cell::new(right)) @@ -157,7 +152,7 @@ impl<'a> FromAst<'a, leo_ast::AssignStatement> for &'a Statement<'a> { AstAssigneeAccess::ArrayIndex(index) => { target_type = match target_type.clone() { Some(PartialType::Array(item, _)) => item.map(|x| *x), - _ => return Err(LeoError::from(AsgError::index_into_non_array(name, &statement.span))), + _ => return Err(AsgError::index_into_non_array(name, &statement.span))?, }; AssignAccess::ArrayIndex(Cell::new(<&Expression<'a>>::from_ast( scope, @@ -169,12 +164,13 @@ impl<'a> FromAst<'a, leo_ast::AssignStatement> for &'a Statement<'a> { let index = index .value .parse::() - .map_err(|_| LeoError::from(AsgError::parse_index_error(span)))?; + .map_err(|_| AsgError::parse_index_error(span))?; target_type = match target_type { - Some(PartialType::Tuple(types)) => types.get(index).cloned().ok_or_else(|| { - LeoError::from(AsgError::tuple_index_out_of_bounds(index, &statement.span)) - })?, - _ => return Err(LeoError::from(AsgError::index_into_non_tuple(name, &statement.span))), + Some(PartialType::Tuple(types)) => types + .get(index) + .cloned() + .ok_or_else(|| AsgError::tuple_index_out_of_bounds(index, &statement.span))?, + _ => return Err(AsgError::index_into_non_tuple(name, &statement.span))?, }; AssignAccess::Tuple(index) } @@ -185,29 +181,26 @@ impl<'a> FromAst<'a, leo_ast::AssignStatement> for &'a Statement<'a> { let members = circuit.members.borrow(); let member = members.get(name.name.as_ref()).ok_or_else(|| { - LeoError::from(AsgError::unresolved_circuit_member( + AsgError::unresolved_circuit_member( &circuit.name.borrow().name, &name.name, &statement.span, - )) + ) })?; let x = match &member { CircuitMember::Variable(type_) => type_.clone(), CircuitMember::Function(_) => { - return Err(LeoError::from(AsgError::illegal_function_assign( - &name.name, - &statement.span, - ))); + return Err(AsgError::illegal_function_assign(&name.name, &statement.span))?; } }; Some(x.partial()) } _ => { - return Err(LeoError::from(AsgError::index_into_non_tuple( + return Err(AsgError::index_into_non_tuple( &statement.assignee.identifier.name, &statement.span, - ))); + ))?; } }; AssignAccess::Member(name.clone()) diff --git a/asg/src/statement/definition.rs b/asg/src/statement/definition.rs index 88e7e63759..b6129b8828 100644 --- a/asg/src/statement/definition.rs +++ b/asg/src/statement/definition.rs @@ -71,10 +71,7 @@ impl<'a> FromAst<'a, leo_ast::DefinitionStatement> for &'a Statement<'a> { .collect::>() .join(" ,"); - return Err(LeoError::from(AsgError::invalid_const_assign( - &var_names, - &statement.span, - ))); + return Err(AsgError::invalid_const_assign(var_names, &statement.span))?; } let type_ = type_.or_else(|| value.get_type()); @@ -83,10 +80,10 @@ impl<'a> FromAst<'a, leo_ast::DefinitionStatement> for &'a Statement<'a> { let mut variables = vec![]; if statement.variable_names.is_empty() { - return Err(LeoError::from(AsgError::illegal_ast_structure( + return Err(AsgError::illegal_ast_structure( "cannot have 0 variable names in destructuring tuple", &statement.span, - ))); + ))?; } if statement.variable_names.len() == 1 { // any return type is fine @@ -98,11 +95,11 @@ impl<'a> FromAst<'a, leo_ast::DefinitionStatement> for &'a Statement<'a> { output_types.extend(sub_types.clone().into_iter().map(Some).collect::>()); } type_ => { - return Err(LeoError::from(AsgError::unexpected_type( - &*format!("{}-ary tuple", statement.variable_names.len()), - type_.map(|x| x.to_string()).as_deref(), + return Err(AsgError::unexpected_type( + format!("{}-ary tuple", statement.variable_names.len()), + type_.map(|x| x.to_string()).unwrap_or("unknown".to_string()), &statement.span, - ))); + ))?; } } } @@ -111,9 +108,7 @@ impl<'a> FromAst<'a, leo_ast::DefinitionStatement> for &'a Statement<'a> { variables.push(&*scope.context.alloc_variable(RefCell::new(InnerVariable { id: scope.context.get_id(), name: variable.identifier.clone(), - type_: type_.ok_or_else(|| { - LeoError::from(AsgError::unresolved_type(&variable.identifier.name, &statement.span)) - })?, + type_: type_.ok_or_else(|| AsgError::unresolved_type(&variable.identifier.name, &statement.span))?, mutable: variable.mutable, const_: false, declaration: crate::VariableDeclaration::Definition, @@ -126,10 +121,7 @@ impl<'a> FromAst<'a, leo_ast::DefinitionStatement> for &'a Statement<'a> { let mut variables = scope.variables.borrow_mut(); let var_name = variable.borrow().name.name.to_string(); if variables.contains_key(&var_name) { - return Err(LeoError::from(AsgError::duplicate_variable_definition( - &var_name, - &statement.span, - ))); + return Err(AsgError::duplicate_variable_definition(var_name, &statement.span))?; } variables.insert(var_name, *variable); diff --git a/asg/src/statement/iteration.rs b/asg/src/statement/iteration.rs index ca4f624713..fd86df130c 100644 --- a/asg/src/statement/iteration.rs +++ b/asg/src/statement/iteration.rs @@ -50,14 +50,12 @@ impl<'a> FromAst<'a, leo_ast::IterationStatement> for &'a Statement<'a> { // Return an error if start or stop is not constant. if !start.is_consty() { - return Err(LeoError::from(AsgError::unexpected_nonconst( + return Err(AsgError::unexpected_nonconst( &start.span().cloned().unwrap_or_default(), - ))); + ))?; } if !stop.is_consty() { - return Err(LeoError::from(AsgError::unexpected_nonconst( - &stop.span().cloned().unwrap_or_default(), - ))); + return Err(AsgError::unexpected_nonconst(&stop.span().cloned().unwrap_or_default()))?; } let variable = scope.context.alloc_variable(RefCell::new(InnerVariable { @@ -65,7 +63,7 @@ impl<'a> FromAst<'a, leo_ast::IterationStatement> for &'a Statement<'a> { name: statement.variable.clone(), type_: start .get_type() - .ok_or_else(|| LeoError::from(AsgError::unresolved_type(&statement.variable.name, &statement.span)))?, + .ok_or_else(|| AsgError::unresolved_type(&statement.variable.name, &statement.span))?, mutable: false, const_: true, declaration: crate::VariableDeclaration::IterationDefinition, diff --git a/ast/Cargo.toml b/ast/Cargo.toml index 4f817e48fd..96fcd30d0b 100644 --- a/ast/Cargo.toml +++ b/ast/Cargo.toml @@ -25,9 +25,8 @@ version = "1.5.3" path = "../errors" version = "1.5.3" -[dependencies.eyre] -version = "0.6.5" -default-features = false +[dependencies.backtrace] +version = "0.3.61" [dependencies.indexmap] version = "1.7.0" @@ -43,12 +42,6 @@ features = [ "derive", "rc" ] [dependencies.serde_json] version = "1.0" -[dependencies.anyhow] -version = "1.0" - -[dependencies.thiserror] -version = "1.0" - [dependencies.tendril] version = "0.4" diff --git a/ast/src/lib.rs b/ast/src/lib.rs index af7e3590ff..be32aba9c0 100644 --- a/ast/src/lib.rs +++ b/ast/src/lib.rs @@ -62,9 +62,9 @@ pub use self::types::*; mod node; pub use node::*; -use leo_errors::LeoError; +use leo_errors::{AstError, LeoError}; -use eyre::eyre; +use backtrace::Backtrace; /// The abstract syntax tree (AST) for a Leo program. /// @@ -100,25 +100,31 @@ impl Ast { /// Serializes the ast into a JSON string. pub fn to_json_string(&self) -> Result { - Ok(serde_json::to_string_pretty(&self.ast).map_err(|e| eyre!(e))?) + Ok(serde_json::to_string_pretty(&self.ast) + .map_err(|e| AstError::failed_to_convert_ast_to_json_string(&e, Backtrace::new()))?) } + /// Serializes the ast into a JSON file. pub fn to_json_file(&self, mut path: std::path::PathBuf, file_name: &str) -> Result<(), LeoError> { path.push(file_name); - let file = std::fs::File::create(path).map_err(|e| eyre!(e))?; + let file = std::fs::File::create(&path) + .map_err(|e| AstError::failed_to_create_ast_json_file(&path, &e, Backtrace::new()))?; let writer = std::io::BufWriter::new(file); - serde_json::to_writer_pretty(writer, &self.ast).map_err(|e| eyre!(e))?; - Ok(()) + Ok(serde_json::to_writer_pretty(writer, &self.ast) + .map_err(|e| AstError::failed_to_write_ast_to_json_file(&path, &e, Backtrace::new()))?) } /// Deserializes the JSON string into a ast. pub fn from_json_string(json: &str) -> Result { - let ast: Program = serde_json::from_str(json).map_err(|e| eyre!(e))?; + let ast: Program = serde_json::from_str(json) + .map_err(|e| AstError::failed_to_read_json_string_to_ast(&e, Backtrace::new()))?; Ok(Self { ast }) } + /// Deserializes the JSON string into a ast from a file. pub fn from_json_file(path: std::path::PathBuf) -> Result { - let data = std::fs::read_to_string(path).map_err(|e| eyre!(e))?; + let data = std::fs::read_to_string(&path) + .map_err(|e| AstError::failed_to_read_json_file(&path, &e, Backtrace::new()))?; Self::from_json_string(&data) } } diff --git a/ast/src/reducer/canonicalization.rs b/ast/src/reducer/canonicalization.rs index 29c151a884..c15df5feac 100644 --- a/ast/src/reducer/canonicalization.rs +++ b/ast/src/reducer/canonicalization.rs @@ -20,7 +20,7 @@ use leo_errors::{AstError, LeoError, Span}; /// Replace Self when it is in a enclosing circuit type. /// Error when Self is outside an enclosing circuit type. /// Tuple array types and expressions expand to nested arrays. -/// Tuple array types and expressions error if a size of 0 is given.anyhow +/// Tuple array types and expressions error if a size of 0 is given. /// Compound operators become simple assignments. /// Functions missing output type return a empty tuple. pub struct Canonicalizer { @@ -469,7 +469,7 @@ impl ReconstructingReducer for Canonicalizer { match new { Type::Array(type_, mut dimensions) => { if dimensions.is_zero() { - return Err(LeoError::from(AstError::invalid_array_dimension_size(span))); + return Err(AstError::invalid_array_dimension_size(span))?; } let mut next = Type::Array(type_, ArrayDimensions(vec![dimensions.remove_last().unwrap()])); @@ -486,14 +486,14 @@ impl ReconstructingReducer for Canonicalizer { Ok(array) } - Type::SelfType if !self.in_circuit => Err(LeoError::from(AstError::big_self_outside_of_circuit(span))), + Type::SelfType if !self.in_circuit => Err(AstError::big_self_outside_of_circuit(span))?, _ => Ok(new.clone()), } } fn reduce_string(&mut self, string: &[Char], span: &Span) -> Result { if string.is_empty() { - return Err(LeoError::from(AstError::empty_string(span))); + return Err(AstError::empty_string(span))?; } let mut elements = Vec::new(); @@ -552,7 +552,7 @@ impl ReconstructingReducer for Canonicalizer { element: Expression, ) -> Result { if array_init.dimensions.is_zero() { - return Err(LeoError::from(AstError::invalid_array_dimension_size(&array_init.span))); + return Err(AstError::invalid_array_dimension_size(&array_init.span))?; } let element = Box::new(element); diff --git a/ast/src/reducer/reconstructing_director.rs b/ast/src/reducer/reconstructing_director.rs index 95721ffa67..ffc29fecc7 100644 --- a/ast/src/reducer/reconstructing_director.rs +++ b/ast/src/reducer/reconstructing_director.rs @@ -398,7 +398,7 @@ impl ReconstructingDirector { match &console_function_call.function { ConsoleFunction::Error(_) => ConsoleFunction::Error(formatted), ConsoleFunction::Log(_) => ConsoleFunction::Log(formatted), - _ => return Err(LeoError::from(AstError::impossible_console_assert_call(&args.span))), + _ => return Err(AstError::impossible_console_assert_call(&args.span))?, } } }; diff --git a/compiler/Cargo.toml b/compiler/Cargo.toml index 156ad14e81..31ed940610 100644 --- a/compiler/Cargo.toml +++ b/compiler/Cargo.toml @@ -90,10 +90,6 @@ version = "0.3.61" [dependencies.bincode] version = "1.3" -[dependencies.eyre] -version = "0.6.5" -default-features = false - [dependencies.hex] version = "0.4.2" diff --git a/compiler/src/compiler.rs b/compiler/src/compiler.rs index 0fcdb6d9a4..b5e37be810 100644 --- a/compiler/src/compiler.rs +++ b/compiler/src/compiler.rs @@ -27,7 +27,7 @@ use crate::{ pub use leo_asg::{new_context, AsgContext as Context, AsgContext}; use leo_asg::{Asg, AsgPass, Program as AsgProgram}; use leo_ast::{Input, MainInput, Program as AstProgram}; -use leo_errors::{CompilerError, LeoError, SnarkVMError}; +use leo_errors::{CompilerError, LeoError}; use leo_input::LeoInputParser; use leo_package::inputs::InputPairs; use leo_parser::parse_ast; @@ -38,7 +38,6 @@ use snarkvm_fields::PrimeField; use snarkvm_r1cs::{ConstraintSynthesizer, ConstraintSystem, SynthesisError}; use backtrace::Backtrace; -use eyre::eyre; use sha2::{Digest, Sha256}; use std::{ fs, @@ -227,13 +226,8 @@ impl<'a, F: PrimeField, G: GroupType> Compiler<'a, F, G> { /// pub fn parse_program(&mut self) -> Result<(), LeoError> { // Load the program file. - let content = fs::read_to_string(&self.main_file_path).map_err(|e| { - LeoError::from(CompilerError::file_read_error( - self.main_file_path.clone(), - eyre!(e), - Backtrace::new(), - )) - })?; + let content = fs::read_to_string(&self.main_file_path) + .map_err(|e| CompilerError::file_read_error(self.main_file_path.clone(), e, Backtrace::new()))?; self.parse_program_from_string(&content) } @@ -330,13 +324,8 @@ impl<'a, F: PrimeField, G: GroupType> Compiler<'a, F, G> { /// pub fn checksum(&self) -> Result { // Read in the main file as string - let unparsed_file = fs::read_to_string(&self.main_file_path).map_err(|e| { - LeoError::from(CompilerError::file_read_error( - self.main_file_path.clone(), - eyre!(e), - Backtrace::new(), - )) - })?; + let unparsed_file = fs::read_to_string(&self.main_file_path) + .map_err(|e| CompilerError::file_read_error(self.main_file_path.clone(), e, Backtrace::new()))?; // Hash the file contents let mut hasher = Sha256::new(); @@ -356,8 +345,8 @@ impl<'a, F: PrimeField, G: GroupType> Compiler<'a, F, G> { system_parameters: &SystemParameters, ) -> Result { // TODO CONVERT STATE ERROR TO LEO ERROR - let result = verify_local_data_commitment(system_parameters, &self.program_input) - .map_err(|e| LeoError::from(SnarkVMError::from(eyre!(e))))?; + let result = verify_local_data_commitment(system_parameters, &self.program_input).unwrap(); + // .map_err(|e| SnarkVMError::new(e))?; Ok(result) } diff --git a/compiler/src/console/assert.rs b/compiler/src/console/assert.rs index af4e09c573..3e7257a80f 100644 --- a/compiler/src/console/assert.rs +++ b/compiler/src/console/assert.rs @@ -45,14 +45,13 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let result_option = match assert_expression { ConstrainedValue::Boolean(boolean) => boolean.get_value(), _ => { - return Err(LeoError::from(CompilerError::console_assertion_must_be_boolean(span))); + return Err(CompilerError::console_assertion_must_be_boolean(span))?; } }; - let result_bool = - result_option.ok_or_else(|| LeoError::from(CompilerError::console_assertion_depends_on_input(span)))?; + let result_bool = result_option.ok_or_else(|| CompilerError::console_assertion_depends_on_input(span))?; if !result_bool { - return Err(LeoError::from(CompilerError::console_assertion_failed(span))); + return Err(CompilerError::console_assertion_failed(span))?; } Ok(()) diff --git a/compiler/src/console/format.rs b/compiler/src/console/format.rs index e49e8e82b5..fc6c289868 100644 --- a/compiler/src/console/format.rs +++ b/compiler/src/console/format.rs @@ -51,13 +51,11 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let parameter = match args.parameters.get(arg_index) { Some(index) => index, None => { - return Err(LeoError::from( - CompilerError::console_container_parameter_length_mismatch( - arg_index + 1, - args.parameters.len(), - &args.span, - ), - )); + return Err(CompilerError::console_container_parameter_length_mismatch( + arg_index + 1, + args.parameters.len(), + &args.span, + ))?; } }; out.push(self.enforce_expression(cs, parameter.get())?.to_string()); @@ -69,16 +67,12 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { substring.push('}'); escape_right_bracket = true; } else { - return Err(LeoError::from(CompilerError::console_fmt_expected_escaped_right_brace( - &args.span, - ))); + return Err(CompilerError::console_fmt_expected_escaped_right_brace(&args.span))?; } } } _ if in_container => { - return Err(LeoError::from(CompilerError::console_fmt_expected_left_or_right_brace( - &args.span, - ))); + return Err(CompilerError::console_fmt_expected_left_or_right_brace(&args.span))?; } _ => substring.push(*scalar), }, @@ -92,13 +86,11 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { // Check that containers and parameters match if arg_index != args.parameters.len() { - return Err(LeoError::from( - CompilerError::console_container_parameter_length_mismatch( - arg_index, - args.parameters.len(), - &args.span, - ), - )); + return Err(CompilerError::console_container_parameter_length_mismatch( + arg_index, + args.parameters.len(), + &args.span, + ))?; } Ok(out.join("")) diff --git a/compiler/src/constraints/constraints.rs b/compiler/src/constraints/constraints.rs index 7f12e536cd..95d0853623 100644 --- a/compiler/src/constraints/constraints.rs +++ b/compiler/src/constraints/constraints.rs @@ -49,7 +49,7 @@ pub fn generate_constraints<'a, F: PrimeField, G: GroupType, CS: ConstraintSy let result = resolved_program.enforce_main_function(cs, function, input)?; Ok(result) } - _ => Err(CompilerError::no_main_function(Backtrace::new()).into()), + _ => Err(CompilerError::no_main_function(Backtrace::new()))?, } } @@ -104,14 +104,11 @@ pub fn generate_test_constraints<'a, F: PrimeField, G: GroupType>( { Some(pair) => pair.to_owned(), None => { - return Err(LeoError::from(CompilerError::invalid_test_context( - file_name.to_string(), - Backtrace::new(), - ))); + return Err(CompilerError::invalid_test_context(file_name, Backtrace::new()))?; } } } - None => default.ok_or_else(|| LeoError::from(CompilerError::no_test_input(Backtrace::new())))?, + None => default.ok_or_else(|| CompilerError::no_test_input(Backtrace::new()))?, }; // parse input files to abstract syntax trees diff --git a/compiler/src/expression/arithmetic/add.rs b/compiler/src/expression/arithmetic/add.rs index 04743e04b2..364fd99f70 100644 --- a/compiler/src/expression/arithmetic/add.rs +++ b/compiler/src/expression/arithmetic/add.rs @@ -38,9 +38,9 @@ pub fn enforce_add<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( (ConstrainedValue::Group(point_1), ConstrainedValue::Group(point_2)) => { Ok(ConstrainedValue::Group(point_1.add(cs, &point_2, span)?)) } - (val_1, val_2) => Err(LeoError::from(CompilerError::incompatible_types( + (val_1, val_2) => Err(CompilerError::incompatible_types( format!("{} + {}", val_1, val_2), span, - ))), + ))?, } } diff --git a/compiler/src/expression/arithmetic/bit_not.rs b/compiler/src/expression/arithmetic/bit_not.rs index ec84560fbc..84df1a3fe6 100644 --- a/compiler/src/expression/arithmetic/bit_not.rs +++ b/compiler/src/expression/arithmetic/bit_not.rs @@ -25,8 +25,5 @@ pub fn evaluate_bit_not<'a, F: PrimeField, G: GroupType>( value: ConstrainedValue<'a, F, G>, span: &Span, ) -> Result, LeoError> { - Err(LeoError::from(CompilerError::cannot_evaluate_expression( - format!("!{}", value), - span, - ))) + Err(CompilerError::cannot_evaluate_expression(format!("!{}", value), span))? } diff --git a/compiler/src/expression/arithmetic/div.rs b/compiler/src/expression/arithmetic/div.rs index 6d611bb459..7f065bc646 100644 --- a/compiler/src/expression/arithmetic/div.rs +++ b/compiler/src/expression/arithmetic/div.rs @@ -35,9 +35,9 @@ pub fn enforce_div<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( (ConstrainedValue::Field(field_1), ConstrainedValue::Field(field_2)) => { Ok(ConstrainedValue::Field(field_1.div(cs, &field_2, span)?)) } - (val_1, val_2) => Err(LeoError::from(CompilerError::incompatible_types( + (val_1, val_2) => Err(CompilerError::incompatible_types( format!("{} / {}", val_1, val_2,), span, - ))), + ))?, } } diff --git a/compiler/src/expression/arithmetic/mul.rs b/compiler/src/expression/arithmetic/mul.rs index 4f6e63aae5..34850ce02a 100644 --- a/compiler/src/expression/arithmetic/mul.rs +++ b/compiler/src/expression/arithmetic/mul.rs @@ -35,9 +35,9 @@ pub fn enforce_mul<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( (ConstrainedValue::Field(field_1), ConstrainedValue::Field(field_2)) => { Ok(ConstrainedValue::Field(field_1.mul(cs, &field_2, span)?)) } - (val_1, val_2) => Err(LeoError::from(CompilerError::incompatible_types( + (val_1, val_2) => Err(CompilerError::incompatible_types( format!("{} * {}", val_1, val_2), span, - ))), + ))?, } } diff --git a/compiler/src/expression/arithmetic/negate.rs b/compiler/src/expression/arithmetic/negate.rs index 819982df88..9beca482db 100644 --- a/compiler/src/expression/arithmetic/negate.rs +++ b/compiler/src/expression/arithmetic/negate.rs @@ -31,9 +31,6 @@ pub fn enforce_negate<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem Ok(ConstrainedValue::Integer(integer.negate(cs, span)?)), ConstrainedValue::Field(field) => Ok(ConstrainedValue::Field(field.negate(cs, span)?)), ConstrainedValue::Group(group) => Ok(ConstrainedValue::Group(group.negate(cs, span)?)), - value => Err(LeoError::from(CompilerError::incompatible_types( - format!("-{}", value), - span, - ))), + value => Err(CompilerError::incompatible_types(format!("-{}", value), span))?, } } diff --git a/compiler/src/expression/arithmetic/pow.rs b/compiler/src/expression/arithmetic/pow.rs index cd268c56de..fd8bd99e0e 100644 --- a/compiler/src/expression/arithmetic/pow.rs +++ b/compiler/src/expression/arithmetic/pow.rs @@ -32,9 +32,9 @@ pub fn enforce_pow<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( (ConstrainedValue::Integer(num_1), ConstrainedValue::Integer(num_2)) => { Ok(ConstrainedValue::Integer(num_1.pow(cs, num_2, span)?)) } - (val_1, val_2) => Err(LeoError::from(CompilerError::incompatible_types( + (val_1, val_2) => Err(CompilerError::incompatible_types( format!("{} ** {}", val_1, val_2,), span, - ))), + ))?, } } diff --git a/compiler/src/expression/arithmetic/sub.rs b/compiler/src/expression/arithmetic/sub.rs index 36e7f58bb3..02762450b8 100644 --- a/compiler/src/expression/arithmetic/sub.rs +++ b/compiler/src/expression/arithmetic/sub.rs @@ -38,9 +38,9 @@ pub fn enforce_sub<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( (ConstrainedValue::Group(point_1), ConstrainedValue::Group(point_2)) => { Ok(ConstrainedValue::Group(point_1.sub(cs, &point_2, span)?)) } - (val_1, val_2) => Err(LeoError::from(CompilerError::incompatible_types( + (val_1, val_2) => Err(CompilerError::incompatible_types( format!("{} - {}", val_1, val_2), span, - ))), + ))?, } } diff --git a/compiler/src/expression/array/access.rs b/compiler/src/expression/array/access.rs index 97c84e19b4..4f05011deb 100644 --- a/compiler/src/expression/array/access.rs +++ b/compiler/src/expression/array/access.rs @@ -28,7 +28,6 @@ use crate::{ use leo_asg::{ConstInt, Expression}; use leo_errors::{CompilerError, LeoError, Span}; -use eyre::eyre; use snarkvm_fields::PrimeField; use snarkvm_gadgets::{ boolean::Boolean, @@ -63,13 +62,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let mut unique_namespace = cs.ns(|| namespace_string); bounds_check .enforce_equal(&mut unique_namespace, &Boolean::Constant(true)) - .map_err(|e| { - LeoError::from(CompilerError::cannot_enforce_expression( - "array bounds check".to_string(), - eyre!(e), - span, - )) - })?; + .map_err(|e| CompilerError::cannot_enforce_expression("array bounds check", e, span))?; Ok(()) } @@ -83,24 +76,25 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { ) -> Result, LeoError> { let mut array = match self.enforce_expression(cs, array)? { ConstrainedValue::Array(array) => array, - value => return Err(LeoError::from(CompilerError::undefined_array(value.to_string(), span))), + value => return Err(CompilerError::undefined_array(value.to_string(), span))?, }; let index_resolved = self.enforce_index(cs, index, span)?; if let Some(resolved) = index_resolved.to_usize() { if resolved >= array.len() { - return Err(LeoError::from(CompilerError::array_index_out_of_bounds(resolved, span))); + return Err(CompilerError::array_index_out_of_bounds(resolved, span))?; } Ok(array[resolved].to_owned()) } else { if array.is_empty() { - return Err(LeoError::from(CompilerError::array_index_out_of_bounds(0, span))); + return Err(CompilerError::array_index_out_of_bounds(0, span))?; } + { let array_len: u32 = array .len() .try_into() - .map_err(|_| LeoError::from(CompilerError::array_length_out_of_bounds(span)))?; + .map_err(|_| CompilerError::array_length_out_of_bounds(span))?; self.array_bounds_check(cs, &index_resolved, array_len, span)?; } @@ -111,23 +105,17 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let index_bounded = i .try_into() - .map_err(|_| LeoError::from(CompilerError::array_index_out_of_legal_bounds(span)))?; + .map_err(|_| CompilerError::array_index_out_of_legal_bounds(span))?; let const_index = ConstInt::U32(index_bounded).cast_to(&index_resolved.get_type()); let index_comparison = index_resolved .evaluate_equal(eq_namespace, &Integer::new(&const_index)) - .map_err(|_| LeoError::from(CompilerError::cannot_evaluate_expression("==".to_string(), span)))?; + .map_err(|_| CompilerError::cannot_evaluate_expression("==", span))?; let unique_namespace = cs.ns(|| format!("select array access {} {}:{}", i, span.line_start, span.col_start)); let value = ConstrainedValue::conditionally_select(unique_namespace, &index_comparison, &item, ¤t_value) - .map_err(|e| { - LeoError::from(CompilerError::cannot_enforce_expression( - "conditional select".to_string(), - eyre!(e), - span, - )) - })?; + .map_err(|e| CompilerError::cannot_enforce_expression("conditional select", e, span))?; current_value = value; } Ok(current_value) @@ -146,7 +134,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { ) -> Result, LeoError> { let array = match self.enforce_expression(cs, array)? { ConstrainedValue::Array(array) => array, - value => return Err(LeoError::from(CompilerError::undefined_array(value.to_string(), span))), + value => return Err(CompilerError::undefined_array(value, span))?, }; let from_resolved = match left { @@ -159,7 +147,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let index_bounded: u32 = array .len() .try_into() - .map_err(|_| LeoError::from(CompilerError::array_length_out_of_bounds(span)))?; + .map_err(|_| CompilerError::array_length_out_of_bounds(span))?; Integer::new(&ConstInt::U32(index_bounded)) } // Array slice ends at array length }; @@ -171,10 +159,10 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { }; Ok(if let Some((left, right)) = const_dimensions { if right - left != length { - return Err(LeoError::from(CompilerError::array_invalid_slice_length(span))); + return Err(CompilerError::array_invalid_slice_length(span))?; } if right > array.len() { - return Err(LeoError::from(CompilerError::array_index_out_of_bounds(right, span))); + return Err(CompilerError::array_index_out_of_bounds(right, span))?; } ConstrainedValue::Array(array[left..right].to_owned()) } else { @@ -196,13 +184,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let mut unique_namespace = cs.ns(|| namespace_string); calc_len .enforce_equal(&mut unique_namespace, &Integer::new(&ConstInt::U32(length as u32))) - .map_err(|e| { - LeoError::from(CompilerError::cannot_enforce_expression( - "array length check".to_string(), - eyre!(e), - span, - )) - })?; + .map_err(|e| CompilerError::cannot_enforce_expression("array length check", e, span))?; } { let bounds_check = evaluate_le::( @@ -222,13 +204,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let mut unique_namespace = cs.ns(|| namespace_string); bounds_check .enforce_equal(&mut unique_namespace, &Boolean::Constant(true)) - .map_err(|e| { - LeoError::from(CompilerError::cannot_enforce_expression( - "array bounds check".to_string(), - eyre!(e), - span, - )) - })?; + .map_err(|e| CompilerError::cannot_enforce_expression("array bounds check", e, span))?; } let mut windows = array.windows(length); let mut result = ConstrainedValue::Array(vec![]); @@ -257,13 +233,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let unique_namespace = unique_namespace.ns(|| format!("array index {} {}:{}", i, span.line_start, span.col_start)); result = ConstrainedValue::conditionally_select(unique_namespace, &equality, &array_value, &result) - .map_err(|e| { - LeoError::from(CompilerError::cannot_enforce_expression( - "conditional select".to_string(), - eyre!(e), - span, - )) - })?; + .map_err(|e| CompilerError::cannot_enforce_expression("conditional select", e, span))?; } result }) diff --git a/compiler/src/expression/array/array.rs b/compiler/src/expression/array/array.rs index 6b2eee3a98..6a84685424 100644 --- a/compiler/src/expression/array/array.rs +++ b/compiler/src/expression/array/array.rs @@ -33,7 +33,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { array: &[(Cell<&'a Expression<'a>>, bool)], span: &Span, ) -> Result, LeoError> { - let expected_dimension = None; + let expected_dimension: Option = None; let mut result = vec![]; for (element, is_spread) in array.iter() { @@ -52,11 +52,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { if let Some(dimension) = expected_dimension { // Return an error if the expected dimension != the actual dimension. if dimension != result.len() { - return Err(LeoError::from(CompilerError::unexpected_array_length( - dimension, - result.len(), - span, - ))); + return Err(CompilerError::unexpected_array_length(dimension, result.len(), span))?; } } diff --git a/compiler/src/expression/array/index.rs b/compiler/src/expression/array/index.rs index 588e84bc7f..2bd5479ed5 100644 --- a/compiler/src/expression/array/index.rs +++ b/compiler/src/expression/array/index.rs @@ -32,10 +32,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { ) -> Result { match self.enforce_expression(cs, index)? { ConstrainedValue::Integer(number) => Ok(number), - value => Err(LeoError::from(CompilerError::invalid_index_expression( - value.to_string(), - span, - ))), + value => Err(CompilerError::invalid_index_expression(value, span))?, } } } diff --git a/compiler/src/expression/circuit/access.rs b/compiler/src/expression/circuit/access.rs index fcaad49931..ea0c10120e 100644 --- a/compiler/src/expression/circuit/access.rs +++ b/compiler/src/expression/circuit/access.rs @@ -40,20 +40,22 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { Ok(member.1) } else { Err(CompilerError::undefined_circuit_member_access( - expr.circuit.get().name.borrow().to_string(), - expr.member.to_string(), + expr.circuit.get().name.borrow(), + &expr.member.name, &expr.member.span, - ) - .into()) + ))? } } - value => Err(LeoError::from(CompilerError::undefined_circuit( - value.to_string(), + value => Err(CompilerError::undefined_circuit( + value, &target.span().cloned().unwrap_or_default(), - ))), + ))?, } } else { - Err(CompilerError::invalid_circuit_static_member_access(expr.member.to_string(), &expr.member.span).into()) + Err(CompilerError::invalid_circuit_static_member_access( + &expr.member.name, + &expr.member.span, + ))? } } } diff --git a/compiler/src/expression/circuit/circuit.rs b/compiler/src/expression/circuit/circuit.rs index e2926c9c27..5563d27588 100644 --- a/compiler/src/expression/circuit/circuit.rs +++ b/compiler/src/expression/circuit/circuit.rs @@ -50,10 +50,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { resolved_members.push(ConstrainedCircuitMember(name.clone(), variable_value)); } _ => { - return Err(LeoError::from(CompilerError::expected_circuit_member( - name.to_string(), - span, - ))); + return Err(CompilerError::expected_circuit_member(name, span))?; } } } diff --git a/compiler/src/expression/conditional/conditional.rs b/compiler/src/expression/conditional/conditional.rs index fae9528672..22e80956f9 100644 --- a/compiler/src/expression/conditional/conditional.rs +++ b/compiler/src/expression/conditional/conditional.rs @@ -20,7 +20,6 @@ use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::Expression; use leo_errors::{CompilerError, LeoError, Span}; -use eyre::eyre; use snarkvm_fields::PrimeField; use snarkvm_gadgets::traits::select::CondSelectGadget; use snarkvm_r1cs::ConstraintSystem; @@ -40,10 +39,8 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { ConstrainedValue::Boolean(resolved) => resolved, value => { return Err(CompilerError::conditional_boolean_expression_fails_to_resolve_to_bool( - value.to_string(), - span, - ) - .into()); + value, span, + ))?; } }; @@ -58,9 +55,9 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { ) }); - ConstrainedValue::conditionally_select(unique_namespace, &conditional_value, &first_value, &second_value) - .map_err(|e| { - CompilerError::cannot_enforce_expression("conditional select".to_string(), eyre!(e), span).into() - }) + Ok( + ConstrainedValue::conditionally_select(unique_namespace, &conditional_value, &first_value, &second_value) + .map_err(|e| CompilerError::cannot_enforce_expression("conditional select", e, span))?, + ) } } diff --git a/compiler/src/expression/logical/and.rs b/compiler/src/expression/logical/and.rs index e4a3400345..f174ff56f4 100644 --- a/compiler/src/expression/logical/and.rs +++ b/compiler/src/expression/logical/and.rs @@ -19,7 +19,6 @@ use crate::{value::ConstrainedValue, GroupType}; use leo_errors::{CompilerError, LeoError, Span}; -use eyre::eyre; use snarkvm_fields::PrimeField; use snarkvm_gadgets::boolean::Boolean; use snarkvm_r1cs::ConstraintSystem; @@ -38,16 +37,10 @@ pub fn enforce_and<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( &left_bool, &right_bool, ) - .map_err(|e| { - LeoError::from(CompilerError::cannot_enforce_expression( - "&&".to_string(), - eyre!(e), - span, - )) - })?; + .map_err(|e| CompilerError::cannot_enforce_expression("&&", e, span))?; return Ok(ConstrainedValue::Boolean(result)); } - Err(LeoError::from(CompilerError::cannot_evaluate_expression(name, span))) + Err(CompilerError::cannot_evaluate_expression(name, span))? } diff --git a/compiler/src/expression/logical/not.rs b/compiler/src/expression/logical/not.rs index 8838ff5d97..31627b41a6 100644 --- a/compiler/src/expression/logical/not.rs +++ b/compiler/src/expression/logical/not.rs @@ -27,9 +27,6 @@ pub fn evaluate_not<'a, F: PrimeField, G: GroupType>( ) -> Result, LeoError> { match value { ConstrainedValue::Boolean(boolean) => Ok(ConstrainedValue::Boolean(boolean.not())), - value => Err(LeoError::from(CompilerError::cannot_evaluate_expression( - format!("!{}", value), - span, - ))), + value => Err(CompilerError::cannot_evaluate_expression(format!("!{}", value), span))?, } } diff --git a/compiler/src/expression/logical/or.rs b/compiler/src/expression/logical/or.rs index 799b15f8d2..a742e2d00b 100644 --- a/compiler/src/expression/logical/or.rs +++ b/compiler/src/expression/logical/or.rs @@ -19,7 +19,6 @@ use crate::{value::ConstrainedValue, GroupType}; use leo_errors::{CompilerError, LeoError, Span}; -use eyre::eyre; use snarkvm_fields::PrimeField; use snarkvm_gadgets::boolean::Boolean; use snarkvm_r1cs::ConstraintSystem; @@ -38,16 +37,10 @@ pub fn enforce_or<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( &left_bool, &right_bool, ) - .map_err(|e| { - LeoError::from(CompilerError::cannot_enforce_expression( - "||".to_string(), - eyre!(e), - span, - )) - })?; + .map_err(|e| CompilerError::cannot_enforce_expression("||", e, span))?; return Ok(ConstrainedValue::Boolean(result)); } - Err(LeoError::from(CompilerError::cannot_evaluate_expression(name, span))) + Err(CompilerError::cannot_evaluate_expression(name, span))? } diff --git a/compiler/src/expression/relational/eq.rs b/compiler/src/expression/relational/eq.rs index c833523b9c..102418e109 100644 --- a/compiler/src/expression/relational/eq.rs +++ b/compiler/src/expression/relational/eq.rs @@ -75,14 +75,14 @@ pub fn evaluate_eq<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( return Ok(current); } (val_1, val_2) => { - return Err(CompilerError::incompatible_types(format!("{} == {}", val_1, val_2,), span).into()); + return Err(CompilerError::incompatible_types( + format!("{} == {}", val_1, val_2,), + span, + ))?; } }; - let boolean = match constraint_result { - Ok(boolean) => boolean, - _ => return Err(CompilerError::cannot_evaluate_expression("==".to_string(), span).into()), - }; + let boolean = constraint_result.map_err(|_| CompilerError::cannot_evaluate_expression("==", span))?; Ok(ConstrainedValue::Boolean(boolean)) } diff --git a/compiler/src/expression/relational/ge.rs b/compiler/src/expression/relational/ge.rs index c1443bd33d..ea290d40eb 100644 --- a/compiler/src/expression/relational/ge.rs +++ b/compiler/src/expression/relational/ge.rs @@ -35,15 +35,14 @@ pub fn evaluate_ge<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( num_1.greater_than_or_equal(unique_namespace, &num_2) } (val_1, val_2) => { - return Err(LeoError::from(CompilerError::incompatible_types( + return Err(CompilerError::incompatible_types( format!("{} >= {}", val_1, val_2), span, - ))); + ))?; } }; - let boolean = constraint_result - .map_err(|_| LeoError::from(CompilerError::cannot_evaluate_expression(">=".to_string(), span)))?; + let boolean = constraint_result.map_err(|_| CompilerError::cannot_evaluate_expression(">=", span))?; Ok(ConstrainedValue::Boolean(boolean)) } diff --git a/compiler/src/expression/relational/gt.rs b/compiler/src/expression/relational/gt.rs index 8d51d6b45c..3fee6d2db8 100644 --- a/compiler/src/expression/relational/gt.rs +++ b/compiler/src/expression/relational/gt.rs @@ -35,15 +35,14 @@ pub fn evaluate_gt<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( num_1.greater_than(unique_namespace, &num_2) } (val_1, val_2) => { - return Err(LeoError::from(CompilerError::incompatible_types( + return Err(CompilerError::incompatible_types( format!("{} > {}", val_1, val_2), span, - ))); + ))?; } }; - let boolean = constraint_result - .map_err(|_| LeoError::from(CompilerError::cannot_evaluate_expression(">".to_string(), span)))?; + let boolean = constraint_result.map_err(|_| CompilerError::cannot_evaluate_expression(">", span))?; Ok(ConstrainedValue::Boolean(boolean)) } diff --git a/compiler/src/expression/relational/le.rs b/compiler/src/expression/relational/le.rs index 0e10eb172a..f2f1e13b56 100644 --- a/compiler/src/expression/relational/le.rs +++ b/compiler/src/expression/relational/le.rs @@ -35,15 +35,14 @@ pub fn evaluate_le<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( num_1.less_than_or_equal(unique_namespace, &num_2) } (val_1, val_2) => { - return Err(LeoError::from(CompilerError::incompatible_types( + return Err(CompilerError::incompatible_types( format!("{} <= {}", val_1, val_2), span, - ))); + ))?; } }; - let boolean = constraint_result - .map_err(|_| LeoError::from(CompilerError::cannot_evaluate_expression("<=".to_string(), span)))?; + let boolean = constraint_result.map_err(|_| CompilerError::cannot_evaluate_expression("<=", span))?; Ok(ConstrainedValue::Boolean(boolean)) } diff --git a/compiler/src/expression/relational/lt.rs b/compiler/src/expression/relational/lt.rs index 475a5ad84d..db79393881 100644 --- a/compiler/src/expression/relational/lt.rs +++ b/compiler/src/expression/relational/lt.rs @@ -35,15 +35,14 @@ pub fn evaluate_lt<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( num_1.less_than(unique_namespace, &num_2) } (val_1, val_2) => { - return Err(LeoError::from(CompilerError::incompatible_types( + return Err(CompilerError::incompatible_types( format!("{} < {}", val_1, val_2), span, - ))); + ))?; } }; - let boolean = constraint_result - .map_err(|_| LeoError::from(CompilerError::cannot_evaluate_expression("<".to_string(), span)))?; + let boolean = constraint_result.map_err(|_| CompilerError::cannot_evaluate_expression("<", span))?; Ok(ConstrainedValue::Boolean(boolean)) } diff --git a/compiler/src/expression/tuple/access.rs b/compiler/src/expression/tuple/access.rs index 66022e0baf..e5d9e8b3a7 100644 --- a/compiler/src/expression/tuple/access.rs +++ b/compiler/src/expression/tuple/access.rs @@ -35,13 +35,13 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { // Get the tuple values. let tuple = match self.enforce_expression(cs, tuple)? { ConstrainedValue::Tuple(tuple) => tuple, - value => return Err(LeoError::from(CompilerError::undefined_array(value.to_string(), span))), + value => return Err(CompilerError::undefined_array(value, span))?, }; // Check for out of bounds access. if index > tuple.len() - 1 { // probably safe to be a panic here - return Err(LeoError::from(CompilerError::tuple_index_out_of_bounds(index, span))); + return Err(CompilerError::tuple_index_out_of_bounds(index, span))?; } Ok(tuple[index].to_owned()) diff --git a/compiler/src/expression/variable_ref/variable_ref.rs b/compiler/src/expression/variable_ref/variable_ref.rs index 26bd081f41..5c5e0cab30 100644 --- a/compiler/src/expression/variable_ref/variable_ref.rs +++ b/compiler/src/expression/variable_ref/variable_ref.rs @@ -26,17 +26,16 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { /// Enforce a variable expression by getting the resolved value pub fn evaluate_ref(&mut self, variable_ref: &VariableRef) -> Result, LeoError> { // Evaluate the identifier name in the current function scope - let span = variable_ref.span.as_ref(); + let span = variable_ref.span.clone(); let variable = variable_ref.variable.borrow(); let result_value = if let Some(value) = self.get(variable.id) { value.clone() } else { - // TODO fix unwrap here. - return Err(LeoError::from(CompilerError::undefined_identifier( + return Err(CompilerError::undefined_identifier( &variable.name.clone().name, - span.unwrap(), - ))); + &span.unwrap_or_default(), + ))?; // todo: probably can be a panic here instead }; diff --git a/compiler/src/function/function.rs b/compiler/src/function/function.rs index 501507badb..76fe3b90dd 100644 --- a/compiler/src/function/function.rs +++ b/compiler/src/function/function.rs @@ -49,11 +49,10 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { if function.arguments.len() != arguments.len() { return Err(CompilerError::function_input_not_found( - function.name.borrow().name.to_string(), - "arguments length invalid".to_string(), + &function.name.borrow().name.to_string(), + "arguments length invalid", &function.span.clone().unwrap_or_default(), - ) - .into()); + ))?; } // Store input values as new variables in resolved program diff --git a/compiler/src/function/input/array.rs b/compiler/src/function/input/array.rs index 3b346a83c6..fde60bfb84 100644 --- a/compiler/src/function/input/array.rs +++ b/compiler/src/function/input/array.rs @@ -41,11 +41,11 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { match input_value { Some(InputValue::Array(arr)) => { if array_len != arr.len() { - return Err(LeoError::from(CompilerError::invalid_input_array_dimensions( + return Err(CompilerError::invalid_input_array_dimensions( arr.len(), array_len, span, - ))); + ))?; } // Allocate each value in the current row @@ -70,10 +70,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { } } _ => { - return Err(LeoError::from(CompilerError::invalid_function_input_array( - input_value.unwrap().to_string(), - span, - ))); + return Err(CompilerError::invalid_function_input_array(input_value.unwrap(), span))?; } } diff --git a/compiler/src/function/input/input_section.rs b/compiler/src/function/input/input_section.rs index 47102850ad..e3b81e23b6 100644 --- a/compiler/src/function/input/input_section.rs +++ b/compiler/src/function/input/input_section.rs @@ -43,11 +43,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { }; let declared_type = self.asg.scope.resolve_ast_type(¶meter.type_, ¶meter.span)?; if !expected_type.is_assignable_from(&declared_type) { - return Err(LeoError::from(AsgError::unexpected_type( - &expected_type.to_string(), - Some(&declared_type.to_string()), - &identifier.span, - ))); + return Err(AsgError::unexpected_type(expected_type, declared_type, &identifier.span).into()); } let member_name = parameter.variable.clone(); let member_value = self.allocate_main_function_input( diff --git a/compiler/src/function/input/main_function_input.rs b/compiler/src/function/input/main_function_input.rs index 308573b201..acac9fc358 100644 --- a/compiler/src/function/input/main_function_input.rs +++ b/compiler/src/function/input/main_function_input.rs @@ -78,13 +78,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { input_option: Option, span: &Span, ) -> Result, LeoError> { - let input = input_option.ok_or_else(|| { - LeoError::from(CompilerError::function_input_not_found( - "main".to_string(), - name.to_string(), - span, - )) - })?; + let input = input_option.ok_or_else(|| CompilerError::function_input_not_found("main", name, span))?; match (type_, input) { (Type::Address, InputValue::Address(addr)) => Ok(ConstrainedValue::Address(Address::constant(addr, span)?)), @@ -114,21 +108,21 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let parsed_type = parsed.get_int_type(); let input_type = input_type.into(); if std::mem::discriminant(&parsed_type) != std::mem::discriminant(&input_type) { - return Err(LeoError::from(CompilerError::integer_value_integer_type_mismatch( - input_type.to_string(), - parsed_type.to_string(), + return Err(CompilerError::integer_value_integer_type_mismatch( + input_type, + parsed_type, span, - ))); + ))?; } Ok(ConstrainedValue::Integer(Integer::new(&parsed))) } (Type::Array(type_, arr_len), InputValue::Array(values)) => { if *arr_len != values.len() { - return Err(LeoError::from(CompilerError::invalid_input_array_dimensions( + return Err(CompilerError::invalid_input_array_dimensions( *arr_len, values.len(), span, - ))); + ))?; } Ok(ConstrainedValue::Array( @@ -140,11 +134,11 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { } (Type::Tuple(types), InputValue::Tuple(values)) => { if values.len() != types.len() { - return Err(LeoError::from(CompilerError::input_tuple_size_mismatch( + return Err(CompilerError::input_tuple_size_mismatch( types.len(), values.len(), span, - ))); + ))?; } Ok(ConstrainedValue::Tuple( @@ -160,12 +154,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { (Type::Circuit(_), _) => unimplemented!("main function input not implemented for type {}", type_), // Should not happen. // Return an error if the input type and input value do not match. - (_, input) => Err(LeoError::from(CompilerError::input_variable_type_mismatch( - type_.to_string(), - input.to_string(), - name.to_string(), - span, - ))), + (_, input) => Err(CompilerError::input_variable_type_mismatch(type_, input, name, span))?, } } } diff --git a/compiler/src/function/input/tuple.rs b/compiler/src/function/input/tuple.rs index 1bed0a3d2f..c751d21866 100644 --- a/compiler/src/function/input/tuple.rs +++ b/compiler/src/function/input/tuple.rs @@ -39,11 +39,11 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { match input_value { Some(InputValue::Tuple(values)) => { if values.len() != types.len() { - return Err(LeoError::from(CompilerError::input_tuple_size_mismatch( + return Err(CompilerError::input_tuple_size_mismatch( types.len(), values.len(), span, - ))); + ))?; } // Allocate each value in the tuple. @@ -62,10 +62,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { } } _ => { - return Err(LeoError::from(CompilerError::invalid_function_input_tuple( - input_value.unwrap().to_string(), - span, - ))); + return Err(CompilerError::invalid_function_input_tuple(input_value.unwrap(), span))?; } } diff --git a/compiler/src/function/main_function.rs b/compiler/src/function/main_function.rs index a37baa21f2..d8547d4692 100644 --- a/compiler/src/function/main_function.rs +++ b/compiler/src/function/main_function.rs @@ -66,10 +66,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { ) { // If variable is in both [main] and [constants] sections - error. (_, Some(_), Some(_)) => { - return Err(LeoError::from(CompilerError::double_input_declaration( - name.to_string(), - &input_variable.name.span, - ))); + return Err(CompilerError::double_input_declaration(name, &input_variable.name.span))?; } // If input option is found in [main] section and input is not const. (false, Some(input_option), _) => self.allocate_main_function_input( @@ -89,25 +86,25 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { )?, // Function argument is const, input is not. (true, Some(_), None) => { - return Err(LeoError::from(CompilerError::expected_const_input_variable( - name.to_string(), + return Err(CompilerError::expected_const_input_variable( + name, &input_variable.name.span, - ))); + ))?; } // Input is const, function argument is not. (false, None, Some(_)) => { - return Err(LeoError::from(CompilerError::expected_non_const_input_variable( - name.to_string(), + return Err(CompilerError::expected_non_const_input_variable( + name, &input_variable.name.span, - ))); + ))?; } // When not found - Error out. (_, _, _) => { - return Err(LeoError::from(CompilerError::function_input_not_found( + return Err(CompilerError::function_input_not_found( function.name.borrow().name.to_string(), - name.to_string(), + name, &input_variable.name.span, - ))); + ))?; } }; diff --git a/compiler/src/function/result/result.rs b/compiler/src/function/result/result.rs index 5f8b6040fa..9e9e47fbeb 100644 --- a/compiler/src/function/result/result.rs +++ b/compiler/src/function/result/result.rs @@ -55,7 +55,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { if get_indicator_value(&indicator) { // Error if we already have a return value. if return_value.is_some() { - return Err(CompilerError::statement_multiple_returns(span).into()); + return Err(CompilerError::statement_multiple_returns(span))?; } else { // Set the function return value. return_value = Some(result); @@ -79,13 +79,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { &result, value, ) - .map_err(|_| { - LeoError::from(CompilerError::statement_select_fail( - result.to_string(), - value.to_string(), - span, - )) - })?, + .map_err(|_| CompilerError::statement_select_fail(result, value, span))?, ); } else { return_value = Some(result); // we ignore indicator for default -- questionable @@ -95,8 +89,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { if expected_return.is_unit() { Ok(ConstrainedValue::Tuple(vec![])) } else { - return_value - .ok_or_else(|| LeoError::from(CompilerError::statement_no_returns(expected_return.to_string(), span))) + Ok(return_value.ok_or_else(|| CompilerError::statement_no_returns(expected_return.to_string(), span))?) } } } diff --git a/compiler/src/output/mod.rs b/compiler/src/output/mod.rs index 9df736a661..be7c673c21 100644 --- a/compiler/src/output/mod.rs +++ b/compiler/src/output/mod.rs @@ -106,7 +106,7 @@ impl Output { // Return an error if we do not have enough return registers if register_values.len() < return_values.len() { - return Err(LeoError::from(CompilerError::output_not_enough_registers(span))); + return Err(CompilerError::output_not_enough_registers(span))?; } let mut registers = BTreeMap::new(); @@ -119,11 +119,11 @@ impl Output { let return_value_type = value.to_type(span)?; if !register_type.is_assignable_from(&return_value_type) { - return Err(LeoError::from(CompilerError::output_mismatched_types( - register_type.to_string(), - return_value_type.to_string(), + return Err(CompilerError::output_mismatched_types( + register_type, + return_value_type, span, - ))); + ))?; } let value = match value { diff --git a/compiler/src/output/output_bytes.rs b/compiler/src/output/output_bytes.rs index 66ae4f8ccc..5e9349cac7 100644 --- a/compiler/src/output/output_bytes.rs +++ b/compiler/src/output/output_bytes.rs @@ -55,7 +55,7 @@ impl OutputBytes { // Return an error if we do not have enough return registers if register_values.len() < return_values.len() { - return Err(LeoError::from(CompilerError::output_not_enough_registers(span))); + return Err(CompilerError::output_not_enough_registers(span))?; } // Manually construct result string @@ -73,11 +73,11 @@ impl OutputBytes { let return_value_type = value.to_type(span)?; if !register_type.is_assignable_from(&return_value_type) { - return Err(LeoError::from(CompilerError::output_mismatched_types( - register_type.to_string(), - return_value_type.to_string(), + return Err(CompilerError::output_mismatched_types( + register_type, + return_value_type, span, - ))); + ))?; } let value = value.to_string(); diff --git a/compiler/src/output/output_file.rs b/compiler/src/output/output_file.rs index 28a502dc1c..03d702213e 100644 --- a/compiler/src/output/output_file.rs +++ b/compiler/src/output/output_file.rs @@ -19,7 +19,6 @@ use leo_errors::{CompilerError, LeoError}; use backtrace::Backtrace; -use eyre::eyre; use std::{ borrow::Cow, @@ -49,11 +48,11 @@ impl OutputFile { pub fn write(&self, path: &Path, bytes: &[u8]) -> Result<(), LeoError> { // create output file let path = self.setup_file_path(path); - let mut file = File::create(&path) - .map_err(|e| LeoError::from(CompilerError::output_file_io_error(eyre!(e), Backtrace::new())))?; + let mut file = File::create(&path).map_err(|e| CompilerError::output_file_io_error(e, Backtrace::new()))?; - file.write_all(bytes) - .map_err(|e| LeoError::from(CompilerError::output_file_io_error(eyre!(e), Backtrace::new()))) + Ok(file + .write_all(bytes) + .map_err(|e| CompilerError::output_file_io_error(e, Backtrace::new()))?) } /// Removes the output file at the given path if it exists. Returns `true` on success, @@ -64,12 +63,7 @@ impl OutputFile { return Ok(false); } - fs::remove_file(&path).map_err(|_| { - LeoError::from(CompilerError::output_file_cannot_remove( - path.into_owned(), - Backtrace::new(), - )) - })?; + fs::remove_file(&path).map_err(|_| CompilerError::output_file_cannot_remove(path, Backtrace::new()))?; Ok(true) } diff --git a/compiler/src/prelude/blake2s.rs b/compiler/src/prelude/blake2s.rs index 328410d27b..efc353bc59 100644 --- a/compiler/src/prelude/blake2s.rs +++ b/compiler/src/prelude/blake2s.rs @@ -19,7 +19,6 @@ use crate::{ConstrainedValue, GroupType, Integer}; use leo_asg::Function; use leo_errors::{CompilerError, LeoError, Span}; -use eyre::eyre; use snarkvm_fields::PrimeField; use snarkvm_gadgets::{ algorithms::prf::Blake2sGadget, @@ -63,25 +62,13 @@ impl<'a, F: PrimeField, G: GroupType> CoreCircuit<'a, F, G> for Blake2s { let input = unwrap_argument(arguments.remove(1)); let seed = unwrap_argument(arguments.remove(0)); - let digest = - Blake2sGadget::check_evaluation_gadget(cs.ns(|| "blake2s hash"), &seed[..], &input[..]).map_err(|e| { - LeoError::from(CompilerError::cannot_enforce_expression( - "Blake2s check evaluation gadget".to_owned(), - eyre!(e), - span, - )) - })?; + let digest = Blake2sGadget::check_evaluation_gadget(cs.ns(|| "blake2s hash"), &seed[..], &input[..]) + .map_err(|e| CompilerError::cannot_enforce_expression("Blake2s check evaluation gadget", e, span))?; Ok(ConstrainedValue::Array( digest .to_bytes(cs) - .map_err(|e| { - LeoError::from(CompilerError::cannot_enforce_expression( - "Vec ToBytes".to_owned(), - eyre!(e), - span, - )) - })? + .map_err(|e| CompilerError::cannot_enforce_expression("Vec ToBytes", e, span))? .into_iter() .map(Integer::U8) .map(ConstrainedValue::Integer) diff --git a/compiler/src/statement/assign/assign.rs b/compiler/src/statement/assign/assign.rs index 3d5349dbf0..d1d34829cf 100644 --- a/compiler/src/statement/assign/assign.rs +++ b/compiler/src/statement/assign/assign.rs @@ -59,13 +59,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { _ => unimplemented!("unimplemented assign operator"), }; let selected_value = ConstrainedValue::conditionally_select(cs.ns(|| scope), condition, &new_value, target) - .map_err(|_| { - LeoError::from(CompilerError::statement_select_fail( - new_value.to_string(), - target.to_string(), - span, - )) - })?; + .map_err(|_| CompilerError::statement_select_fail(new_value, target.clone(), span))?; *target = selected_value; Ok(()) diff --git a/compiler/src/statement/assign/assignee/array_index.rs b/compiler/src/statement/assign/assignee/array_index.rs index 52ee0d1421..413b97995c 100644 --- a/compiler/src/statement/assign/assignee/array_index.rs +++ b/compiler/src/statement/assign/assignee/array_index.rs @@ -22,7 +22,6 @@ use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType, Int use leo_asg::{ConstInt, Expression, Node}; use leo_errors::{CompilerError, LeoError}; -use eyre::eyre; use snarkvm_fields::PrimeField; use snarkvm_gadgets::traits::{eq::EvaluateEqGadget, select::CondSelectGadget}; use snarkvm_r1cs::ConstraintSystem; @@ -44,11 +43,11 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { ConstrainedValue::Array(input) => { if let Some(index) = index_resolved.to_usize() { if index >= input.len() { - Err(LeoError::from(CompilerError::statement_array_assign_index_bounds( + Err(CompilerError::statement_array_assign_index_bounds( index, input.len(), &context.span, - ))) + ))? } else { let target = input.get_mut(index).unwrap(); if context.remaining_accesses.is_empty() { @@ -64,7 +63,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let array_len: u32 = input .len() .try_into() - .map_err(|_| LeoError::from(CompilerError::array_length_out_of_bounds(&span)))?; + .map_err(|_| CompilerError::array_length_out_of_bounds(&span))?; self.array_bounds_check(cs, &index_resolved, array_len, &span)?; } @@ -77,13 +76,11 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let index_bounded = i .try_into() - .map_err(|_| LeoError::from(CompilerError::array_index_out_of_legal_bounds(&span)))?; + .map_err(|_| CompilerError::array_index_out_of_legal_bounds(&span))?; let const_index = ConstInt::U32(index_bounded).cast_to(&index_resolved.get_type()); let index_comparison = index_resolved .evaluate_equal(eq_namespace, &Integer::new(&const_index)) - .map_err(|_| { - LeoError::from(CompilerError::cannot_evaluate_expression("==".to_string(), &span)) - })?; + .map_err(|_| CompilerError::cannot_evaluate_expression("==", &span))?; let mut unique_namespace = cs.ns(|| { format!( @@ -116,31 +113,23 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { &temp_item, item, ) - .map_err(|e| { - LeoError::from(CompilerError::cannot_enforce_expression( - "conditional select".to_string(), - eyre!(e), - &span, - )) - })?; + .map_err(|e| CompilerError::cannot_enforce_expression("conditional select", e, &span))?; *item = value; } Ok(()) } } - _ => Err(LeoError::from(CompilerError::statement_array_assign_interior_index( - &context.span, - ))), + _ => Err(CompilerError::statement_array_assign_interior_index(&context.span))?, } } else if context.from_range && input_len != 0 { context.from_range = false; if let Some(index) = index_resolved.to_usize() { if index >= input_len { - return Err(LeoError::from(CompilerError::statement_array_assign_index_bounds( + return Err(CompilerError::statement_array_assign_index_bounds( index, input_len, &context.span, - ))); + ))?; } let target = context.input.remove(index); @@ -158,7 +147,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { .input .len() .try_into() - .map_err(|_| LeoError::from(CompilerError::array_length_out_of_bounds(&span)))?; + .map_err(|_| CompilerError::array_length_out_of_bounds(&span))?; self.array_bounds_check(cs, &index_resolved, array_len, &span)?; } @@ -171,13 +160,11 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let index_bounded = i .try_into() - .map_err(|_| LeoError::from(CompilerError::array_index_out_of_legal_bounds(&span)))?; + .map_err(|_| CompilerError::array_index_out_of_legal_bounds(&span))?; let const_index = ConstInt::U32(index_bounded).cast_to(&index_resolved.get_type()); let index_comparison = index_resolved .evaluate_equal(eq_namespace, &Integer::new(&const_index)) - .map_err(|_| { - LeoError::from(CompilerError::cannot_evaluate_expression("==".to_string(), &span)) - })?; + .map_err(|_| CompilerError::cannot_evaluate_expression("==", &span))?; let mut unique_namespace = cs.ns(|| { format!( @@ -206,21 +193,13 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { }; let value = ConstrainedValue::conditionally_select(unique_namespace, &index_comparison, &temp_item, item) - .map_err(|e| { - LeoError::from(CompilerError::cannot_enforce_expression( - "conditional select".to_string(), - eyre!(e), - &span, - )) - })?; + .map_err(|e| CompilerError::cannot_enforce_expression("conditional select", e, &span))?; **item = value; } Ok(()) } } else { - Err(LeoError::from(CompilerError::statement_array_assign_interior_index( - &context.span, - ))) + Err(CompilerError::statement_array_assign_interior_index(&context.span))? } } } diff --git a/compiler/src/statement/assign/assignee/array_range_index.rs b/compiler/src/statement/assign/assignee/array_range_index.rs index 1312becf28..acdefb8caa 100644 --- a/compiler/src/statement/assign/assignee/array_range_index.rs +++ b/compiler/src/statement/assign/assignee/array_range_index.rs @@ -38,7 +38,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { .transpose()? .map(|x| { x.to_usize() - .ok_or_else(|| LeoError::from(CompilerError::statement_array_assign_index_const(&context.span))) + .ok_or_else(|| CompilerError::statement_array_assign_index_const(&context.span)) }) .transpose()?; let stop_index = stop @@ -46,7 +46,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { .transpose()? .map(|x| { x.to_usize() - .ok_or_else(|| LeoError::from(CompilerError::statement_array_assign_index_const(&context.span))) + .ok_or_else(|| CompilerError::statement_array_assign_index_const(&context.span)) }) .transpose()?; let start_index = start_index.unwrap_or(0); @@ -75,9 +75,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { } Ok(()) } - _ => Err(LeoError::from(CompilerError::statement_array_assign_index( - &context.span, - ))), + _ => Err(CompilerError::statement_array_assign_index(&context.span))?, } } else { // range of a range diff --git a/compiler/src/statement/assign/assignee/member.rs b/compiler/src/statement/assign/assignee/member.rs index 4e12879d2d..081c84f68c 100644 --- a/compiler/src/statement/assign/assignee/member.rs +++ b/compiler/src/statement/assign/assignee/member.rs @@ -31,9 +31,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { name: &Identifier, ) -> Result<(), LeoError> { if context.input.len() != 1 { - return Err(LeoError::from(CompilerError::statement_array_assign_interior_index( - &context.span, - ))); + return Err(CompilerError::statement_array_assign_interior_index(&context.span))?; } match context.input.remove(0) { ConstrainedValue::CircuitExpression(_variable, members) => { @@ -47,18 +45,12 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { } None => { // Throw an error if the circuit variable does not exist in the circuit - Err(LeoError::from(CompilerError::statement_undefined_circuit_variable( - name.to_string(), - &context.span, - ))) + Err(CompilerError::statement_undefined_circuit_variable(name, &context.span))? } } } // Throw an error if the circuit definition does not exist in the file - x => Err(LeoError::from(CompilerError::undefined_circuit( - x.to_string(), - &context.span, - ))), + x => Err(CompilerError::undefined_circuit(x, &context.span))?, } } } diff --git a/compiler/src/statement/assign/assignee/mod.rs b/compiler/src/statement/assign/assignee/mod.rs index 2500dc7132..cbe0a9a688 100644 --- a/compiler/src/statement/assign/assignee/mod.rs +++ b/compiler/src/statement/assign/assignee/mod.rs @@ -116,22 +116,22 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { span: &Span, ) -> Result<(), LeoError> { if stop_index < start_index { - Err(LeoError::from(CompilerError::statement_array_assign_range_order( + Err(CompilerError::statement_array_assign_range_order( start_index, stop_index, len, span, - ))) + ))? } else if start_index > len { - Err(LeoError::from(CompilerError::statement_array_assign_index_bounds( + Err(CompilerError::statement_array_assign_index_bounds( start_index, len, span, - ))) + ))? } else if stop_index > len { - Err(LeoError::from(CompilerError::statement_array_assign_index_bounds( + Err(CompilerError::statement_array_assign_index_bounds( stop_index, len, span, - ))) + ))? } else { Ok(()) } diff --git a/compiler/src/statement/assign/assignee/tuple.rs b/compiler/src/statement/assign/assignee/tuple.rs index 150b4ffbe6..45c89feaf7 100644 --- a/compiler/src/statement/assign/assignee/tuple.rs +++ b/compiler/src/statement/assign/assignee/tuple.rs @@ -30,26 +30,22 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { index: usize, ) -> Result<(), LeoError> { if context.input.len() != 1 { - return Err(LeoError::from(CompilerError::statement_array_assign_interior_index( - &context.span, - ))); + return Err(CompilerError::statement_array_assign_interior_index(&context.span))?; } match context.input.remove(0) { ConstrainedValue::Tuple(old) => { if index > old.len() { - Err(LeoError::from(CompilerError::statement_tuple_assign_index_bounds( + Err(CompilerError::statement_tuple_assign_index_bounds( index, old.len(), &context.span, - ))) + ))? } else { context.input = vec![&mut old[index]]; self.resolve_target_access(cs, context) } } - _ => Err(LeoError::from(CompilerError::statement_tuple_assign_index( - &context.span, - ))), + _ => Err(CompilerError::statement_tuple_assign_index(&context.span))?, } } } diff --git a/compiler/src/statement/conditional/conditional.rs b/compiler/src/statement/conditional/conditional.rs index 1049c130a8..b165405b00 100644 --- a/compiler/src/statement/conditional/conditional.rs +++ b/compiler/src/statement/conditional/conditional.rs @@ -24,7 +24,7 @@ use crate::{ StatementResult, }; use leo_asg::ConditionalStatement; -use leo_errors::{CompilerError, LeoError}; +use leo_errors::CompilerError; use snarkvm_fields::PrimeField; use snarkvm_gadgets::boolean::Boolean; @@ -57,9 +57,10 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let inner_indicator = match self.enforce_expression(cs, statement.condition.get())? { ConstrainedValue::Boolean(resolved) => resolved, value => { - return Err(LeoError::from( - CompilerError::conditional_boolean_expression_fails_to_resolve_to_bool(value.to_string(), &span), - )); + return Err(CompilerError::conditional_boolean_expression_fails_to_resolve_to_bool( + value.to_string(), + &span, + ))?; } }; @@ -75,7 +76,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { outer_indicator, &inner_indicator, ) - .map_err(|_| LeoError::from(CompilerError::statement_indicator_calculation(branch_1_name, &span)))?; + .map_err(|_| CompilerError::statement_indicator_calculation(branch_1_name, &span))?; let mut results = vec![]; @@ -96,7 +97,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { outer_indicator, &inner_indicator, ) - .map_err(|_| LeoError::from(CompilerError::statement_indicator_calculation(branch_2_name, &span)))?; + .map_err(|_| CompilerError::statement_indicator_calculation(branch_2_name, &span))?; // Evaluate branch 2 let mut branch_2_result = match statement.next.get() { diff --git a/compiler/src/statement/definition/definition.rs b/compiler/src/statement/definition/definition.rs index a84c0d09d3..437630a891 100644 --- a/compiler/src/statement/definition/definition.rs +++ b/compiler/src/statement/definition/definition.rs @@ -31,11 +31,11 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { span: &Span, ) -> Result<(), LeoError> { if values.len() != variable_names.len() { - return Err(LeoError::from(CompilerError::statement_invalid_number_of_definitions( + return Err(CompilerError::statement_invalid_number_of_definitions( values.len(), variable_names.len(), span, - ))); + ))?; } for (variable, value) in variable_names.iter().zip(values.into_iter()) { @@ -65,10 +65,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { // ConstrainedValue::Return(values) => values, ConstrainedValue::Tuple(values) => values, value => { - return Err(LeoError::from(CompilerError::statement_multiple_definition( - value.to_string(), - &span, - ))); + return Err(CompilerError::statement_multiple_definition(value, &span))?; } }; diff --git a/compiler/src/statement/iteration/iteration.rs b/compiler/src/statement/iteration/iteration.rs index 16bcd2e5da..801811e4be 100644 --- a/compiler/src/statement/iteration/iteration.rs +++ b/compiler/src/statement/iteration/iteration.rs @@ -26,7 +26,7 @@ use crate::{ StatementResult, }; use leo_asg::IterationStatement; -use leo_errors::{CompilerError, LeoError}; +use leo_errors::CompilerError; use snarkvm_fields::PrimeField; use snarkvm_gadgets::{boolean::Boolean, integers::uint::UInt32}; @@ -47,11 +47,11 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let from = self .enforce_index(cs, statement.start.get(), &span)? .to_usize() - .ok_or_else(|| LeoError::from(CompilerError::statement_loop_index_const(&span)))?; + .ok_or_else(|| CompilerError::statement_loop_index_const(&span))?; let to = self .enforce_index(cs, statement.stop.get(), &span)? .to_usize() - .ok_or_else(|| LeoError::from(CompilerError::statement_loop_index_const(&span)))?; + .ok_or_else(|| CompilerError::statement_loop_index_const(&span))?; let iter: Box> = match (from < to, statement.inclusive) { (true, true) => Box::new(from..=to), diff --git a/compiler/src/statement/statement.rs b/compiler/src/statement/statement.rs index 93462864f4..06cf561fc5 100644 --- a/compiler/src/statement/statement.rs +++ b/compiler/src/statement/statement.rs @@ -82,9 +82,9 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { } } _ => { - return Err(LeoError::from(CompilerError::statement_unassigned( + return Err(CompilerError::statement_unassigned( &statement.span.clone().unwrap_or_default(), - ))); + ))?; } } } diff --git a/compiler/src/value/address/address.rs b/compiler/src/value/address/address.rs index afe8c57b8a..da2e7c66eb 100644 --- a/compiler/src/value/address/address.rs +++ b/compiler/src/value/address/address.rs @@ -18,7 +18,6 @@ use crate::{ConstrainedValue, GroupType, IntegerTrait}; use leo_ast::InputValue; use leo_errors::{CompilerError, LeoError, Span}; -use eyre::eyre; use snarkvm_dpc::{account::Address as AleoAddress, testnet1::instantiated::Components}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::{ @@ -43,8 +42,8 @@ pub struct Address { impl Address { pub(crate) fn constant(address: String, span: &Span) -> Result { - let address = AleoAddress::from_str(&address) - .map_err(|e| LeoError::from(CompilerError::address_value_account_error(eyre!(e), span)))?; + let address = + AleoAddress::from_str(&address).map_err(|e| CompilerError::address_value_account_error(e, span))?; let mut address_bytes = vec![]; address.write_le(&mut address_bytes).unwrap(); @@ -73,10 +72,7 @@ impl Address { if let InputValue::Address(string) = input { Some(string) } else { - return Err(LeoError::from(CompilerError::address_value_invalid_address( - name.to_owned(), - span, - ))); + return Err(CompilerError::address_value_invalid_address(name, span))?; } } None => None, @@ -86,7 +82,7 @@ impl Address { cs.ns(|| format!("`{}: address` {}:{}", name, span.line_start, span.col_start)), || address_value.ok_or(SynthesisError::AssignmentMissing), ) - .map_err(|_| LeoError::from(CompilerError::address_value_missing_address(span)))?; + .map_err(|_| CompilerError::address_value_missing_address(span))?; Ok(ConstrainedValue::Address(address)) } diff --git a/compiler/src/value/boolean/input.rs b/compiler/src/value/boolean/input.rs index 3557f95560..648ce5f2d4 100644 --- a/compiler/src/value/boolean/input.rs +++ b/compiler/src/value/boolean/input.rs @@ -30,16 +30,11 @@ pub(crate) fn allocate_bool>( option: Option, span: &Span, ) -> Result { - Boolean::alloc( + Ok(Boolean::alloc( cs.ns(|| format!("`{}: bool` {}:{}", name, span.line_start, span.col_start)), || option.ok_or(SynthesisError::AssignmentMissing), ) - .map_err(|_| { - LeoError::from(CompilerError::boolean_value_missing_boolean( - format!("{}: bool", name), - span, - )) - }) + .map_err(|_| CompilerError::boolean_value_missing_boolean(format!("{}: bool", name), span))?) } pub(crate) fn bool_from_input<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( @@ -54,10 +49,7 @@ pub(crate) fn bool_from_input<'a, F: PrimeField, G: GroupType, CS: Constraint if let InputValue::Boolean(bool) = input { Some(bool) } else { - return Err(LeoError::from(CompilerError::boolean_value_invalid_boolean( - name.to_owned(), - span, - ))); + return Err(CompilerError::boolean_value_invalid_boolean(name, span))?; } } None => None, diff --git a/compiler/src/value/char/char.rs b/compiler/src/value/char/char.rs index ae131e1a97..2a4c97e70e 100644 --- a/compiler/src/value/char/char.rs +++ b/compiler/src/value/char/char.rs @@ -160,10 +160,7 @@ pub(crate) fn char_from_input<'a, F: PrimeField, G: GroupType, CS: Constraint } } } else { - return Err(LeoError::from(CompilerError::char_value_invalid_char( - input.to_string(), - span, - ))); + return Err(CompilerError::char_value_invalid_char(input, span))?; } } None => (CharType::Scalar(0 as char), None), diff --git a/compiler/src/value/field/field_type.rs b/compiler/src/value/field/field_type.rs index 4e49368370..1753c5af08 100644 --- a/compiler/src/value/field/field_type.rs +++ b/compiler/src/value/field/field_type.rs @@ -19,7 +19,6 @@ use crate::number_string_typing; use leo_errors::{CompilerError, LeoError, Span}; -use eyre::eyre; use snarkvm_fields::PrimeField; use snarkvm_gadgets::{ bits::{ToBitsBEGadget, ToBytesGadget}, @@ -51,14 +50,16 @@ impl FieldType { let number_info = number_string_typing(&string); let value = match number_info { - (number, neg) if neg => -F::from_str(&number) - .map_err(|_| LeoError::from(CompilerError::field_value_invalid_field(string.clone(), span)))?, - (number, _) => F::from_str(&number) - .map_err(|_| LeoError::from(CompilerError::field_value_invalid_field(string.clone(), span)))?, + (number, neg) if neg => { + -F::from_str(&number).map_err(|_| CompilerError::field_value_invalid_field(string.clone(), span))? + } + (number, _) => { + F::from_str(&number).map_err(|_| CompilerError::field_value_invalid_field(string.clone(), span))? + } }; let value = FpGadget::alloc_constant(cs, || Ok(value)) - .map_err(|_| LeoError::from(CompilerError::field_value_invalid_field(string, span)))?; + .map_err(|_| CompilerError::field_value_invalid_field(string, span))?; Ok(FieldType(value)) } @@ -68,59 +69,47 @@ impl FieldType { let result = self .0 .negate(cs) - .map_err(|e| LeoError::from(CompilerError::field_value_negate_operation(eyre!(e), span)))?; + .map_err(|e| CompilerError::field_value_negate_operation(e, span))?; Ok(FieldType(result)) } /// Returns a new `FieldType` by calling the `FpGadget` `add` function. pub fn add>(&self, cs: CS, other: &Self, span: &Span) -> Result { - let value = self.0.add(cs, &other.0).map_err(|e| { - LeoError::from(CompilerError::field_value_binary_operation( - "+".to_string(), - eyre!(e), - span, - )) - })?; + let value = self + .0 + .add(cs, &other.0) + .map_err(|e| CompilerError::field_value_binary_operation("+", e, span))?; Ok(FieldType(value)) } /// Returns a new `FieldType` by calling the `FpGadget` `sub` function. pub fn sub>(&self, cs: CS, other: &Self, span: &Span) -> Result { - let value = self.0.sub(cs, &other.0).map_err(|e| { - LeoError::from(CompilerError::field_value_binary_operation( - "-".to_string(), - eyre!(e), - span, - )) - })?; + let value = self + .0 + .sub(cs, &other.0) + .map_err(|e| CompilerError::field_value_binary_operation("-", e, span))?; Ok(FieldType(value)) } /// Returns a new `FieldType` by calling the `FpGadget` `mul` function. pub fn mul>(&self, cs: CS, other: &Self, span: &Span) -> Result { - let value = self.0.mul(cs, &other.0).map_err(|e| { - LeoError::from(CompilerError::field_value_binary_operation( - "*".to_string(), - eyre!(e), - span, - )) - })?; + let value = self + .0 + .mul(cs, &other.0) + .map_err(|e| CompilerError::field_value_binary_operation("*", e, span))?; Ok(FieldType(value)) } /// Returns a new `FieldType` by calling the `FpGadget` `inverse` function. pub fn inverse>(&self, cs: CS, span: &Span) -> Result { - let value = self.0.inverse(cs).map_err(|e| { - LeoError::from(CompilerError::field_value_binary_operation( - "inv".to_string(), - eyre!(e), - span, - )) - })?; + let value = self + .0 + .inverse(cs) + .map_err(|e| CompilerError::field_value_binary_operation("inv", e, span))?; Ok(FieldType(value)) } diff --git a/compiler/src/value/field/input.rs b/compiler/src/value/field/input.rs index 7d71cd1639..fee726de68 100644 --- a/compiler/src/value/field/input.rs +++ b/compiler/src/value/field/input.rs @@ -40,13 +40,8 @@ pub(crate) fn allocate_field>( || Some(number).ok_or(SynthesisError::AssignmentMissing), ) .map(|value| value.negate(cs, span)) - .map_err(|_| { - LeoError::from(CompilerError::field_value_missing_field( - format!("{}: field", name), - span, - )) - })?, - (number, _) => FieldType::alloc( + .map_err(|_| CompilerError::field_value_missing_field(format!("{}: field", name), span))?, + (number, _) => Ok(FieldType::alloc( cs.ns(|| format!("`{}: field` {}:{}", name, span.line_start, span.col_start)), || Some(number).ok_or(SynthesisError::AssignmentMissing), ) @@ -55,13 +50,13 @@ pub(crate) fn allocate_field>( format!("{}: field", name), span, )) - }), + })?), } } - None => Err(LeoError::from(CompilerError::field_value_missing_field( + None => Err(CompilerError::field_value_missing_field( format!("{}: field", name), span, - ))), + ))?, } } @@ -77,10 +72,7 @@ pub(crate) fn field_from_input<'a, F: PrimeField, G: GroupType, CS: Constrain if let InputValue::Field(string) = input { Some(string) } else { - return Err(LeoError::from(CompilerError::field_value_invalid_field( - input.to_string(), - span, - ))); + return Err(CompilerError::field_value_invalid_field(input, span))?; } } None => None, diff --git a/compiler/src/value/group/input.rs b/compiler/src/value/group/input.rs index 86c7471191..35438ce814 100644 --- a/compiler/src/value/group/input.rs +++ b/compiler/src/value/group/input.rs @@ -30,16 +30,11 @@ pub(crate) fn allocate_group, CS: ConstraintSyste option: Option, span: &Span, ) -> Result { - G::alloc( + Ok(G::alloc( cs.ns(|| format!("`{}: group` {}:{}", name, span.line_start, span.col_start)), || option.ok_or(SynthesisError::AssignmentMissing), ) - .map_err(|_| { - LeoError::from(CompilerError::group_value_missing_group( - format!("{}: group", name), - span, - )) - }) + .map_err(|_| CompilerError::group_value_missing_group(format!("{}: group", name), span))?) } pub(crate) fn group_from_input<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( @@ -54,10 +49,7 @@ pub(crate) fn group_from_input<'a, F: PrimeField, G: GroupType, CS: Constrain if let InputValue::Group(string) = input { Some(string) } else { - return Err(LeoError::from(CompilerError::group_value_missing_group( - input.to_string(), - span, - ))); + return Err(CompilerError::group_value_missing_group(input, span))?; } } None => None, diff --git a/compiler/src/value/group/targets/edwards_bls12.rs b/compiler/src/value/group/targets/edwards_bls12.rs index e136747082..edcd29fe9d 100644 --- a/compiler/src/value/group/targets/edwards_bls12.rs +++ b/compiler/src/value/group/targets/edwards_bls12.rs @@ -18,7 +18,6 @@ use crate::{number_string_typing, GroupType}; use leo_asg::{GroupCoordinate, GroupValue}; use leo_errors::{CompilerError, LeoError, Span}; -use eyre::eyre; use snarkvm_curves::{ edwards_bls12::{EdwardsAffine, EdwardsParameters, Fq}, templates::twisted_edwards_extended::Affine, @@ -61,9 +60,10 @@ impl GroupType for EdwardsGroupType { } fn to_allocated>(&self, mut cs: CS, span: &Span) -> Result { - self.allocated(cs.ns(|| format!("allocate affine point {}:{}", span.line_start, span.col_start))) + Ok(self + .allocated(cs.ns(|| format!("allocate affine point {}:{}", span.line_start, span.col_start))) .map(|ebg| EdwardsGroupType::Allocated(Box::new(ebg))) - .map_err(|e| LeoError::from(CompilerError::group_value_synthesis_error(eyre!(e), span))) + .map_err(|e| CompilerError::group_value_synthesis_error(e, span))?) } fn negate>(&self, cs: CS, span: &Span) -> Result { @@ -71,7 +71,7 @@ impl GroupType for EdwardsGroupType { EdwardsGroupType::Constant(group) => Ok(EdwardsGroupType::Constant(group.neg())), EdwardsGroupType::Allocated(group) => { let result = , Fq>>::negate(group, cs) - .map_err(|e| LeoError::from(CompilerError::group_value_negate_operation(eyre!(e), span)))?; + .map_err(|e| CompilerError::group_value_negate_operation(e, span))?; Ok(EdwardsGroupType::Allocated(Box::new(result))) } @@ -90,13 +90,7 @@ impl GroupType for EdwardsGroupType { cs, other_value, ) - .map_err(|e| { - LeoError::from(CompilerError::group_value_binary_operation( - "+".to_string(), - eyre!(e), - span, - )) - })?; + .map_err(|e| CompilerError::group_value_binary_operation("+", e, span))?; Ok(EdwardsGroupType::Allocated(Box::new(result))) } @@ -104,13 +98,9 @@ impl GroupType for EdwardsGroupType { (EdwardsGroupType::Constant(constant_value), EdwardsGroupType::Allocated(allocated_value)) | (EdwardsGroupType::Allocated(allocated_value), EdwardsGroupType::Constant(constant_value)) => { Ok(EdwardsGroupType::Allocated(Box::new( - allocated_value.add_constant(cs, constant_value).map_err(|e| { - LeoError::from(CompilerError::group_value_binary_operation( - "+".to_string(), - eyre!(e), - span, - )) - })?, + allocated_value + .add_constant(cs, constant_value) + .map_err(|e| CompilerError::group_value_binary_operation("+", e, span))?, ))) } } @@ -128,13 +118,7 @@ impl GroupType for EdwardsGroupType { cs, other_value, ) - .map_err(|e| { - LeoError::from(CompilerError::group_value_binary_operation( - "-".to_string(), - eyre!(e), - span, - )) - })?; + .map_err(|e| CompilerError::group_value_binary_operation("-", e, span))?; Ok(EdwardsGroupType::Allocated(Box::new(result))) } @@ -142,13 +126,9 @@ impl GroupType for EdwardsGroupType { (EdwardsGroupType::Constant(constant_value), EdwardsGroupType::Allocated(allocated_value)) | (EdwardsGroupType::Allocated(allocated_value), EdwardsGroupType::Constant(constant_value)) => { Ok(EdwardsGroupType::Allocated(Box::new( - allocated_value.sub_constant(cs, constant_value).map_err(|e| { - LeoError::from(CompilerError::group_value_binary_operation( - "-".to_string(), - eyre!(e), - span, - )) - })?, + allocated_value + .sub_constant(cs, constant_value) + .map_err(|e| CompilerError::group_value_binary_operation("-", e, span))?, ))) } } @@ -171,10 +151,12 @@ impl EdwardsGroupType { } else { let one = edwards_affine_one(); let number_value = match number_info { - (number, neg) if neg => -Fp256::from_str(&number) - .map_err(|_| LeoError::from(CompilerError::group_value_n_group(number, span)))?, - (number, _) => Fp256::from_str(&number) - .map_err(|_| LeoError::from(CompilerError::group_value_n_group(number, span)))?, + (number, neg) if neg => { + -Fp256::from_str(&number).map_err(|_| CompilerError::group_value_n_group(number, span))? + } + (number, _) => { + Fp256::from_str(&number).map_err(|_| CompilerError::group_value_n_group(number, span))? + } }; let result: EdwardsAffine = one.mul(number_value); @@ -225,10 +207,10 @@ impl EdwardsGroupType { Self::edwards_affine_from_y_str(number_string_typing(&y_string), span, None, span) } // Invalid - (x, y) => Err(LeoError::from(CompilerError::group_value_invalid_group( + (x, y) => Err(CompilerError::group_value_invalid_group( format!("({}, {})", x, y), span, - ))), + ))?, } } @@ -239,17 +221,16 @@ impl EdwardsGroupType { element_span: &Span, ) -> Result { let x = match x_info { - (x_str, neg) if neg => -Fq::from_str(&x_str) - .map_err(|_| LeoError::from(CompilerError::group_value_x_invalid(x_str, x_span)))?, - (x_str, _) => { - Fq::from_str(&x_str).map_err(|_| LeoError::from(CompilerError::group_value_x_invalid(x_str, x_span)))? + (x_str, neg) if neg => { + -Fq::from_str(&x_str).map_err(|_| CompilerError::group_value_x_invalid(x_str, x_span))? } + (x_str, _) => Fq::from_str(&x_str).map_err(|_| CompilerError::group_value_x_invalid(x_str, x_span))?, }; match greatest { // Sign provided - Some(greatest) => EdwardsAffine::from_x_coordinate(x, greatest) - .ok_or_else(|| LeoError::from(CompilerError::group_value_x_recover(element_span))), + Some(greatest) => Ok(EdwardsAffine::from_x_coordinate(x, greatest) + .ok_or_else(|| CompilerError::group_value_x_recover(element_span))?), // Sign inferred None => { // Attempt to recover with a sign_low bit. @@ -263,7 +244,7 @@ impl EdwardsGroupType { } // Otherwise return error. - Err(LeoError::from(CompilerError::group_value_x_recover(element_span))) + Err(CompilerError::group_value_x_recover(element_span))? } } } @@ -275,17 +256,16 @@ impl EdwardsGroupType { element_span: &Span, ) -> Result { let y = match y_info { - (y_str, neg) if neg => -Fq::from_str(&y_str) - .map_err(|_| LeoError::from(CompilerError::group_value_y_invalid(y_str, y_span)))?, - (y_str, _) => { - Fq::from_str(&y_str).map_err(|_| LeoError::from(CompilerError::group_value_y_invalid(y_str, y_span)))? + (y_str, neg) if neg => { + -Fq::from_str(&y_str).map_err(|_| CompilerError::group_value_y_invalid(y_str, y_span))? } + (y_str, _) => Fq::from_str(&y_str).map_err(|_| CompilerError::group_value_y_invalid(y_str, y_span))?, }; match greatest { // Sign provided - Some(greatest) => EdwardsAffine::from_y_coordinate(y, greatest) - .ok_or_else(|| LeoError::from(CompilerError::group_value_y_recover(element_span))), + Some(greatest) => Ok(EdwardsAffine::from_y_coordinate(y, greatest) + .ok_or_else(|| CompilerError::group_value_y_recover(element_span))?), // Sign inferred None => { // Attempt to recover with a sign_low bit. @@ -299,7 +279,7 @@ impl EdwardsGroupType { } // Otherwise return error. - Err(LeoError::from(CompilerError::group_value_y_recover(element_span))) + Err(CompilerError::group_value_y_recover(element_span))? } } } @@ -312,17 +292,17 @@ impl EdwardsGroupType { element_span: &Span, ) -> Result { let x = match x_info { - (x_str, neg) if neg => -Fq::from_str(&x_str) - .map_err(|_| LeoError::from(CompilerError::group_value_x_invalid(x_str.to_string(), x_span)))?, - (x_str, _) => Fq::from_str(&x_str) - .map_err(|_| LeoError::from(CompilerError::group_value_x_invalid(x_str.to_string(), x_span)))?, + (x_str, neg) if neg => { + -Fq::from_str(&x_str).map_err(|_| CompilerError::group_value_x_invalid(x_str, x_span))? + } + (x_str, _) => Fq::from_str(&x_str).map_err(|_| CompilerError::group_value_x_invalid(x_str, x_span))?, }; let y = match y_info { - (y_str, neg) if neg => -Fq::from_str(&y_str) - .map_err(|_| LeoError::from(CompilerError::group_value_y_invalid(y_str.to_string(), y_span)))?, - (y_str, _) => Fq::from_str(&y_str) - .map_err(|_| LeoError::from(CompilerError::group_value_y_invalid(y_str.to_string(), y_span)))?, + (y_str, neg) if neg => { + -Fq::from_str(&y_str).map_err(|_| CompilerError::group_value_y_invalid(y_str, y_span))? + } + (y_str, _) => Fq::from_str(&y_str).map_err(|_| CompilerError::group_value_y_invalid(y_str, y_span))?, }; let element = EdwardsAffine::new(x, y); @@ -330,10 +310,7 @@ impl EdwardsGroupType { if element.is_on_curve() { Ok(element) } else { - Err(LeoError::from(CompilerError::group_value_not_on_curve( - element.to_string(), - element_span, - ))) + Err(CompilerError::group_value_not_on_curve(element, element_span))? } } diff --git a/compiler/src/value/integer/integer.rs b/compiler/src/value/integer/integer.rs index 1a1ffb3f2e..9beeb0e913 100644 --- a/compiler/src/value/integer/integer.rs +++ b/compiler/src/value/integer/integer.rs @@ -20,7 +20,6 @@ use leo_asg::{ConstInt, IntegerType}; use leo_ast::InputValue; use leo_errors::{CompilerError, LeoError, Span}; -use eyre::eyre; use snarkvm_fields::{Field, PrimeField}; use snarkvm_gadgets::{ boolean::Boolean, @@ -162,18 +161,15 @@ impl Integer { if let InputValue::Integer(type_, number) = input { let asg_type = IntegerType::from(type_); if std::mem::discriminant(&asg_type) != std::mem::discriminant(integer_type) { - return Err(LeoError::from(CompilerError::integer_value_integer_type_mismatch( - integer_type.to_string(), - asg_type.to_string(), + return Err(CompilerError::integer_value_integer_type_mismatch( + integer_type, + asg_type, span, - ))); + ))?; } Some(number) } else { - return Err(LeoError::from(CompilerError::integer_value_invalid_integer( - input.to_string(), - span, - ))); + return Err(CompilerError::integer_value_invalid_integer(input, span))?; } } None => None, @@ -189,7 +185,7 @@ impl Integer { let result = match_signed_integer!(a, span => a.neg(cs.ns(|| unique_namespace))); - result.ok_or_else(|| LeoError::from(CompilerError::integer_value_negate_operation(span))) + Ok(result.ok_or_else(|| CompilerError::integer_value_negate_operation(span))?) } pub fn add>( @@ -205,7 +201,7 @@ impl Integer { let result = match_integers_span!((a, b), span => a.add(cs.ns(|| unique_namespace), &b)); - result.ok_or_else(|| LeoError::from(CompilerError::integer_value_binary_operation("+".to_string(), span))) + Ok(result.ok_or_else(|| CompilerError::integer_value_binary_operation("+", span))?) } pub fn sub>( @@ -221,7 +217,7 @@ impl Integer { let result = match_integers_span!((a, b), span => a.sub(cs.ns(|| unique_namespace), &b)); - result.ok_or_else(|| LeoError::from(CompilerError::integer_value_binary_operation("-".to_string(), span))) + Ok(result.ok_or_else(|| CompilerError::integer_value_binary_operation("-", span))?) } pub fn mul>( @@ -237,7 +233,7 @@ impl Integer { let result = match_integers_span!((a, b), span => a.mul(cs.ns(|| unique_namespace), &b)); - result.ok_or_else(|| LeoError::from(CompilerError::integer_value_binary_operation("*".to_string(), span))) + Ok(result.ok_or_else(|| CompilerError::integer_value_binary_operation("*", span))?) } pub fn div>( @@ -253,7 +249,7 @@ impl Integer { let result = match_integers_span!((a, b), span => a.div(cs.ns(|| unique_namespace), &b)); - result.ok_or_else(|| LeoError::from(CompilerError::integer_value_binary_operation("÷".to_string(), span))) + Ok(result.ok_or_else(|| CompilerError::integer_value_binary_operation("÷", span))?) } pub fn pow>( @@ -269,7 +265,7 @@ impl Integer { let result = match_integers_span!((a, b), span => a.pow(cs.ns(|| unique_namespace), &b)); - result.ok_or_else(|| LeoError::from(CompilerError::integer_value_binary_operation("**".to_string(), span))) + Ok(result.ok_or_else(|| CompilerError::integer_value_binary_operation("**", span))?) } } diff --git a/compiler/src/value/integer/macros.rs b/compiler/src/value/integer/macros.rs index bdaae8c6c6..67ae416946 100644 --- a/compiler/src/value/integer/macros.rs +++ b/compiler/src/value/integer/macros.rs @@ -55,31 +55,21 @@ macro_rules! match_unsigned_integer { macro_rules! match_signed_integer { ($integer: ident, $span: ident => $expression: expr) => { match $integer { - Integer::I8($integer) => { - Some(Integer::I8($expression.map_err(|e| { - LeoError::from(CompilerError::integer_value_signed(eyre!(e), $span)) - })?)) - } - Integer::I16($integer) => { - Some(Integer::I16($expression.map_err(|e| { - LeoError::from(CompilerError::integer_value_signed(eyre!(e), $span)) - })?)) - } - Integer::I32($integer) => { - Some(Integer::I32($expression.map_err(|e| { - LeoError::from(CompilerError::integer_value_signed(eyre!(e), $span)) - })?)) - } - Integer::I64($integer) => { - Some(Integer::I64($expression.map_err(|e| { - LeoError::from(CompilerError::integer_value_signed(eyre!(e), $span)) - })?)) - } - Integer::I128($integer) => { - Some(Integer::I128($expression.map_err(|e| { - LeoError::from(CompilerError::integer_value_signed(eyre!(e), $span)) - })?)) - } + Integer::I8($integer) => Some(Integer::I8( + $expression.map_err(|e| CompilerError::integer_value_signed(e, $span))?, + )), + Integer::I16($integer) => Some(Integer::I16( + $expression.map_err(|e| CompilerError::integer_value_signed(e, $span))?, + )), + Integer::I32($integer) => Some(Integer::I32( + $expression.map_err(|e| CompilerError::integer_value_signed(e, $span))?, + )), + Integer::I64($integer) => Some(Integer::I64( + $expression.map_err(|e| CompilerError::integer_value_signed(e, $span))?, + )), + Integer::I128($integer) => Some(Integer::I128( + $expression.map_err(|e| CompilerError::integer_value_signed(e, $span))?, + )), _ => None, } @@ -110,57 +100,37 @@ macro_rules! match_integers { macro_rules! match_integers_span { (($a: ident, $b: ident), $span: ident => $expression:expr) => { match ($a, $b) { - (Integer::U8($a), Integer::U8($b)) => { - Some(Integer::U8($expression.map_err(|e| { - LeoError::from(CompilerError::integer_value_unsigned(eyre!(e), $span)) - })?)) - } - (Integer::U16($a), Integer::U16($b)) => { - Some(Integer::U16($expression.map_err(|e| { - LeoError::from(CompilerError::integer_value_unsigned(eyre!(e), $span)) - })?)) - } - (Integer::U32($a), Integer::U32($b)) => { - Some(Integer::U32($expression.map_err(|e| { - LeoError::from(CompilerError::integer_value_unsigned(eyre!(e), $span)) - })?)) - } - (Integer::U64($a), Integer::U64($b)) => { - Some(Integer::U64($expression.map_err(|e| { - LeoError::from(CompilerError::integer_value_unsigned(eyre!(e), $span)) - })?)) - } - (Integer::U128($a), Integer::U128($b)) => { - Some(Integer::U128($expression.map_err(|e| { - LeoError::from(CompilerError::integer_value_unsigned(eyre!(e), $span)) - })?)) - } + (Integer::U8($a), Integer::U8($b)) => Some(Integer::U8( + $expression.map_err(|e| CompilerError::integer_value_unsigned(e, $span))?, + )), + (Integer::U16($a), Integer::U16($b)) => Some(Integer::U16( + $expression.map_err(|e| CompilerError::integer_value_unsigned(e, $span))?, + )), + (Integer::U32($a), Integer::U32($b)) => Some(Integer::U32( + $expression.map_err(|e| CompilerError::integer_value_unsigned(e, $span))?, + )), + (Integer::U64($a), Integer::U64($b)) => Some(Integer::U64( + $expression.map_err(|e| CompilerError::integer_value_unsigned(e, $span))?, + )), + (Integer::U128($a), Integer::U128($b)) => Some(Integer::U128( + $expression.map_err(|e| CompilerError::integer_value_unsigned(e, $span))?, + )), - (Integer::I8($a), Integer::I8($b)) => { - Some(Integer::I8($expression.map_err(|e| { - LeoError::from(CompilerError::integer_value_unsigned(eyre!(e), $span)) - })?)) - } - (Integer::I16($a), Integer::I16($b)) => { - Some(Integer::I16($expression.map_err(|e| { - LeoError::from(CompilerError::integer_value_unsigned(eyre!(e), $span)) - })?)) - } - (Integer::I32($a), Integer::I32($b)) => { - Some(Integer::I32($expression.map_err(|e| { - LeoError::from(CompilerError::integer_value_unsigned(eyre!(e), $span)) - })?)) - } - (Integer::I64($a), Integer::I64($b)) => { - Some(Integer::I64($expression.map_err(|e| { - LeoError::from(CompilerError::integer_value_unsigned(eyre!(e), $span)) - })?)) - } - (Integer::I128($a), Integer::I128($b)) => { - Some(Integer::I128($expression.map_err(|e| { - LeoError::from(CompilerError::integer_value_unsigned(eyre!(e), $span)) - })?)) - } + (Integer::I8($a), Integer::I8($b)) => Some(Integer::I8( + $expression.map_err(|e| CompilerError::integer_value_unsigned(e, $span))?, + )), + (Integer::I16($a), Integer::I16($b)) => Some(Integer::I16( + $expression.map_err(|e| CompilerError::integer_value_unsigned(e, $span))?, + )), + (Integer::I32($a), Integer::I32($b)) => Some(Integer::I32( + $expression.map_err(|e| CompilerError::integer_value_unsigned(e, $span))?, + )), + (Integer::I64($a), Integer::I64($b)) => Some(Integer::I64( + $expression.map_err(|e| CompilerError::integer_value_unsigned(e, $span))?, + )), + (Integer::I128($a), Integer::I128($b)) => Some(Integer::I128( + $expression.map_err(|e| CompilerError::integer_value_unsigned(e, $span))?, + )), (_, _) => None, } }; @@ -171,7 +141,7 @@ macro_rules! allocate_type { let option = $option .map(|s| { s.parse::<$rust_ty>() - .map_err(|_| LeoError::from(CompilerError::integer_value_invalid_integer(s, $span))) + .map_err(|_| CompilerError::integer_value_invalid_integer(s, $span)) }) .transpose()?; @@ -188,10 +158,10 @@ macro_rules! allocate_type { || option.ok_or(SynthesisError::AssignmentMissing), ) .map_err(|_| { - LeoError::from(CompilerError::integer_value_missing_integer( + CompilerError::integer_value_missing_integer( format!("{}: {}", $name.to_string(), stringify!($rust_ty)), $span, - )) + ) })?; $leo_ty(result) diff --git a/errors/src/asg/asg_errors.rs b/errors/src/asg/asg_errors.rs index b2a6b01f66..beb74d0b13 100644 --- a/errors/src/asg/asg_errors.rs +++ b/errors/src/asg/asg_errors.rs @@ -16,6 +16,8 @@ use crate::create_errors; +use std::fmt::{Debug, Display}; + create_errors!( AsgError, exit_code_mask: 0u32, @@ -23,21 +25,21 @@ create_errors!( @formatted unresolved_circuit { - args: (name: &str), + args: (name: impl Display), msg: format!("failed to resolve circuit: '{}'", name), help: None, } @formatted unresolved_import { - args: (name: &str), + args: (name: impl Display), msg: format!("failed to resolve import: '{}'", name), help: None, } @formatted unresolved_circuit_member { - args: (circuit_name: &str, name: &str), + args: (circuit_name: impl Display, name: impl Display), msg: format!( "illegal reference to non-existant member '{}' of circuit '{}'", name, circuit_name @@ -47,7 +49,7 @@ create_errors!( @formatted missing_circuit_member { - args: (circuit_name: &str, name: &str), + args: (circuit_name: impl Display, name: impl Display), msg: format!( "missing circuit member '{}' for initialization of circuit '{}'", name, circuit_name @@ -57,7 +59,7 @@ create_errors!( @formatted overridden_circuit_member { - args: (circuit_name: &str, name: &str), + args: (circuit_name: impl Display, name: impl Display), msg: format!( "cannot declare circuit member '{}' more than once for initialization of circuit '{}'", name, circuit_name @@ -67,7 +69,7 @@ create_errors!( @formatted redefined_circuit_member { - args: (circuit_name: &str, name: &str), + args: (circuit_name: impl Display, name: impl Display), msg: format!( "cannot declare circuit member '{}' multiple times in circuit '{}'", name, circuit_name @@ -77,7 +79,7 @@ create_errors!( @formatted extra_circuit_member { - args: (circuit_name: &str, name: &str), + args: (circuit_name: impl Display, name: impl Display), msg: format!( "extra circuit member '{}' for initialization of circuit '{}' is not allowed", name, circuit_name @@ -87,21 +89,21 @@ create_errors!( @formatted illegal_function_assign { - args: (name: &str), + args: (name: impl Display), msg: format!("attempt to assign to function '{}'", name), help: None, } @formatted circuit_variable_call { - args: (circuit_name: &str, name: &str), + args: (circuit_name: impl Display, name: impl Display), msg: format!("cannot call variable member '{}' of circuit '{}'", name, circuit_name), help: None, } @formatted circuit_static_call_invalid { - args: (circuit_name: &str, name: &str), + args: (circuit_name: impl Display, name: impl Display), msg: format!( "cannot call static function '{}' of circuit '{}' from target", name, circuit_name @@ -111,7 +113,7 @@ create_errors!( @formatted circuit_member_mut_call_invalid { - args: (circuit_name: &str, name: &str), + args: (circuit_name: impl Display, name: impl Display), msg: format!( "cannot call mutable member function '{}' of circuit '{}' from immutable context", name, circuit_name @@ -121,7 +123,7 @@ create_errors!( @formatted circuit_member_call_invalid { - args: (circuit_name: &str, name: &str), + args: (circuit_name: impl Display, name: impl Display), msg: format!( "cannot call member function '{}' of circuit '{}' from static context", name, circuit_name @@ -131,7 +133,7 @@ create_errors!( @formatted circuit_function_ref { - args: (circuit_name: &str, name: &str), + args: (circuit_name: impl Display, name: impl Display), msg: format!( "cannot reference function member '{}' of circuit '{}' as value", name, circuit_name @@ -141,21 +143,21 @@ create_errors!( @formatted index_into_non_array { - args: (name: &str), + args: (name: impl Display), msg: format!("failed to index into non-array '{}'", name), help: None, } @formatted invalid_assign_index { - args: (name: &str, num: &str), + args: (name: impl Display, num: impl Display), msg: format!("failed to index array with invalid integer '{}'[{}]", name, num), help: None, } @formatted invalid_backwards_assignment { - args: (name: &str, left: usize, right: usize), + args: (name: impl Display, left: impl Display, right: impl Display), msg: format!( "failed to index array range for assignment with left > right '{}'[{}..{}]", name, left, right @@ -165,7 +167,7 @@ create_errors!( @formatted invalid_const_assign { - args: (name: &str), + args: (name: impl Display), msg: format!( "failed to create const variable(s) '{}' with non constant values.", name @@ -175,42 +177,42 @@ create_errors!( @formatted duplicate_function_definition { - args: (name: &str), + args: (name: impl Display), msg: format!("a function named \"{}\" already exists in this scope", name), help: None, } @formatted duplicate_variable_definition { - args: (name: &str), + args: (name: impl Display), msg: format!("a variable named \"{}\" already exists in this scope", name), help: None, } @formatted index_into_non_tuple { - args: (name: &str), + args: (name: impl Display), msg: format!("failed to index into non-tuple '{}'", name), help: None, } @formatted tuple_index_out_of_bounds { - args: (index: usize), + args: (index: impl Display), msg: format!("tuple index out of bounds: '{}'", index), help: None, } @formatted array_index_out_of_bounds { - args: (index: usize), + args: (index: impl Display), msg: format!("array index out of bounds: '{}'", index), help: None, } @formatted ternary_different_types { - args: (left: &str, right: &str), + args: (left: impl Display, right: impl Display), msg: format!("ternary sides had different types: left {}, right {}", left, right), help: None, } @@ -224,32 +226,32 @@ create_errors!( @formatted unexpected_call_argument_count { - args: (expected: usize, got: usize), + args: (expected: impl Display, got: impl Display), msg: format!("function call expected {} arguments, got {}", expected, got), help: None, } @formatted unresolved_function { - args: (name: &str), + args: (name: impl Display), msg: format!("failed to resolve function: '{}'", name), help: None, } @formatted unresolved_type { - args: (name: &str), + args: (name: impl Display), msg: format!("failed to resolve type for variable definition '{}'", name), help: None, } @formatted unexpected_type { - args: (expected: &str, received: Option<&str>), + args: (expected: impl Display, received: impl Display), msg: format!( "unexpected type, expected: '{}', received: '{}'", expected, - received.unwrap_or("unknown") + received, ), help: None, } @@ -263,28 +265,28 @@ create_errors!( @formatted unresolved_reference { - args: (name: &str), + args: (name: impl Display), msg: format!("failed to resolve variable reference '{}'", name), help: None, } @formatted invalid_boolean { - args: (value: &str), + args: (value: impl Display), msg: format!("failed to parse boolean value '{}'", value), help: None, } @formatted invalid_char { - args: (value: &str), + args: (value: impl Display), msg: format!("failed to parse char value '{}'", value), help: None, } @formatted invalid_int { - args: (value: &str), + args: (value: impl Display), msg: format!("failed to parse int value '{}'", value), help: None, } @@ -298,28 +300,28 @@ create_errors!( @formatted immutable_assignment { - args: (name: &str), + args: (name: impl Display), msg: format!("illegal assignment to immutable variable '{}'", name), help: None, } @formatted function_missing_return { - args: (name: &str), + args: (name: impl Display), msg: format!("function '{}' missing return for all paths", name), help: None, } @formatted function_return_validation { - args: (name: &str, description: &str), + args: (name: impl Display, description: impl Display), msg: format!("function '{}' failed to validate return path: '{}'", name, description), help: None, } @formatted input_ref_needs_type { - args: (category: &str, name: &str), + args: (category: impl Display, name: impl Display), msg: format!("could not infer type for input in '{}': '{}'", category, name), help: None, } @@ -368,14 +370,14 @@ create_errors!( @formatted illegal_ast_structure { - args: (details: &str), + args: (details: impl Display), msg: format!("illegal ast structure: {}", details), help: None, } @formatted illegal_input_variable_reference { - args: (details: &str), + args: (details: impl Display), msg: format!("illegal ast structure: {}", details), help: None, } diff --git a/errors/src/ast/ast_errors.rs b/errors/src/ast/ast_errors.rs index 3648e92e1c..9f9f3fb00e 100644 --- a/errors/src/ast/ast_errors.rs +++ b/errors/src/ast/ast_errors.rs @@ -15,12 +15,48 @@ // along with the Leo library. If not, see . use crate::create_errors; +use std::{error::Error as ErrorArg, fmt::Debug}; create_errors!( AstError, exit_code_mask: 1000u32, error_code_prefix: "T", + @backtraced + failed_to_convert_ast_to_json_string { + args: (error: impl ErrorArg), + msg: format!("failed to convert ast to a json string {}", error), + help: None, + } + + @backtraced + failed_to_create_ast_json_file { + args: (path: impl Debug, error: impl ErrorArg), + msg: format!("failed to creat ast json file `{:?}` {}", path, error), + help: None, + } + + @backtraced + failed_to_write_ast_to_json_file { + args: (path: impl Debug, error: impl ErrorArg), + msg: format!("failed to write ast to a json file `{:?}` {}", path, error), + help: None, + } + + @backtraced + failed_to_read_json_string_to_ast { + args: (error: impl ErrorArg), + msg: format!("failed to convert json stirng to an ast {}", error), + help: None, + } + + @backtraced + failed_to_read_json_file { + args: (path: impl Debug, error: impl ErrorArg), + msg: format!("failed to convert json file `{:?}` to an ast {}", path, error), + help: None, + } + @formatted big_self_outside_of_circuit { args: (), diff --git a/errors/src/common/backtraced.rs b/errors/src/common/backtraced.rs index 9a96847040..aa1333b303 100644 --- a/errors/src/common/backtraced.rs +++ b/errors/src/common/backtraced.rs @@ -35,7 +35,7 @@ pub struct BacktracedError { pub message: String, pub help: Option, pub exit_code: u32, - pub code_identifier: String, + pub code_identifier: u32, pub error_type: String, #[derivative(PartialEq = "ignore")] #[derivative(Hash = "ignore")] @@ -45,9 +45,9 @@ pub struct BacktracedError { impl BacktracedError { pub fn new_from_backtrace( message: S, - help: Option, + help: Option, exit_code: u32, - code_identifier: String, + code_identifier: u32, error_type: String, backtrace: Backtrace, ) -> Self @@ -63,12 +63,16 @@ impl BacktracedError { backtrace, } } + + pub fn exit_code(&self) -> u32 { + 0 + } } impl fmt::Display for BacktracedError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let error_message = format!( - "{indent }[E{error_type}{code_identifier}{exit_code}]: {message}\ + "[E{error_type}{code_identifier:0>3}{exit_code:0>4}]: {message}\ {indent } ", indent = INDENT, error_type = self.error_type, @@ -83,7 +87,11 @@ impl fmt::Display for BacktracedError { write!(f, "{indent } = {help}", indent = INDENT, help = help)?; } - write!(f, "stack backtrace:\n{:?}", self.backtrace) + if std::env::var("LEO_BACKTRACE").unwrap_or_default().trim() == "1" { + write!(f, "stack backtrace:\n{:?}", self.backtrace)?; + } + + Ok(()) } } diff --git a/errors/src/common/formatted.rs b/errors/src/common/formatted.rs index 07184f2f72..580a475271 100644 --- a/errors/src/common/formatted.rs +++ b/errors/src/common/formatted.rs @@ -42,9 +42,9 @@ pub struct FormattedError { impl FormattedError { pub fn new_from_span( message: S, - help: Option, + help: Option, exit_code: u32, - code_identifier: String, + code_identifier: u32, error_type: String, span: &Span, ) -> Self @@ -68,6 +68,10 @@ impl FormattedError { ), } } + + pub fn exit_code(&self) -> u32 { + 0 + } } impl fmt::Display for FormattedError { @@ -91,11 +95,11 @@ impl fmt::Display for FormattedError { underline }; - let underlined = underline(self.col_start, self.col_start); + let underlined = underline(self.col_start, self.col_stop); let error_message = format!( - "[E{error_type}{code_identifier}{exit_code:0>4}]: {message}\n\ - --> {path}:{line_start}:{start}\n\ + "[E{error_type}{code_identifier:0>3}{exit_code:0>4}]: {message}\n \ + --> {path}:{line_start}:{start}\n\ {indent } ", indent = INDENT, error_type = self.backtrace.error_type, @@ -131,7 +135,11 @@ impl fmt::Display for FormattedError { write!(f, "{indent } = {help}", indent = INDENT, help = help)?; } - write!(f, "stack backtrace:\n{:?}", self.backtrace.backtrace) + if std::env::var("LEO_BACKTRACE").unwrap_or_default().trim() == "1" { + write!(f, "stack backtrace:\n{:?}", self.backtrace.backtrace)?; + } + + Ok(()) } } diff --git a/errors/src/common/macros.rs b/errors/src/common/macros.rs index 98b1a69b2b..cf84897fa9 100644 --- a/errors/src/common/macros.rs +++ b/errors/src/common/macros.rs @@ -22,6 +22,7 @@ macro_rules! create_errors { use backtrace::Backtrace; + #[derive(Debug, Error)] pub enum $error_type { #[error(transparent)] @@ -34,6 +35,19 @@ macro_rules! create_errors { impl LeoErrorCode for $error_type {} impl ErrorCode for $error_type { + #[inline(always)] + fn exit_code(&self) -> u32 { + match self { + Self::FormattedError(formatted) => { + formatted.exit_code() + }, + Self::BacktracedError(backtraced) => { + backtraced.exit_code() + } + } + + } + #[inline(always)] fn exit_code_mask() -> u32 { $exit_code_mask @@ -44,20 +58,20 @@ macro_rules! create_errors { $error_code_prefix.to_string() } - fn new_from_backtrace(message: S, help: Option, exit_code: u32, backtrace: Backtrace) -> Self - where - S: ToString { - BacktracedError::new_from_backtrace( - message, + fn new_from_backtrace(message: S, help: Option, exit_code: u32, backtrace: Backtrace) -> Self + where + S: ToString { + BacktracedError::new_from_backtrace( + message, help, exit_code + Self::exit_code_mask(), Self::code_identifier(), - Self::error_type(), - backtrace, - ).into() - } + Self::error_type(), + backtrace, + ).into() + } - fn new_from_span(message: S, help: Option, exit_code: u32, span: &Span) -> Self + fn new_from_span(message: S, help: Option, exit_code: u32, span: &Span) -> Self where S: ToString { FormattedError::new_from_span( message, diff --git a/errors/src/common/mod.rs b/errors/src/common/mod.rs index 79ee8225cb..fe9dcb1cf9 100644 --- a/errors/src/common/mod.rs +++ b/errors/src/common/mod.rs @@ -32,3 +32,8 @@ pub use self::tendril_json::*; pub mod traits; pub use self::traits::*; + +// Can make the args cleaner once https://github.com/rust-lang/rust/issues/41517 or https://github.com/rust-lang/rust/issues/63063 hits stable. +// pub(crate) type DisplayArg = impl std::fmt::Display; +// pub(crate) type DebugArg = impl std::fmt::Debug; +// pub(crate) type ErrorArg = impl std::error::Error; diff --git a/errors/src/common/traits.rs b/errors/src/common/traits.rs index 57486748f2..0bb3bda30a 100644 --- a/errors/src/common/traits.rs +++ b/errors/src/common/traits.rs @@ -19,22 +19,24 @@ use crate::Span; use backtrace::Backtrace; pub trait ErrorCode: Sized { + fn exit_code(&self) -> u32; + fn exit_code_mask() -> u32; fn error_type() -> String; - fn new_from_backtrace(message: S, help: Option, exit_code: u32, backtrace: Backtrace) -> Self + fn new_from_backtrace(message: S, help: Option, exit_code: u32, backtrace: Backtrace) -> Self where S: ToString; - fn new_from_span(message: S, help: Option, exit_code: u32, span: &Span) -> Self + fn new_from_span(message: S, help: Option, exit_code: u32, span: &Span) -> Self where S: ToString; } pub trait LeoErrorCode: ErrorCode { #[inline(always)] - fn code_identifier() -> String { - "037".to_string() + fn code_identifier() -> u32 { + 037 } } diff --git a/errors/src/compiler/compiler_errors.rs b/errors/src/compiler/compiler_errors.rs index 2667e3eb6f..a064320113 100644 --- a/errors/src/compiler/compiler_errors.rs +++ b/errors/src/compiler/compiler_errors.rs @@ -16,7 +16,10 @@ use crate::create_errors; -use eyre::ErrReport; +use std::{ + error::Error as ErrorArg, + fmt::{Debug, Display}, +}; create_errors!( CompilerError, @@ -25,14 +28,14 @@ create_errors!( @backtraced invalid_test_context { - args: (name: String), + args: (name: impl Display), msg: format!("Cannot find input files with context name `{}`", name), help: None, } @backtraced file_read_error { - args: (path: std::path::PathBuf, error: ErrReport), + args: (path: impl Debug, error: impl ErrorArg), msg: format!("Cannot read from the provided file path '{:?}': {}", path, error), help: None, } @@ -67,7 +70,7 @@ create_errors!( @formatted console_container_parameter_length_mismatch { - args: (containers: usize, parameters: usize), + args: (containers: impl Display, parameters: impl Display), msg: format!( "Formatter given {} containers and found {} parameters", containers, parameters @@ -99,7 +102,7 @@ create_errors!( @formatted cannot_enforce_expression { - args: (operation: String, error: ErrReport), + args: (operation: impl Display, error: impl ErrorArg), msg: format!( "the gadget operation `{}` failed due to synthesis error `{:?}`", operation, error, @@ -109,7 +112,7 @@ create_errors!( @formatted cannot_evaluate_expression { - args: (operation: String), + args: (operation: impl Display), msg: format!("Mismatched types found for operation `{}`", operation), help: None, } @@ -130,35 +133,35 @@ create_errors!( @formatted conditional_boolean_expression_fails_to_resolve_to_bool { - args: (actual: String), + args: (actual: impl Display), msg: format!("if, else conditional must resolve to a boolean, found `{}`", actual), help: None, } @formatted expected_circuit_member { - args: (expected: String), + args: (expected: impl Display), msg: format!("expected circuit member `{}`, not found", expected), help: None, } @formatted incompatible_types { - args: (operation: String), + args: (operation: impl Display), msg: format!("no implementation for `{}`", operation), help: None, } @formatted tuple_index_out_of_bounds { - args: (index: usize), + args: (index: impl Display), msg: format!("cannot access index {} of tuple out of bounds", index), help: None, } @formatted array_index_out_of_bounds { - args: (index: usize), + args: (index: impl Display), msg: format!("cannot access index {} of array out of bounds", index), help: None, } @@ -172,35 +175,35 @@ create_errors!( @formatted invalid_index_expression { - args: (actual: String), + args: (actual: impl Display), msg: format!("index must resolve to an integer, found `{}`", actual), help: None, } @formatted unexpected_array_length { - args: (expected: usize, actual: usize), + args: (expected: impl Display, actual: impl Display), msg: format!("expected array length {}, found one with length {}", expected, actual), help: None, } @formatted invalid_circuit_static_member_access { - args: (member: String), + args: (member: impl Display), msg: format!("invalid circuit static member `{}` must be accessed using `::` syntax", member), help: None, } @formatted undefined_array { - args: (actual: String), + args: (actual: impl Display), msg: format!("array `{}` must be declared before it is used in an expression", actual), help: None, } @formatted undefined_circuit { - args: (actual: String), + args: (actual: impl Display), msg: format!( "circuit `{}` must be declared before it is used in an expression", actual @@ -210,21 +213,21 @@ create_errors!( @formatted undefined_identifier { - args: (name: &str), + args: (name: impl Display), msg: format!("Cannot find value `{}` in this scope", name), help: None, } @formatted undefined_circuit_member_access { - args: (circuit: String, member: String), + args: (circuit: impl Display, member: impl Display), msg: format!("Circuit `{}` has no member `{}`", circuit, member), help: None, } @formatted input_variable_type_mismatch { - args: (expected: String, actual: String, variable: String), + args: (expected: impl Display, actual: impl Display, variable: impl Display), msg: format!( "Expected input variable `{}` to be type `{}`, found type `{}`", variable, expected, actual @@ -234,7 +237,7 @@ create_errors!( @formatted expected_const_input_variable { - args: (variable: String), + args: (variable: impl Display), msg: format!( "Expected input variable `{}` to be constant. Move input variable `{}` to [constants] section of input file", variable, variable @@ -244,7 +247,7 @@ create_errors!( @formatted expected_non_const_input_variable { - args: (variable: String), + args: (variable: impl Display), msg: format!( "Expected input variable `{}` to be non-constant. Move input variable `{}` to [main] section of input file", variable, variable @@ -254,14 +257,14 @@ create_errors!( @formatted invalid_function_input_array { - args: (actual: String), + args: (actual: impl Display), msg: format!("Expected function input array, found `{}`", actual), help: None, } @formatted invalid_input_array_dimensions { - args: (expected: usize, actual: usize), + args: (expected: impl Display, actual: impl Display), msg: format!( "Input array dimensions mismatch expected {}, found array dimensions {}", expected, actual @@ -271,7 +274,7 @@ create_errors!( @formatted input_tuple_size_mismatch { - args: (expected: usize, actual: usize), + args: (expected: impl Display, actual: impl Display), msg: format!( "Input tuple size mismatch expected {}, found tuple with length {}", expected, actual @@ -281,21 +284,21 @@ create_errors!( @formatted invalid_function_input_tuple { - args: (actual: String), + args: (actual: impl Display), msg: format!("Expected function input tuple, found `{}`", actual), help: None, } @formatted function_input_not_found { - args: (function: String, expected: String), + args: (function: impl Display, expected: impl Display), msg: format!("function `{}` input {} not found", function, expected), help: None, } @formatted double_input_declaration { - args: (input_name: String), + args: (input_name: impl Display), msg: format!("Input variable {} declared twice", input_name), help: None, } @@ -309,7 +312,7 @@ create_errors!( @formatted output_mismatched_types { - args: (left: String, right: String), + args: (left: impl Display, right: impl Display), msg: format!( "Mismatched types. Expected register output type `{}`, found type `{}`.", left, right @@ -319,28 +322,28 @@ create_errors!( @backtraced output_file_error { - args: (error: ErrReport), + args: (error: impl ErrorArg), msg: error, help: None, } @backtraced output_file_io_error { - args: (error: ErrReport), + args: (error: impl ErrorArg), msg: error, help: None, } @backtraced output_file_cannot_read { - args: (path: std::path::PathBuf), + args: (path: impl Debug), msg: format!("Cannot read the provided ouput file - {:?}", path), help: None, } @backtraced output_file_cannot_remove { - args: (path: std::path::PathBuf), + args: (path: impl Debug), msg: format!("Cannot remove the provided ouput file - {:?}", path), help: None, } @@ -375,7 +378,7 @@ create_errors!( @formatted statement_array_assign_index_bounds { - args: (index: usize, length: usize), + args: (index: impl Display, length: impl Display), msg: format!( "Array assign index `{}` out of range for array of length `{}`", index, length @@ -385,7 +388,7 @@ create_errors!( @formatted statement_array_assign_range_order { - args: (start: usize, stop: usize, length: usize), + args: (start: impl Display, stop: impl Display, length: impl Display), msg: format!( "Array assign range `{}`..`{}` out of range for array of length `{}`", start, stop, length @@ -395,14 +398,14 @@ create_errors!( @formatted statement_conditional_boolean_fails_to_resolve_to_boolean { - args: (actual: String), + args: (actual: impl Display), msg: format!("If, else conditional must resolve to a boolean, found `{}`", actual), help: None, } @formatted statement_indicator_calculation { - args: (name: String), + args: (name: impl Display), msg: format!( "Constraint system failed to evaluate branch selection indicator `{}`", name @@ -412,7 +415,7 @@ create_errors!( @formatted statement_invalid_number_of_definitions { - args: (expected: usize, actual: usize), + args: (expected: impl Display, actual: impl Display), msg: format!( "Multiple definition statement expected {} return values, found {} values", expected, actual @@ -422,7 +425,7 @@ create_errors!( @formatted statement_multiple_definition { - args: (value: String), + args: (value: impl Display), msg: format!("cannot assign multiple variables to a single value: {}", value), help: None, } @@ -436,7 +439,7 @@ create_errors!( @formatted statement_no_returns { - args: (expected: String), + args: (expected: impl Display), msg: format!( "function expected `{}` return type but no valid branches returned a result", expected @@ -446,7 +449,7 @@ create_errors!( @formatted statement_select_fail { - args: (first: String, second: String), + args: (first: impl Display, second: impl Display), msg: format!( "Conditional select gadget failed to select between `{}` or `{}`", first, second @@ -463,7 +466,7 @@ create_errors!( @formatted statement_tuple_assign_index_bounds { - args: (index: usize, length: usize), + args: (index: impl Display, length: impl Display), msg: format!( "Tuple assign index `{}` out of range for tuple of length `{}`", index, length @@ -480,14 +483,14 @@ create_errors!( @formatted statement_undefined_variable { - args: (name: String), + args: (name: impl Display), msg: format!("Attempted to assign to unknown variable `{}`", name), help: None, } @formatted statement_undefined_circuit_variable { - args: (name: String), + args: (name: impl Display), msg: format!("Attempted to assign to unknown circuit member variable `{}`", name), help: None, } @@ -501,14 +504,14 @@ create_errors!( @formatted address_value_account_error { - args: (error: ErrReport), + args: (error: impl ErrorArg), msg: format!("account creation failed due to `{}`", error), help: None, } @formatted address_value_invalid_address { - args: (actual: String), + args: (actual: impl Display), msg: format!("expected address input type, found `{}`", actual), help: None, } @@ -522,7 +525,7 @@ create_errors!( @formatted boolean_value_cannot_enforce { - args: (operation: String, error: ErrReport), + args: (operation: impl Display, error: impl ErrorArg), msg: format!( "the boolean operation `{}` failed due to the synthesis error `{}`", operation, error, @@ -532,42 +535,42 @@ create_errors!( @formatted boolean_value_cannot_evaluate { - args: (operation: String), + args: (operation: impl Display), msg: format!("no implementation found for `{}`", operation), help: None, } @formatted boolean_value_invalid_boolean { - args: (actual: String), + args: (actual: impl Display), msg: format!("expected boolean input type, found `{}`", actual), help: None, } @formatted boolean_value_missing_boolean { - args: (expected: String), + args: (expected: impl Display), msg: format!("expected boolean input `{}` not found", expected), help: None, } @formatted char_value_invalid_char { - args: (actual: String), + args: (actual: impl Display), msg: format!("expected char element input type, found `{}`", actual), help: None, } @formatted field_value_negate_operation { - args: (error: ErrReport), + args: (error: impl ErrorArg), msg: format!("field negation failed due to synthesis error `{}`", error), help: None, } @formatted field_value_binary_operation { - args: (operation: String, error: ErrReport), + args: (operation: impl Display, error: impl ErrorArg), msg: format!( "the field binary operation `{}` failed due to synthesis error `{}`", operation, error, @@ -577,35 +580,35 @@ create_errors!( @formatted field_value_invalid_field { - args: (actual: String), + args: (actual: impl Display), msg: format!("expected field element input type, found `{}`", actual), help: None, } @formatted field_value_missing_field { - args: (expected: String), + args: (expected: impl Display), msg: format!("expected field input `{}` not found", expected), help: None, } @formatted field_value_no_inverse { - args: (field: String), + args: (field: impl Display), msg: format!("no multiplicative inverse found for field `{}`", field), help: None, } @formatted group_value_negate_operation { - args: (error: ErrReport), + args: (error: impl ErrorArg), msg: format!("group negation failed due to the synthesis error `{}`", error), help: None, } @formatted group_value_binary_operation { - args: (operation: String, error: ErrReport), + args: (operation: impl Display, error: impl ErrorArg), msg: format!( "the group binary operation `{}` failed due to the synthesis error `{}`", operation, error, @@ -615,42 +618,42 @@ create_errors!( @formatted group_value_invalid_group { - args: (actual: String), + args: (actual: impl Display), msg: format!("expected group affine point input type, found `{}`", actual), help: None, } @formatted group_value_missing_group { - args: (expected: String), + args: (expected: impl Display), msg: format!("expected group input `{}` not found", expected), help: None, } @formatted group_value_synthesis_error { - args: (error: ErrReport), + args: (error: impl ErrorArg), msg: format!("compilation failed due to group synthesis error `{}`", error), help: None, } @formatted group_value_x_invalid { - args: (x: String), + args: (x: impl Display), msg: format!("invalid x coordinate `{}`", x), help: None, } @formatted group_value_y_invalid { - args: (y: String), + args: (y: impl Display), msg: format!("invalid y coordinate `{}`", y), help: None, } @formatted group_value_not_on_curve { - args: (element: String), + args: (element: impl Display), msg: format!("group element `{}` is not on the supported curve", element), help: None, } @@ -671,21 +674,21 @@ create_errors!( @formatted group_value_n_group { - args: (number: String), + args: (number: impl Display), msg: format!("cannot multiply group generator by \"{}\"", number), help: None, } @formatted integer_value_signed { - args: (error: ErrReport), + args: (error: impl ErrorArg), msg: format!("integer operation failed due to the signed integer error `{}`", error), help: None, } @formatted integer_value_unsigned { - args: (error: ErrReport), + args: (error: impl ErrorArg), msg: format!( "integer operation failed due to the unsigned integer error `{}`", error @@ -695,7 +698,7 @@ create_errors!( @formatted integer_value_synthesis { - args: (error: ErrReport), + args: (error: impl ErrorArg), msg: format!("integer operation failed due to the synthesis error `{}`", error), help: None, } @@ -709,7 +712,7 @@ create_errors!( @formatted integer_value_binary_operation { - args: (operation: String), + args: (operation: impl Display), msg: format!( "the integer binary operation `{}` can only be enforced on integers of the same type", operation @@ -719,28 +722,28 @@ create_errors!( @formatted integer_value_integer_type_mismatch { - args: (expected: String, received: String), + args: (expected: impl Display, received: impl Display), msg: format!("expected data type `{}`, found `{}`", expected, received), help: None, } @formatted integer_value_invalid_integer { - args: (actual: String), + args: (actual: impl Display), msg: format!("failed to parse `{}` as expected integer type", actual), help: None, } @formatted integer_value_missing_integer { - args: (expected: String), + args: (expected: impl Display), msg: format!("expected integer input `{}` not found", expected), help: None, } @formatted integer_value_cannot_evaluate { - args: (operation: String), + args: (operation: impl Display), msg: format!("no implementation found for `{}`", operation), help: None, } diff --git a/errors/src/import/import_errors.rs b/errors/src/import/import_errors.rs index d01d36f34c..eaabadcd6f 100644 --- a/errors/src/import/import_errors.rs +++ b/errors/src/import/import_errors.rs @@ -16,6 +16,11 @@ use crate::create_errors; +use std::{ + error::Error as ErrorArg, + fmt::{Debug, Display}, +}; + create_errors!( ImportError, exit_code_mask: 3000u32, @@ -24,14 +29,14 @@ create_errors!( // An imported package has the same name as an imported core_package. @formatted conflicting_imports { - args: (name: &str), + args: (name: impl Display), msg: format!("conflicting imports found for `{}`.", name), help: None, } @formatted recursive_imports { - args: (package: &str), + args: (package: impl Display), msg: format!("recursive imports for `{}`.", package), help: None, } @@ -47,7 +52,7 @@ create_errors!( // Failed to find the directory of the current file. @formatted current_directory_error { - args: (error: std::io::Error), + args: (error: impl ErrorArg), msg: format!("Compilation failed trying to find current directory - {:?}.", error), help: None, } @@ -55,10 +60,10 @@ create_errors!( // Failed to open or get the name of a directory. @formatted directory_error { - args: (error: std::io::Error, path: &std::path::Path), + args: (error: impl ErrorArg, path:impl Debug), msg: format!( - "Compilation failed due to directory error @ '{}' - {:?}.", - path.to_str().unwrap_or_default(), + "Compilation failed due to directory error @ '{:?}' - {:?}.", + path, error ), help: None, @@ -67,15 +72,15 @@ create_errors!( // Failed to find a main file for the current package. @formatted expected_main_file { - args: (entry: String), - msg: format!("Expected main file at `{}`.", entry), + args: (entry: impl Debug), + msg: format!("Expected main file at `{:?}`.", entry), help: None, } // Failed to import a package name. @formatted unknown_package { - args: (name: &str), + args: (name: impl Display), msg: format!( "Cannot find imported package `{}` in source files or import directory.", name @@ -85,7 +90,7 @@ create_errors!( @formatted io_error { - args: (path: &str, error: std::io::Error), + args: (path: impl Display, error: impl ErrorArg), msg: format!("cannot read imported file '{}': {:?}", path, error), help: None, } diff --git a/errors/src/lib.rs b/errors/src/lib.rs index aff03bc907..1d1fcf3a11 100644 --- a/errors/src/lib.rs +++ b/errors/src/lib.rs @@ -47,8 +47,6 @@ extern crate thiserror; use leo_input::InputParserError; -use eyre::ErrReport; - #[derive(Debug, Error)] pub enum LeoError { #[error(transparent)] @@ -73,10 +71,28 @@ pub enum LeoError { ParserError(#[from] ParserError), #[error(transparent)] - RustError(#[from] ErrReport), + SnarkVMError(#[from] SnarkVMError), #[error(transparent)] - SnarkVMError(#[from] SnarkVMError), + StateError(#[from] StateError), +} + +impl LeoError { + pub fn exit_code(&self) -> u32 { + use LeoError::*; + + match self { + AsgError(error) => error.exit_code(), + AstError(error) => error.exit_code(), + CompilerError(error) => error.exit_code(), + ImportError(error) => error.exit_code(), + InputError(_error) => 0, // TODO migrate me. + PackageError(error) => error.exit_code(), + ParserError(error) => error.exit_code(), + SnarkVMError(_error) => 0, // TODO update once snarkvm implments a global top level error similar to LeoError. + StateError(error) => error.exit_code(), + } + } } // #[test] diff --git a/errors/src/package/package_errors.rs b/errors/src/package/package_errors.rs index 3a84b4927f..719f8b03c0 100644 --- a/errors/src/package/package_errors.rs +++ b/errors/src/package/package_errors.rs @@ -15,9 +15,11 @@ // along with the Leo library. If not, see . use crate::create_errors; -use std::{ffi::OsString, path::PathBuf}; -use eyre::ErrReport; +use std::{ + error::Error as ErrorArg, + fmt::{Debug, Display}, +}; create_errors!( PackageError, @@ -26,399 +28,399 @@ create_errors!( @backtraced failed_to_create_imports_directory { - args: (error: ErrReport), + args: (error: impl ErrorArg), msg: format!("failed creating imports directory {}", error), help: None, } @backtraced import_does_not_exist { - args: (package: String), + args: (package: impl Display), msg: format!("package {} does not exist as an import", package), help: None, } @backtraced failed_to_remove_imports_directory { - args: (error: ErrReport), + args: (error: impl ErrorArg), msg: format!("failed removing imports directory {}", error), help: None, } @backtraced failed_to_create_inputs_directory { - args: (error: ErrReport), + args: (error: impl ErrorArg), msg: format!("failed creating inputs directory {}", error), help: None, } @backtraced failed_to_get_input_file_entry { - args: (error: ErrReport), + args: (error: impl ErrorArg), msg: format!("failed to get input file entry: {}", error), help: None, } @backtraced failed_to_get_input_file_name { - args: (file: OsString), + args: (file: impl Debug), msg: format!("failed to get input file name: {:?}", file), help: None, } @backtraced failed_to_get_input_file_type { - args: (file: OsString, error: ErrReport), + args: (file: impl Debug, error: impl ErrorArg), msg: format!("failed to get input file `{:?}` type: {}", file, error), help: None, } @backtraced invalid_input_file_type { - args: (file: OsString, type_: std::fs::FileType), + args: (file: impl Debug, type_: std::fs::FileType), msg: format!("input file `{:?}` has invalid type: {:?}", file, type_), help: None, } @backtraced failed_to_read_inputs_directory { - args: (error: ErrReport), + args: (error: impl ErrorArg), msg: format!("failed reading inputs directory {}", error), help: None, } @backtraced failed_to_read_input_file { - args: (path: PathBuf), + args: (path: impl Debug), msg: format!("Cannot read input file from the provided file path - {:?}", path), help: None, } @backtraced io_error_input_file { - args: (error: ErrReport), + args: (error: impl ErrorArg), msg: format!("IO error input file from the provided file path - {}", error), help: None, } @backtraced failed_to_read_state_file { - args: (path: PathBuf), + args: (path: impl Debug), msg: format!("Cannot read state file from the provided file path - {:?}", path), help: None, } @backtraced io_error_state_file { - args: (error: ErrReport), + args: (error: impl ErrorArg), msg: format!("IO error state file from the provided file path - {}", error), help: None, } @backtraced failed_to_read_checksum_file { - args: (path: PathBuf), + args: (path: impl Debug), msg: format!("Cannot read checksum file from the provided file path - {:?}", path), help: None, } @backtraced failed_to_remove_checksum_file { - args: (path: PathBuf), + args: (path: impl Debug), msg: format!("Cannot remove checksum file from the provided file path - {:?}", path), help: None, } @backtraced io_error_checksum_file { - args: (error: ErrReport), + args: (error: impl ErrorArg), msg: format!("IO cannot read checksum file from the provided file path - {}", error), help: None, } @backtraced failed_to_read_circuit_file { - args: (path: PathBuf), + args: (path: impl Debug), msg: format!("Cannot read circuit file from the provided file path - {:?}", path), help: None, } @backtraced failed_to_remove_circuit_file { - args: (path: PathBuf), + args: (path: impl Debug), msg: format!("Cannot remove circuit file from the provided file path - {:?}", path), help: None, } @backtraced io_error_circuit_file { - args: (error: ErrReport), + args: (error: impl ErrorArg), msg: format!("IO error circuit file from the provided file path - {}", error), help: None, } @backtraced failed_to_create_outputs_directory { - args: (error: ErrReport), + args: (error: impl ErrorArg), msg: format!("failed creating outputs directory {}", error), help: None, } @backtraced failed_to_remove_outputs_directory { - args: (error: ErrReport), + args: (error: impl ErrorArg), msg: format!("failed removing outputs directory {}", error), help: None, } @backtraced failed_to_read_proof_file { - args: (path: PathBuf), + args: (path: impl Debug), msg: format!("Cannot read proof file from the provided file path - {:?}", path), help: None, } @backtraced failed_to_remove_proof_file { - args: (path: PathBuf), + args: (path: impl Debug), msg: format!("Cannot remove proof file from the provided file path - {:?}", path), help: None, } @backtraced io_error_proof_file { - args: (error: ErrReport), + args: (error: impl ErrorArg), msg: format!("IO error proof file from the provided file path - {}", error), help: None, } @backtraced failed_to_read_proving_key_file { - args: (path: PathBuf), + args: (path: impl Debug), msg: format!("Cannot read prooving key file from the provided file path - {:?}", path), help: None, } @backtraced failed_to_remove_proving_key_file { - args: (path: PathBuf), + args: (path: impl Debug), msg: format!("Cannot remove prooving key file from the provided file path - {:?}", path), help: None, } @backtraced io_error_proving_key_file { - args: (error: ErrReport), + args: (error: impl ErrorArg), msg: format!("IO error prooving key file from the provided file path - {}", error), help: None, } @backtraced failed_to_read_verification_key_file { - args: (path: PathBuf), + args: (path: impl Debug), msg: format!("Cannot read verification key file from the provided file path - {:?}", path), help: None, } @backtraced failed_to_remove_verification_key_file { - args: (path: PathBuf), + args: (path: impl Debug), msg: format!("Cannot remove verification key file from the provided file path - {:?}", path), help: None, } @backtraced io_error_verification_key_file { - args: (error: ErrReport), + args: (error: impl ErrorArg), msg: format!("IO error verification key file from the provided file path - {}", error), help: None, } @backtraced io_error_gitignore_file { - args: (error: ErrReport), + args: (error: impl ErrorArg), msg: format!("IO error gitignore file from the provided file path - {}", error), help: None, } @backtraced failed_to_create_manifest_file { - args: (filename: &str, error: ErrReport), + args: (filename: impl Display, error: impl ErrorArg), msg: format!("failed creating manifest file `{}` {}", filename, error), help: None, } @backtraced failed_to_get_manifest_metadata_file { - args: (filename: &str, error: ErrReport), + args: (filename: impl Display, error: impl ErrorArg), msg: format!("failed getting manifest file metadata `{}` {}", filename, error), help: None, } @backtraced failed_to_open_manifest_file { - args: (filename: &str, error: ErrReport), + args: (filename: impl Display, error: impl ErrorArg), msg: format!("failed openining manifest file `{}` {}", filename, error), help: None, } @backtraced failed_to_parse_manifest_file { - args: (filename: &str, error: ErrReport), + args: (filename: impl Display, error: impl ErrorArg), msg: format!("failed parsing manifest file `{}` {}", filename, error), help: None, } @backtraced failed_to_read_manifest_file { - args: (filename: &str, error: ErrReport), + args: (filename: impl Display, error: impl ErrorArg), msg: format!("failed reading manifest file `{}` {}", filename, error), help: None, } @backtraced failed_to_write_manifest_file { - args: (filename: &str, error: ErrReport), + args: (filename: impl Display, error: impl ErrorArg), msg: format!("failed writing manifest file `{}` {}", filename, error), help: None, } @backtraced io_error_manifest_file { - args: (error: ErrReport), + args: (error: impl ErrorArg), msg: format!("IO error manifest file from the provided file path - {}", error), help: None, } @backtraced io_error_readme_file { - args: (error: ErrReport), + args: (error: impl ErrorArg), msg: format!("IO error readme file from the provided file path - {}", error), help: None, } @backtraced failed_to_create_zip_file { - args: (error: ErrReport), + args: (error: impl ErrorArg), msg: format!("failed creating zip file {}", error), help: None, } @backtraced failed_to_open_zip_file { - args: (error: ErrReport), + args: (error: impl ErrorArg), msg: format!("failed opening zip file {}", error), help: None, } @backtraced failed_to_read_zip_file { - args: (error: ErrReport), + args: (error: impl ErrorArg), msg: format!("failed reading zip file {}", error), help: None, } @backtraced failed_to_write_zip_file { - args: (error: ErrReport), + args: (error: impl ErrorArg), msg: format!("failed writing zip file {}", error), help: None, } @backtraced failed_to_remove_zip_file { - args: (path: PathBuf), + args: (path: impl Debug), msg: format!("failed removing zip file from the provided file path - {:?}", path), help: None, } @backtraced failed_to_zip { - args: (error: ErrReport), + args: (error: impl ErrorArg), msg: error, help: None, } @backtraced io_error_zip_file { - args: (error: ErrReport), + args: (error: impl ErrorArg), msg: format!("IO error zip file from the provided file path - {}", error), help: None, } @backtraced io_error_library_file { - args: (error: ErrReport), + args: (error: impl ErrorArg), msg: format!("IO error library file from the provided file path - {}", error), help: None, } @backtraced io_error_main_file { - args: (error: ErrReport), + args: (error: impl ErrorArg), msg: format!("IO error main file from the provided file path - {}", error), help: None, } @backtraced failed_to_create_source_directory { - args: (error: ErrReport), + args: (error: impl ErrorArg), msg: format!("failed creating source directory {}", error), help: None, } @backtraced failed_to_get_source_file_entry { - args: (error: ErrReport), + args: (error: impl ErrorArg), msg: format!("failed to get input file entry: {}", error), help: None, } @backtraced failed_to_get_source_file_extension { - args: (extension: OsString), + args: (extension: impl Debug), msg: format!("failed to get source file extension: {:?}", extension), help: None, } @backtraced failed_to_get_source_file_type { - args: (file: OsString, error: ErrReport), + args: (file: impl Debug, error: impl ErrorArg), msg: format!("failed to get source file `{:?}` type: {}", file, error), help: None, } @backtraced invalid_source_file_extension { - args: (file: OsString, extension: OsString), + args: (file: impl Debug, extension: impl Debug), msg: format!("source file `{:?}` has invalid extension: {:?}", file, extension), help: None, } @backtraced invalid_source_file_type { - args: (file: OsString, type_: std::fs::FileType), + args: (file: impl Debug, type_: std::fs::FileType), msg: format!("source file `{:?}` has invalid type: {:?}", file, type_), help: None, } @backtraced failed_to_read_source_directory { - args: (error: ErrReport), + args: (error: impl ErrorArg), msg: format!("failed reading source directory {}", error), help: None, } @backtraced failed_to_initialize_package { - args: (package: String, path: OsString), + args: (package: impl Display, path: impl Debug), msg: format!("failed to initialize package {} {:?}", package, path), help: None, } @backtraced invalid_package_name { - args: (package: String), + args: (package: impl Display), msg: format!("invalid project name {}", package), help: None, } diff --git a/errors/src/parser/parser_errors.rs b/errors/src/parser/parser_errors.rs index 4792dcea16..bb192d79eb 100644 --- a/errors/src/parser/parser_errors.rs +++ b/errors/src/parser/parser_errors.rs @@ -16,6 +16,8 @@ use crate::create_errors; +use std::fmt::Display; + create_errors!( ParserError, exit_code_mask: 5000u32, @@ -23,14 +25,14 @@ create_errors!( @formatted unexpected_token { - args: (message: String, help: String), + args: (message: impl Display, help: String), msg: message, help: Some(help), } @formatted invalid_address_lit { - args: (token: &str), + args: (token: impl Display), msg: format!("invalid address literal: '{}'", token), help: None, } @@ -51,14 +53,14 @@ create_errors!( @formatted unexpected_whitespace { - args: (left: &str, right: &str), + args: (left: impl Display, right: impl Display), msg: format!("Unexpected white space between terms {} and {}", left, right), help: None, } @formatted unexpected { - args: (got: String, expected: String), + args: (got: impl Display, expected: impl Display), msg: format!("expected {} -- got '{}'", expected, got), help: None, } @@ -72,7 +74,7 @@ create_errors!( @formatted unexpected_ident { - args: (got: &str, expected: &[&str]), + args: (got: impl Display, expected: &[impl Display]), msg: format!( "unexpected identifier: expected {} -- got '{}'", expected @@ -87,14 +89,14 @@ create_errors!( @formatted unexpected_statement { - args: (got: String, expected: &str), + args: (got: impl Display, expected: impl Display), msg: format!("unexpected statement: expected '{}', got '{}'", expected, got), help: None, } @formatted unexpected_str { - args: (got: String, expected: &str), + args: (got: impl Display, expected: impl Display), msg: format!("unexpected string: expected '{}', got '{}'", expected, got), help: None, } diff --git a/imports/src/parser/import_parser.rs b/imports/src/parser/import_parser.rs index d4ed1edf27..163e789bcc 100644 --- a/imports/src/parser/import_parser.rs +++ b/imports/src/parser/import_parser.rs @@ -50,7 +50,7 @@ impl<'a> ImportResolver<'a> for ImportParser<'a> { ) -> Result>, LeoError> { let full_path = package_segments.join("."); if self.partial_imports.contains(&full_path) { - return Err(LeoError::from(ImportError::recursive_imports(&full_path, span))); + return Err(ImportError::recursive_imports(full_path, span).into()); } if let Some(program) = self.imports.get(&full_path) { return Ok(Some(program.clone())); diff --git a/imports/src/parser/parse_package.rs b/imports/src/parser/parse_package.rs index f2be60ce71..1d3b39fe55 100644 --- a/imports/src/parser/parse_package.rs +++ b/imports/src/parser/parse_package.rs @@ -83,9 +83,9 @@ impl<'a> ImportParser<'a> { // Get a vector of all packages in the source directory. let entries = fs::read_dir(path) - .map_err(|error| LeoError::from(ImportError::directory_error(error, &error_path, span)))? + .map_err(|error| ImportError::directory_error(error, &error_path, span))? .collect::, std::io::Error>>() - .map_err(|error| LeoError::from(ImportError::directory_error(error, &error_path, span)))?; + .map_err(|error| ImportError::directory_error(error, &error_path, span))?; // Check if the imported package name is in the source directory. let matched_source_entry = entries.into_iter().find(|entry| { @@ -100,9 +100,9 @@ impl<'a> ImportParser<'a> { if imports_directory.exists() { // Get a vector of all packages in the imports directory. let entries = fs::read_dir(imports_directory) - .map_err(|error| LeoError::from(ImportError::directory_error(error, &error_path, span)))? + .map_err(|error| ImportError::directory_error(error, &error_path, span))? .collect::, std::io::Error>>() - .map_err(|error| LeoError::from(ImportError::directory_error(error, &error_path, span)))?; + .map_err(|error| ImportError::directory_error(error, error_path, span))?; // Check if the imported package name is in the imports directory. let matched_import_entry = entries @@ -111,16 +111,16 @@ impl<'a> ImportParser<'a> { // Check if the package name was found in both the source and imports directory. match (matched_source_entry, matched_import_entry) { - (Some(_), Some(_)) => Err(LeoError::from(ImportError::conflicting_imports(package_name, span))), + (Some(_), Some(_)) => Err(ImportError::conflicting_imports(package_name, span).into()), (Some(source_entry), None) => self.parse_package_access(context, &source_entry, &segments[1..], span), (None, Some(import_entry)) => self.parse_package_access(context, &import_entry, &segments[1..], span), - (None, None) => Err(LeoError::from(ImportError::unknown_package(package_name, span))), + (None, None) => Err(ImportError::unknown_package(package_name, span).into()), } } else { // Enforce local package access with no found imports directory match matched_source_entry { Some(source_entry) => self.parse_package_access(context, &source_entry, &segments[1..], span), - None => Err(LeoError::from(ImportError::unknown_package(package_name, span))), + None => Err(ImportError::unknown_package(package_name, span).into()), } } } diff --git a/imports/src/parser/parse_symbol.rs b/imports/src/parser/parse_symbol.rs index 3c43615f46..2863f437c0 100644 --- a/imports/src/parser/parse_symbol.rs +++ b/imports/src/parser/parse_symbol.rs @@ -32,29 +32,26 @@ impl<'a> ImportParser<'a> { // Get the package file type. let file_type = package .file_type() - .map_err(|error| LeoError::from(ImportError::directory_error(error, &package.path(), span)))?; + .map_err(|error| ImportError::directory_error(error, package.path(), span))?; let file_name = package .file_name() .into_string() - .map_err(|_| LeoError::from(ImportError::convert_os_string(span)))?; + .map_err(|_| ImportError::convert_os_string(span))?; let mut file_path = package.path(); if file_type.is_dir() { file_path.push(MAIN_FILE); if !file_path.exists() { - return Err(LeoError::from(ImportError::expected_main_file( - format!("{:?}", file_path.as_path()), - span, - ))); + return Err(ImportError::expected_main_file(file_path.as_path(), span).into()); } } let file_path_str = file_path.to_str().unwrap_or_default(); // Build the package abstract syntax tree. - let program_string = &std::fs::read_to_string(&file_path) - .map_err(|x| LeoError::from(ImportError::io_error(file_path_str, x, span)))?; + let program_string = + &std::fs::read_to_string(&file_path).map_err(|x| ImportError::io_error(file_path_str, x, span))?; let mut program = leo_parser::parse(file_path_str, program_string)?; program.name = file_name; let mut ast = leo_ast::Ast::new(program); diff --git a/leo/main.rs b/leo/main.rs index 5b633f1634..a71589459e 100644 --- a/leo/main.rs +++ b/leo/main.rs @@ -38,6 +38,7 @@ use commands::{ Watch, }; +// TODO remove anyhow::Result for a LeoResult use anyhow::Result; use colored::Colorize; use std::{path::PathBuf, process::exit}; diff --git a/package/Cargo.toml b/package/Cargo.toml index d8f051020a..507d05acf4 100644 --- a/package/Cargo.toml +++ b/package/Cargo.toml @@ -21,10 +21,6 @@ edition = "2018" path = "../errors" version = "1.5.3" -[dependencies.eyre] -version = "0.6.5" -default-features = false - [dependencies.backtrace] version = "0.3.61" diff --git a/package/src/imports/directory.rs b/package/src/imports/directory.rs index 82ef4afe75..c7db6cbaef 100644 --- a/package/src/imports/directory.rs +++ b/package/src/imports/directory.rs @@ -19,7 +19,6 @@ use leo_errors::{LeoError, PackageError}; use std::{borrow::Cow, fs, path::Path}; use backtrace::Backtrace; -use eyre::eyre; pub static IMPORTS_DIRECTORY_NAME: &str = "imports/"; @@ -33,8 +32,8 @@ impl ImportsDirectory { path.to_mut().push(IMPORTS_DIRECTORY_NAME); } - fs::create_dir_all(&path) - .map_err(|e| PackageError::failed_to_create_imports_directory(eyre!(e), Backtrace::new()).into()) + fs::create_dir_all(&path).map_err(|e| PackageError::failed_to_create_imports_directory(e, Backtrace::new()))?; + Ok(()) } /// Removes an imported package in the imports directory at the provided path. @@ -47,11 +46,10 @@ impl ImportsDirectory { path.to_mut().push(package_name); if !path.exists() || !path.is_dir() { - return Err(PackageError::import_does_not_exist(package_name.into(), Backtrace::new()).into()); + return Err(PackageError::import_does_not_exist(package_name, Backtrace::new()))?; } - fs::remove_dir_all(&path) - .map_err(|e| PackageError::failed_to_remove_imports_directory(eyre!(e), Backtrace::new()))?; + fs::remove_dir_all(&path).map_err(|e| PackageError::failed_to_remove_imports_directory(e, Backtrace::new()))?; Ok(()) } diff --git a/package/src/inputs/directory.rs b/package/src/inputs/directory.rs index 3b85b1aaee..0aec0af922 100644 --- a/package/src/inputs/directory.rs +++ b/package/src/inputs/directory.rs @@ -24,7 +24,6 @@ use std::{ }; use backtrace::Backtrace; -use eyre::eyre; pub static INPUTS_DIRECTORY_NAME: &str = "inputs/"; @@ -38,8 +37,8 @@ impl InputsDirectory { path.to_mut().push(INPUTS_DIRECTORY_NAME); } - fs::create_dir_all(&path) - .map_err(|e| PackageError::failed_to_create_inputs_directory(eyre!(e), Backtrace::new()).into()) + fs::create_dir_all(&path).map_err(|e| PackageError::failed_to_create_inputs_directory(e, Backtrace::new()))?; + Ok(()) } /// Returns a list of files in the input directory. @@ -47,12 +46,8 @@ impl InputsDirectory { let mut path = path.to_owned(); path.push(INPUTS_DIRECTORY_NAME); - // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. - let directory = match fs::read_dir(&path) { - Ok(read_dir) => read_dir, - Err(e) => return Err(PackageError::failed_to_read_inputs_directory(eyre!(e), Backtrace::new()).into()), - }; - + let directory = + fs::read_dir(&path).map_err(|e| PackageError::failed_to_read_inputs_directory(e, Backtrace::new()))?; let mut file_paths = Vec::new(); parse_file_paths(directory, &mut file_paths)?; @@ -62,23 +57,16 @@ impl InputsDirectory { fn parse_file_paths(directory: ReadDir, file_paths: &mut Vec) -> Result<(), LeoError> { for file_entry in directory.into_iter() { - // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. - let file_entry = match file_entry { - Ok(dir_entry) => dir_entry, - Err(e) => return Err(PackageError::failed_to_get_input_file_entry(eyre!(e), Backtrace::new()).into()), - }; + let file_entry = file_entry.map_err(|e| PackageError::failed_to_get_input_file_entry(e, Backtrace::new()))?; let file_path = file_entry.path(); // Verify that the entry is structured as a valid file or directory let file_type = file_entry.file_type().map_err(|e| { - PackageError::failed_to_get_input_file_type(file_path.as_os_str().to_owned(), eyre!(e), Backtrace::new()) + PackageError::failed_to_get_input_file_type(file_path.as_os_str().to_owned(), e, Backtrace::new()) })?; if file_type.is_dir() { - // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. - let directory = match fs::read_dir(&file_path) { - Ok(read_dir) => read_dir, - Err(e) => return Err(PackageError::failed_to_read_inputs_directory(eyre!(e), Backtrace::new()).into()), - }; + let directory = fs::read_dir(&file_path) + .map_err(|e| PackageError::failed_to_read_inputs_directory(e, Backtrace::new()))?; parse_file_paths(directory, file_paths)?; continue; @@ -87,8 +75,7 @@ fn parse_file_paths(directory: ReadDir, file_paths: &mut Vec) -> Result file_path.as_os_str().to_owned(), file_type, Backtrace::new(), - ) - .into()); + ))?; } file_paths.push(file_path); diff --git a/package/src/inputs/input.rs b/package/src/inputs/input.rs index a51a31a705..15fc95c751 100644 --- a/package/src/inputs/input.rs +++ b/package/src/inputs/input.rs @@ -21,7 +21,6 @@ use crate::inputs::INPUTS_DIRECTORY_NAME; use leo_errors::{LeoError, PackageError}; use backtrace::Backtrace; -use eyre::eyre; use serde::Deserialize; use std::{ borrow::Cow, @@ -60,27 +59,19 @@ impl InputFile { pub fn read_from<'a>(&self, path: &'a Path) -> Result<(String, Cow<'a, Path>), LeoError> { let path = self.setup_file_path(path); - match fs::read_to_string(&path) { - Ok(input) => Ok((input, path)), - Err(_) => Err(PackageError::failed_to_read_input_file(path.into_owned(), Backtrace::new()).into()), - } + let input = fs::read_to_string(&path) + .map_err(|_| PackageError::failed_to_read_input_file(path.clone().into_owned(), Backtrace::new()))?; + Ok((input, path)) } /// Writes the standard input format to a file. pub fn write_to(self, path: &Path) -> Result<(), LeoError> { let path = self.setup_file_path(path); + let mut file = File::create(&path).map_err(|e| PackageError::io_error_input_file(e, Backtrace::new()))?; - // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. - let mut file = match File::create(&path) { - Ok(file) => file, - Err(e) => return Err(PackageError::io_error_input_file(eyre!(e), Backtrace::new()).into()), - }; - - // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. - match file.write_all(self.template().as_bytes()) { - Ok(_) => Ok(()), - Err(e) => Err(PackageError::io_error_input_file(eyre!(e), Backtrace::new()).into()), - } + file.write_all(self.template().as_bytes()) + .map_err(|e| PackageError::io_error_input_file(e, Backtrace::new()))?; + Ok(()) } fn template(&self) -> String { diff --git a/package/src/inputs/pairs.rs b/package/src/inputs/pairs.rs index adf1acbdcf..c68b531329 100644 --- a/package/src/inputs/pairs.rs +++ b/package/src/inputs/pairs.rs @@ -61,18 +61,16 @@ impl TryFrom<&Path> for InputPairs { Some(file_name) => file_name, None => { return Err(PackageError::failed_to_get_input_file_name( - file.as_os_str().to_owned(), + file.as_os_str(), Backtrace::new(), - ) - .into()); + ))?; } }, None => { return Err(PackageError::failed_to_get_input_file_name( - file.as_os_str().to_owned(), + file.as_os_str(), Backtrace::new(), - ) - .into()); + ))?; } }; diff --git a/package/src/inputs/state.rs b/package/src/inputs/state.rs index 18f8dd420f..588c33fc8d 100644 --- a/package/src/inputs/state.rs +++ b/package/src/inputs/state.rs @@ -20,7 +20,6 @@ use crate::inputs::INPUTS_DIRECTORY_NAME; use leo_errors::{LeoError, PackageError}; use backtrace::Backtrace; -use eyre::eyre; use serde::Deserialize; use std::{ borrow::Cow, @@ -59,27 +58,19 @@ impl StateFile { pub fn read_from<'a>(&self, path: &'a Path) -> Result<(String, Cow<'a, Path>), LeoError> { let path = self.setup_file_path(path); - match fs::read_to_string(&path) { - Ok(input) => Ok((input, path)), - Err(_) => Err(PackageError::failed_to_read_state_file(path.into_owned(), Backtrace::new()).into()), - } + let input = fs::read_to_string(&path) + .map_err(|_| PackageError::failed_to_read_state_file(path.clone().into_owned(), Backtrace::new()))?; + Ok((input, path)) } /// Writes the standard input format to a file. pub fn write_to(self, path: &Path) -> Result<(), LeoError> { let path = self.setup_file_path(path); + let mut file = File::create(&path).map_err(|e| PackageError::io_error_state_file(e, Backtrace::new()))?; - // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. - let mut file = match File::create(&path) { - Ok(file) => file, - Err(e) => return Err(PackageError::io_error_state_file(eyre!(e), Backtrace::new()).into()), - }; - - // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. - match file.write_all(self.template().as_bytes()) { - Ok(_) => Ok(()), - Err(e) => Err(PackageError::io_error_state_file(eyre!(e), Backtrace::new()).into()), - } + Ok(file + .write_all(self.template().as_bytes()) + .map_err(|e| PackageError::io_error_state_file(e, Backtrace::new()))?) } fn template(&self) -> String { diff --git a/package/src/outputs/checksum.rs b/package/src/outputs/checksum.rs index 59c31eb9fd..f93ad885ef 100644 --- a/package/src/outputs/checksum.rs +++ b/package/src/outputs/checksum.rs @@ -20,7 +20,6 @@ use crate::outputs::OUTPUTS_DIRECTORY_NAME; use leo_errors::{LeoError, PackageError}; use backtrace::Backtrace; -use eyre::eyre; use serde::Deserialize; use std::{ borrow::Cow, @@ -55,25 +54,19 @@ impl ChecksumFile { pub fn read_from(&self, path: &Path) -> Result { let path = self.setup_file_path(path); - fs::read_to_string(&path) - .map_err(|_| PackageError::failed_to_read_checksum_file(path.into_owned(), Backtrace::new()).into()) + let string = fs::read_to_string(&path) + .map_err(|_| PackageError::failed_to_read_checksum_file(path.into_owned(), Backtrace::new()))?; + Ok(string) } /// Writes the given checksum to a file. pub fn write_to(&self, path: &Path, checksum: String) -> Result<(), LeoError> { let path = self.setup_file_path(path); + let mut file = File::create(&path).map_err(|e| PackageError::io_error_checksum_file(e, Backtrace::new()))?; - // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. - let mut file = match File::create(&path) { - Ok(file) => file, - Err(e) => return Err(PackageError::io_error_checksum_file(eyre!(e), Backtrace::new()).into()), - }; - - // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. - match file.write_all(checksum.as_bytes()) { - Ok(v) => Ok(v), - Err(e) => Err(PackageError::io_error_checksum_file(eyre!(e), Backtrace::new()).into()), - } + file.write_all(checksum.as_bytes()) + .map_err(|e| PackageError::io_error_checksum_file(e, Backtrace::new()))?; + Ok(()) } /// Removes the checksum at the given path if it exists. Returns `true` on success, @@ -84,11 +77,9 @@ impl ChecksumFile { return Ok(false); } - // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. - match fs::remove_file(&path) { - Ok(_) => Ok(true), - Err(_) => Err(PackageError::failed_to_remove_checksum_file(path.into_owned(), Backtrace::new()).into()), - } + fs::remove_file(&path) + .map_err(|_| PackageError::failed_to_remove_checksum_file(path.into_owned(), Backtrace::new()))?; + Ok(true) } fn setup_file_path<'a>(&self, path: &'a Path) -> Cow<'a, Path> { diff --git a/package/src/outputs/circuit.rs b/package/src/outputs/circuit.rs index 62a161043c..42601616d2 100644 --- a/package/src/outputs/circuit.rs +++ b/package/src/outputs/circuit.rs @@ -20,7 +20,6 @@ use crate::outputs::OUTPUTS_DIRECTORY_NAME; use leo_errors::{LeoError, PackageError}; use backtrace::Backtrace; -use eyre::eyre; use serde::Deserialize; use std::{ borrow::Cow, @@ -55,25 +54,19 @@ impl CircuitFile { pub fn read_from(&self, path: &Path) -> Result { let path = self.setup_file_path(path); - fs::read_to_string(&path) - .map_err(|_| PackageError::failed_to_read_circuit_file(path.into_owned(), Backtrace::new()).into()) + let string = fs::read_to_string(&path) + .map_err(|_| PackageError::failed_to_read_circuit_file(path.into_owned(), Backtrace::new()))?; + Ok(string) } /// Writes the given serialized circuit to a file. pub fn write_to(&self, path: &Path, circuit: String) -> Result<(), LeoError> { let path = self.setup_file_path(path); + let mut file = File::create(&path).map_err(|e| PackageError::io_error_circuit_file(e, Backtrace::new()))?; - // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. - let mut file = match File::create(&path) { - Ok(file) => file, - Err(e) => return Err(PackageError::io_error_circuit_file(eyre!(e), Backtrace::new()).into()), - }; - - // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. - match file.write_all(circuit.as_bytes()) { - Ok(_) => Ok(()), - Err(e) => Err(PackageError::io_error_circuit_file(eyre!(e), Backtrace::new()).into()), - } + file.write_all(circuit.as_bytes()) + .map_err(|e| PackageError::io_error_circuit_file(e, Backtrace::new()))?; + Ok(()) } /// Removes the serialized circuit at the given path if it exists. Returns `true` on success, @@ -84,11 +77,8 @@ impl CircuitFile { return Ok(false); } - // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. - match fs::remove_file(&path) { - Ok(_) => Ok(true), - Err(_) => Err(PackageError::failed_to_remove_circuit_file(path.into_owned(), Backtrace::new()).into()), - } + fs::remove_file(&path).map_err(|_| PackageError::failed_to_remove_circuit_file(path, Backtrace::new()))?; + Ok(true) } fn setup_file_path<'a>(&self, path: &'a Path) -> Cow<'a, Path> { diff --git a/package/src/outputs/directory.rs b/package/src/outputs/directory.rs index 05088d92c1..4fb3898803 100644 --- a/package/src/outputs/directory.rs +++ b/package/src/outputs/directory.rs @@ -17,7 +17,6 @@ use leo_errors::{LeoError, PackageError}; use backtrace::Backtrace; -use eyre::eyre; use std::{borrow::Cow, fs, path::Path}; pub static OUTPUTS_DIRECTORY_NAME: &str = "outputs/"; @@ -32,8 +31,8 @@ impl OutputsDirectory { path.to_mut().push(OUTPUTS_DIRECTORY_NAME); } - fs::create_dir_all(&path) - .map_err(|e| PackageError::failed_to_create_inputs_directory(eyre!(e), Backtrace::new()).into()) + fs::create_dir_all(&path).map_err(|e| PackageError::failed_to_create_inputs_directory(e, Backtrace::new()))?; + Ok(()) } /// Removes the directory at the provided path. @@ -44,9 +43,8 @@ impl OutputsDirectory { } if path.exists() { - if let Err(e) = fs::remove_dir_all(&path) { - return Err(PackageError::failed_to_create_inputs_directory(eyre!(e), Backtrace::new()).into()); - } + fs::remove_dir_all(&path) + .map_err(|e| PackageError::failed_to_create_inputs_directory(e, Backtrace::new()))?; } Ok(()) diff --git a/package/src/outputs/proof.rs b/package/src/outputs/proof.rs index 6150c07dcc..d4fd3ff83b 100644 --- a/package/src/outputs/proof.rs +++ b/package/src/outputs/proof.rs @@ -20,7 +20,6 @@ use crate::outputs::OUTPUTS_DIRECTORY_NAME; use leo_errors::{LeoError, PackageError}; use backtrace::Backtrace; -use eyre::eyre; use serde::Deserialize; use std::{ borrow::Cow, @@ -55,25 +54,18 @@ impl ProofFile { pub fn read_from(&self, path: &Path) -> Result { let path = self.setup_file_path(path); - fs::read_to_string(&path) - .map_err(|_| PackageError::failed_to_read_proof_file(path.into_owned(), Backtrace::new()).into()) + let string = fs::read_to_string(&path) + .map_err(|_| PackageError::failed_to_read_proof_file(path.into_owned(), Backtrace::new()))?; + Ok(string) } /// Writes the given proof to a file. pub fn write_to(&self, path: &Path, proof: &[u8]) -> Result<(), LeoError> { let path = self.setup_file_path(path); + let mut file = File::create(&path).map_err(|e| PackageError::io_error_proof_file(e, Backtrace::new()))?; - // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. - let mut file = match File::create(&path) { - Ok(file) => file, - Err(e) => return Err(PackageError::io_error_proof_file(eyre!(e), Backtrace::new()).into()), - }; - - // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. - if let Err(e) = file.write_all(proof) { - return Err(PackageError::io_error_proof_file(eyre!(e), Backtrace::new()).into()); - }; - + file.write_all(proof) + .map_err(|e| PackageError::io_error_proof_file(e, Backtrace::new()))?; tracing::info!("Saving proof... ({:?})", path); Ok(()) @@ -87,11 +79,8 @@ impl ProofFile { return Ok(false); } - // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. - match fs::remove_file(&path) { - Ok(_) => Ok(true), - Err(_) => Err(PackageError::failed_to_remove_proof_file(path.into_owned(), Backtrace::new()).into()), - } + fs::remove_file(&path).map_err(|_| PackageError::failed_to_remove_proof_file(path, Backtrace::new()))?; + Ok(true) } fn setup_file_path<'a>(&self, path: &'a Path) -> Cow<'a, Path> { diff --git a/package/src/outputs/proving_key.rs b/package/src/outputs/proving_key.rs index 30b0577073..0cba0066cb 100644 --- a/package/src/outputs/proving_key.rs +++ b/package/src/outputs/proving_key.rs @@ -20,7 +20,6 @@ use crate::outputs::OUTPUTS_DIRECTORY_NAME; use leo_errors::{LeoError, PackageError}; use backtrace::Backtrace; -use eyre::eyre; use serde::Deserialize; use std::{ borrow::Cow, @@ -59,25 +58,19 @@ impl ProvingKeyFile { pub fn read_from(&self, path: &Path) -> Result, LeoError> { let path = self.setup_file_path(path); - fs::read(&path) - .map_err(|_| PackageError::failed_to_read_proving_key_file(path.into_owned(), Backtrace::new()).into()) + let bytes = + fs::read(&path).map_err(|_| PackageError::failed_to_read_proving_key_file(path, Backtrace::new()))?; + Ok(bytes) } /// Writes the given proving key to a file. pub fn write_to<'a>(&self, path: &'a Path, proving_key: &[u8]) -> Result, LeoError> { let path = self.setup_file_path(path); + let mut file = File::create(&path).map_err(|e| PackageError::io_error_proving_key_file(e, Backtrace::new()))?; - // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. - let mut file = match File::create(&path) { - Ok(file) => file, - Err(e) => return Err(PackageError::io_error_proving_key_file(eyre!(e), Backtrace::new()).into()), - }; - - // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. - match file.write_all(proving_key) { - Ok(_) => Ok(path), - Err(e) => Err(PackageError::io_error_proving_key_file(eyre!(e), Backtrace::new()).into()), - } + file.write_all(proving_key) + .map_err(|e| PackageError::io_error_proving_key_file(e, Backtrace::new()))?; + Ok(path) } /// Removes the proving key at the given path if it exists. Returns `true` on success, @@ -88,11 +81,8 @@ impl ProvingKeyFile { return Ok(false); } - // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. - match fs::remove_file(&path) { - Ok(_) => Ok(true), - Err(_) => Err(PackageError::failed_to_remove_proving_key_file(path.into_owned(), Backtrace::new()).into()), - } + fs::remove_file(&path).map_err(|_| PackageError::failed_to_remove_proving_key_file(path, Backtrace::new()))?; + Ok(true) } fn setup_file_path<'a>(&self, path: &'a Path) -> Cow<'a, Path> { diff --git a/package/src/outputs/verification_key.rs b/package/src/outputs/verification_key.rs index 6c6a4e61f7..d09e21e7c5 100644 --- a/package/src/outputs/verification_key.rs +++ b/package/src/outputs/verification_key.rs @@ -20,7 +20,6 @@ use crate::outputs::OUTPUTS_DIRECTORY_NAME; use leo_errors::{LeoError, PackageError}; use backtrace::Backtrace; -use eyre::eyre; use serde::Deserialize; use std::{ borrow::Cow, @@ -59,25 +58,20 @@ impl VerificationKeyFile { pub fn read_from(&self, path: &Path) -> Result, LeoError> { let path = self.setup_file_path(path); - fs::read(&path) - .map_err(|_| PackageError::failed_to_read_verification_key_file(path.into_owned(), Backtrace::new()).into()) + let bytes = fs::read(&path) + .map_err(|_| PackageError::failed_to_read_verification_key_file(path.into_owned(), Backtrace::new()))?; + Ok(bytes) } /// Writes the given verification key to a file. pub fn write_to<'a>(&self, path: &'a Path, verification_key: &[u8]) -> Result, LeoError> { let path = self.setup_file_path(path); + let mut file = + File::create(&path).map_err(|e| PackageError::io_error_verification_key_file(e, Backtrace::new()))?; - // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. - let mut file = match File::create(&path) { - Ok(file) => file, - Err(e) => return Err(PackageError::io_error_verification_key_file(eyre!(e), Backtrace::new()).into()), - }; - - // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. - match file.write_all(verification_key) { - Ok(_) => Ok(path), - Err(e) => Err(PackageError::io_error_verification_key_file(eyre!(e), Backtrace::new()).into()), - } + file.write_all(verification_key) + .map_err(|e| PackageError::io_error_verification_key_file(e, Backtrace::new()))?; + Ok(path) } /// Removes the verification key at the given path if it exists. Returns `true` on success, @@ -88,13 +82,9 @@ impl VerificationKeyFile { return Ok(false); } - // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. - match fs::remove_file(&path) { - Ok(_) => Ok(true), - Err(_) => { - Err(PackageError::failed_to_remove_verification_key_file(path.into_owned(), Backtrace::new()).into()) - } - } + fs::remove_file(&path) + .map_err(|_| PackageError::failed_to_remove_verification_key_file(path, Backtrace::new()))?; + Ok(true) } fn setup_file_path<'a>(&self, path: &'a Path) -> Cow<'a, Path> { diff --git a/package/src/package.rs b/package/src/package.rs index bd62c914b4..c5d2e9f279 100644 --- a/package/src/package.rs +++ b/package/src/package.rs @@ -39,7 +39,7 @@ impl Package { pub fn new(package_name: &str) -> Result { // Check that the package name is valid. if !Self::is_package_name_valid(package_name) { - return Err(PackageError::invalid_package_name(package_name.to_string(), Backtrace::new()).into()); + return Err(PackageError::invalid_package_name(package_name, Backtrace::new()))?; } Ok(Self { @@ -189,11 +189,10 @@ impl Package { { if !Self::can_initialize(package_name, path) { return Err(PackageError::failed_to_initialize_package( - package_name.to_owned(), - path.as_os_str().to_owned(), + package_name, + path.as_os_str(), Backtrace::new(), - ) - .into()); + ))?; } } // Next, initialize this directory as a Leo package. @@ -232,11 +231,10 @@ impl Package { { if !Self::is_initialized(package_name, path) { return Err(PackageError::failed_to_initialize_package( - package_name.to_owned(), - path.as_os_str().to_owned(), + package_name, + path.as_os_str(), Backtrace::new(), - ) - .into()); + ))?; } } @@ -245,7 +243,7 @@ impl Package { /// Removes the package at the given path pub fn remove_imported_package(package_name: &str, path: &Path) -> Result<(), LeoError> { - ImportsDirectory::remove_import(path, package_name) + Ok(ImportsDirectory::remove_import(path, package_name)?) } } diff --git a/package/src/root/gitignore.rs b/package/src/root/gitignore.rs index dd18daf4e6..8190eb239a 100644 --- a/package/src/root/gitignore.rs +++ b/package/src/root/gitignore.rs @@ -19,7 +19,6 @@ use leo_errors::{LeoError, PackageError}; use backtrace::Backtrace; -use eyre::eyre; use serde::Deserialize; use std::{borrow::Cow, fs::File, io::Write, path::Path}; @@ -47,17 +46,10 @@ impl Gitignore { path.to_mut().push(GITIGNORE_FILENAME); } - // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. - let mut file = match File::create(&path) { - Ok(file) => file, - Err(e) => return Err(PackageError::io_error_gitignore_file(eyre!(e), Backtrace::new()).into()), - }; - - // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. - match file.write_all(self.template().as_bytes()) { - Ok(v) => Ok(v), - Err(e) => Err(PackageError::io_error_gitignore_file(eyre!(e), Backtrace::new()).into()), - } + let mut file = File::create(&path).map_err(|e| PackageError::io_error_gitignore_file(e, Backtrace::new()))?; + file.write_all(self.template().as_bytes()) + .map_err(|e| PackageError::io_error_gitignore_file(e, Backtrace::new()))?; + Ok(()) } fn template(&self) -> String { diff --git a/package/src/root/manifest.rs b/package/src/root/manifest.rs index e06908f8e9..e281f5b0d3 100644 --- a/package/src/root/manifest.rs +++ b/package/src/root/manifest.rs @@ -18,7 +18,6 @@ use crate::package::Package; use leo_errors::{LeoError, PackageError}; use backtrace::Backtrace; -use eyre::eyre; use serde::Deserialize; use std::{ borrow::Cow, @@ -88,27 +87,12 @@ impl Manifest { path.to_mut().push(MANIFEST_FILENAME); } - // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. - let mut file = match File::create(&path) { - Ok(file) => file, - Err(e) => { - return Err(PackageError::failed_to_create_manifest_file( - MANIFEST_FILENAME, - eyre!(e), - Backtrace::new(), - ) - .into()); - } - }; + let mut file = File::create(&path) + .map_err(|e| PackageError::failed_to_create_manifest_file(MANIFEST_FILENAME, e, Backtrace::new()))?; - // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. - match file.write_all(self.template().as_bytes()) { - Ok(v) => Ok(v), - Err(e) => Err(LeoError::from(PackageError::io_error_manifest_file( - eyre!(e), - Backtrace::new(), - ))), - } + file.write_all(self.template().as_bytes()) + .map_err(|e| PackageError::io_error_manifest_file(e, Backtrace::new()))?; + Ok(()) } fn template(&self) -> String { @@ -142,39 +126,18 @@ impl TryFrom<&Path> for Manifest { path.to_mut().push(MANIFEST_FILENAME); } - // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. - let mut file = match File::open(path.clone()) { - Ok(file) => file, - Err(e) => { - return Err(PackageError::failed_to_open_manifest_file( - MANIFEST_FILENAME, - eyre!(e), - Backtrace::new(), - )); - } - }; + let mut file = File::open(path.clone()) + .map_err(|e| PackageError::failed_to_open_manifest_file(MANIFEST_FILENAME, e, Backtrace::new()))?; - // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. - let size = match file.metadata() { - Ok(metadata) => metadata.len() as usize, - Err(e) => { - return Err(PackageError::failed_to_get_manifest_metadata_file( - MANIFEST_FILENAME, - eyre!(e), - Backtrace::new(), - )); - } - }; + let size = file + .metadata() + .map_err(|e| PackageError::failed_to_get_manifest_metadata_file(MANIFEST_FILENAME, e, Backtrace::new()))? + .len() as usize; let mut buffer = String::with_capacity(size); - // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. - if let Err(e) = file.read_to_string(&mut buffer) { - return Err(PackageError::failed_to_read_manifest_file( - MANIFEST_FILENAME, - eyre!(e), - Backtrace::new(), - )); - } + + file.read_to_string(&mut buffer) + .map_err(|e| PackageError::failed_to_read_manifest_file(MANIFEST_FILENAME, e, Backtrace::new()))?; // Determine if the old remote format is being used, and update to new convention @@ -260,29 +223,15 @@ author = "{author}" // Rewrite the toml file if it has been updated if buffer != refactored_toml { - let mut file = match File::create(&path) { - Ok(file) => file, - Err(e) => { - return Err(PackageError::failed_to_create_manifest_file( - MANIFEST_FILENAME, - eyre!(e), - Backtrace::new(), - )); - } - }; + let mut file = File::create(&path) + .map_err(|e| PackageError::failed_to_create_manifest_file(MANIFEST_FILENAME, e, Backtrace::new()))?; - // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. - if let Err(e) = file.write_all(refactored_toml.as_bytes()) { - return Err(PackageError::failed_to_write_manifest_file( - MANIFEST_FILENAME, - eyre!(e), - Backtrace::new(), - )); - } + file.write_all(refactored_toml.as_bytes()) + .map_err(|e| PackageError::failed_to_write_manifest_file(MANIFEST_FILENAME, e, Backtrace::new()))?; } // Read the toml file toml::from_str(&final_toml) - .map_err(|e| PackageError::failed_to_parse_manifest_file(MANIFEST_FILENAME, eyre!(e), Backtrace::new())) + .map_err(|e| PackageError::failed_to_parse_manifest_file(MANIFEST_FILENAME, e, Backtrace::new())) } } diff --git a/package/src/root/readme.rs b/package/src/root/readme.rs index 1cd5865e02..cfe0872d57 100644 --- a/package/src/root/readme.rs +++ b/package/src/root/readme.rs @@ -20,7 +20,6 @@ use leo_errors::{LeoError, PackageError}; use backtrace::Backtrace; -use eyre::eyre; use serde::Deserialize; use std::{borrow::Cow, fs::File, io::Write, path::Path}; @@ -56,17 +55,11 @@ impl README { path.to_mut().push(README_FILENAME); } - // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. - let mut file = match File::create(&path) { - Ok(file) => file, - Err(e) => return Err(PackageError::io_error_readme_file(eyre!(e), Backtrace::new()).into()), - }; + let mut file = File::create(&path).map_err(|e| PackageError::io_error_readme_file(e, Backtrace::new()))?; - // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. - match file.write_all(self.template().as_bytes()) { - Ok(v) => Ok(v), - Err(e) => Err(PackageError::io_error_readme_file(eyre!(e), Backtrace::new()).into()), - } + file.write_all(self.template().as_bytes()) + .map_err(|e| PackageError::io_error_readme_file(e, Backtrace::new()))?; + Ok(()) } fn template(&self) -> String { diff --git a/package/src/root/zip.rs b/package/src/root/zip.rs index 1cfe219649..002ca5a92e 100644 --- a/package/src/root/zip.rs +++ b/package/src/root/zip.rs @@ -33,7 +33,6 @@ use crate::{ use leo_errors::{LeoError, PackageError}; use backtrace::Backtrace; -use eyre::eyre; use serde::Deserialize; use std::{ @@ -86,11 +85,7 @@ impl ZipFile { // Create zip file let path = self.setup_file_path(src_dir); - // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. - let file = match File::create(&path) { - Ok(file) => file, - Err(e) => return Err(PackageError::failed_to_create_zip_file(eyre!(e), Backtrace::new()).into()), - }; + let file = File::create(&path).map_err(|e| PackageError::failed_to_create_zip_file(e, Backtrace::new()))?; let mut zip = ZipWriter::new(file); let options = FileOptions::default() .compression_method(zip::CompressionMethod::Stored) @@ -114,26 +109,14 @@ impl ZipFile { if path.is_file() { tracing::info!("Adding file {:?} as {:?}", path, name); #[allow(deprecated)] - // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. - if let Err(e) = zip.start_file_from_path(name, options) { - return Err(PackageError::io_error_zip_file(eyre!(e), Backtrace::new()).into()); - } + zip.start_file_from_path(name, options) + .map_err(|e| PackageError::io_error_zip_file(e, Backtrace::new()))?; - // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. - let mut f = match File::open(path) { - Ok(file) => file, - Err(e) => return Err(PackageError::failed_to_open_zip_file(eyre!(e), Backtrace::new()).into()), - }; - - // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. - if let Err(e) = f.read_to_end(&mut buffer) { - return Err(PackageError::failed_to_read_zip_file(eyre!(e), Backtrace::new()).into()); - } - - // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. - if let Err(e) = zip.write_all(&*buffer) { - return Err(PackageError::failed_to_write_zip_file(eyre!(e), Backtrace::new()).into()); - } + let mut f = File::open(path).map_err(|e| PackageError::failed_to_open_zip_file(e, Backtrace::new()))?; + f.read_to_end(&mut buffer) + .map_err(|e| PackageError::failed_to_read_zip_file(e, Backtrace::new()))?; + zip.write_all(&*buffer) + .map_err(|e| PackageError::failed_to_write_zip_file(e, Backtrace::new()))?; buffer.clear(); } else if !name.as_os_str().is_empty() { @@ -141,16 +124,13 @@ impl ZipFile { // and mapname conversion failed error on unzip tracing::info!("Adding directory {:?} as {:?}", path, name); #[allow(deprecated)] - // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. - if let Err(e) = zip.add_directory_from_path(name, options) { - return Err(PackageError::io_error_zip_file(eyre!(e), Backtrace::new()).into()); - } + zip.add_directory_from_path(name, options) + .map_err(|e| PackageError::io_error_zip_file(e, Backtrace::new()))?; } } - if let Err(e) = zip.finish() { - return Err(PackageError::io_error_zip_file(eyre!(e), Backtrace::new()).into()); - } + zip.finish() + .map_err(|e| PackageError::io_error_zip_file(e, Backtrace::new()))?; tracing::info!("Package zip file created successfully {:?}", path); @@ -165,11 +145,7 @@ impl ZipFile { return Ok(false); } - // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. - if fs::remove_file(&path).is_err() { - return Err(PackageError::failed_to_remove_zip_file(path.into_owned(), Backtrace::new()).into()); - } - + fs::remove_file(&path).map_err(|_| PackageError::failed_to_remove_zip_file(path, Backtrace::new()))?; Ok(true) } diff --git a/package/src/source/directory.rs b/package/src/source/directory.rs index c238fb36cf..8d243c654d 100644 --- a/package/src/source/directory.rs +++ b/package/src/source/directory.rs @@ -23,7 +23,6 @@ use std::{ }; use backtrace::Backtrace; -use eyre::eyre; pub static SOURCE_DIRECTORY_NAME: &str = "src/"; @@ -39,8 +38,8 @@ impl SourceDirectory { path.to_mut().push(SOURCE_DIRECTORY_NAME); } - fs::create_dir_all(&path) - .map_err(|e| PackageError::failed_to_create_source_directory(eyre!(e), Backtrace::new()).into()) + fs::create_dir_all(&path).map_err(|e| PackageError::failed_to_create_source_directory(e, Backtrace::new()))?; + Ok(()) } /// Returns a list of files in the source directory. @@ -48,33 +47,25 @@ impl SourceDirectory { let mut path = Cow::from(path); path.to_mut().push(SOURCE_DIRECTORY_NAME); - // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. - let directory = match fs::read_dir(&path) { - Ok(read_dir) => read_dir, - Err(e) => return Err(PackageError::failed_to_read_inputs_directory(eyre!(e), Backtrace::new()).into()), - }; + let directory = + fs::read_dir(&path).map_err(|e| PackageError::failed_to_read_inputs_directory(e, Backtrace::new()))?; let mut file_paths = Vec::new(); for file_entry in directory.into_iter() { let file_entry = - file_entry.map_err(|e| PackageError::failed_to_get_source_file_entry(eyre!(e), Backtrace::new()))?; + file_entry.map_err(|e| PackageError::failed_to_get_source_file_entry(e, Backtrace::new()))?; let file_path = file_entry.path(); // Verify that the entry is structured as a valid file let file_type = file_entry.file_type().map_err(|e| { - PackageError::failed_to_get_source_file_type( - file_path.as_os_str().to_owned(), - eyre!(e), - Backtrace::new(), - ) + PackageError::failed_to_get_source_file_type(file_path.as_os_str().to_owned(), e, Backtrace::new()) })?; if !file_type.is_file() { return Err(PackageError::invalid_source_file_type( file_path.as_os_str().to_owned(), file_type, Backtrace::new(), - ) - .into()); + ))?; } // Verify that the file has the default file extension @@ -86,8 +77,7 @@ impl SourceDirectory { file_path.as_os_str().to_owned(), file_extension.to_owned(), Backtrace::new(), - ) - .into()); + ))?; } file_paths.push(file_path); diff --git a/package/src/source/main.rs b/package/src/source/main.rs index d0beab8f63..4d8d5d6b17 100644 --- a/package/src/source/main.rs +++ b/package/src/source/main.rs @@ -20,7 +20,6 @@ use crate::source::directory::SOURCE_DIRECTORY_NAME; use leo_errors::{LeoError, PackageError}; use backtrace::Backtrace; -use eyre::eyre; use serde::Deserialize; use std::{borrow::Cow, fs::File, io::Write, path::Path}; @@ -62,10 +61,10 @@ impl MainFile { path.to_mut().push(MAIN_FILENAME); } - let mut file = File::create(&path).map_err(|e| PackageError::io_error_main_file(eyre!(e), Backtrace::new()))?; + let mut file = File::create(&path).map_err(|e| PackageError::io_error_main_file(e, Backtrace::new()))?; Ok(file .write_all(self.template().as_bytes()) - .map_err(|e| PackageError::io_error_main_file(eyre!(e), Backtrace::new()))?) + .map_err(|e| PackageError::io_error_main_file(e, Backtrace::new()))?) } fn template(&self) -> String { diff --git a/parser/Cargo.toml b/parser/Cargo.toml index 1732acbc6c..63f9430ab9 100644 --- a/parser/Cargo.toml +++ b/parser/Cargo.toml @@ -40,9 +40,6 @@ features = [ "derive" ] [dependencies.serde_json] version = "1.0" -[dependencies.thiserror] -version = "1.0" - [dependencies.tracing] version = "0.1" diff --git a/parser/src/parser/context.rs b/parser/src/parser/context.rs index 94eee223fa..4721cd3b22 100644 --- a/parser/src/parser/context.rs +++ b/parser/src/parser/context.rs @@ -64,7 +64,7 @@ impl ParserContext { /// Returns an unexpected end of function [`SyntaxError`]. /// pub fn eof(&self) -> LeoError { - LeoError::from(ParserError::unexpected_eof(&self.end_span)) + ParserError::unexpected_eof(&self.end_span).into() } /// @@ -300,11 +300,7 @@ impl ParserContext { if &token == inner { Ok(self.tokens.pop().unwrap().span) } else { - Err(LeoError::from(ParserError::unexpected( - inner.to_string(), - token.to_string(), - span, - ))) + Err(ParserError::unexpected(inner, token, span))? } } else { Err(self.eof()) @@ -319,11 +315,11 @@ impl ParserContext { if token.iter().any(|x| x == inner) { Ok(self.tokens.pop().unwrap()) } else { - Err(LeoError::from(ParserError::unexpected( - inner.to_string(), + Err(ParserError::unexpected( + inner, token.iter().map(|x| format!("'{}'", x)).collect::>().join(", "), span, - ))) + ))? } } else { Err(self.eof()) @@ -364,11 +360,7 @@ impl ParserContext { unimplemented!() } } else { - Err(LeoError::from(ParserError::unexpected_str( - inner.to_string(), - "ident", - span, - ))) + Err(ParserError::unexpected_str(inner, "ident", span))? } } else { Err(self.eof()) diff --git a/parser/src/parser/expression.rs b/parser/src/parser/expression.rs index 3578499031..61aff85c74 100644 --- a/parser/src/parser/expression.rs +++ b/parser/src/parser/expression.rs @@ -16,7 +16,7 @@ use tendril::format_tendril; -use leo_errors::{LeoError, ParserError}; +use leo_errors::ParserError; use super::*; @@ -461,11 +461,7 @@ impl ParserContext { }); } else { let next = self.peek()?; - return Err(LeoError::from(ParserError::unexpected_str( - next.token.to_string(), - "int or ident", - &next.span, - ))); + return Err(ParserError::unexpected_str(&next.token, "int or ident", &next.span))?; } } Token::LeftParen => { @@ -612,7 +608,7 @@ impl ParserContext { let first = match first { SpreadOrExpression::Spread(first) => { let span = span + first.span(); - return Err(LeoError::from(ParserError::spread_in_array_init(&span))); + return Err(ParserError::spread_in_array_init(&span))?; } SpreadOrExpression::Expression(x) => x, }; @@ -729,11 +725,7 @@ impl ParserContext { Expression::Identifier(ident) } token => { - return Err(LeoError::from(ParserError::unexpected_str( - token.to_string(), - "expression", - &span, - ))); + return Err(ParserError::unexpected_str(token, "expression", &span))?; } }) } diff --git a/parser/src/parser/file.rs b/parser/src/parser/file.rs index 8582be17d1..1e970d3874 100644 --- a/parser/src/parser/file.rs +++ b/parser/src/parser/file.rs @@ -16,7 +16,7 @@ use tendril::format_tendril; -use leo_errors::{LeoError, ParserError}; +use leo_errors::ParserError; use crate::KEYWORD_TOKENS; @@ -48,7 +48,7 @@ impl ParserContext { functions.insert(id, function); } Token::Ident(ident) if ident.as_ref() == "test" => { - return Err(LeoError::from(ParserError::test_function(&token.span))); + return Err(ParserError::test_function(&token.span))?; // self.expect(Token::Test)?; // let (id, function) = self.parse_function_declaration()?; // tests.insert(id, TestFunction { @@ -61,8 +61,8 @@ impl ParserContext { global_consts.insert(name, global_const); } _ => { - return Err(LeoError::from(ParserError::unexpected( - token.token.to_string(), + return Err(ParserError::unexpected( + &token.token, [ Token::Import, Token::Circuit, @@ -75,7 +75,7 @@ impl ParserContext { .collect::>() .join(", "), &token.span, - ))); + ))?; } } } @@ -96,7 +96,7 @@ impl ParserContext { let start = self.expect(Token::At)?; let name = self.expect_ident()?; if name.name.as_ref() == "context" { - return Err(LeoError::from(ParserError::context_annotation(&name.span))); + return Err(ParserError::context_annotation(&name.span).into()); } assert_no_whitespace(&start, &name.span, &name.name, "@")?; @@ -108,15 +108,15 @@ impl ParserContext { loop { if let Some(end) = self.eat(Token::RightParen) { if comma { - return Err(LeoError::from(ParserError::unexpected( - Token::RightParen.to_string(), + return Err(ParserError::unexpected( + Token::RightParen, [Token::Ident("identifier".into()), Token::Int("number".into())] .iter() .map(|x| format!("'{}'", x)) .collect::>() .join(", "), &end.span, - ))); + ))?; } end_span = end.span; break; @@ -128,11 +128,7 @@ impl ParserContext { args.push(int.value); } else { let token = self.peek()?; - return Err(LeoError::from(ParserError::unexpected_str( - token.token.to_string(), - "ident or int", - &token.span, - ))); + return Err(ParserError::unexpected_str(&token.token, "ident or int", &token.span))?; } if self.eat(Token::Comma).is_none() && !comma { end_span = self.expect(Token::RightParen)?; @@ -169,7 +165,7 @@ impl ParserContext { } if out.is_empty() { - return Err(LeoError::from(ParserError::invalid_import_list(span))); + return Err(ParserError::invalid_import_list(span))?; } Ok(out) @@ -248,11 +244,7 @@ impl ParserContext { // Return an error if the package name contains a keyword. if let Some(token) = KEYWORD_TOKENS.iter().find(|x| x.to_string() == base.name.as_ref()) { - return Err(LeoError::from(ParserError::unexpected_str( - token.to_string(), - "package name", - &base.span, - ))); + return Err(ParserError::unexpected_str(token, "package name", &base.span))?; } // Return an error if the package name contains invalid characters. @@ -261,7 +253,7 @@ impl ParserContext { .chars() .all(|x| x.is_ascii_lowercase() || x.is_ascii_digit() || x == '-' || x == '_') { - return Err(LeoError::from(ParserError::invalid_package_name(&base.span))); + return Err(ParserError::invalid_package_name(&base.span))?; } // Return the package name. @@ -323,14 +315,14 @@ impl ParserContext { let peeked = &self.peek()?; if peeked.token == Token::Semicolon { if commas { - return Err(LeoError::from(ParserError::mixed_commas_and_semicolons(&peeked.span))); + return Err(ParserError::mixed_commas_and_semicolons(&peeked.span))?; } semi_colons = true; self.expect(Token::Semicolon)?; } else { if semi_colons { - return Err(LeoError::from(ParserError::mixed_commas_and_semicolons(&peeked.span))); + return Err(ParserError::mixed_commas_and_semicolons(&peeked.span))?; } commas = true; @@ -374,21 +366,20 @@ impl ParserContext { /// Returns a [`CircuitMember`] AST node if the next tokens represent a circuit member function. /// pub fn parse_member_function_declaration(&mut self) -> SyntaxResult { - let peeked = &self.peek()?; - let peeked_token = &peeked.token; - if peeked_token == &Token::Function || peeked_token == &Token::At { + let peeked = self.peek()?.clone(); + if &peeked.token == &Token::Function || &peeked.token == &Token::At { let function = self.parse_function_declaration()?; Ok(CircuitMember::CircuitFunction(Box::new(function.1))) } else { - Err(LeoError::from(ParserError::unexpected( - peeked_token.to_string(), + Err(ParserError::unexpected( + &peeked.token, [Token::Function, Token::At] .iter() .map(|x| format!("'{}'", x)) .collect::>() .join(", "), &peeked.span, - ))) + ))? } } @@ -441,9 +432,7 @@ impl ParserContext { } if let Some(mutable) = &mutable { - return Err(LeoError::from(ParserError::mut_function_input( - &(&mutable.span + &name.span), - ))); + return Err(ParserError::mut_function_input(&(&mutable.span + &name.span)))?; } self.expect(Token::Colon)?; diff --git a/parser/src/parser/mod.rs b/parser/src/parser/mod.rs index a195eb0067..8b6eff0e1c 100644 --- a/parser/src/parser/mod.rs +++ b/parser/src/parser/mod.rs @@ -41,11 +41,7 @@ pub(crate) fn assert_no_whitespace(left_span: &Span, right_span: &Span, left: &s let mut error_span = left_span + right_span; error_span.col_start = left_span.col_stop - 1; error_span.col_stop = right_span.col_start - 1; - return Err(LeoError::from(ParserError::unexpected_whitespace( - left, - right, - &error_span, - ))); + return Err(ParserError::unexpected_whitespace(left, right, &error_span))?; } Ok(()) diff --git a/parser/src/parser/statement.rs b/parser/src/parser/statement.rs index 7676e4508c..2f4419aeb3 100644 --- a/parser/src/parser/statement.rs +++ b/parser/src/parser/statement.rs @@ -16,7 +16,7 @@ use super::*; -use leo_errors::{LeoError, ParserError}; +use leo_errors::ParserError; const ASSIGN_TOKENS: &[Token] = &[ Token::Assign, @@ -64,7 +64,7 @@ impl ParserContext { accesses.push(AssigneeAccess::ArrayIndex(*expr.index)); } Expression::Identifier(id) => identifier = id, - _ => return Err(LeoError::from(ParserError::invalid_assignment_target(expr.span()))), + _ => return Err(ParserError::invalid_assignment_target(expr.span()))?, } Ok(identifier) } @@ -191,11 +191,7 @@ impl ParserContext { match s { Statement::Block(_) | Statement::Conditional(_) => Some(Box::new(s)), s => { - return Err(LeoError::from(ParserError::unexpected_statement( - s.to_string(), - "Block or Conditional", - s.span(), - ))); + return Err(ParserError::unexpected_statement(&s, "Block or Conditional", s.span()))?; } } } else { @@ -249,11 +245,7 @@ impl ParserContext { chars } SpannedToken { token, span } => { - return Err(LeoError::from(ParserError::unexpected_str( - token.to_string(), - "formatted string", - &span, - ))); + return Err(ParserError::unexpected_str(token, "formatted string", &span))?; } }; @@ -288,11 +280,11 @@ impl ParserContext { "error" => ConsoleFunction::Error(self.parse_console_args()?), "log" => ConsoleFunction::Log(self.parse_console_args()?), x => { - return Err(LeoError::from(ParserError::unexpected_ident( + return Err(ParserError::unexpected_ident( x, &["assert", "error", "log"], &function.span, - ))); + ))?; } }; self.expect(Token::RightParen)?; @@ -311,9 +303,7 @@ impl ParserContext { pub fn parse_variable_name(&mut self, span: &SpannedToken) -> SyntaxResult { let mutable = self.eat(Token::Mut); if let Some(mutable) = &mutable { - return Err(LeoError::from(ParserError::let_mut_statement( - &(&mutable.span + &span.span), - ))); + return Err(ParserError::let_mut_statement(&(&mutable.span + &span.span)))?; } let name = self.expect_ident()?; diff --git a/parser/src/parser/type_.rs b/parser/src/parser/type_.rs index 10fd83cdf6..c72af90179 100644 --- a/parser/src/parser/type_.rs +++ b/parser/src/parser/type_.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use super::*; -use leo_errors::{LeoError, ParserError}; +use leo_errors::ParserError; const TYPE_TOKENS: &[Token] = &[ Token::I8, @@ -69,11 +69,7 @@ impl ParserContext { dimensions.push(int); } else { let token = self.peek()?; - return Err(LeoError::from(ParserError::unexpected_str( - token.token.to_string(), - "int", - &token.span, - ))); + return Err(ParserError::unexpected_str(&token.token, "int", &token.span))?; } if self.eat(Token::Comma).is_none() { break; diff --git a/parser/src/tokenizer/mod.rs b/parser/src/tokenizer/mod.rs index f840838128..3543ac5479 100644 --- a/parser/src/tokenizer/mod.rs +++ b/parser/src/tokenizer/mod.rs @@ -70,7 +70,7 @@ pub(crate) fn tokenize(path: &str, input: StrTendril) -> Result { if !check_address(address) { - return Err(LeoError::from(ParserError::invalid_address_lit(address, &span))); + return Err(ParserError::invalid_address_lit(address, &span))?; } } _ => (), @@ -82,8 +82,8 @@ pub(crate) fn tokenize(path: &str, input: StrTendril) -> Result Result Date: Wed, 4 Aug 2021 03:36:33 -0700 Subject: [PATCH 08/58] cli errors, leo result type --- Cargo.lock | 1 - Cargo.toml | 3 - asg/src/expression/array_access.rs | 12 +- asg/src/expression/array_init.rs | 10 +- asg/src/expression/array_inline.rs | 10 +- asg/src/expression/array_range_access.rs | 23 +- asg/src/expression/binary.rs | 17 +- asg/src/expression/call.rs | 35 +- asg/src/expression/cast.rs | 2 +- asg/src/expression/circuit_access.rs | 25 +- asg/src/expression/circuit_init.rs | 30 +- asg/src/expression/constant.rs | 16 +- asg/src/expression/ternary.rs | 2 +- asg/src/expression/tuple_access.rs | 7 +- asg/src/expression/tuple_init.rs | 8 +- asg/src/expression/unary.rs | 8 +- asg/src/expression/variable_ref.rs | 7 +- asg/src/program/circuit.rs | 13 +- asg/src/program/function.rs | 10 +- asg/src/program/mod.rs | 14 +- asg/src/statement/assign.rs | 19 +- asg/src/statement/definition.rs | 12 +- asg/src/statement/iteration.rs | 6 +- ast/src/reducer/canonicalization.rs | 8 +- ast/src/reducer/reconstructing_director.rs | 2 +- compiler/src/console/assert.rs | 4 +- compiler/src/console/format.rs | 10 +- compiler/src/constraints/constraints.rs | 4 +- compiler/src/expression/arithmetic/add.rs | 5 +- compiler/src/expression/arithmetic/bit_not.rs | 2 +- compiler/src/expression/arithmetic/div.rs | 7 +- compiler/src/expression/arithmetic/mul.rs | 5 +- compiler/src/expression/arithmetic/negate.rs | 2 +- compiler/src/expression/arithmetic/pow.rs | 7 +- compiler/src/expression/arithmetic/sub.rs | 5 +- compiler/src/expression/array/access.rs | 12 +- compiler/src/expression/array/array.rs | 2 +- compiler/src/expression/array/index.rs | 2 +- compiler/src/expression/circuit/access.rs | 19 +- compiler/src/expression/circuit/circuit.rs | 2 +- .../src/expression/conditional/conditional.rs | 4 +- compiler/src/expression/logical/and.rs | 2 +- compiler/src/expression/logical/not.rs | 2 +- compiler/src/expression/logical/or.rs | 2 +- compiler/src/expression/relational/eq.rs | 5 +- compiler/src/expression/relational/ge.rs | 5 +- compiler/src/expression/relational/gt.rs | 5 +- compiler/src/expression/relational/le.rs | 5 +- compiler/src/expression/relational/lt.rs | 5 +- compiler/src/expression/tuple/access.rs | 4 +- .../expression/variable_ref/variable_ref.rs | 7 +- compiler/src/function/function.rs | 3 +- compiler/src/function/input/array.rs | 8 +- .../src/function/input/main_function_input.rs | 22 +- compiler/src/function/input/tuple.rs | 8 +- compiler/src/function/main_function.rs | 19 +- compiler/src/function/result/result.rs | 2 +- compiler/src/output/mod.rs | 8 +- compiler/src/output/output_bytes.rs | 8 +- .../statement/assign/assignee/array_index.rs | 21 +- .../assign/assignee/array_range_index.rs | 2 +- .../src/statement/assign/assignee/member.rs | 6 +- compiler/src/statement/assign/assignee/mod.rs | 17 +- .../src/statement/assign/assignee/tuple.rs | 10 +- .../src/statement/conditional/conditional.rs | 3 +- .../src/statement/definition/definition.rs | 5 +- compiler/src/statement/statement.rs | 6 +- compiler/src/value/address/address.rs | 2 +- compiler/src/value/boolean/input.rs | 2 +- compiler/src/value/char/char.rs | 2 +- compiler/src/value/field/input.rs | 7 +- compiler/src/value/group/input.rs | 2 +- .../src/value/group/targets/edwards_bls12.rs | 11 +- compiler/src/value/integer/integer.rs | 10 +- errors/src/asg/asg_errors.rs | 2 +- errors/src/ast/ast_errors.rs | 2 +- errors/src/cli/cli_errors.rs | 341 ++++++++++++++++++ errors/src/cli/mod.rs | 18 + errors/src/common/backtraced.rs | 2 +- errors/src/common/formatted.rs | 2 +- errors/src/common/traits.rs | 2 +- errors/src/compiler/compiler_errors.rs | 2 +- errors/src/import/import_errors.rs | 2 +- errors/src/lib.rs | 16 + errors/src/package/package_errors.rs | 2 +- errors/src/parser/parser_errors.rs | 2 +- errors/src/snarkvm/snarkvm_errors.rs | 8 +- leo/api.rs | 53 +-- leo/commands/build.rs | 4 +- leo/commands/clean.rs | 2 +- leo/commands/deploy.rs | 2 +- leo/commands/init.rs | 8 +- leo/commands/lint.rs | 2 +- leo/commands/mod.rs | 2 +- leo/commands/new.rs | 8 +- leo/commands/package/add.rs | 49 +-- leo/commands/package/clone.rs | 40 +- leo/commands/package/login.rs | 16 +- leo/commands/package/logout.rs | 25 +- leo/commands/package/publish.rs | 14 +- leo/commands/package/remove.rs | 2 +- leo/commands/prove.rs | 10 +- leo/commands/run.rs | 5 +- leo/commands/setup.rs | 23 +- leo/commands/test.rs | 10 +- leo/commands/update.rs | 5 +- leo/commands/watch.rs | 11 +- leo/config.rs | 81 +++-- leo/context.rs | 4 +- leo/logger.rs | 8 +- leo/main.rs | 7 +- leo/tests/mod.rs | 2 +- leo/updater.rs | 33 +- package/src/imports/directory.rs | 2 +- package/src/inputs/directory.rs | 3 +- package/src/inputs/pairs.rs | 12 +- package/src/package.rs | 10 +- package/src/source/directory.rs | 6 +- parser/src/parser/context.rs | 9 +- parser/src/parser/expression.rs | 6 +- parser/src/parser/file.rs | 29 +- parser/src/parser/mod.rs | 2 +- parser/src/parser/statement.rs | 14 +- parser/src/parser/type_.rs | 2 +- parser/src/tokenizer/mod.rs | 5 +- 125 files changed, 935 insertions(+), 610 deletions(-) create mode 100644 errors/src/cli/cli_errors.rs create mode 100644 errors/src/cli/mod.rs diff --git a/Cargo.lock b/Cargo.lock index da2eccdadb..367f5d9031 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1305,7 +1305,6 @@ name = "leo-lang" version = "1.5.3" dependencies = [ "ansi_term 0.12.1", - "anyhow", "assert_cmd", "clap", "colored", diff --git a/Cargo.toml b/Cargo.toml index ffe2e1880b..b8dad67f1e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -96,9 +96,6 @@ default-features = false [dependencies.snarkvm-utilities] version = "0.7.4" -[dependencies.anyhow] -version = "1.0" - [dependencies.structopt] version = "0.3" diff --git a/asg/src/expression/array_access.rs b/asg/src/expression/array_access.rs index 7336947fa0..859356adae 100644 --- a/asg/src/expression/array_access.rs +++ b/asg/src/expression/array_access.rs @@ -95,9 +95,10 @@ impl<'a> FromAst<'a, leo_ast::ArrayAccessExpression> for ArrayAccessExpression<' type_ => { return Err(AsgError::unexpected_type( "array", - type_.map(|x| x.to_string()).unwrap_or("unknown".to_string()), + type_.map(|x| x.to_string()).unwrap_or_else(|| "unknown".to_string()), &value.span, - ))?; + ) + .into()); } }; @@ -113,10 +114,9 @@ impl<'a> FromAst<'a, leo_ast::ArrayAccessExpression> for ArrayAccessExpression<' .flatten() { if index >= array_len { - return Err(AsgError::array_index_out_of_bounds( - index, - &array.span().cloned().unwrap_or_default(), - ))?; + return Err( + AsgError::array_index_out_of_bounds(index, &array.span().cloned().unwrap_or_default()).into(), + ); } } diff --git a/asg/src/expression/array_init.rs b/asg/src/expression/array_init.rs index 362504d518..0714e48e82 100644 --- a/asg/src/expression/array_init.rs +++ b/asg/src/expression/array_init.rs @@ -74,7 +74,7 @@ impl<'a> FromAst<'a, leo_ast::ArrayInitExpression> for ArrayInitExpression<'a> { Some(PartialType::Array(item, dims)) => (item.map(|x| *x), dims), None => (None, None), Some(type_) => { - return Err(AsgError::unexpected_type(type_, "array", &value.span))?; + return Err(AsgError::unexpected_type(type_, "array", &value.span).into()); } }; let dimensions = value @@ -97,7 +97,8 @@ impl<'a> FromAst<'a, leo_ast::ArrayInitExpression> for ArrayInitExpression<'a> { format!("array of length {}", expected_len), format!("array of length {}", len), &value.span, - ))?; + ) + .into()); } } @@ -110,7 +111,8 @@ impl<'a> FromAst<'a, leo_ast::ArrayInitExpression> for ArrayInitExpression<'a> { format!("array of length {}", dimension), format!("array of length {}", len), &value.span, - ))?; + ) + .into()); } } @@ -118,7 +120,7 @@ impl<'a> FromAst<'a, leo_ast::ArrayInitExpression> for ArrayInitExpression<'a> { } None => None, Some(type_) => { - return Err(AsgError::unexpected_type("array", type_, &value.span))?; + return Err(AsgError::unexpected_type("array", type_, &value.span).into()); } } } diff --git a/asg/src/expression/array_inline.rs b/asg/src/expression/array_inline.rs index ae26dc4164..1a67bd8663 100644 --- a/asg/src/expression/array_inline.rs +++ b/asg/src/expression/array_inline.rs @@ -109,7 +109,7 @@ impl<'a> FromAst<'a, leo_ast::ArrayInlineExpression> for ArrayInlineExpression<' Some(PartialType::Array(item, dims)) => (item.map(|x| *x), dims), None => (None, None), Some(type_) => { - return Err(AsgError::unexpected_type(type_, "array", &value.span))?; + return Err(AsgError::unexpected_type(type_, "array", &value.span).into()); } }; @@ -172,9 +172,10 @@ impl<'a> FromAst<'a, leo_ast::ArrayInlineExpression> for ArrayInlineExpression<' .map(|x| x.to_string()) .as_deref() .unwrap_or("unknown"), - type_.map(|x| x.to_string()).unwrap_or("unknown".to_string()), + type_.map(|x| x.to_string()).unwrap_or_else(|| "unknown".to_string()), &value.span, - ))?; + ) + .into()); } } Ok((Cell::new(expr), true)) @@ -188,7 +189,8 @@ impl<'a> FromAst<'a, leo_ast::ArrayInlineExpression> for ArrayInlineExpression<' format!("array of length {}", expected_len), format!("array of length {}", len), &value.span, - ))?; + ) + .into()); } } Ok(output) diff --git a/asg/src/expression/array_range_access.rs b/asg/src/expression/array_range_access.rs index 4fdd32cd5f..190d0e829c 100644 --- a/asg/src/expression/array_range_access.rs +++ b/asg/src/expression/array_range_access.rs @@ -108,7 +108,7 @@ impl<'a> FromAst<'a, leo_ast::ArrayRangeAccessExpression> for ArrayRangeAccessEx Some(PartialType::Array(element, len)) => (Some(PartialType::Array(element, None)), len), None => (None, None), Some(x) => { - return Err(AsgError::unexpected_type(x, "array", &value.span))?; + return Err(AsgError::unexpected_type(x, "array", &value.span).into()); } }; let array = <&Expression<'a>>::from_ast(scope, &*value.array, expected_array)?; @@ -118,9 +118,10 @@ impl<'a> FromAst<'a, leo_ast::ArrayRangeAccessExpression> for ArrayRangeAccessEx type_ => { return Err(AsgError::unexpected_type( "array", - type_.map(|x| x.to_string()).unwrap_or("unknown".to_string()), + type_.map(|x| x.to_string()).unwrap_or_else(|| "unknown".to_string()), &value.span, - ))?; + ) + .into()); } }; @@ -154,7 +155,7 @@ impl<'a> FromAst<'a, leo_ast::ArrayRangeAccessExpression> for ArrayRangeAccessEx } else { value.span.clone() }; - return Err(AsgError::array_index_out_of_bounds(inner_value, &error_span))?; + return Err(AsgError::array_index_out_of_bounds(inner_value, &error_span).into()); } else if let Some(left) = const_left { if left > inner_value { let error_span = if let Some(right) = right { @@ -162,7 +163,7 @@ impl<'a> FromAst<'a, leo_ast::ArrayRangeAccessExpression> for ArrayRangeAccessEx } else { value.span.clone() }; - return Err(AsgError::array_index_out_of_bounds(inner_value, &error_span))?; + return Err(AsgError::array_index_out_of_bounds(inner_value, &error_span).into()); } } } @@ -182,11 +183,9 @@ impl<'a> FromAst<'a, leo_ast::ArrayRangeAccessExpression> for ArrayRangeAccessEx if let Some(length) = length { if length != expected_len { let concrete_type = Type::Array(parent_element, length); - return Err(AsgError::unexpected_type( - expected_type.as_ref().unwrap(), - concrete_type, - &value.span, - ))?; + return Err( + AsgError::unexpected_type(expected_type.as_ref().unwrap(), concrete_type, &value.span).into(), + ); } } if let Some(left_value) = const_left { @@ -196,13 +195,13 @@ impl<'a> FromAst<'a, leo_ast::ArrayRangeAccessExpression> for ArrayRangeAccessEx } else { value.span.clone() }; - return Err(AsgError::array_index_out_of_bounds(left_value, &error_span))?; + return Err(AsgError::array_index_out_of_bounds(left_value, &error_span).into()); } } length = Some(expected_len); } if length.is_none() { - return Err(AsgError::unknown_array_size(&value.span))?; + return Err(AsgError::unknown_array_size(&value.span).into()); } Ok(ArrayRangeAccessExpression { diff --git a/asg/src/expression/binary.rs b/asg/src/expression/binary.rs index df6f444720..1ed79339e6 100644 --- a/asg/src/expression/binary.rs +++ b/asg/src/expression/binary.rs @@ -123,7 +123,7 @@ impl<'a> FromAst<'a, leo_ast::BinaryExpression> for BinaryExpression<'a> { BinaryOperationClass::Boolean => match expected_type { Some(PartialType::Type(Type::Boolean)) | None => None, Some(x) => { - return Err(AsgError::unexpected_type(x, Type::Boolean, &value.span))?; + return Err(AsgError::unexpected_type(x, Type::Boolean, &value.span).into()); } }, BinaryOperationClass::Numeric => match expected_type { @@ -131,7 +131,7 @@ impl<'a> FromAst<'a, leo_ast::BinaryExpression> for BinaryExpression<'a> { Some(x @ PartialType::Type(Type::Field)) => Some(x), Some(x @ PartialType::Type(Type::Group)) => Some(x), Some(x) => { - return Err(AsgError::unexpected_type(x, "integer, field, or group", &value.span))?; + return Err(AsgError::unexpected_type(x, "integer, field, or group", &value.span).into()); } None => None, }, @@ -182,23 +182,24 @@ impl<'a> FromAst<'a, leo_ast::BinaryExpression> for BinaryExpression<'a> { type_ => { return Err(AsgError::unexpected_type( "integer", - type_.map(|x| x.to_string()).unwrap_or("unknown".to_string()), + type_.map(|x| x.to_string()).unwrap_or_else(|| "unknown".to_string()), &value.span, - ))?; + ) + .into()); } }, BinaryOperationClass::Boolean => match &value.op { BinaryOperation::And | BinaryOperation::Or => match left_type { Some(Type::Boolean) | None => (), Some(x) => { - return Err(AsgError::unexpected_type(x, Type::Boolean, &value.span))?; + return Err(AsgError::unexpected_type(x, Type::Boolean, &value.span).into()); } }, BinaryOperation::Eq | BinaryOperation::Ne => (), // all types allowed _ => match left_type { Some(Type::Integer(_)) | None => (), Some(x) => { - return Err(AsgError::unexpected_type(x, "integer", &value.span))?; + return Err(AsgError::unexpected_type(x, "integer", &value.span).into()); } }, }, @@ -209,11 +210,11 @@ impl<'a> FromAst<'a, leo_ast::BinaryExpression> for BinaryExpression<'a> { match (left_type, right_type) { (Some(left_type), Some(right_type)) => { if !left_type.is_assignable_from(&right_type) { - return Err(AsgError::unexpected_type(left_type, right_type, &value.span))?; + return Err(AsgError::unexpected_type(left_type, right_type, &value.span).into()); } } (None, None) => { - return Err(AsgError::unexpected_type("any type", "unknown type", &value.span))?; + return Err(AsgError::unexpected_type("any type", "unknown type", &value.span).into()); } (_, _) => (), } diff --git a/asg/src/expression/call.rs b/asg/src/expression/call.rs index 51453541a1..6592518110 100644 --- a/asg/src/expression/call.rs +++ b/asg/src/expression/call.rs @@ -107,9 +107,10 @@ impl<'a> FromAst<'a, leo_ast::CallExpression> for CallExpression<'a> { type_ => { return Err(AsgError::unexpected_type( "circuit", - type_.map(|x| x.to_string()).unwrap_or("unknown".to_string()), + type_.map(|x| x.to_string()).unwrap_or_else(|| "unknown".to_string()), span, - ))?; + ) + .into()); } }; let circuit_name = circuit.name.borrow().name.clone(); @@ -120,18 +121,16 @@ impl<'a> FromAst<'a, leo_ast::CallExpression> for CallExpression<'a> { match member { CircuitMember::Function(body) => { if body.qualifier == FunctionQualifier::Static { - return Err(AsgError::circuit_static_call_invalid(&circuit_name, &name.name, span))?; + return Err(AsgError::circuit_static_call_invalid(&circuit_name, &name.name, span).into()); } else if body.qualifier == FunctionQualifier::MutSelfRef && !target.is_mut_ref() { - return Err(AsgError::circuit_member_mut_call_invalid( - circuit_name, - &name.name, - span, - ))?; + return Err( + AsgError::circuit_member_mut_call_invalid(circuit_name, &name.name, span).into(), + ); } (Some(target), *body) } CircuitMember::Variable(_) => { - return Err(AsgError::circuit_variable_call(circuit_name, &name.name, span))?; + return Err(AsgError::circuit_variable_call(circuit_name, &name.name, span).into()); } } } @@ -145,7 +144,7 @@ impl<'a> FromAst<'a, leo_ast::CallExpression> for CallExpression<'a> { .resolve_circuit(&circuit_name.name) .ok_or_else(|| AsgError::unresolved_circuit(&circuit_name.name, &circuit_name.span))? } else { - return Err(AsgError::unexpected_type("circuit", "unknown", span))?; + return Err(AsgError::unexpected_type("circuit", "unknown", span).into()); }; let circuit_name = circuit.name.borrow().name.clone(); @@ -156,12 +155,12 @@ impl<'a> FromAst<'a, leo_ast::CallExpression> for CallExpression<'a> { match member { CircuitMember::Function(body) => { if body.qualifier != FunctionQualifier::Static { - return Err(AsgError::circuit_member_call_invalid(circuit_name, &name.name, span))?; + return Err(AsgError::circuit_member_call_invalid(circuit_name, &name.name, span).into()); } (None, *body) } CircuitMember::Variable(_) => { - return Err(AsgError::circuit_variable_call(circuit_name, &name.name, span))?; + return Err(AsgError::circuit_variable_call(circuit_name, &name.name, span).into()); } } } @@ -169,13 +168,14 @@ impl<'a> FromAst<'a, leo_ast::CallExpression> for CallExpression<'a> { return Err(AsgError::illegal_ast_structure( "non Identifier/CircuitMemberAccess/CircuitStaticFunctionAccess as call target", &value.span, - ))?; + ) + .into()); } }; if let Some(expected) = expected_type { let output: Type = function.output.clone(); if !expected.matches(&output) { - return Err(AsgError::unexpected_type(expected, output, &value.span))?; + return Err(AsgError::unexpected_type(expected, output, &value.span).into()); } } if value.arguments.len() != function.arguments.len() { @@ -183,7 +183,8 @@ impl<'a> FromAst<'a, leo_ast::CallExpression> for CallExpression<'a> { function.arguments.len(), value.arguments.len(), &value.span, - ))?; + ) + .into()); } let arguments = value @@ -194,14 +195,14 @@ impl<'a> FromAst<'a, leo_ast::CallExpression> for CallExpression<'a> { let argument = argument.get().borrow(); let converted = <&Expression<'a>>::from_ast(scope, expr, Some(argument.type_.clone().partial()))?; if argument.const_ && !converted.is_consty() { - return Err(AsgError::unexpected_nonconst(expr.span()))?; + return Err(AsgError::unexpected_nonconst(expr.span()).into()); } Ok(Cell::new(converted)) }) .collect::, LeoError>>()?; if function.is_test() { - return Err(AsgError::call_test_function(&value.span))?; + return Err(AsgError::call_test_function(&value.span).into()); } Ok(CallExpression { parent: Cell::new(None), diff --git a/asg/src/expression/cast.rs b/asg/src/expression/cast.rs index 80f53e79c8..bd5b2906e2 100644 --- a/asg/src/expression/cast.rs +++ b/asg/src/expression/cast.rs @@ -80,7 +80,7 @@ impl<'a> FromAst<'a, leo_ast::CastExpression> for CastExpression<'a> { let target_type = scope.resolve_ast_type(&value.target_type, &value.span)?; if let Some(expected_type) = &expected_type { if !expected_type.matches(&target_type) { - return Err(AsgError::unexpected_type(expected_type, target_type, &value.span))?; + return Err(AsgError::unexpected_type(expected_type, target_type, &value.span).into()); } } diff --git a/asg/src/expression/circuit_access.rs b/asg/src/expression/circuit_access.rs index df09cfe0ab..79405afc44 100644 --- a/asg/src/expression/circuit_access.rs +++ b/asg/src/expression/circuit_access.rs @@ -109,9 +109,10 @@ impl<'a> FromAst<'a, leo_ast::CircuitMemberAccessExpression> for CircuitAccessEx x => { return Err(AsgError::unexpected_type( "circuit", - x.map(|x| x.to_string()).unwrap_or("unknown".to_string()), + x.map(|x| x.to_string()).unwrap_or_else(|| "unknown".to_string()), &value.span, - ))?; + ) + .into()); } }; @@ -122,7 +123,7 @@ impl<'a> FromAst<'a, leo_ast::CircuitMemberAccessExpression> for CircuitAccessEx if let CircuitMember::Variable(type_) = &member { let type_: Type = type_.clone(); if !expected_type.matches(&type_) { - return Err(AsgError::unexpected_type(expected_type, type_, &value.span))?; + return Err(AsgError::unexpected_type(expected_type, type_, &value.span).into()); } } // used by call expression } @@ -142,18 +143,17 @@ impl<'a> FromAst<'a, leo_ast::CircuitMemberAccessExpression> for CircuitAccessEx CircuitMember::Variable(expected_type.clone()), ); } else { - return Err(AsgError::input_ref_needs_type( - &circuit.name.borrow().name, - &value.name.name, - &value.span, - ))?; + return Err( + AsgError::input_ref_needs_type(&circuit.name.borrow().name, &value.name.name, &value.span).into(), + ); } } else { return Err(AsgError::unresolved_circuit_member( &circuit.name.borrow().name, &value.name.name, &value.span, - ))?; + ) + .into()); } Ok(CircuitAccessExpression { @@ -177,12 +177,12 @@ impl<'a> FromAst<'a, leo_ast::CircuitStaticFunctionAccessExpression> for Circuit .resolve_circuit(&name.name) .ok_or_else(|| AsgError::unresolved_circuit(&name.name, &name.span))?, _ => { - return Err(AsgError::unexpected_type("circuit", "unknown", &value.span))?; + return Err(AsgError::unexpected_type("circuit", "unknown", &value.span).into()); } }; if let Some(expected_type) = expected_type { - return Err(AsgError::unexpected_type(expected_type, "none", &value.span))?; + return Err(AsgError::unexpected_type(expected_type, "none", &value.span).into()); } if let Some(CircuitMember::Function(_)) = circuit.members.borrow().get(value.name.name.as_ref()) { @@ -192,7 +192,8 @@ impl<'a> FromAst<'a, leo_ast::CircuitStaticFunctionAccessExpression> for Circuit &circuit.name.borrow().name, &value.name.name, &value.span, - ))?; + ) + .into()); } Ok(CircuitAccessExpression { diff --git a/asg/src/expression/circuit_init.rs b/asg/src/expression/circuit_init.rs index 249fa77ebb..31759a82b6 100644 --- a/asg/src/expression/circuit_init.rs +++ b/asg/src/expression/circuit_init.rs @@ -101,11 +101,7 @@ impl<'a> FromAst<'a, leo_ast::CircuitInitExpression> for CircuitInitExpression<' Some(PartialType::Type(Type::Circuit(expected_circuit))) if expected_circuit == circuit => (), None => (), Some(x) => { - return Err(AsgError::unexpected_type( - x, - circuit.name.borrow().name.to_string(), - &value.span, - ))?; + return Err(AsgError::unexpected_type(x, circuit.name.borrow().name.to_string(), &value.span).into()); } } let members: IndexMap<&str, (&Identifier, Option<&leo_ast::Expression>)> = value @@ -121,11 +117,9 @@ impl<'a> FromAst<'a, leo_ast::CircuitInitExpression> for CircuitInitExpression<' let circuit_members = circuit.members.borrow(); for (name, member) in circuit_members.iter() { if defined_variables.contains(name) { - return Err(AsgError::overridden_circuit_member( - &circuit.name.borrow().name, - name, - &value.span, - ))?; + return Err( + AsgError::overridden_circuit_member(&circuit.name.borrow().name, name, &value.span).into(), + ); } defined_variables.insert(name.clone()); let type_: Type = if let CircuitMember::Variable(type_) = &member { @@ -145,21 +139,17 @@ impl<'a> FromAst<'a, leo_ast::CircuitInitExpression> for CircuitInitExpression<' }; values.push(((*identifier).clone(), Cell::new(received))); } else { - return Err(AsgError::missing_circuit_member( - &circuit.name.borrow().name, - name, - &value.span, - ))?; + return Err( + AsgError::missing_circuit_member(&circuit.name.borrow().name, name, &value.span).into(), + ); } } for (name, (identifier, _expression)) in members.iter() { if circuit_members.get(*name).is_none() { - return Err(AsgError::extra_circuit_member( - &circuit.name.borrow().name, - name, - &identifier.span, - ))?; + return Err( + AsgError::extra_circuit_member(&circuit.name.borrow().name, name, &identifier.span).into(), + ); } } } diff --git a/asg/src/expression/constant.rs b/asg/src/expression/constant.rs index 3de0f77d51..9043e80577 100644 --- a/asg/src/expression/constant.rs +++ b/asg/src/expression/constant.rs @@ -85,7 +85,7 @@ impl<'a> FromAst<'a, leo_ast::ValueExpression> for Constant<'a> { match expected_type.map(PartialType::full).flatten() { Some(Type::Address) | None => (), Some(x) => { - return Err(AsgError::unexpected_type(x, Type::Address, span))?; + return Err(AsgError::unexpected_type(x, Type::Address, span).into()); } } Constant { @@ -98,7 +98,7 @@ impl<'a> FromAst<'a, leo_ast::ValueExpression> for Constant<'a> { match expected_type.map(PartialType::full).flatten() { Some(Type::Boolean) | None => (), Some(x) => { - return Err(AsgError::unexpected_type(x, Type::Boolean, span))?; + return Err(AsgError::unexpected_type(x, Type::Boolean, span).into()); } } Constant { @@ -115,7 +115,7 @@ impl<'a> FromAst<'a, leo_ast::ValueExpression> for Constant<'a> { match expected_type.map(PartialType::full).flatten() { Some(Type::Char) | None => (), Some(x) => { - return Err(AsgError::unexpected_type(x, Type::Char, value.span()))?; + return Err(AsgError::unexpected_type(x, Type::Char, value.span()).into()); } } @@ -129,7 +129,7 @@ impl<'a> FromAst<'a, leo_ast::ValueExpression> for Constant<'a> { match expected_type.map(PartialType::full).flatten() { Some(Type::Field) | None => (), Some(x) => { - return Err(AsgError::unexpected_type(x, Type::Field, span))?; + return Err(AsgError::unexpected_type(x, Type::Field, span).into()); } } Constant { @@ -142,7 +142,7 @@ impl<'a> FromAst<'a, leo_ast::ValueExpression> for Constant<'a> { match expected_type.map(PartialType::full).flatten() { Some(Type::Group) | None => (), Some(x) => { - return Err(AsgError::unexpected_type(x, Type::Group, value.span()))?; + return Err(AsgError::unexpected_type(x, Type::Group, value.span()).into()); } } Constant { @@ -159,7 +159,7 @@ impl<'a> FromAst<'a, leo_ast::ValueExpression> for Constant<'a> { } } Implicit(value, span) => match expected_type { - None => return Err(AsgError::unresolved_type("unknown", span))?, + None => return Err(AsgError::unresolved_type("unknown", span).into()), Some(PartialType::Integer(Some(sub_type), _)) | Some(PartialType::Integer(None, Some(sub_type))) => { Constant { parent: Cell::new(None), @@ -183,7 +183,7 @@ impl<'a> FromAst<'a, leo_ast::ValueExpression> for Constant<'a> { value: ConstValue::Address(value.clone()), }, Some(x) => { - return Err(AsgError::unexpected_type(x, "unknown", span))?; + return Err(AsgError::unexpected_type(x, "unknown", span).into()); } }, Integer(int_type, value, span) => { @@ -192,7 +192,7 @@ impl<'a> FromAst<'a, leo_ast::ValueExpression> for Constant<'a> { Some(PartialType::Integer(None, Some(_))) => (), None => (), Some(x) => { - return Err(AsgError::unexpected_type(x, int_type, span))?; + return Err(AsgError::unexpected_type(x, int_type, span).into()); } } Constant { diff --git a/asg/src/expression/ternary.rs b/asg/src/expression/ternary.rs index af8956a060..5e20f04734 100644 --- a/asg/src/expression/ternary.rs +++ b/asg/src/expression/ternary.rs @@ -91,7 +91,7 @@ impl<'a> FromAst<'a, leo_ast::TernaryExpression> for TernaryExpression<'a> { let right = if_false.get().get_type().unwrap().into(); if left != right { - return Err(AsgError::ternary_different_types(left, right, &value.span))?; + return Err(AsgError::ternary_different_types(left, right, &value.span).into()); } Ok(TernaryExpression { diff --git a/asg/src/expression/tuple_access.rs b/asg/src/expression/tuple_access.rs index c594c441cf..31edab6df4 100644 --- a/asg/src/expression/tuple_access.rs +++ b/asg/src/expression/tuple_access.rs @@ -91,9 +91,12 @@ impl<'a> FromAst<'a, leo_ast::TupleAccessExpression> for TupleAccessExpression<' } else { return Err(AsgError::unexpected_type( "a tuple", - tuple_type.map(|x| x.to_string()).unwrap_or("unknown".to_string()), + tuple_type + .map(|x| x.to_string()) + .unwrap_or_else(|| "unknown".to_string()), &value.span, - ))?; + ) + .into()); } Ok(TupleAccessExpression { diff --git a/asg/src/expression/tuple_init.rs b/asg/src/expression/tuple_init.rs index 20c7ff041a..041e69ce14 100644 --- a/asg/src/expression/tuple_init.rs +++ b/asg/src/expression/tuple_init.rs @@ -88,9 +88,10 @@ impl<'a> FromAst<'a, leo_ast::TupleInitExpression> for TupleInitExpression<'a> { x => { return Err(AsgError::unexpected_type( "tuple", - x.map(|x| x.to_string()).unwrap_or("unknown".to_string()), + x.map(|x| x.to_string()).unwrap_or_else(|| "unknown".to_string()), &value.span, - ))?; + ) + .into()); } }; @@ -102,7 +103,8 @@ impl<'a> FromAst<'a, leo_ast::TupleInitExpression> for TupleInitExpression<'a> { format!("tuple of length {}", tuple_types.len()), format!("tuple of length {}", value.elements.len()), &value.span, - ))?; + ) + .into()); } } diff --git a/asg/src/expression/unary.rs b/asg/src/expression/unary.rs index 73809e3dbc..54baed3be6 100644 --- a/asg/src/expression/unary.rs +++ b/asg/src/expression/unary.rs @@ -95,7 +95,7 @@ impl<'a> FromAst<'a, leo_ast::UnaryExpression> for UnaryExpression<'a> { UnaryOperation::Not => match expected_type.map(|x| x.full()).flatten() { Some(Type::Boolean) | None => Some(Type::Boolean), Some(type_) => { - return Err(AsgError::unexpected_type(type_, Type::Boolean, &value.span))?; + return Err(AsgError::unexpected_type(type_, Type::Boolean, &value.span).into()); } }, UnaryOperation::Negate => match expected_type.map(|x| x.full()).flatten() { @@ -104,14 +104,14 @@ impl<'a> FromAst<'a, leo_ast::UnaryExpression> for UnaryExpression<'a> { Some(Type::Field) => Some(Type::Field), None => None, Some(type_) => { - return Err(AsgError::unexpected_type(type_, "integer, group, field", &value.span))?; + return Err(AsgError::unexpected_type(type_, "integer, group, field", &value.span).into()); } }, UnaryOperation::BitNot => match expected_type.map(|x| x.full()).flatten() { Some(type_ @ Type::Integer(_)) => Some(type_), None => None, Some(type_) => { - return Err(AsgError::unexpected_type(type_, "integer", &value.span))?; + return Err(AsgError::unexpected_type(type_, "integer", &value.span).into()); } }, }; @@ -126,7 +126,7 @@ impl<'a> FromAst<'a, leo_ast::UnaryExpression> for UnaryExpression<'a> { }) .unwrap_or(false); if is_expr_unsigned { - return Err(AsgError::unsigned_negation(&value.span))?; + return Err(AsgError::unsigned_negation(&value.span).into()); } } Ok(UnaryExpression { diff --git a/asg/src/expression/variable_ref.rs b/asg/src/expression/variable_ref.rs index 6035a8c4f1..e31561c644 100644 --- a/asg/src/expression/variable_ref.rs +++ b/asg/src/expression/variable_ref.rs @@ -143,7 +143,8 @@ impl<'a> FromAst<'a, leo_ast::Identifier> for &'a Expression<'a> { return Err(AsgError::illegal_input_variable_reference( "attempted to reference input when none is in scope", &value.span, - ))?; + ) + .into()); } } else { match scope.resolve_variable(&value.name) { @@ -156,7 +157,7 @@ impl<'a> FromAst<'a, leo_ast::Identifier> for &'a Expression<'a> { value: ConstValue::Address(value.name.clone()), }))); } - return Err(AsgError::unresolved_reference(&value.name, &value.span))?; + return Err(AsgError::unresolved_reference(&value.name, &value.span).into()); } } }; @@ -173,7 +174,7 @@ impl<'a> FromAst<'a, leo_ast::Identifier> for &'a Expression<'a> { .get_type() .ok_or_else(|| AsgError::unresolved_reference(&value.name, &value.span))?; if !expected_type.matches(&type_) { - return Err(AsgError::unexpected_type(expected_type, type_, &value.span))?; + return Err(AsgError::unexpected_type(expected_type, type_, &value.span).into()); } } diff --git a/asg/src/program/circuit.rs b/asg/src/program/circuit.rs index 7f504670f9..e5584bd6b8 100644 --- a/asg/src/program/circuit.rs +++ b/asg/src/program/circuit.rs @@ -71,11 +71,9 @@ impl<'a> Circuit<'a> { for member in value.members.iter() { if let leo_ast::CircuitMember::CircuitVariable(name, type_) = member { if members.contains_key(name.name.as_ref()) { - return Err(AsgError::redefined_circuit_member( - &value.circuit_name.name, - &name.name, - &name.span, - ))?; + return Err( + AsgError::redefined_circuit_member(&value.circuit_name.name, &name.name, &name.span).into(), + ); } members.insert( name.name.to_string(), @@ -102,12 +100,13 @@ impl<'a> Circuit<'a> { &value.circuit_name.name, &function.identifier.name, &function.identifier.span, - ))?; + ) + .into()); } let asg_function = Function::init(new_scope, function)?; asg_function.circuit.replace(Some(circuit)); if asg_function.is_test() { - return Err(AsgError::circuit_test_function(&function.identifier.span))?; + return Err(AsgError::circuit_test_function(&function.identifier.span).into()); } members.insert( function.identifier.name.to_string(), diff --git a/asg/src/program/function.rs b/asg/src/program/function.rs index c0c3fc4883..3135d66e8b 100644 --- a/asg/src/program/function.rs +++ b/asg/src/program/function.rs @@ -107,7 +107,7 @@ impl<'a> Function<'a> { } } if qualifier != FunctionQualifier::Static && scope.circuit_self.get().is_none() { - return Err(AsgError::invalid_self_in_global(&value.span))?; + return Err(AsgError::invalid_self_in_global(&value.span).into()); } let function = scope.context.alloc_function(Function { id: scope.context.get_id(), @@ -151,16 +151,12 @@ impl<'a> Function<'a> { let main_block = BlockStatement::from_ast(self.scope, &value.block, None)?; let mut director = MonoidalDirector::new(ReturnPathReducer::new()); if !director.reduce_block(&main_block).0 && !self.output.is_unit() { - return Err(AsgError::function_missing_return(&self.name.borrow().name, &value.span))?; + return Err(AsgError::function_missing_return(&self.name.borrow().name, &value.span).into()); } #[allow(clippy::never_loop)] // TODO @Protryon: How should we return multiple errors? for (span, error) in director.reducer().errors { - return Err(AsgError::function_return_validation( - &self.name.borrow().name, - error, - &span, - ))?; + return Err(AsgError::function_return_validation(&self.name.borrow().name, error, &span).into()); } self.body diff --git a/asg/src/program/mod.rs b/asg/src/program/mod.rs index 5f5a446ab6..2e5bb7f6c9 100644 --- a/asg/src/program/mod.rs +++ b/asg/src/program/mod.rs @@ -164,7 +164,7 @@ impl<'a> Program<'a> { )? { Some(x) => x, None => { - return Err(AsgError::unresolved_import(pretty_package, &Span::default()))?; + return Err(AsgError::unresolved_import(pretty_package, &Span::default()).into()); } }; @@ -196,10 +196,7 @@ impl<'a> Program<'a> { } else if let Some(global_const) = resolved_package.global_consts.get(&name) { imported_global_consts.insert(name.clone(), *global_const); } else { - return Err(AsgError::unresolved_import( - format!("{}.{}", pretty_package, name), - &span, - ))?; + return Err(AsgError::unresolved_import(format!("{}.{}", pretty_package, name), &span).into()); } } ImportSymbol::Alias(name, alias) => { @@ -210,10 +207,7 @@ impl<'a> Program<'a> { } else if let Some(global_const) = resolved_package.global_consts.get(&name) { imported_global_consts.insert(alias.clone(), *global_const); } else { - return Err(AsgError::unresolved_import( - format!("{}.{}", pretty_package, name), - &span, - ))?; + return Err(AsgError::unresolved_import(format!("{}.{}", pretty_package, name), &span).into()); } } } @@ -304,7 +298,7 @@ impl<'a> Program<'a> { let name = name.name.to_string(); if functions.contains_key(&name) { - return Err(AsgError::duplicate_function_definition(name, &function.span))?; + return Err(AsgError::duplicate_function_definition(name, &function.span).into()); } functions.insert(name, asg_function); diff --git a/asg/src/statement/assign.rs b/asg/src/statement/assign.rs index b697d9a32d..aa39c1b053 100644 --- a/asg/src/statement/assign.rs +++ b/asg/src/statement/assign.rs @@ -78,7 +78,8 @@ impl<'a> FromAst<'a, leo_ast::AssignStatement> for &'a Statement<'a> { return Err(AsgError::illegal_input_variable_reference( "attempted to reference input when none is in scope", &statement.span, - ))?; + ) + .into()); } } else { scope @@ -87,7 +88,7 @@ impl<'a> FromAst<'a, leo_ast::AssignStatement> for &'a Statement<'a> { }; if !variable.borrow().mutable { - return Err(AsgError::immutable_assignment(name, &statement.span))?; + return Err(AsgError::immutable_assignment(name, &statement.span).into()); } let mut target_type: Option = Some(variable.borrow().type_.clone().into()); @@ -140,11 +141,12 @@ impl<'a> FromAst<'a, leo_ast::AssignStatement> for &'a Statement<'a> { left, right, &statement.span, - ))?; + ) + .into()); } } } - _ => return Err(AsgError::index_into_non_array(name, &statement.span))?, + _ => return Err(AsgError::index_into_non_array(name, &statement.span).into()), } AssignAccess::ArrayRange(Cell::new(left), Cell::new(right)) @@ -152,7 +154,7 @@ impl<'a> FromAst<'a, leo_ast::AssignStatement> for &'a Statement<'a> { AstAssigneeAccess::ArrayIndex(index) => { target_type = match target_type.clone() { Some(PartialType::Array(item, _)) => item.map(|x| *x), - _ => return Err(AsgError::index_into_non_array(name, &statement.span))?, + _ => return Err(AsgError::index_into_non_array(name, &statement.span).into()), }; AssignAccess::ArrayIndex(Cell::new(<&Expression<'a>>::from_ast( scope, @@ -170,7 +172,7 @@ impl<'a> FromAst<'a, leo_ast::AssignStatement> for &'a Statement<'a> { .get(index) .cloned() .ok_or_else(|| AsgError::tuple_index_out_of_bounds(index, &statement.span))?, - _ => return Err(AsgError::index_into_non_tuple(name, &statement.span))?, + _ => return Err(AsgError::index_into_non_tuple(name, &statement.span).into()), }; AssignAccess::Tuple(index) } @@ -191,7 +193,7 @@ impl<'a> FromAst<'a, leo_ast::AssignStatement> for &'a Statement<'a> { let x = match &member { CircuitMember::Variable(type_) => type_.clone(), CircuitMember::Function(_) => { - return Err(AsgError::illegal_function_assign(&name.name, &statement.span))?; + return Err(AsgError::illegal_function_assign(&name.name, &statement.span).into()); } }; Some(x.partial()) @@ -200,7 +202,8 @@ impl<'a> FromAst<'a, leo_ast::AssignStatement> for &'a Statement<'a> { return Err(AsgError::index_into_non_tuple( &statement.assignee.identifier.name, &statement.span, - ))?; + ) + .into()); } }; AssignAccess::Member(name.clone()) diff --git a/asg/src/statement/definition.rs b/asg/src/statement/definition.rs index b6129b8828..cc54b7f80e 100644 --- a/asg/src/statement/definition.rs +++ b/asg/src/statement/definition.rs @@ -71,7 +71,7 @@ impl<'a> FromAst<'a, leo_ast::DefinitionStatement> for &'a Statement<'a> { .collect::>() .join(" ,"); - return Err(AsgError::invalid_const_assign(var_names, &statement.span))?; + return Err(AsgError::invalid_const_assign(var_names, &statement.span).into()); } let type_ = type_.or_else(|| value.get_type()); @@ -83,7 +83,8 @@ impl<'a> FromAst<'a, leo_ast::DefinitionStatement> for &'a Statement<'a> { return Err(AsgError::illegal_ast_structure( "cannot have 0 variable names in destructuring tuple", &statement.span, - ))?; + ) + .into()); } if statement.variable_names.len() == 1 { // any return type is fine @@ -97,9 +98,10 @@ impl<'a> FromAst<'a, leo_ast::DefinitionStatement> for &'a Statement<'a> { type_ => { return Err(AsgError::unexpected_type( format!("{}-ary tuple", statement.variable_names.len()), - type_.map(|x| x.to_string()).unwrap_or("unknown".to_string()), + type_.map(|x| x.to_string()).unwrap_or_else(|| "unknown".to_string()), &statement.span, - ))?; + ) + .into()); } } } @@ -121,7 +123,7 @@ impl<'a> FromAst<'a, leo_ast::DefinitionStatement> for &'a Statement<'a> { let mut variables = scope.variables.borrow_mut(); let var_name = variable.borrow().name.name.to_string(); if variables.contains_key(&var_name) { - return Err(AsgError::duplicate_variable_definition(var_name, &statement.span))?; + return Err(AsgError::duplicate_variable_definition(var_name, &statement.span).into()); } variables.insert(var_name, *variable); diff --git a/asg/src/statement/iteration.rs b/asg/src/statement/iteration.rs index fd86df130c..af40f378d5 100644 --- a/asg/src/statement/iteration.rs +++ b/asg/src/statement/iteration.rs @@ -50,12 +50,10 @@ impl<'a> FromAst<'a, leo_ast::IterationStatement> for &'a Statement<'a> { // Return an error if start or stop is not constant. if !start.is_consty() { - return Err(AsgError::unexpected_nonconst( - &start.span().cloned().unwrap_or_default(), - ))?; + return Err(AsgError::unexpected_nonconst(&start.span().cloned().unwrap_or_default()).into()); } if !stop.is_consty() { - return Err(AsgError::unexpected_nonconst(&stop.span().cloned().unwrap_or_default()))?; + return Err(AsgError::unexpected_nonconst(&stop.span().cloned().unwrap_or_default()).into()); } let variable = scope.context.alloc_variable(RefCell::new(InnerVariable { diff --git a/ast/src/reducer/canonicalization.rs b/ast/src/reducer/canonicalization.rs index c15df5feac..b426a99ff3 100644 --- a/ast/src/reducer/canonicalization.rs +++ b/ast/src/reducer/canonicalization.rs @@ -469,7 +469,7 @@ impl ReconstructingReducer for Canonicalizer { match new { Type::Array(type_, mut dimensions) => { if dimensions.is_zero() { - return Err(AstError::invalid_array_dimension_size(span))?; + return Err(AstError::invalid_array_dimension_size(span).into()); } let mut next = Type::Array(type_, ArrayDimensions(vec![dimensions.remove_last().unwrap()])); @@ -486,14 +486,14 @@ impl ReconstructingReducer for Canonicalizer { Ok(array) } - Type::SelfType if !self.in_circuit => Err(AstError::big_self_outside_of_circuit(span))?, + Type::SelfType if !self.in_circuit => Err(AstError::big_self_outside_of_circuit(span).into()), _ => Ok(new.clone()), } } fn reduce_string(&mut self, string: &[Char], span: &Span) -> Result { if string.is_empty() { - return Err(AstError::empty_string(span))?; + return Err(AstError::empty_string(span).into()); } let mut elements = Vec::new(); @@ -552,7 +552,7 @@ impl ReconstructingReducer for Canonicalizer { element: Expression, ) -> Result { if array_init.dimensions.is_zero() { - return Err(AstError::invalid_array_dimension_size(&array_init.span))?; + return Err(AstError::invalid_array_dimension_size(&array_init.span).into()); } let element = Box::new(element); diff --git a/ast/src/reducer/reconstructing_director.rs b/ast/src/reducer/reconstructing_director.rs index ffc29fecc7..efe328bd18 100644 --- a/ast/src/reducer/reconstructing_director.rs +++ b/ast/src/reducer/reconstructing_director.rs @@ -398,7 +398,7 @@ impl ReconstructingDirector { match &console_function_call.function { ConsoleFunction::Error(_) => ConsoleFunction::Error(formatted), ConsoleFunction::Log(_) => ConsoleFunction::Log(formatted), - _ => return Err(AstError::impossible_console_assert_call(&args.span))?, + _ => return Err(AstError::impossible_console_assert_call(&args.span).into()), } } }; diff --git a/compiler/src/console/assert.rs b/compiler/src/console/assert.rs index 3e7257a80f..0d2e278764 100644 --- a/compiler/src/console/assert.rs +++ b/compiler/src/console/assert.rs @@ -45,13 +45,13 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let result_option = match assert_expression { ConstrainedValue::Boolean(boolean) => boolean.get_value(), _ => { - return Err(CompilerError::console_assertion_must_be_boolean(span))?; + return Err(CompilerError::console_assertion_must_be_boolean(span).into()); } }; let result_bool = result_option.ok_or_else(|| CompilerError::console_assertion_depends_on_input(span))?; if !result_bool { - return Err(CompilerError::console_assertion_failed(span))?; + return Err(CompilerError::console_assertion_failed(span).into()); } Ok(()) diff --git a/compiler/src/console/format.rs b/compiler/src/console/format.rs index fc6c289868..22711bde43 100644 --- a/compiler/src/console/format.rs +++ b/compiler/src/console/format.rs @@ -55,7 +55,8 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { arg_index + 1, args.parameters.len(), &args.span, - ))?; + ) + .into()); } }; out.push(self.enforce_expression(cs, parameter.get())?.to_string()); @@ -67,12 +68,12 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { substring.push('}'); escape_right_bracket = true; } else { - return Err(CompilerError::console_fmt_expected_escaped_right_brace(&args.span))?; + return Err(CompilerError::console_fmt_expected_escaped_right_brace(&args.span).into()); } } } _ if in_container => { - return Err(CompilerError::console_fmt_expected_left_or_right_brace(&args.span))?; + return Err(CompilerError::console_fmt_expected_left_or_right_brace(&args.span).into()); } _ => substring.push(*scalar), }, @@ -90,7 +91,8 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { arg_index, args.parameters.len(), &args.span, - ))?; + ) + .into()); } Ok(out.join("")) diff --git a/compiler/src/constraints/constraints.rs b/compiler/src/constraints/constraints.rs index 95d0853623..20479f683d 100644 --- a/compiler/src/constraints/constraints.rs +++ b/compiler/src/constraints/constraints.rs @@ -49,7 +49,7 @@ pub fn generate_constraints<'a, F: PrimeField, G: GroupType, CS: ConstraintSy let result = resolved_program.enforce_main_function(cs, function, input)?; Ok(result) } - _ => Err(CompilerError::no_main_function(Backtrace::new()))?, + _ => Err(CompilerError::no_main_function(Backtrace::new()).into()), } } @@ -104,7 +104,7 @@ pub fn generate_test_constraints<'a, F: PrimeField, G: GroupType>( { Some(pair) => pair.to_owned(), None => { - return Err(CompilerError::invalid_test_context(file_name, Backtrace::new()))?; + return Err(CompilerError::invalid_test_context(file_name, Backtrace::new()).into()); } } } diff --git a/compiler/src/expression/arithmetic/add.rs b/compiler/src/expression/arithmetic/add.rs index 364fd99f70..211c2b2f62 100644 --- a/compiler/src/expression/arithmetic/add.rs +++ b/compiler/src/expression/arithmetic/add.rs @@ -38,9 +38,6 @@ pub fn enforce_add<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( (ConstrainedValue::Group(point_1), ConstrainedValue::Group(point_2)) => { Ok(ConstrainedValue::Group(point_1.add(cs, &point_2, span)?)) } - (val_1, val_2) => Err(CompilerError::incompatible_types( - format!("{} + {}", val_1, val_2), - span, - ))?, + (val_1, val_2) => return Err(CompilerError::incompatible_types(format!("{} + {}", val_1, val_2), span).into()), } } diff --git a/compiler/src/expression/arithmetic/bit_not.rs b/compiler/src/expression/arithmetic/bit_not.rs index 84df1a3fe6..0aa4defcd9 100644 --- a/compiler/src/expression/arithmetic/bit_not.rs +++ b/compiler/src/expression/arithmetic/bit_not.rs @@ -25,5 +25,5 @@ pub fn evaluate_bit_not<'a, F: PrimeField, G: GroupType>( value: ConstrainedValue<'a, F, G>, span: &Span, ) -> Result, LeoError> { - Err(CompilerError::cannot_evaluate_expression(format!("!{}", value), span))? + return Err(CompilerError::cannot_evaluate_expression(format!("!{}", value), span).into()); } diff --git a/compiler/src/expression/arithmetic/div.rs b/compiler/src/expression/arithmetic/div.rs index 7f065bc646..df5109946a 100644 --- a/compiler/src/expression/arithmetic/div.rs +++ b/compiler/src/expression/arithmetic/div.rs @@ -35,9 +35,8 @@ pub fn enforce_div<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( (ConstrainedValue::Field(field_1), ConstrainedValue::Field(field_2)) => { Ok(ConstrainedValue::Field(field_1.div(cs, &field_2, span)?)) } - (val_1, val_2) => Err(CompilerError::incompatible_types( - format!("{} / {}", val_1, val_2,), - span, - ))?, + (val_1, val_2) => { + return Err(CompilerError::incompatible_types(format!("{} / {}", val_1, val_2,), span).into()); + } } } diff --git a/compiler/src/expression/arithmetic/mul.rs b/compiler/src/expression/arithmetic/mul.rs index 34850ce02a..dee25df379 100644 --- a/compiler/src/expression/arithmetic/mul.rs +++ b/compiler/src/expression/arithmetic/mul.rs @@ -35,9 +35,6 @@ pub fn enforce_mul<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( (ConstrainedValue::Field(field_1), ConstrainedValue::Field(field_2)) => { Ok(ConstrainedValue::Field(field_1.mul(cs, &field_2, span)?)) } - (val_1, val_2) => Err(CompilerError::incompatible_types( - format!("{} * {}", val_1, val_2), - span, - ))?, + (val_1, val_2) => return Err(CompilerError::incompatible_types(format!("{} * {}", val_1, val_2), span).into()), } } diff --git a/compiler/src/expression/arithmetic/negate.rs b/compiler/src/expression/arithmetic/negate.rs index 9beca482db..2c041a73a0 100644 --- a/compiler/src/expression/arithmetic/negate.rs +++ b/compiler/src/expression/arithmetic/negate.rs @@ -31,6 +31,6 @@ pub fn enforce_negate<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem Ok(ConstrainedValue::Integer(integer.negate(cs, span)?)), ConstrainedValue::Field(field) => Ok(ConstrainedValue::Field(field.negate(cs, span)?)), ConstrainedValue::Group(group) => Ok(ConstrainedValue::Group(group.negate(cs, span)?)), - value => Err(CompilerError::incompatible_types(format!("-{}", value), span))?, + value => return Err(CompilerError::incompatible_types(format!("-{}", value), span).into()), } } diff --git a/compiler/src/expression/arithmetic/pow.rs b/compiler/src/expression/arithmetic/pow.rs index fd8bd99e0e..afc748709f 100644 --- a/compiler/src/expression/arithmetic/pow.rs +++ b/compiler/src/expression/arithmetic/pow.rs @@ -32,9 +32,8 @@ pub fn enforce_pow<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( (ConstrainedValue::Integer(num_1), ConstrainedValue::Integer(num_2)) => { Ok(ConstrainedValue::Integer(num_1.pow(cs, num_2, span)?)) } - (val_1, val_2) => Err(CompilerError::incompatible_types( - format!("{} ** {}", val_1, val_2,), - span, - ))?, + (val_1, val_2) => { + return Err(CompilerError::incompatible_types(format!("{} ** {}", val_1, val_2,), span).into()); + } } } diff --git a/compiler/src/expression/arithmetic/sub.rs b/compiler/src/expression/arithmetic/sub.rs index 02762450b8..9e3e036723 100644 --- a/compiler/src/expression/arithmetic/sub.rs +++ b/compiler/src/expression/arithmetic/sub.rs @@ -38,9 +38,6 @@ pub fn enforce_sub<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( (ConstrainedValue::Group(point_1), ConstrainedValue::Group(point_2)) => { Ok(ConstrainedValue::Group(point_1.sub(cs, &point_2, span)?)) } - (val_1, val_2) => Err(CompilerError::incompatible_types( - format!("{} - {}", val_1, val_2), - span, - ))?, + (val_1, val_2) => return Err(CompilerError::incompatible_types(format!("{} - {}", val_1, val_2), span).into()), } } diff --git a/compiler/src/expression/array/access.rs b/compiler/src/expression/array/access.rs index 4f05011deb..849d6f04c1 100644 --- a/compiler/src/expression/array/access.rs +++ b/compiler/src/expression/array/access.rs @@ -76,18 +76,18 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { ) -> Result, LeoError> { let mut array = match self.enforce_expression(cs, array)? { ConstrainedValue::Array(array) => array, - value => return Err(CompilerError::undefined_array(value.to_string(), span))?, + value => return Err(CompilerError::undefined_array(value.to_string(), span).into()), }; let index_resolved = self.enforce_index(cs, index, span)?; if let Some(resolved) = index_resolved.to_usize() { if resolved >= array.len() { - return Err(CompilerError::array_index_out_of_bounds(resolved, span))?; + return Err(CompilerError::array_index_out_of_bounds(resolved, span).into()); } Ok(array[resolved].to_owned()) } else { if array.is_empty() { - return Err(CompilerError::array_index_out_of_bounds(0, span))?; + return Err(CompilerError::array_index_out_of_bounds(0, span).into()); } { @@ -134,7 +134,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { ) -> Result, LeoError> { let array = match self.enforce_expression(cs, array)? { ConstrainedValue::Array(array) => array, - value => return Err(CompilerError::undefined_array(value, span))?, + value => return Err(CompilerError::undefined_array(value, span).into()), }; let from_resolved = match left { @@ -159,10 +159,10 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { }; Ok(if let Some((left, right)) = const_dimensions { if right - left != length { - return Err(CompilerError::array_invalid_slice_length(span))?; + return Err(CompilerError::array_invalid_slice_length(span).into()); } if right > array.len() { - return Err(CompilerError::array_index_out_of_bounds(right, span))?; + return Err(CompilerError::array_index_out_of_bounds(right, span).into()); } ConstrainedValue::Array(array[left..right].to_owned()) } else { diff --git a/compiler/src/expression/array/array.rs b/compiler/src/expression/array/array.rs index 6a84685424..960fb3b984 100644 --- a/compiler/src/expression/array/array.rs +++ b/compiler/src/expression/array/array.rs @@ -52,7 +52,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { if let Some(dimension) = expected_dimension { // Return an error if the expected dimension != the actual dimension. if dimension != result.len() { - return Err(CompilerError::unexpected_array_length(dimension, result.len(), span))?; + return Err(CompilerError::unexpected_array_length(dimension, result.len(), span).into()); } } diff --git a/compiler/src/expression/array/index.rs b/compiler/src/expression/array/index.rs index 2bd5479ed5..246df2e943 100644 --- a/compiler/src/expression/array/index.rs +++ b/compiler/src/expression/array/index.rs @@ -32,7 +32,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { ) -> Result { match self.enforce_expression(cs, index)? { ConstrainedValue::Integer(number) => Ok(number), - value => Err(CompilerError::invalid_index_expression(value, span))?, + value => Err(CompilerError::invalid_index_expression(value, span).into()), } } } diff --git a/compiler/src/expression/circuit/access.rs b/compiler/src/expression/circuit/access.rs index ea0c10120e..bb2115c458 100644 --- a/compiler/src/expression/circuit/access.rs +++ b/compiler/src/expression/circuit/access.rs @@ -39,23 +39,22 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { if let Some(member) = members.into_iter().find(|x| x.0.name == expr.member.name) { Ok(member.1) } else { - Err(CompilerError::undefined_circuit_member_access( + return Err(CompilerError::undefined_circuit_member_access( expr.circuit.get().name.borrow(), &expr.member.name, &expr.member.span, - ))? + ) + .into()); } } - value => Err(CompilerError::undefined_circuit( - value, - &target.span().cloned().unwrap_or_default(), - ))?, + value => { + return Err( + CompilerError::undefined_circuit(value, &target.span().cloned().unwrap_or_default()).into(), + ); + } } } else { - Err(CompilerError::invalid_circuit_static_member_access( - &expr.member.name, - &expr.member.span, - ))? + Err(CompilerError::invalid_circuit_static_member_access(&expr.member.name, &expr.member.span).into()) } } } diff --git a/compiler/src/expression/circuit/circuit.rs b/compiler/src/expression/circuit/circuit.rs index 5563d27588..a47ea9bb5d 100644 --- a/compiler/src/expression/circuit/circuit.rs +++ b/compiler/src/expression/circuit/circuit.rs @@ -50,7 +50,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { resolved_members.push(ConstrainedCircuitMember(name.clone(), variable_value)); } _ => { - return Err(CompilerError::expected_circuit_member(name, span))?; + return Err(CompilerError::expected_circuit_member(name, span).into()); } } } diff --git a/compiler/src/expression/conditional/conditional.rs b/compiler/src/expression/conditional/conditional.rs index 22e80956f9..ab536e0a6b 100644 --- a/compiler/src/expression/conditional/conditional.rs +++ b/compiler/src/expression/conditional/conditional.rs @@ -38,9 +38,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let conditional_value = match self.enforce_expression(cs, conditional)? { ConstrainedValue::Boolean(resolved) => resolved, value => { - return Err(CompilerError::conditional_boolean_expression_fails_to_resolve_to_bool( - value, span, - ))?; + return Err(CompilerError::conditional_boolean_expression_fails_to_resolve_to_bool(value, span).into()); } }; diff --git a/compiler/src/expression/logical/and.rs b/compiler/src/expression/logical/and.rs index f174ff56f4..3175eb4c29 100644 --- a/compiler/src/expression/logical/and.rs +++ b/compiler/src/expression/logical/and.rs @@ -42,5 +42,5 @@ pub fn enforce_and<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( return Ok(ConstrainedValue::Boolean(result)); } - Err(CompilerError::cannot_evaluate_expression(name, span))? + Err(CompilerError::cannot_evaluate_expression(name, span).into()) } diff --git a/compiler/src/expression/logical/not.rs b/compiler/src/expression/logical/not.rs index 31627b41a6..8f8747c2f5 100644 --- a/compiler/src/expression/logical/not.rs +++ b/compiler/src/expression/logical/not.rs @@ -27,6 +27,6 @@ pub fn evaluate_not<'a, F: PrimeField, G: GroupType>( ) -> Result, LeoError> { match value { ConstrainedValue::Boolean(boolean) => Ok(ConstrainedValue::Boolean(boolean.not())), - value => Err(CompilerError::cannot_evaluate_expression(format!("!{}", value), span))?, + value => return Err(CompilerError::cannot_evaluate_expression(format!("!{}", value), span).into()), } } diff --git a/compiler/src/expression/logical/or.rs b/compiler/src/expression/logical/or.rs index a742e2d00b..842653e8bf 100644 --- a/compiler/src/expression/logical/or.rs +++ b/compiler/src/expression/logical/or.rs @@ -42,5 +42,5 @@ pub fn enforce_or<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( return Ok(ConstrainedValue::Boolean(result)); } - Err(CompilerError::cannot_evaluate_expression(name, span))? + Err(CompilerError::cannot_evaluate_expression(name, span).into()) } diff --git a/compiler/src/expression/relational/eq.rs b/compiler/src/expression/relational/eq.rs index 102418e109..4bd0d26805 100644 --- a/compiler/src/expression/relational/eq.rs +++ b/compiler/src/expression/relational/eq.rs @@ -75,10 +75,7 @@ pub fn evaluate_eq<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( return Ok(current); } (val_1, val_2) => { - return Err(CompilerError::incompatible_types( - format!("{} == {}", val_1, val_2,), - span, - ))?; + return Err(CompilerError::incompatible_types(format!("{} == {}", val_1, val_2,), span).into()); } }; diff --git a/compiler/src/expression/relational/ge.rs b/compiler/src/expression/relational/ge.rs index ea290d40eb..e3014dfb61 100644 --- a/compiler/src/expression/relational/ge.rs +++ b/compiler/src/expression/relational/ge.rs @@ -35,10 +35,7 @@ pub fn evaluate_ge<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( num_1.greater_than_or_equal(unique_namespace, &num_2) } (val_1, val_2) => { - return Err(CompilerError::incompatible_types( - format!("{} >= {}", val_1, val_2), - span, - ))?; + return Err(CompilerError::incompatible_types(format!("{} >= {}", val_1, val_2), span).into()); } }; diff --git a/compiler/src/expression/relational/gt.rs b/compiler/src/expression/relational/gt.rs index 3fee6d2db8..feb128084b 100644 --- a/compiler/src/expression/relational/gt.rs +++ b/compiler/src/expression/relational/gt.rs @@ -35,10 +35,7 @@ pub fn evaluate_gt<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( num_1.greater_than(unique_namespace, &num_2) } (val_1, val_2) => { - return Err(CompilerError::incompatible_types( - format!("{} > {}", val_1, val_2), - span, - ))?; + return Err(CompilerError::incompatible_types(format!("{} > {}", val_1, val_2), span).into()); } }; diff --git a/compiler/src/expression/relational/le.rs b/compiler/src/expression/relational/le.rs index f2f1e13b56..7efb797ec9 100644 --- a/compiler/src/expression/relational/le.rs +++ b/compiler/src/expression/relational/le.rs @@ -35,10 +35,7 @@ pub fn evaluate_le<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( num_1.less_than_or_equal(unique_namespace, &num_2) } (val_1, val_2) => { - return Err(CompilerError::incompatible_types( - format!("{} <= {}", val_1, val_2), - span, - ))?; + return Err(CompilerError::incompatible_types(format!("{} <= {}", val_1, val_2), span).into()); } }; diff --git a/compiler/src/expression/relational/lt.rs b/compiler/src/expression/relational/lt.rs index db79393881..8392bf6fe3 100644 --- a/compiler/src/expression/relational/lt.rs +++ b/compiler/src/expression/relational/lt.rs @@ -35,10 +35,7 @@ pub fn evaluate_lt<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( num_1.less_than(unique_namespace, &num_2) } (val_1, val_2) => { - return Err(CompilerError::incompatible_types( - format!("{} < {}", val_1, val_2), - span, - ))?; + return Err(CompilerError::incompatible_types(format!("{} < {}", val_1, val_2), span).into()); } }; diff --git a/compiler/src/expression/tuple/access.rs b/compiler/src/expression/tuple/access.rs index e5d9e8b3a7..e9ba0e45cb 100644 --- a/compiler/src/expression/tuple/access.rs +++ b/compiler/src/expression/tuple/access.rs @@ -35,13 +35,13 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { // Get the tuple values. let tuple = match self.enforce_expression(cs, tuple)? { ConstrainedValue::Tuple(tuple) => tuple, - value => return Err(CompilerError::undefined_array(value, span))?, + value => return Err(CompilerError::undefined_array(value, span).into()), }; // Check for out of bounds access. if index > tuple.len() - 1 { // probably safe to be a panic here - return Err(CompilerError::tuple_index_out_of_bounds(index, span))?; + return Err(CompilerError::tuple_index_out_of_bounds(index, span).into()); } Ok(tuple[index].to_owned()) diff --git a/compiler/src/expression/variable_ref/variable_ref.rs b/compiler/src/expression/variable_ref/variable_ref.rs index 5c5e0cab30..86a6a63a19 100644 --- a/compiler/src/expression/variable_ref/variable_ref.rs +++ b/compiler/src/expression/variable_ref/variable_ref.rs @@ -32,10 +32,9 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let result_value = if let Some(value) = self.get(variable.id) { value.clone() } else { - return Err(CompilerError::undefined_identifier( - &variable.name.clone().name, - &span.unwrap_or_default(), - ))?; + return Err( + CompilerError::undefined_identifier(&variable.name.clone().name, &span.unwrap_or_default()).into(), + ); // todo: probably can be a panic here instead }; diff --git a/compiler/src/function/function.rs b/compiler/src/function/function.rs index 76fe3b90dd..6b7f637022 100644 --- a/compiler/src/function/function.rs +++ b/compiler/src/function/function.rs @@ -52,7 +52,8 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { &function.name.borrow().name.to_string(), "arguments length invalid", &function.span.clone().unwrap_or_default(), - ))?; + ) + .into()); } // Store input values as new variables in resolved program diff --git a/compiler/src/function/input/array.rs b/compiler/src/function/input/array.rs index fde60bfb84..ef971b3b17 100644 --- a/compiler/src/function/input/array.rs +++ b/compiler/src/function/input/array.rs @@ -41,11 +41,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { match input_value { Some(InputValue::Array(arr)) => { if array_len != arr.len() { - return Err(CompilerError::invalid_input_array_dimensions( - arr.len(), - array_len, - span, - ))?; + return Err(CompilerError::invalid_input_array_dimensions(arr.len(), array_len, span).into()); } // Allocate each value in the current row @@ -70,7 +66,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { } } _ => { - return Err(CompilerError::invalid_function_input_array(input_value.unwrap(), span))?; + return Err(CompilerError::invalid_function_input_array(input_value.unwrap(), span).into()); } } diff --git a/compiler/src/function/input/main_function_input.rs b/compiler/src/function/input/main_function_input.rs index acac9fc358..e122761740 100644 --- a/compiler/src/function/input/main_function_input.rs +++ b/compiler/src/function/input/main_function_input.rs @@ -108,21 +108,15 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let parsed_type = parsed.get_int_type(); let input_type = input_type.into(); if std::mem::discriminant(&parsed_type) != std::mem::discriminant(&input_type) { - return Err(CompilerError::integer_value_integer_type_mismatch( - input_type, - parsed_type, - span, - ))?; + return Err( + CompilerError::integer_value_integer_type_mismatch(input_type, parsed_type, span).into(), + ); } Ok(ConstrainedValue::Integer(Integer::new(&parsed))) } (Type::Array(type_, arr_len), InputValue::Array(values)) => { if *arr_len != values.len() { - return Err(CompilerError::invalid_input_array_dimensions( - *arr_len, - values.len(), - span, - ))?; + return Err(CompilerError::invalid_input_array_dimensions(*arr_len, values.len(), span).into()); } Ok(ConstrainedValue::Array( @@ -134,11 +128,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { } (Type::Tuple(types), InputValue::Tuple(values)) => { if values.len() != types.len() { - return Err(CompilerError::input_tuple_size_mismatch( - types.len(), - values.len(), - span, - ))?; + return Err(CompilerError::input_tuple_size_mismatch(types.len(), values.len(), span).into()); } Ok(ConstrainedValue::Tuple( @@ -154,7 +144,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { (Type::Circuit(_), _) => unimplemented!("main function input not implemented for type {}", type_), // Should not happen. // Return an error if the input type and input value do not match. - (_, input) => Err(CompilerError::input_variable_type_mismatch(type_, input, name, span))?, + (_, input) => Err(CompilerError::input_variable_type_mismatch(type_, input, name, span).into()), } } } diff --git a/compiler/src/function/input/tuple.rs b/compiler/src/function/input/tuple.rs index c751d21866..6621221d50 100644 --- a/compiler/src/function/input/tuple.rs +++ b/compiler/src/function/input/tuple.rs @@ -39,11 +39,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { match input_value { Some(InputValue::Tuple(values)) => { if values.len() != types.len() { - return Err(CompilerError::input_tuple_size_mismatch( - types.len(), - values.len(), - span, - ))?; + return Err(CompilerError::input_tuple_size_mismatch(types.len(), values.len(), span).into()); } // Allocate each value in the tuple. @@ -62,7 +58,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { } } _ => { - return Err(CompilerError::invalid_function_input_tuple(input_value.unwrap(), span))?; + return Err(CompilerError::invalid_function_input_tuple(input_value.unwrap(), span).into()); } } diff --git a/compiler/src/function/main_function.rs b/compiler/src/function/main_function.rs index d8547d4692..6c5e15adcf 100644 --- a/compiler/src/function/main_function.rs +++ b/compiler/src/function/main_function.rs @@ -66,7 +66,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { ) { // If variable is in both [main] and [constants] sections - error. (_, Some(_), Some(_)) => { - return Err(CompilerError::double_input_declaration(name, &input_variable.name.span))?; + return Err(CompilerError::double_input_declaration(name, &input_variable.name.span).into()); } // If input option is found in [main] section and input is not const. (false, Some(input_option), _) => self.allocate_main_function_input( @@ -86,17 +86,15 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { )?, // Function argument is const, input is not. (true, Some(_), None) => { - return Err(CompilerError::expected_const_input_variable( - name, - &input_variable.name.span, - ))?; + return Err( + CompilerError::expected_const_input_variable(name, &input_variable.name.span).into(), + ); } // Input is const, function argument is not. (false, None, Some(_)) => { - return Err(CompilerError::expected_non_const_input_variable( - name, - &input_variable.name.span, - ))?; + return Err( + CompilerError::expected_non_const_input_variable(name, &input_variable.name.span).into(), + ); } // When not found - Error out. (_, _, _) => { @@ -104,7 +102,8 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { function.name.borrow().name.to_string(), name, &input_variable.name.span, - ))?; + ) + .into()); } }; diff --git a/compiler/src/function/result/result.rs b/compiler/src/function/result/result.rs index 9e9e47fbeb..56c7742919 100644 --- a/compiler/src/function/result/result.rs +++ b/compiler/src/function/result/result.rs @@ -55,7 +55,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { if get_indicator_value(&indicator) { // Error if we already have a return value. if return_value.is_some() { - return Err(CompilerError::statement_multiple_returns(span))?; + return Err(CompilerError::statement_multiple_returns(span).into()); } else { // Set the function return value. return_value = Some(result); diff --git a/compiler/src/output/mod.rs b/compiler/src/output/mod.rs index be7c673c21..4fbe9c2aa9 100644 --- a/compiler/src/output/mod.rs +++ b/compiler/src/output/mod.rs @@ -106,7 +106,7 @@ impl Output { // Return an error if we do not have enough return registers if register_values.len() < return_values.len() { - return Err(CompilerError::output_not_enough_registers(span))?; + return Err(CompilerError::output_not_enough_registers(span).into()); } let mut registers = BTreeMap::new(); @@ -119,11 +119,7 @@ impl Output { let return_value_type = value.to_type(span)?; if !register_type.is_assignable_from(&return_value_type) { - return Err(CompilerError::output_mismatched_types( - register_type, - return_value_type, - span, - ))?; + return Err(CompilerError::output_mismatched_types(register_type, return_value_type, span).into()); } let value = match value { diff --git a/compiler/src/output/output_bytes.rs b/compiler/src/output/output_bytes.rs index 5e9349cac7..50ce93b4a8 100644 --- a/compiler/src/output/output_bytes.rs +++ b/compiler/src/output/output_bytes.rs @@ -55,7 +55,7 @@ impl OutputBytes { // Return an error if we do not have enough return registers if register_values.len() < return_values.len() { - return Err(CompilerError::output_not_enough_registers(span))?; + return Err(CompilerError::output_not_enough_registers(span).into()); } // Manually construct result string @@ -73,11 +73,7 @@ impl OutputBytes { let return_value_type = value.to_type(span)?; if !register_type.is_assignable_from(&return_value_type) { - return Err(CompilerError::output_mismatched_types( - register_type, - return_value_type, - span, - ))?; + return Err(CompilerError::output_mismatched_types(register_type, return_value_type, span).into()); } let value = value.to_string(); diff --git a/compiler/src/statement/assign/assignee/array_index.rs b/compiler/src/statement/assign/assignee/array_index.rs index 413b97995c..6d46492d59 100644 --- a/compiler/src/statement/assign/assignee/array_index.rs +++ b/compiler/src/statement/assign/assignee/array_index.rs @@ -43,11 +43,10 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { ConstrainedValue::Array(input) => { if let Some(index) = index_resolved.to_usize() { if index >= input.len() { - Err(CompilerError::statement_array_assign_index_bounds( - index, - input.len(), - &context.span, - ))? + Err( + CompilerError::statement_array_assign_index_bounds(index, input.len(), &context.span) + .into(), + ) } else { let target = input.get_mut(index).unwrap(); if context.remaining_accesses.is_empty() { @@ -119,17 +118,15 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { Ok(()) } } - _ => Err(CompilerError::statement_array_assign_interior_index(&context.span))?, + _ => Err(CompilerError::statement_array_assign_interior_index(&context.span).into()), } } else if context.from_range && input_len != 0 { context.from_range = false; if let Some(index) = index_resolved.to_usize() { if index >= input_len { - return Err(CompilerError::statement_array_assign_index_bounds( - index, - input_len, - &context.span, - ))?; + return Err( + CompilerError::statement_array_assign_index_bounds(index, input_len, &context.span).into(), + ); } let target = context.input.remove(index); @@ -199,7 +196,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { Ok(()) } } else { - Err(CompilerError::statement_array_assign_interior_index(&context.span))? + Err(CompilerError::statement_array_assign_interior_index(&context.span).into()) } } } diff --git a/compiler/src/statement/assign/assignee/array_range_index.rs b/compiler/src/statement/assign/assignee/array_range_index.rs index acdefb8caa..060f5eca50 100644 --- a/compiler/src/statement/assign/assignee/array_range_index.rs +++ b/compiler/src/statement/assign/assignee/array_range_index.rs @@ -75,7 +75,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { } Ok(()) } - _ => Err(CompilerError::statement_array_assign_index(&context.span))?, + _ => Err(CompilerError::statement_array_assign_index(&context.span).into()), } } else { // range of a range diff --git a/compiler/src/statement/assign/assignee/member.rs b/compiler/src/statement/assign/assignee/member.rs index 081c84f68c..f6ecc243b1 100644 --- a/compiler/src/statement/assign/assignee/member.rs +++ b/compiler/src/statement/assign/assignee/member.rs @@ -31,7 +31,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { name: &Identifier, ) -> Result<(), LeoError> { if context.input.len() != 1 { - return Err(CompilerError::statement_array_assign_interior_index(&context.span))?; + return Err(CompilerError::statement_array_assign_interior_index(&context.span).into()); } match context.input.remove(0) { ConstrainedValue::CircuitExpression(_variable, members) => { @@ -45,12 +45,12 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { } None => { // Throw an error if the circuit variable does not exist in the circuit - Err(CompilerError::statement_undefined_circuit_variable(name, &context.span))? + Err(CompilerError::statement_undefined_circuit_variable(name, &context.span).into()) } } } // Throw an error if the circuit definition does not exist in the file - x => Err(CompilerError::undefined_circuit(x, &context.span))?, + x => Err(CompilerError::undefined_circuit(x, &context.span).into()), } } } diff --git a/compiler/src/statement/assign/assignee/mod.rs b/compiler/src/statement/assign/assignee/mod.rs index cbe0a9a688..6b299823a7 100644 --- a/compiler/src/statement/assign/assignee/mod.rs +++ b/compiler/src/statement/assign/assignee/mod.rs @@ -116,22 +116,11 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { span: &Span, ) -> Result<(), LeoError> { if stop_index < start_index { - Err(CompilerError::statement_array_assign_range_order( - start_index, - stop_index, - len, - span, - ))? + Err(CompilerError::statement_array_assign_range_order(start_index, stop_index, len, span).into()) } else if start_index > len { - Err(CompilerError::statement_array_assign_index_bounds( - start_index, - len, - span, - ))? + Err(CompilerError::statement_array_assign_index_bounds(start_index, len, span).into()) } else if stop_index > len { - Err(CompilerError::statement_array_assign_index_bounds( - stop_index, len, span, - ))? + Err(CompilerError::statement_array_assign_index_bounds(stop_index, len, span).into()) } else { Ok(()) } diff --git a/compiler/src/statement/assign/assignee/tuple.rs b/compiler/src/statement/assign/assignee/tuple.rs index 45c89feaf7..e69a4072d4 100644 --- a/compiler/src/statement/assign/assignee/tuple.rs +++ b/compiler/src/statement/assign/assignee/tuple.rs @@ -30,22 +30,18 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { index: usize, ) -> Result<(), LeoError> { if context.input.len() != 1 { - return Err(CompilerError::statement_array_assign_interior_index(&context.span))?; + return Err(CompilerError::statement_array_assign_interior_index(&context.span).into()); } match context.input.remove(0) { ConstrainedValue::Tuple(old) => { if index > old.len() { - Err(CompilerError::statement_tuple_assign_index_bounds( - index, - old.len(), - &context.span, - ))? + Err(CompilerError::statement_tuple_assign_index_bounds(index, old.len(), &context.span).into()) } else { context.input = vec![&mut old[index]]; self.resolve_target_access(cs, context) } } - _ => Err(CompilerError::statement_tuple_assign_index(&context.span))?, + _ => Err(CompilerError::statement_tuple_assign_index(&context.span).into()), } } } diff --git a/compiler/src/statement/conditional/conditional.rs b/compiler/src/statement/conditional/conditional.rs index b165405b00..c37a4a336d 100644 --- a/compiler/src/statement/conditional/conditional.rs +++ b/compiler/src/statement/conditional/conditional.rs @@ -60,7 +60,8 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { return Err(CompilerError::conditional_boolean_expression_fails_to_resolve_to_bool( value.to_string(), &span, - ))?; + ) + .into()); } }; diff --git a/compiler/src/statement/definition/definition.rs b/compiler/src/statement/definition/definition.rs index 437630a891..c2699a8594 100644 --- a/compiler/src/statement/definition/definition.rs +++ b/compiler/src/statement/definition/definition.rs @@ -35,7 +35,8 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { values.len(), variable_names.len(), span, - ))?; + ) + .into()); } for (variable, value) in variable_names.iter().zip(values.into_iter()) { @@ -65,7 +66,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { // ConstrainedValue::Return(values) => values, ConstrainedValue::Tuple(values) => values, value => { - return Err(CompilerError::statement_multiple_definition(value, &span))?; + return Err(CompilerError::statement_multiple_definition(value, &span).into()); } }; diff --git a/compiler/src/statement/statement.rs b/compiler/src/statement/statement.rs index 06cf561fc5..eb351f100e 100644 --- a/compiler/src/statement/statement.rs +++ b/compiler/src/statement/statement.rs @@ -82,9 +82,9 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { } } _ => { - return Err(CompilerError::statement_unassigned( - &statement.span.clone().unwrap_or_default(), - ))?; + return Err( + CompilerError::statement_unassigned(&statement.span.clone().unwrap_or_default()).into(), + ); } } } diff --git a/compiler/src/value/address/address.rs b/compiler/src/value/address/address.rs index da2e7c66eb..b9a0ae444d 100644 --- a/compiler/src/value/address/address.rs +++ b/compiler/src/value/address/address.rs @@ -72,7 +72,7 @@ impl Address { if let InputValue::Address(string) = input { Some(string) } else { - return Err(CompilerError::address_value_invalid_address(name, span))?; + return Err(CompilerError::address_value_invalid_address(name, span).into()); } } None => None, diff --git a/compiler/src/value/boolean/input.rs b/compiler/src/value/boolean/input.rs index 648ce5f2d4..0ee07d62c5 100644 --- a/compiler/src/value/boolean/input.rs +++ b/compiler/src/value/boolean/input.rs @@ -49,7 +49,7 @@ pub(crate) fn bool_from_input<'a, F: PrimeField, G: GroupType, CS: Constraint if let InputValue::Boolean(bool) = input { Some(bool) } else { - return Err(CompilerError::boolean_value_invalid_boolean(name, span))?; + return Err(CompilerError::boolean_value_invalid_boolean(name, span).into()); } } None => None, diff --git a/compiler/src/value/char/char.rs b/compiler/src/value/char/char.rs index 2a4c97e70e..3f7c094e53 100644 --- a/compiler/src/value/char/char.rs +++ b/compiler/src/value/char/char.rs @@ -160,7 +160,7 @@ pub(crate) fn char_from_input<'a, F: PrimeField, G: GroupType, CS: Constraint } } } else { - return Err(CompilerError::char_value_invalid_char(input, span))?; + return Err(CompilerError::char_value_invalid_char(input, span).into()); } } None => (CharType::Scalar(0 as char), None), diff --git a/compiler/src/value/field/input.rs b/compiler/src/value/field/input.rs index fee726de68..74a30b3a95 100644 --- a/compiler/src/value/field/input.rs +++ b/compiler/src/value/field/input.rs @@ -53,10 +53,7 @@ pub(crate) fn allocate_field>( })?), } } - None => Err(CompilerError::field_value_missing_field( - format!("{}: field", name), - span, - ))?, + None => return Err(CompilerError::field_value_missing_field(format!("{}: field", name), span).into()), } } @@ -72,7 +69,7 @@ pub(crate) fn field_from_input<'a, F: PrimeField, G: GroupType, CS: Constrain if let InputValue::Field(string) = input { Some(string) } else { - return Err(CompilerError::field_value_invalid_field(input, span))?; + return Err(CompilerError::field_value_invalid_field(input, span).into()); } } None => None, diff --git a/compiler/src/value/group/input.rs b/compiler/src/value/group/input.rs index 35438ce814..93d1e7abcb 100644 --- a/compiler/src/value/group/input.rs +++ b/compiler/src/value/group/input.rs @@ -49,7 +49,7 @@ pub(crate) fn group_from_input<'a, F: PrimeField, G: GroupType, CS: Constrain if let InputValue::Group(string) = input { Some(string) } else { - return Err(CompilerError::group_value_missing_group(input, span))?; + return Err(CompilerError::group_value_missing_group(input, span).into()); } } None => None, diff --git a/compiler/src/value/group/targets/edwards_bls12.rs b/compiler/src/value/group/targets/edwards_bls12.rs index edcd29fe9d..65ae635f12 100644 --- a/compiler/src/value/group/targets/edwards_bls12.rs +++ b/compiler/src/value/group/targets/edwards_bls12.rs @@ -207,10 +207,7 @@ impl EdwardsGroupType { Self::edwards_affine_from_y_str(number_string_typing(&y_string), span, None, span) } // Invalid - (x, y) => Err(CompilerError::group_value_invalid_group( - format!("({}, {})", x, y), - span, - ))?, + (x, y) => return Err(CompilerError::group_value_invalid_group(format!("({}, {})", x, y), span).into()), } } @@ -244,7 +241,7 @@ impl EdwardsGroupType { } // Otherwise return error. - Err(CompilerError::group_value_x_recover(element_span))? + Err(CompilerError::group_value_x_recover(element_span).into()) } } } @@ -279,7 +276,7 @@ impl EdwardsGroupType { } // Otherwise return error. - Err(CompilerError::group_value_y_recover(element_span))? + Err(CompilerError::group_value_y_recover(element_span).into()) } } } @@ -310,7 +307,7 @@ impl EdwardsGroupType { if element.is_on_curve() { Ok(element) } else { - Err(CompilerError::group_value_not_on_curve(element, element_span))? + Err(CompilerError::group_value_not_on_curve(element, element_span).into()) } } diff --git a/compiler/src/value/integer/integer.rs b/compiler/src/value/integer/integer.rs index 9beeb0e913..04d93af54e 100644 --- a/compiler/src/value/integer/integer.rs +++ b/compiler/src/value/integer/integer.rs @@ -161,15 +161,13 @@ impl Integer { if let InputValue::Integer(type_, number) = input { let asg_type = IntegerType::from(type_); if std::mem::discriminant(&asg_type) != std::mem::discriminant(integer_type) { - return Err(CompilerError::integer_value_integer_type_mismatch( - integer_type, - asg_type, - span, - ))?; + return Err( + CompilerError::integer_value_integer_type_mismatch(integer_type, asg_type, span).into(), + ); } Some(number) } else { - return Err(CompilerError::integer_value_invalid_integer(input, span))?; + return Err(CompilerError::integer_value_invalid_integer(input, span).into()); } } None => None, diff --git a/errors/src/asg/asg_errors.rs b/errors/src/asg/asg_errors.rs index beb74d0b13..2112faafba 100644 --- a/errors/src/asg/asg_errors.rs +++ b/errors/src/asg/asg_errors.rs @@ -21,7 +21,7 @@ use std::fmt::{Debug, Display}; create_errors!( AsgError, exit_code_mask: 0u32, - error_code_prefix: "G", + error_code_prefix: "ASG", @formatted unresolved_circuit { diff --git a/errors/src/ast/ast_errors.rs b/errors/src/ast/ast_errors.rs index 9f9f3fb00e..ede0122169 100644 --- a/errors/src/ast/ast_errors.rs +++ b/errors/src/ast/ast_errors.rs @@ -20,7 +20,7 @@ use std::{error::Error as ErrorArg, fmt::Debug}; create_errors!( AstError, exit_code_mask: 1000u32, - error_code_prefix: "T", + error_code_prefix: "AST", @backtraced failed_to_convert_ast_to_json_string { diff --git a/errors/src/cli/cli_errors.rs b/errors/src/cli/cli_errors.rs new file mode 100644 index 0000000000..e42937e072 --- /dev/null +++ b/errors/src/cli/cli_errors.rs @@ -0,0 +1,341 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +use crate::create_errors; +use std::{ + error::Error as ErrorArg, + fmt::{Debug, Display}, +}; + +create_errors!( + CliError, + exit_code_mask: 7000u32, + error_code_prefix: "CLI", + + @backtraced + unidentified_api { + args: (), + msg: "Unidentified API error", + help: None, + } + + @backtraced + unable_to_connect_aleo_pm { + args: (), + msg: "Unable to connect to Aleo PM. If you specified custom API endpoint, then check the URL for errors", + help: None, + } + + @backtraced + package_not_found { + args: (), + msg: "Package is not found - check author and/or package name", + help: None, + } + + @backtraced + unkown_api_error { + args: (status: impl Display), + msg: format!("Unknown API error: {}", status), + help: None, + } + + @backtraced + account_not_found { + args: (), + msg: "This username is not yet registered or the password is incorrect", + help: None, + } + + @backtraced + incorrect_password { + args: (), + msg: "", + help: None, + } + + @backtraced + bad_request { + args: (msg: impl Display), + msg: msg, + help: None, + } + + @backtraced + not_logged_in { + args: (), + msg: "You are not logged in. Please use `leo login` to login", + help: None, + } + + @backtraced + already_published { + args: (), + msg: "This package version is already published", + help: None, + } + + @backtraced + internal_server_error { + args: (), + msg: "Server error, please contact us at https://github.com/AleoHQ/leo/issues", + help: None, + } + + @backtraced + reqwest_json_error { + args: (error: impl ErrorArg), + msg: format!("request json failed {}", error), + help: None, + } + + @backtraced + incorrect_command_argument { + args: (), + msg: "Incorrect argument, please use --help for information on command use", + help: None, + } + + @backtraced + cli_io_error { + args: (error: impl ErrorArg), + msg: format!("cli io error {}", error), + help: None, + } + + @backtraced + cli_bytes_conversion_error { + args: (error: impl ErrorArg), + msg: format!("cli bytes conversion error {}", error), + help: None, + } + + @backtraced + cli_zip_error { + args: (error: impl ErrorArg), + msg: format!("cli zip error {}", error), + help: None, + } + + @backtraced + mainifest_file_not_found { + args: (), + msg: "Package manifest not found, try running `leo init`", + help: None, + } + + @backtraced + unable_to_get_token { + args: (), + msg: "Unable to get token", + help: None, + } + + @backtraced + supplied_token_is_incorrect { + args: (), + msg: "Supplied token is incorrect", + help: None, + } + + @backtraced + stored_credentials_expired { + args: (), + msg: "Stored credentials are incorrect or expired, please login again", + help: None, + } + + @backtraced + no_credentials_provided { + args: (), + msg: "No credentials provided", + help: None, + } + + @backtraced + logout_permision_denied { + args: (), + msg: "permission denied - check file permission in .leo folder", + help: None, + } + + @backtraced + cannot_access_logout_file { + args: (), + msg: "something went wrong, can't access the file", + help: None, + } + + @backtraced + package_cannot_be_named_after_a_keyword { + args: (), + msg: "Cannot be named a package after a keyword", + help: None, + } + + @backtraced + no_package_description { + args: (), + msg: "No package description", + help: None, + } + + @backtraced + missing_package_license { + args: (), + msg: "Missing package license", + help: None, + } + + @backtraced + missing_package_remote { + args: (), + msg: "Missing package remote", + help: None, + } + + @backtraced + package_author_is_not_set { + args: (), + msg: "Package author is not set. Specify package author in [remote] section of Leo.toml", + help: None, + } + + @backtraced + failed_to_convert_to_toml { + args: (error: impl ErrorArg), + msg: format!("failed to covnert to toml {}", error), + help: None, + } + + @backtraced + failed_to_convert_from_toml { + args: (error: impl ErrorArg), + msg: format!("failed to covnert from toml {}", error), + help: None, + } + + @backtraced + package_directory_does_not_exist { + args: (), + msg: "Directory does not exist", + help: None, + } + + @backtraced + invalid_project_name { + args: (), + msg: "Project name invalid", + help: None, + } + + @backtraced + invalid_package_name { + args: (name: impl Display), + msg: format!("Invalid Leo project name: {}", name), + help: None, + } + + @backtraced + package_main_file_not_found { + args: (), + msg: "File main.leo not found in src/ directory", + help: None, + } + + @backtraced + package_directory_already_exists { + args: (path: impl Debug), + msg: format!("Directory already exists {:?}", path), + help: None, + } + + @backtraced + package_could_not_create_directory { + args: (error: impl ErrorArg), + msg: format!("Could not create directory {}", error), + help: None, + } + + @backtraced + unable_to_setup { + args: (), + msg: "Unable to setup, see command output for more details", + help: None, + } + + @backtraced + program_file_does_not_exist { + args: (path: impl Display), + msg: format!("Program file does not exist {}", path), + help: None, + } + + @backtraced + could_not_fetch_versions { + args: (error: impl ErrorArg), + msg: format!("Could not fetch versions: {}", error), + help: None, + } + + @backtraced + unable_to_watch { + args: (error: impl ErrorArg), + msg: format!("Unable to watch, check that directory contains Leo.toml file. Error: {}", error), + help: None, + } + + @backtraced + failed_to_enable_ansi_support { + args: (), + msg: "failed to enable ansi_support", + help: None, + } + + @backtraced + self_update_error { + args: (error: impl ErrorArg), + msg: format!("self update crate Error: {}", error), + help: None, + } + + @backtraced + old_release_version { + args: (current: impl Display, latest: impl Display), + msg: format!("Old release version {} {}", current, latest), + help: None, + } +); + +impl CliError { + pub fn remove_token_and_username(error: std::io::Error, backtrace: Backtrace) -> Self { + use std::io::ErrorKind; + match error.kind() { + ErrorKind::NotFound => { + // tracing::info!("you are not logged in"); + Self::not_logged_in(backtrace) + } + ErrorKind::PermissionDenied => { + // tracing::error!("permission denied - check file permission in .leo folder"); + Self::logout_permision_denied(backtrace) + } + _ => { + // tracing::error!("something went wrong, can't access the file"); + Self::cannot_access_logout_file(backtrace) + } + } + } +} diff --git a/errors/src/cli/mod.rs b/errors/src/cli/mod.rs new file mode 100644 index 0000000000..85d9ad4089 --- /dev/null +++ b/errors/src/cli/mod.rs @@ -0,0 +1,18 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +pub mod cli_errors; +pub use self::cli_errors::*; diff --git a/errors/src/common/backtraced.rs b/errors/src/common/backtraced.rs index aa1333b303..1ab4c7e2f9 100644 --- a/errors/src/common/backtraced.rs +++ b/errors/src/common/backtraced.rs @@ -56,7 +56,7 @@ impl BacktracedError { { Self { message: message.to_string(), - help: help.map(|help| help.to_string()), + help, exit_code, code_identifier, error_type, diff --git a/errors/src/common/formatted.rs b/errors/src/common/formatted.rs index 580a475271..7e735b5ddc 100644 --- a/errors/src/common/formatted.rs +++ b/errors/src/common/formatted.rs @@ -60,7 +60,7 @@ impl FormattedError { content: span.content.to_string(), backtrace: BacktracedError::new_from_backtrace( message.to_string(), - help.map(|help| help.to_string()), + help, exit_code, code_identifier, error_type, diff --git a/errors/src/common/traits.rs b/errors/src/common/traits.rs index 0bb3bda30a..5e34f0db83 100644 --- a/errors/src/common/traits.rs +++ b/errors/src/common/traits.rs @@ -37,6 +37,6 @@ pub trait ErrorCode: Sized { pub trait LeoErrorCode: ErrorCode { #[inline(always)] fn code_identifier() -> u32 { - 037 + 37 } } diff --git a/errors/src/compiler/compiler_errors.rs b/errors/src/compiler/compiler_errors.rs index a064320113..4c2fab4791 100644 --- a/errors/src/compiler/compiler_errors.rs +++ b/errors/src/compiler/compiler_errors.rs @@ -24,7 +24,7 @@ use std::{ create_errors!( CompilerError, exit_code_mask: 2000u32, - error_code_prefix: "C", + error_code_prefix: "CMP", @backtraced invalid_test_context { diff --git a/errors/src/import/import_errors.rs b/errors/src/import/import_errors.rs index eaabadcd6f..8ee09bd3a9 100644 --- a/errors/src/import/import_errors.rs +++ b/errors/src/import/import_errors.rs @@ -24,7 +24,7 @@ use std::{ create_errors!( ImportError, exit_code_mask: 3000u32, - error_code_prefix: "I", + error_code_prefix: "IMP", // An imported package has the same name as an imported core_package. @formatted diff --git a/errors/src/lib.rs b/errors/src/lib.rs index 1d1fcf3a11..01859de714 100644 --- a/errors/src/lib.rs +++ b/errors/src/lib.rs @@ -20,6 +20,9 @@ pub use self::asg::*; pub mod ast; pub use self::ast::*; +pub mod cli; +pub use self::cli::*; + #[macro_use] pub mod common; pub use self::common::*; @@ -47,6 +50,8 @@ extern crate thiserror; use leo_input::InputParserError; +use backtrace::Backtrace; + #[derive(Debug, Error)] pub enum LeoError { #[error(transparent)] @@ -55,6 +60,9 @@ pub enum LeoError { #[error(transparent)] AstError(#[from] AstError), + #[error(transparent)] + CliError(#[from] CliError), + #[error(transparent)] CompilerError(#[from] CompilerError), @@ -84,6 +92,7 @@ impl LeoError { match self { AsgError(error) => error.exit_code(), AstError(error) => error.exit_code(), + CliError(error) => error.exit_code(), CompilerError(error) => error.exit_code(), ImportError(error) => error.exit_code(), InputError(_error) => 0, // TODO migrate me. @@ -95,6 +104,13 @@ impl LeoError { } } +pub type Result = core::result::Result; + +#[inline(always)] +pub fn new_backtrace() -> Backtrace { + Backtrace::new() +} + // #[test] // fn test_error() { // let err = FormattedError { diff --git a/errors/src/package/package_errors.rs b/errors/src/package/package_errors.rs index 719f8b03c0..423dc7beda 100644 --- a/errors/src/package/package_errors.rs +++ b/errors/src/package/package_errors.rs @@ -24,7 +24,7 @@ use std::{ create_errors!( PackageError, exit_code_mask: 4000u32, - error_code_prefix: "PA", + error_code_prefix: "PAK", @backtraced failed_to_create_imports_directory { diff --git a/errors/src/parser/parser_errors.rs b/errors/src/parser/parser_errors.rs index bb192d79eb..f9d954e27d 100644 --- a/errors/src/parser/parser_errors.rs +++ b/errors/src/parser/parser_errors.rs @@ -21,7 +21,7 @@ use std::fmt::Display; create_errors!( ParserError, exit_code_mask: 5000u32, - error_code_prefix: "P", + error_code_prefix: "PAR", @formatted unexpected_token { diff --git a/errors/src/snarkvm/snarkvm_errors.rs b/errors/src/snarkvm/snarkvm_errors.rs index 23768c351c..8fe476d698 100644 --- a/errors/src/snarkvm/snarkvm_errors.rs +++ b/errors/src/snarkvm/snarkvm_errors.rs @@ -14,10 +14,16 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use eyre::ErrReport; +use eyre::{eyre, ErrReport}; #[derive(Debug, Error)] pub enum SnarkVMError { #[error(transparent)] SnarkVMError(#[from] ErrReport), } + +impl Default for SnarkVMError { + fn default() -> Self { + Self::SnarkVMError(eyre!("snarkvm error")) + } +} diff --git a/leo/api.rs b/leo/api.rs index 53b6157d09..58a5f019ee 100644 --- a/leo/api.rs +++ b/leo/api.rs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use anyhow::{anyhow, Error, Result}; +use leo_errors::{new_backtrace, CliError, LeoError, Result}; + use reqwest::{ blocking::{multipart::Form, Client, Response}, Method, @@ -61,8 +62,8 @@ pub trait Route { /// Transform specific status codes into correct errors for this route. /// For example 404 on package fetch should mean that 'Package is not found' - fn status_to_err(&self, _status: StatusCode) -> Error { - anyhow!("Unidentified API error") + fn status_to_err(&self, _status: StatusCode) -> LeoError { + CliError::unidentified_api(new_backtrace()).into() } } @@ -130,9 +131,9 @@ impl Api { }; // only one error is possible here - let res = res.send().map_err(|_| { - anyhow!("Unable to connect to Aleo PM. If you specified custom API endpoint, then check the URL for errors") - })?; + let res = res + .send() + .map_err(|_| CliError::unable_to_connect_aleo_pm(new_backtrace()))?; // where magic begins route.process(res) @@ -170,14 +171,14 @@ impl Route for Fetch { Ok(res) } - fn status_to_err(&self, status: StatusCode) -> Error { + fn status_to_err(&self, status: StatusCode) -> LeoError { match status { - StatusCode::BAD_REQUEST => anyhow!("Package is not found - check author and/or package name"), + StatusCode::BAD_REQUEST => CliError::package_not_found(new_backtrace()).into(), // TODO: we should return 404 on not found author/package // and return BAD_REQUEST if data format is incorrect or some of the arguments // were not passed - StatusCode::NOT_FOUND => anyhow!("Package not found"), - _ => anyhow!("Unknown API error: {}", status), + StatusCode::NOT_FOUND => CliError::package_not_found(new_backtrace()).into(), + _ => CliError::unkown_api_error(status, new_backtrace()).into(), } } } @@ -206,12 +207,12 @@ impl Route for Login { Ok(res) } - fn status_to_err(&self, status: StatusCode) -> Error { + fn status_to_err(&self, status: StatusCode) -> LeoError { match status { - StatusCode::BAD_REQUEST => anyhow!("This username is not yet registered or the password is incorrect"), + StatusCode::BAD_REQUEST => CliError::account_not_found(new_backtrace()).into(), // TODO: NOT_FOUND here should be replaced, this error code has no relation to what this route is doing - StatusCode::NOT_FOUND => anyhow!("Incorrect password"), - _ => anyhow!("Unknown API error: {}", status), + StatusCode::NOT_FOUND => CliError::incorrect_password(new_backtrace()).into(), + _ => CliError::unkown_api_error(status, new_backtrace()).into(), } } } @@ -250,18 +251,20 @@ impl Route for Publish { let status = res.status(); if status == StatusCode::OK { - let body: PublishResponse = res.json()?; + let body: PublishResponse = res + .json() + .map_err(|e| CliError::reqwest_json_error(e, new_backtrace()))?; Ok(body.package_id) } else { - let res: HashMap = res.json()?; + let res: HashMap = res + .json() + .map_err(|e| CliError::reqwest_json_error(e, new_backtrace()))?; Err(match status { - StatusCode::BAD_REQUEST => anyhow!("{}", res.get("message").unwrap()), - StatusCode::UNAUTHORIZED => anyhow!("You are not logged in. Please use `leo login` to login"), - StatusCode::FAILED_DEPENDENCY => anyhow!("This package version is already published"), - StatusCode::INTERNAL_SERVER_ERROR => { - anyhow!("Server error, please contact us at https://github.com/AleoHQ/leo/issues") - } - _ => anyhow!("Unknown status code"), + StatusCode::BAD_REQUEST => CliError::bad_request(res.get("message").unwrap(), new_backtrace()).into(), + StatusCode::UNAUTHORIZED => CliError::not_logged_in(new_backtrace()).into(), + StatusCode::FAILED_DEPENDENCY => CliError::already_published(new_backtrace()).into(), + StatusCode::INTERNAL_SERVER_ERROR => CliError::internal_server_error(new_backtrace()).into(), + _ => CliError::unkown_api_error(status, new_backtrace()).into(), }) } } @@ -291,7 +294,9 @@ impl Route for Profile { // this may be extended for more precise error handling let status = res.status(); if status == StatusCode::OK { - let body: ProfileResponse = res.json()?; + let body: ProfileResponse = res + .json() + .map_err(|e| CliError::reqwest_json_error(e, new_backtrace()))?; return Ok(Some(body.username)); } diff --git a/leo/commands/build.rs b/leo/commands/build.rs index 76ce6c614d..18d9cca79e 100644 --- a/leo/commands/build.rs +++ b/leo/commands/build.rs @@ -21,6 +21,7 @@ use leo_compiler::{ AstSnapshotOptions, CompilerOptions, }; +use leo_errors::{new_backtrace, CliError, Result}; use leo_package::{ inputs::*, outputs::{ChecksumFile, CircuitFile, OutputsDirectory, OUTPUTS_DIRECTORY_NAME}, @@ -28,7 +29,6 @@ use leo_package::{ }; use leo_synthesizer::{CircuitSynthesizer, SerializedCircuit}; -use anyhow::{anyhow, Result}; use snarkvm_curves::{bls12_377::Bls12_377, edwards_bls12::Fq}; use snarkvm_r1cs::ConstraintSystem; use structopt::StructOpt; @@ -145,7 +145,7 @@ impl Command for Build { // Compile the main.leo file along with constraints if !MainFile::exists_at(&package_path) { - return Err(anyhow!("File main.leo not found in src/ directory")); + return Err(CliError::package_main_file_not_found(new_backtrace()))?; } // Create the output directory diff --git a/leo/commands/clean.rs b/leo/commands/clean.rs index 83c2503555..54ba1344f3 100644 --- a/leo/commands/clean.rs +++ b/leo/commands/clean.rs @@ -16,9 +16,9 @@ use crate::{commands::Command, context::Context}; use leo_compiler::OutputFile; +use leo_errors::Result; use leo_package::outputs::{ChecksumFile, CircuitFile, ProofFile, ProvingKeyFile, VerificationKeyFile}; -use anyhow::Result; use structopt::StructOpt; use tracing::span::Span; diff --git a/leo/commands/deploy.rs b/leo/commands/deploy.rs index fa421e14ab..576165e598 100644 --- a/leo/commands/deploy.rs +++ b/leo/commands/deploy.rs @@ -15,8 +15,8 @@ // along with the Leo library. If not, see . use crate::{commands::Command, context::Context}; +use leo_errors::Result; -use anyhow::Result; use structopt::StructOpt; use tracing::span::Span; diff --git a/leo/commands/init.rs b/leo/commands/init.rs index 18711d6923..b1f11ab6a5 100644 --- a/leo/commands/init.rs +++ b/leo/commands/init.rs @@ -15,9 +15,9 @@ // along with the Leo library. If not, see . use crate::{commands::Command, config::*, context::Context}; +use leo_errors::{new_backtrace, CliError, Result}; use leo_package::LeoPackage; -use anyhow::{anyhow, Result}; use structopt::StructOpt; use tracing::span::Span; @@ -44,17 +44,17 @@ impl Command for Init { // Check that the current package directory path exists. if !path.exists() { - return Err(anyhow!("Directory does not exist")); + return Err(CliError::package_directory_does_not_exist(new_backtrace()))?; } // Check that the given package name is valid. let package_name = path .file_stem() - .ok_or_else(|| anyhow!("Project name invalid"))? + .ok_or_else(|| CliError::invalid_project_name(new_backtrace()))? .to_string_lossy() .to_string(); if !LeoPackage::is_package_name_valid(&package_name) { - return Err(anyhow!("Invalid Leo project name: {}", package_name)); + return Err(CliError::invalid_package_name(&package_name, new_backtrace()))?; } let username = read_username().ok(); diff --git a/leo/commands/lint.rs b/leo/commands/lint.rs index c3f948acc9..1fba917222 100644 --- a/leo/commands/lint.rs +++ b/leo/commands/lint.rs @@ -15,8 +15,8 @@ // along with the Leo library. If not, see . use crate::{commands::Command, context::Context}; +use leo_errors::Result; -use anyhow::Result; use structopt::StructOpt; use tracing::span::Span; diff --git a/leo/commands/mod.rs b/leo/commands/mod.rs index 7f5f2349fb..b20bde89fe 100644 --- a/leo/commands/mod.rs +++ b/leo/commands/mod.rs @@ -15,8 +15,8 @@ // along with the Leo library. If not, see . use crate::context::Context; +use leo_errors::Result; -use anyhow::Result; use std::time::Instant; use tracing::span::Span; diff --git a/leo/commands/new.rs b/leo/commands/new.rs index 9f72988bb4..d2e7f4f7d8 100644 --- a/leo/commands/new.rs +++ b/leo/commands/new.rs @@ -15,9 +15,9 @@ // along with the Leo library. If not, see . use crate::{commands::Command, config::*, context::Context}; +use leo_errors::{new_backtrace, CliError, Result}; use leo_package::LeoPackage; -use anyhow::{anyhow, Result}; use std::fs; use structopt::StructOpt; use tracing::span::Span; @@ -46,7 +46,7 @@ impl Command for New { // Check that the given package name is valid. let package_name = self.name; if !LeoPackage::is_package_name_valid(&package_name) { - return Err(anyhow!("Invalid Leo project name")); + return Err(CliError::invalid_project_name(new_backtrace()))?; } let username = read_username().ok(); @@ -57,11 +57,11 @@ impl Command for New { // Verify the package directory path does not exist yet. if path.exists() { - return Err(anyhow!("Directory already exists {:?}", path)); + return Err(CliError::package_directory_already_exists(&path, new_backtrace()))?; } // Create the package directory - fs::create_dir_all(&path).map_err(|err| anyhow!("Could not create directory {}", err))?; + fs::create_dir_all(&path).map_err(|err| CliError::package_could_not_create_directory(err, new_backtrace()))?; LeoPackage::initialize(&package_name, &path, username)?; diff --git a/leo/commands/package/add.rs b/leo/commands/package/add.rs index 5b540617ba..2db7cbac22 100644 --- a/leo/commands/package/add.rs +++ b/leo/commands/package/add.rs @@ -15,9 +15,9 @@ // along with the Leo library. If not, see . use crate::{api::Fetch, commands::Command, context::Context}; +use leo_errors::{new_backtrace, CliError, Result}; use leo_package::imports::{ImportsDirectory, IMPORTS_DIRECTORY_NAME}; -use anyhow::{anyhow, Result}; use std::{ fs::{create_dir_all, File}, io::{Read, Write}, @@ -64,16 +64,12 @@ impl Add { if v.len() == 2 { Ok((v[0].to_string(), v[1].to_string())) } else { - Err(anyhow!( - "Incorrect argument, please use --help for information on command use" - )) + Err(CliError::incorrect_command_argument(new_backtrace()))? } } else if let (Some(author), Some(package)) = (&self.author, &self.package) { Ok((author.clone(), package.clone())) } else { - Err(anyhow!( - "Incorrect argument, please use --help for information on command use" - )) + Err(CliError::incorrect_command_argument(new_backtrace()))? } } } @@ -92,11 +88,13 @@ impl Command for Add { fn apply(self, context: Context, _: Self::Input) -> Result { // Check that a manifest exists for the current package. - if context.manifest().is_err() { - return Err(anyhow!("Package manifest not found, try running `leo init`")); - }; + context + .manifest() + .map_err(|_| CliError::mainifest_file_not_found(new_backtrace()))?; - let (author, package_name) = self.try_read_arguments()?; + let (author, package_name) = self + .try_read_arguments() + .map_err(|e| CliError::cli_bytes_conversion_error(e, new_backtrace()))?; // Attempt to fetch the package. let reader = { @@ -105,7 +103,11 @@ impl Command for Add { package_name: package_name.clone(), version: self.version, }; - let bytes = context.api.run_route(fetch)?.bytes()?; + let bytes = context + .api + .run_route(fetch)? + .bytes() + .map_err(|e| CliError::cli_bytes_conversion_error(e, new_backtrace()))?; std::io::Cursor::new(bytes) }; @@ -115,19 +117,15 @@ impl Command for Add { ImportsDirectory::create(&path)?; path.push(IMPORTS_DIRECTORY_NAME); path.push(package_name); - create_dir_all(&path)?; + create_dir_all(&path).map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; }; // Proceed to unzip and parse the fetched bytes. - let mut zip_archive = match zip::ZipArchive::new(reader) { - Ok(zip) => zip, - Err(error) => return Err(anyhow!(error)), - }; + let mut zip_archive = zip::ZipArchive::new(reader).map_err(|e| CliError::cli_zip_error(e, new_backtrace()))?; for i in 0..zip_archive.len() { - let file = match zip_archive.by_index(i) { - Ok(file) => file, - Err(error) => return Err(anyhow!(error)), - }; + let file = zip_archive + .by_index(i) + .map_err(|e| CliError::cli_zip_error(e, new_backtrace()))?; let file_name = file.name(); @@ -135,13 +133,16 @@ impl Command for Add { file_path.push(file_name); if file_name.ends_with('/') { - create_dir_all(file_path)?; + create_dir_all(file_path).map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; } else { if let Some(parent_directory) = path.parent() { - create_dir_all(parent_directory)?; + create_dir_all(parent_directory).map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; } - File::create(file_path)?.write_all(&file.bytes().map(|e| e.unwrap()).collect::>())?; + let mut created = File::create(file_path).map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; + created + .write_all(&file.bytes().map(|e| e.unwrap()).collect::>()) + .map_err(|e| CliError::cli_bytes_conversion_error(e, new_backtrace()))?; } } diff --git a/leo/commands/package/clone.rs b/leo/commands/package/clone.rs index 92cad951cd..0efd2efd06 100644 --- a/leo/commands/package/clone.rs +++ b/leo/commands/package/clone.rs @@ -15,8 +15,8 @@ // along with the Leo library. If not, see . use crate::{api::Fetch, commands::Command, context::Context}; +use leo_errors::{new_backtrace, CliError, Result}; -use anyhow::{anyhow, Result}; use std::{ borrow::Cow, fs::{ @@ -68,16 +68,12 @@ impl Clone { if v.len() == 2 { Ok((v[0].to_string(), v[1].to_string())) } else { - Err(anyhow!( - "Incorrect argument, please use --help for information on command use" - )) + Err(CliError::incorrect_command_argument(new_backtrace()))? } } else if let (Some(author), Some(package)) = (&self.author, &self.package) { Ok((author.clone(), package.clone())) } else { - Err(anyhow!( - "Incorrect argument, please use --help for information on command use" - )) + Err(CliError::incorrect_command_argument(new_backtrace()))? } } @@ -91,7 +87,7 @@ impl Clone { path.to_mut().push(directory_name); } - Ok(fs::create_dir_all(&path)?) + Ok(fs::create_dir_all(&path).map_err(|e| CliError::cli_io_error(e, new_backtrace()))?) } } @@ -117,7 +113,11 @@ impl Command for Clone { package_name: package_name.clone(), version: self.version, }; - let bytes = context.api.run_route(fetch)?.bytes()?; + let bytes = context + .api + .run_route(fetch)? + .bytes() + .map_err(|e| CliError::cli_bytes_conversion_error(e, new_backtrace()))?; std::io::Cursor::new(bytes) }; @@ -127,15 +127,12 @@ impl Command for Clone { Self::create_directory(&path, &package_name)?; // Proceed to unzip and parse the fetched bytes. - let mut zip_archive = match zip::ZipArchive::new(reader) { - Ok(zip) => zip, - Err(error) => return Err(anyhow!(error)), - }; + let mut zip_archive = zip::ZipArchive::new(reader).map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; + for i in 0..zip_archive.len() { - let file = match zip_archive.by_index(i) { - Ok(file) => file, - Err(error) => return Err(anyhow!(error)), - }; + let file = zip_archive + .by_index(i) + .map_err(|e| CliError::cli_zip_error(e, new_backtrace()))?; let file_name = file.name(); @@ -143,13 +140,16 @@ impl Command for Clone { file_path.push(file_name); if file_name.ends_with('/') { - fs::create_dir_all(file_path)?; + fs::create_dir_all(file_path).map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; } else { if let Some(parent_directory) = path.parent() { - fs::create_dir_all(parent_directory)?; + fs::create_dir_all(parent_directory).map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; } - File::create(file_path)?.write_all(&file.bytes().map(|e| e.unwrap()).collect::>())?; + let mut created = File::create(file_path).map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; + created + .write_all(&file.bytes().map(|e| e.unwrap()).collect::>()) + .map_err(|e| CliError::cli_bytes_conversion_error(e, new_backtrace()))?; } } diff --git a/leo/commands/package/login.rs b/leo/commands/package/login.rs index 960b7727fc..e586fafeb8 100644 --- a/leo/commands/package/login.rs +++ b/leo/commands/package/login.rs @@ -20,8 +20,8 @@ use crate::{ config::*, context::Context, }; +use leo_errors::{new_backtrace, CliError, Result}; -use anyhow::{anyhow, Result}; use std::collections::HashMap; use structopt::StructOpt; use tracing::Span; @@ -72,11 +72,13 @@ impl Command for Login { }; let res = api.run_route(login)?; - let mut res: HashMap = res.json()?; + let mut res: HashMap = res + .json() + .map_err(|e| CliError::reqwest_json_error(e, new_backtrace()))?; let tok_opt = res.remove("token"); if tok_opt.is_none() { - return Err(anyhow!("Unable to get token")); + return Err(CliError::unable_to_get_token(new_backtrace()))?; }; (tok_opt.unwrap(), email_username) @@ -90,7 +92,7 @@ impl Command for Login { match api.run_route(ProfileRoute {})? { Some(username) => (token, username), - None => return Err(anyhow!("Supplied token is incorrect")), + None => return Err(CliError::supplied_token_is_incorrect(new_backtrace()))?, } } @@ -107,12 +109,10 @@ impl Command for Login { (token, username) } else { remove_token_and_username()?; - return Err(anyhow!( - "Stored credentials are incorrect or expired, please login again" - )); + return Err(CliError::stored_credentials_expired(new_backtrace()))?; } } - None => return Err(anyhow!("No credentials provided")), + None => return Err(CliError::no_credentials_provided(new_backtrace()))?, } } }; diff --git a/leo/commands/package/logout.rs b/leo/commands/package/logout.rs index a18e29351b..09fcdfdafd 100644 --- a/leo/commands/package/logout.rs +++ b/leo/commands/package/logout.rs @@ -15,9 +15,8 @@ // along with the Leo library. If not, see . use crate::{commands::Command, config::remove_token_and_username, context::Context}; +use leo_errors::Result; -use anyhow::Result; -use std::io::ErrorKind; use structopt::StructOpt; use tracing::Span; @@ -41,24 +40,8 @@ impl Command for Logout { fn apply(self, _context: Context, _: Self::Input) -> Result { // the only error we're interested here is NotFound // however err in this case can also be of kind PermissionDenied or other - if let Err(err) = remove_token_and_username() { - match err.kind() { - ErrorKind::NotFound => { - tracing::info!("you are not logged in"); - Ok(()) - } - ErrorKind::PermissionDenied => { - tracing::error!("permission denied - check file permission in .leo folder"); - Ok(()) - } - _ => { - tracing::error!("something went wrong, can't access the file"); - Ok(()) - } - } - } else { - tracing::info!("success"); - Ok(()) - } + remove_token_and_username()?; + tracing::info!("success"); + Ok(()) } } diff --git a/leo/commands/package/publish.rs b/leo/commands/package/publish.rs index a3d7f165c7..c0a8c072ac 100644 --- a/leo/commands/package/publish.rs +++ b/leo/commands/package/publish.rs @@ -16,13 +16,13 @@ use super::build::Build; use crate::{api::Publish as PublishRoute, commands::Command, context::Context}; +use leo_errors::{new_backtrace, CliError, Result}; use leo_package::{ outputs::OutputsDirectory, root::{ZipFile, AUTHOR_PLACEHOLDER}, }; use leo_parser::KEYWORD_TOKENS; -use anyhow::{anyhow, Result}; use structopt::StructOpt; /// Publish package to Aleo Package Manager @@ -49,7 +49,7 @@ impl Command for Publish { let package_name = manifest.get_package_name(); if KEYWORD_TOKENS.iter().any(|keyword| keyword.to_string() == package_name) { - return Err(anyhow!("Cannot name a package after a keyword")); + return Err(CliError::package_cannot_be_named_after_a_keyword(new_backtrace()))?; } let package_version = manifest.get_package_version(); @@ -59,9 +59,9 @@ impl Command for Publish { manifest.get_package_license(), manifest.get_package_remote(), ) { - (None, _, _) => return Err(anyhow!("No package description")), - (_, None, _) => return Err(anyhow!("Missing package license")), - (_, _, None) => return Err(anyhow!("Missing package remote")), + (None, _, _) => return Err(CliError::no_package_description(new_backtrace()))?, + (_, None, _) => return Err(CliError::missing_package_license(new_backtrace()))?, + (_, _, None) => return Err(CliError::missing_package_remote(new_backtrace()))?, (_, _, _) => (), }; @@ -70,9 +70,7 @@ impl Command for Publish { // Prevent most common error before accessing API. if username == AUTHOR_PLACEHOLDER { - return Err(anyhow!( - "Package author is not set. Specify package author in [remote] section of Leo.toml" - )); + return Err(CliError::package_author_is_not_set(new_backtrace()))?; } // Create the output directory. diff --git a/leo/commands/package/remove.rs b/leo/commands/package/remove.rs index 1f5426062c..6d8ba229f9 100644 --- a/leo/commands/package/remove.rs +++ b/leo/commands/package/remove.rs @@ -15,9 +15,9 @@ // along with the Leo library. If not, see . use crate::{commands::Command, context::Context}; +use leo_errors::Result; use leo_package::LeoPackage; -use anyhow::Result; use structopt::StructOpt; use tracing::span::Span; diff --git a/leo/commands/prove.rs b/leo/commands/prove.rs index 46fdac1dad..2a174dedd4 100644 --- a/leo/commands/prove.rs +++ b/leo/commands/prove.rs @@ -16,6 +16,7 @@ use super::{build::BuildOptions, setup::Setup}; use crate::{commands::Command, context::Context}; +use leo_errors::{new_backtrace, CliError, Result, SnarkVMError}; use leo_package::outputs::ProofFile; use snarkvm_algorithms::{ snark::groth16::{Groth16, PreparedVerifyingKey, Proof}, @@ -24,7 +25,6 @@ use snarkvm_algorithms::{ use snarkvm_curves::bls12_377::{Bls12_377, Fr}; use snarkvm_utilities::bytes::ToBytes; -use anyhow::Result; use rand::thread_rng; use structopt::StructOpt; use tracing::span::Span; @@ -66,11 +66,15 @@ impl Command for Prove { tracing::info!("Starting..."); let rng = &mut thread_rng(); - let program_proof = Groth16::>::prove(¶meters, &program, rng)?; + // TODO fix this once snarkvm has better errors. + let program_proof = + Groth16::>::prove(¶meters, &program, rng).map_err(|_| SnarkVMError::default())?; // Write the proof file to the output directory let mut proof = vec![]; - program_proof.write_le(&mut proof)?; + program_proof + .write_le(&mut proof) + .map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; ProofFile::new(&package_name).write_to(&path, &proof)?; Ok((program_proof, prepared_verifying_key)) diff --git a/leo/commands/run.rs b/leo/commands/run.rs index 601441f507..49e3622557 100644 --- a/leo/commands/run.rs +++ b/leo/commands/run.rs @@ -17,8 +17,8 @@ use super::{build::BuildOptions, prove::Prove}; use crate::{commands::Command, context::Context}; use leo_compiler::{compiler::Compiler, group::targets::edwards_bls12::EdwardsGroupType}; +use leo_errors::{Result, SnarkVMError}; -use anyhow::Result; use snarkvm_algorithms::{snark::groth16::Groth16, traits::SNARK}; use snarkvm_curves::bls12_377::{Bls12_377, Fr}; use structopt::StructOpt; @@ -61,7 +61,8 @@ impl Command for Run { &prepared_verifying_key, &vec![], &proof, - )?; + ) + .map_err(|_| SnarkVMError::default())?; // Log the verifier output match is_success { diff --git a/leo/commands/setup.rs b/leo/commands/setup.rs index cfa15c6871..1265161377 100644 --- a/leo/commands/setup.rs +++ b/leo/commands/setup.rs @@ -17,6 +17,7 @@ use super::build::{Build, BuildOptions}; use crate::{commands::Command, context::Context}; use leo_compiler::{compiler::Compiler, group::targets::edwards_bls12::EdwardsGroupType}; +use leo_errors::{new_backtrace, CliError, Result}; use leo_package::outputs::{ProvingKeyFile, VerificationKeyFile}; use snarkvm_algorithms::{ @@ -26,7 +27,6 @@ use snarkvm_algorithms::{ use snarkvm_curves::bls12_377::{Bls12_377, Fr}; use snarkvm_utilities::ToBytes; -use anyhow::{anyhow, Result}; use rand::thread_rng; use structopt::StructOpt; use tracing::span::Span; @@ -80,14 +80,16 @@ impl Command for Setup { let rng = &mut thread_rng(); let (proving_key, prepared_verifying_key) = Groth16::, Vec>::setup(&program, rng) - .map_err(|_| anyhow!("{}", "Unable to setup, see command output for more details"))?; + .map_err(|_| CliError::unable_to_setup(new_backtrace()))?; // TODO (howardwu): Convert parameters to a 'proving key' struct for serialization. // Write the proving key file to the output directory let proving_key_file = ProvingKeyFile::new(&package_name); tracing::info!("Saving proving key ({:?})", proving_key_file.full_path(&path)); let mut proving_key_bytes = vec![]; - proving_key.write_le(&mut proving_key_bytes)?; + proving_key + .write_le(&mut proving_key_bytes) + .map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; let _ = proving_key_file.write_to(&path, &proving_key_bytes)?; tracing::info!("Complete"); @@ -95,7 +97,10 @@ impl Command for Setup { let verification_key_file = VerificationKeyFile::new(&package_name); tracing::info!("Saving verification key ({:?})", verification_key_file.full_path(&path)); let mut verification_key = vec![]; - proving_key.vk.write_le(&mut verification_key)?; + proving_key + .vk + .write_le(&mut verification_key) + .map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; let _ = verification_key_file.write_to(&path, &verification_key)?; tracing::info!("Complete"); @@ -110,13 +115,17 @@ impl Command for Setup { tracing::info!("Skipping curve check"); } let proving_key_bytes = ProvingKeyFile::new(&package_name).read_from(&path)?; - let proving_key = ProvingKey::::read(proving_key_bytes.as_slice(), !self.skip_key_check)?; + let proving_key = ProvingKey::::read(proving_key_bytes.as_slice(), !self.skip_key_check) + .map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; tracing::info!("Complete"); // Read the verification key file from the output directory tracing::info!("Loading verification key..."); - let verifying_key_bytes = VerificationKeyFile::new(&package_name).read_from(&path)?; - let verifying_key = VerifyingKey::::read(verifying_key_bytes.as_slice())?; + let verifying_key_bytes = VerificationKeyFile::new(&package_name) + .read_from(&path) + .map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; + let verifying_key = VerifyingKey::::read(verifying_key_bytes.as_slice()) + .map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; // Derive the prepared verifying key file from the verifying key let prepared_verifying_key = PreparedVerifyingKey::::from(verifying_key); diff --git a/leo/commands/test.rs b/leo/commands/test.rs index 3de2c52715..ef33258861 100644 --- a/leo/commands/test.rs +++ b/leo/commands/test.rs @@ -20,13 +20,13 @@ use leo_compiler::{ compiler::{thread_leaked_context, Compiler}, group::targets::edwards_bls12::EdwardsGroupType, }; +use leo_errors::{new_backtrace, CliError, Result}; use leo_package::{ inputs::*, outputs::{OutputsDirectory, OUTPUTS_DIRECTORY_NAME}, source::{MainFile, MAIN_FILENAME, SOURCE_DIRECTORY_NAME}, }; -use anyhow::{anyhow, Result}; use snarkvm_curves::edwards_bls12::Fq; use std::{convert::TryFrom, path::PathBuf, time::Instant}; use structopt::StructOpt; @@ -80,10 +80,10 @@ impl Command for Test { // when no main file and no files marked - error } else { - return Err(anyhow!( - "Program file does not exist {}", - package_path.to_string_lossy() - )); + return Err(CliError::program_file_does_not_exist( + package_path.to_string_lossy(), + new_backtrace(), + ))?; } // Construct the path to the output directory; diff --git a/leo/commands/update.rs b/leo/commands/update.rs index 07b382a1a0..e0431512c6 100644 --- a/leo/commands/update.rs +++ b/leo/commands/update.rs @@ -15,8 +15,8 @@ // along with the Leo library. If not, see . use crate::{commands::Command, config::Config, context::Context, updater::Updater}; +use leo_errors::{new_backtrace, CliError, Result}; -use anyhow::{anyhow, Result}; use structopt::StructOpt; use tracing::span::Span; @@ -61,7 +61,8 @@ impl Command for Update { fn apply(self, _: Context, _: Self::Input) -> Result { // If --list is passed, list all available versions and return. if self.list { - return Updater::show_available_releases().map_err(|e| anyhow!("Could not fetch versions: {}", e)); + return Ok(Updater::show_available_releases() + .map_err(|e| CliError::could_not_fetch_versions(e, new_backtrace()))?); } // Handles enabling and disabling automatic updates in the config file. diff --git a/leo/commands/watch.rs b/leo/commands/watch.rs index 0bbd546047..ae5756e76a 100644 --- a/leo/commands/watch.rs +++ b/leo/commands/watch.rs @@ -16,10 +16,10 @@ use super::build::{Build, BuildOptions}; use crate::{commands::Command, context::Context}; +use leo_errors::{new_backtrace, CliError, Result}; use std::{sync::mpsc::channel, time::Duration}; -use anyhow::{anyhow, Result}; use notify::{watcher, DebouncedEvent, RecursiveMode, Watcher}; use structopt::StructOpt; use tracing::span::Span; @@ -54,12 +54,9 @@ impl Command for Watch { let (tx, rx) = channel(); let mut watcher = watcher(tx, Duration::from_secs(self.interval)).unwrap(); - watcher.watch(LEO_SOURCE_DIR, RecursiveMode::Recursive).map_err(|e| { - anyhow!( - "Unable to watch, check that directory contains Leo.toml file. Error: {}", - e - ) - })?; + watcher + .watch(LEO_SOURCE_DIR, RecursiveMode::Recursive) + .map_err(|e| CliError::unable_to_watch(e, new_backtrace()))?; tracing::info!("Watching Leo source code"); diff --git a/leo/config.rs b/leo/config.rs index ccba67ef0b..4e566b3337 100644 --- a/leo/config.rs +++ b/leo/config.rs @@ -14,18 +14,18 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . +use leo_errors::{new_backtrace, CliError, Result}; + use std::{ fs::{ create_dir_all, File, {self}, }, - io, io::prelude::*, path::{Path, PathBuf}, }; -use anyhow::Error; use dirs::home_dir; use lazy_static::lazy_static; use serde::{Deserialize, Serialize}; @@ -83,44 +83,49 @@ impl Default for Config { impl Config { /// Read the config from the `config.toml` file - pub fn read_config() -> Result { + pub fn read_config() -> Result { let config_dir = LEO_CONFIG_DIRECTORY.clone(); let config_path = LEO_CONFIG_PATH.clone(); if !Path::exists(&config_path) { // Create a new default `config.toml` file if it doesn't already exist - create_dir_all(&config_dir)?; + create_dir_all(&config_dir).map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; - let default_config_string = toml::to_string(&Config::default())?; + let default_config_string = toml::to_string(&Config::default()) + .map_err(|e| CliError::failed_to_convert_to_toml(e, new_backtrace()))?; - fs::write(&config_path, default_config_string)?; + fs::write(&config_path, default_config_string).map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; } let toml_string = match fs::read_to_string(&config_path) { Ok(mut toml) => { // If the config is using an incorrect format, rewrite it. if toml::from_str::(&toml).is_err() { - let default_config_string = toml::to_string(&Config::default())?; - fs::write(&config_path, default_config_string.clone())?; + let default_config_string = toml::to_string(&Config::default()) + .map_err(|e| CliError::failed_to_convert_to_toml(e, new_backtrace()))?; + fs::write(&config_path, default_config_string.clone()) + .map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; toml = default_config_string; } toml } Err(_) => { - create_dir_all(&config_dir)?; - toml::to_string(&Config::default())? + create_dir_all(&config_dir).map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; + toml::to_string(&Config::default()) + .map_err(|e| CliError::failed_to_convert_to_toml(e, new_backtrace()))? } }; // Parse the contents into the `Config` struct - let config: Config = toml::from_str(&toml_string)?; + let config: Config = + toml::from_str(&toml_string).map_err(|e| CliError::failed_to_convert_from_toml(e, new_backtrace()))?; Ok(config) } /// Update the `automatic` configuration in the `config.toml` file. - pub fn set_update_automatic(automatic: bool) -> Result<(), Error> { + pub fn set_update_automatic(automatic: bool) -> Result<()> { let mut config = Self::read_config()?; if config.update.automatic != automatic { @@ -128,46 +133,66 @@ impl Config { // Update the config file let config_path = LEO_CONFIG_PATH.clone(); - fs::write(&config_path, toml::to_string(&config)?)?; + fs::write( + &config_path, + toml::to_string(&config).map_err(|e| CliError::failed_to_convert_to_toml(e, new_backtrace()))?, + ) + .map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; } Ok(()) } } -pub fn write_token_and_username(token: &str, username: &str) -> Result<(), io::Error> { +pub fn write_token_and_username(token: &str, username: &str) -> Result<()> { let config_dir = LEO_CONFIG_DIRECTORY.clone(); // Create Leo config directory if it not exists if !Path::new(&config_dir).exists() { - create_dir_all(&config_dir)?; + create_dir_all(&config_dir).map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; } - let mut credentials = File::create(&LEO_CREDENTIALS_PATH.to_path_buf())?; - credentials.write_all(token.as_bytes())?; + let mut credentials = + File::create(&LEO_CREDENTIALS_PATH.to_path_buf()).map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; + credentials + .write_all(token.as_bytes()) + .map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; - let mut username_file = File::create(&LEO_USERNAME_PATH.to_path_buf())?; - username_file.write_all(username.as_bytes())?; + let mut username_file = + File::create(&LEO_USERNAME_PATH.to_path_buf()).map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; + username_file + .write_all(username.as_bytes()) + .map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; Ok(()) } -pub fn read_token() -> Result { - let mut credentials = File::open(&LEO_CREDENTIALS_PATH.to_path_buf())?; +pub fn read_token() -> Result { + let mut credentials = + File::open(&LEO_CREDENTIALS_PATH.to_path_buf()).map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; let mut buf = String::new(); - credentials.read_to_string(&mut buf)?; + credentials + .read_to_string(&mut buf) + .map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; Ok(buf) } -pub fn read_username() -> Result { - let mut username = File::open(&LEO_USERNAME_PATH.to_path_buf())?; +pub fn read_username() -> Result { + let mut username = + File::open(&LEO_USERNAME_PATH.to_path_buf()).map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; let mut buf = String::new(); - username.read_to_string(&mut buf)?; + username + .read_to_string(&mut buf) + .map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; Ok(buf) } -pub fn remove_token_and_username() -> Result<(), io::Error> { - fs::remove_file(&LEO_CREDENTIALS_PATH.to_path_buf())?; - fs::remove_file(&LEO_USERNAME_PATH.to_path_buf())?; +pub fn remove_token_and_username() -> Result<()> { + if let Err(err) = fs::remove_file(&LEO_CREDENTIALS_PATH.to_path_buf()) { + Err(CliError::remove_token_and_username(err, new_backtrace()))? + } + if let Err(err) = fs::remove_file(&LEO_USERNAME_PATH.to_path_buf()) { + Err(CliError::remove_token_and_username(err, new_backtrace()))? + } Ok(()) } diff --git a/leo/context.rs b/leo/context.rs index 0fb96f0a11..07cb6b47c6 100644 --- a/leo/context.rs +++ b/leo/context.rs @@ -15,9 +15,9 @@ // along with the Leo library. If not, see . use crate::{api::Api, config}; +use leo_errors::{new_backtrace, CliError, Result}; use leo_package::root::Manifest; -use anyhow::Result; use std::{convert::TryFrom, env::current_dir, path::PathBuf}; pub const PACKAGE_MANAGER_URL: &str = "https://api.aleo.pm/"; @@ -37,7 +37,7 @@ impl Context { pub fn dir(&self) -> Result { match &self.path { Some(path) => Ok(path.clone()), - None => Ok(current_dir()?), + None => Ok(current_dir().map_err(|e| CliError::cli_io_error(e, new_backtrace()))?), } } diff --git a/leo/logger.rs b/leo/logger.rs index f7f145a4c2..91c72ea7f7 100644 --- a/leo/logger.rs +++ b/leo/logger.rs @@ -14,9 +14,10 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . +use leo_errors::{new_backtrace, CliError, Result}; + use std::{fmt, sync::Once}; -use anyhow::Result; use colored::Colorize; use tracing::{event::Event, subscriber::Subscriber}; use tracing_subscriber::{ @@ -213,10 +214,7 @@ where pub fn init_logger(_app_name: &'static str, verbosity: usize) -> Result<()> { // This line enables Windows 10 ANSI coloring API. #[cfg(target_family = "windows")] - match ansi_term::enable_ansi_support() { - Ok(_) => {} - Err(_) => return Err(anyhow::anyhow!("Error: Failed to enable ansi_support")), - }; + ansi_term::enable_ansi_support().map_err(|_| CliError::failed_to_enable_ansi_support(new_backtrace()))?; use tracing_subscriber::fmt::writer::MakeWriterExt; diff --git a/leo/main.rs b/leo/main.rs index a71589459e..4de5ef6e20 100644 --- a/leo/main.rs +++ b/leo/main.rs @@ -37,9 +37,8 @@ use commands::{ Update, Watch, }; +use leo_errors::Result; -// TODO remove anyhow::Result for a LeoResult -use anyhow::Result; use colored::Colorize; use std::{path::PathBuf, process::exit}; use structopt::{clap::AppSettings, StructOpt}; @@ -253,8 +252,8 @@ fn handle_error(res: Result) -> T { #[cfg(test)] mod cli_tests { use crate::{run_with_args, Opt}; + use leo_errors::Result; - use anyhow::Result; use std::path::PathBuf; use structopt::StructOpt; use test_dir::{DirBuilder, FileType, TestDir}; @@ -262,7 +261,7 @@ mod cli_tests { // Runs Command from cmd-like argument "leo run --arg1 --arg2". fn run_cmd(args: &str, path: &Option) -> Result<()> { let args = args.split(' ').collect::>(); - let mut opts = Opt::from_iter_safe(args)?; + let mut opts = Opt::from_iter_safe(args).unwrap(); if path.is_some() { opts.path = path.clone(); diff --git a/leo/tests/mod.rs b/leo/tests/mod.rs index 12e4e63eb8..a716ef9428 100644 --- a/leo/tests/mod.rs +++ b/leo/tests/mod.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use anyhow::Result; +use leo_errors::Result; use std::path::PathBuf; use crate::{ diff --git a/leo/updater.rs b/leo/updater.rs index a5e5b7668a..c00feaf25b 100644 --- a/leo/updater.rs +++ b/leo/updater.rs @@ -15,8 +15,8 @@ // along with the Leo library. If not, see . use crate::config::Config; +use leo_errors::{new_backtrace, CliError, Result}; -use anyhow::{anyhow, Result}; use colored::Colorize; use self_update::{backends::github, version::bump_is_greater, Status}; @@ -33,8 +33,10 @@ impl Updater { let releases = github::ReleaseList::configure() .repo_owner(Self::LEO_REPO_OWNER) .repo_name(Self::LEO_REPO_NAME) - .build()? - .fetch()?; + .build() + .map_err(|e| CliError::self_update_error(e, new_backtrace()))? + .fetch() + .map_err(|e| CliError::self_update_error(e, new_backtrace()))?; let mut output = "\nList of available versions\n".to_string(); for release in releases { @@ -57,8 +59,10 @@ impl Updater { .show_download_progress(show_output) .no_confirm(true) .show_output(show_output) - .build()? - .update()?; + .build() + .map_err(|e| CliError::self_update_error(e, new_backtrace()))? + .update() + .map_err(|e| CliError::self_update_error(e, new_backtrace()))?; Ok(status) } @@ -70,19 +74,24 @@ impl Updater { .repo_name(Self::LEO_REPO_NAME) .bin_name(Self::LEO_BIN_NAME) .current_version(env!("CARGO_PKG_VERSION")) - .build()?; + .build() + .map_err(|e| CliError::self_update_error(e, new_backtrace()))?; let current_version = updater.current_version(); - let latest_release = updater.get_latest_release()?; + let latest_release = updater + .get_latest_release() + .map_err(|e| CliError::self_update_error(e, new_backtrace()))?; - if bump_is_greater(¤t_version, &latest_release.version)? { + if bump_is_greater(¤t_version, &latest_release.version) + .map_err(|e| CliError::self_update_error(e, new_backtrace()))? + { Ok(latest_release.version) } else { - Err(anyhow!( - "Old release version {} {}", + Err(CliError::old_release_version( current_version, - latest_release.version - )) + latest_release.version, + new_backtrace(), + ))? } } diff --git a/package/src/imports/directory.rs b/package/src/imports/directory.rs index c7db6cbaef..38d497050f 100644 --- a/package/src/imports/directory.rs +++ b/package/src/imports/directory.rs @@ -46,7 +46,7 @@ impl ImportsDirectory { path.to_mut().push(package_name); if !path.exists() || !path.is_dir() { - return Err(PackageError::import_does_not_exist(package_name, Backtrace::new()))?; + return Err(PackageError::import_does_not_exist(package_name, Backtrace::new()).into()); } fs::remove_dir_all(&path).map_err(|e| PackageError::failed_to_remove_imports_directory(e, Backtrace::new()))?; diff --git a/package/src/inputs/directory.rs b/package/src/inputs/directory.rs index 0aec0af922..448b251bec 100644 --- a/package/src/inputs/directory.rs +++ b/package/src/inputs/directory.rs @@ -75,7 +75,8 @@ fn parse_file_paths(directory: ReadDir, file_paths: &mut Vec) -> Result file_path.as_os_str().to_owned(), file_type, Backtrace::new(), - ))?; + ) + .into()); } file_paths.push(file_path); diff --git a/package/src/inputs/pairs.rs b/package/src/inputs/pairs.rs index c68b531329..6fca57fb73 100644 --- a/package/src/inputs/pairs.rs +++ b/package/src/inputs/pairs.rs @@ -60,17 +60,13 @@ impl TryFrom<&Path> for InputPairs { Some(stem) => match stem.to_str() { Some(file_name) => file_name, None => { - return Err(PackageError::failed_to_get_input_file_name( - file.as_os_str(), - Backtrace::new(), - ))?; + return Err( + PackageError::failed_to_get_input_file_name(file.as_os_str(), Backtrace::new()).into(), + ); } }, None => { - return Err(PackageError::failed_to_get_input_file_name( - file.as_os_str(), - Backtrace::new(), - ))?; + return Err(PackageError::failed_to_get_input_file_name(file.as_os_str(), Backtrace::new()).into()); } }; diff --git a/package/src/package.rs b/package/src/package.rs index c5d2e9f279..eba5a35514 100644 --- a/package/src/package.rs +++ b/package/src/package.rs @@ -39,7 +39,7 @@ impl Package { pub fn new(package_name: &str) -> Result { // Check that the package name is valid. if !Self::is_package_name_valid(package_name) { - return Err(PackageError::invalid_package_name(package_name, Backtrace::new()))?; + return Err(PackageError::invalid_package_name(package_name, Backtrace::new()).into()); } Ok(Self { @@ -192,7 +192,8 @@ impl Package { package_name, path.as_os_str(), Backtrace::new(), - ))?; + ) + .into()); } } // Next, initialize this directory as a Leo package. @@ -234,7 +235,8 @@ impl Package { package_name, path.as_os_str(), Backtrace::new(), - ))?; + ) + .into()); } } @@ -243,7 +245,7 @@ impl Package { /// Removes the package at the given path pub fn remove_imported_package(package_name: &str, path: &Path) -> Result<(), LeoError> { - Ok(ImportsDirectory::remove_import(path, package_name)?) + ImportsDirectory::remove_import(path, package_name) } } diff --git a/package/src/source/directory.rs b/package/src/source/directory.rs index 8d243c654d..fc82cd3add 100644 --- a/package/src/source/directory.rs +++ b/package/src/source/directory.rs @@ -65,7 +65,8 @@ impl SourceDirectory { file_path.as_os_str().to_owned(), file_type, Backtrace::new(), - ))?; + ) + .into()); } // Verify that the file has the default file extension @@ -77,7 +78,8 @@ impl SourceDirectory { file_path.as_os_str().to_owned(), file_extension.to_owned(), Backtrace::new(), - ))?; + ) + .into()); } file_paths.push(file_path); diff --git a/parser/src/parser/context.rs b/parser/src/parser/context.rs index 4721cd3b22..7e04957e2d 100644 --- a/parser/src/parser/context.rs +++ b/parser/src/parser/context.rs @@ -300,7 +300,7 @@ impl ParserContext { if &token == inner { Ok(self.tokens.pop().unwrap().span) } else { - Err(ParserError::unexpected(inner, token, span))? + Err(ParserError::unexpected(inner, token, span).into()) } } else { Err(self.eof()) @@ -315,11 +315,12 @@ impl ParserContext { if token.iter().any(|x| x == inner) { Ok(self.tokens.pop().unwrap()) } else { - Err(ParserError::unexpected( + return Err(ParserError::unexpected( inner, token.iter().map(|x| format!("'{}'", x)).collect::>().join(", "), span, - ))? + ) + .into()); } } else { Err(self.eof()) @@ -360,7 +361,7 @@ impl ParserContext { unimplemented!() } } else { - Err(ParserError::unexpected_str(inner, "ident", span))? + Err(ParserError::unexpected_str(inner, "ident", span).into()) } } else { Err(self.eof()) diff --git a/parser/src/parser/expression.rs b/parser/src/parser/expression.rs index 61aff85c74..b25d9dddd3 100644 --- a/parser/src/parser/expression.rs +++ b/parser/src/parser/expression.rs @@ -461,7 +461,7 @@ impl ParserContext { }); } else { let next = self.peek()?; - return Err(ParserError::unexpected_str(&next.token, "int or ident", &next.span))?; + return Err(ParserError::unexpected_str(&next.token, "int or ident", &next.span).into()); } } Token::LeftParen => { @@ -608,7 +608,7 @@ impl ParserContext { let first = match first { SpreadOrExpression::Spread(first) => { let span = span + first.span(); - return Err(ParserError::spread_in_array_init(&span))?; + return Err(ParserError::spread_in_array_init(&span).into()); } SpreadOrExpression::Expression(x) => x, }; @@ -725,7 +725,7 @@ impl ParserContext { Expression::Identifier(ident) } token => { - return Err(ParserError::unexpected_str(token, "expression", &span))?; + return Err(ParserError::unexpected_str(token, "expression", &span).into()); } }) } diff --git a/parser/src/parser/file.rs b/parser/src/parser/file.rs index 1e970d3874..ed09efea59 100644 --- a/parser/src/parser/file.rs +++ b/parser/src/parser/file.rs @@ -48,7 +48,7 @@ impl ParserContext { functions.insert(id, function); } Token::Ident(ident) if ident.as_ref() == "test" => { - return Err(ParserError::test_function(&token.span))?; + return Err(ParserError::test_function(&token.span).into()); // self.expect(Token::Test)?; // let (id, function) = self.parse_function_declaration()?; // tests.insert(id, TestFunction { @@ -75,7 +75,8 @@ impl ParserContext { .collect::>() .join(", "), &token.span, - ))?; + ) + .into()); } } } @@ -116,7 +117,8 @@ impl ParserContext { .collect::>() .join(", "), &end.span, - ))?; + ) + .into()); } end_span = end.span; break; @@ -128,7 +130,7 @@ impl ParserContext { args.push(int.value); } else { let token = self.peek()?; - return Err(ParserError::unexpected_str(&token.token, "ident or int", &token.span))?; + return Err(ParserError::unexpected_str(&token.token, "ident or int", &token.span).into()); } if self.eat(Token::Comma).is_none() && !comma { end_span = self.expect(Token::RightParen)?; @@ -165,7 +167,7 @@ impl ParserContext { } if out.is_empty() { - return Err(ParserError::invalid_import_list(span))?; + return Err(ParserError::invalid_import_list(span).into()); } Ok(out) @@ -244,7 +246,7 @@ impl ParserContext { // Return an error if the package name contains a keyword. if let Some(token) = KEYWORD_TOKENS.iter().find(|x| x.to_string() == base.name.as_ref()) { - return Err(ParserError::unexpected_str(token, "package name", &base.span))?; + return Err(ParserError::unexpected_str(token, "package name", &base.span).into()); } // Return an error if the package name contains invalid characters. @@ -253,7 +255,7 @@ impl ParserContext { .chars() .all(|x| x.is_ascii_lowercase() || x.is_ascii_digit() || x == '-' || x == '_') { - return Err(ParserError::invalid_package_name(&base.span))?; + return Err(ParserError::invalid_package_name(&base.span).into()); } // Return the package name. @@ -315,14 +317,14 @@ impl ParserContext { let peeked = &self.peek()?; if peeked.token == Token::Semicolon { if commas { - return Err(ParserError::mixed_commas_and_semicolons(&peeked.span))?; + return Err(ParserError::mixed_commas_and_semicolons(&peeked.span).into()); } semi_colons = true; self.expect(Token::Semicolon)?; } else { if semi_colons { - return Err(ParserError::mixed_commas_and_semicolons(&peeked.span))?; + return Err(ParserError::mixed_commas_and_semicolons(&peeked.span).into()); } commas = true; @@ -367,11 +369,11 @@ impl ParserContext { /// pub fn parse_member_function_declaration(&mut self) -> SyntaxResult { let peeked = self.peek()?.clone(); - if &peeked.token == &Token::Function || &peeked.token == &Token::At { + if peeked.token == Token::Function || peeked.token == Token::At { let function = self.parse_function_declaration()?; Ok(CircuitMember::CircuitFunction(Box::new(function.1))) } else { - Err(ParserError::unexpected( + return Err(ParserError::unexpected( &peeked.token, [Token::Function, Token::At] .iter() @@ -379,7 +381,8 @@ impl ParserContext { .collect::>() .join(", "), &peeked.span, - ))? + ) + .into()); } } @@ -432,7 +435,7 @@ impl ParserContext { } if let Some(mutable) = &mutable { - return Err(ParserError::mut_function_input(&(&mutable.span + &name.span)))?; + return Err(ParserError::mut_function_input(&(&mutable.span + &name.span)).into()); } self.expect(Token::Colon)?; diff --git a/parser/src/parser/mod.rs b/parser/src/parser/mod.rs index 8b6eff0e1c..8965ac9359 100644 --- a/parser/src/parser/mod.rs +++ b/parser/src/parser/mod.rs @@ -41,7 +41,7 @@ pub(crate) fn assert_no_whitespace(left_span: &Span, right_span: &Span, left: &s let mut error_span = left_span + right_span; error_span.col_start = left_span.col_stop - 1; error_span.col_stop = right_span.col_start - 1; - return Err(ParserError::unexpected_whitespace(left, right, &error_span))?; + return Err(ParserError::unexpected_whitespace(left, right, &error_span).into()); } Ok(()) diff --git a/parser/src/parser/statement.rs b/parser/src/parser/statement.rs index 2f4419aeb3..0c8c333cf0 100644 --- a/parser/src/parser/statement.rs +++ b/parser/src/parser/statement.rs @@ -64,7 +64,7 @@ impl ParserContext { accesses.push(AssigneeAccess::ArrayIndex(*expr.index)); } Expression::Identifier(id) => identifier = id, - _ => return Err(ParserError::invalid_assignment_target(expr.span()))?, + _ => return Err(ParserError::invalid_assignment_target(expr.span()).into()), } Ok(identifier) } @@ -191,7 +191,7 @@ impl ParserContext { match s { Statement::Block(_) | Statement::Conditional(_) => Some(Box::new(s)), s => { - return Err(ParserError::unexpected_statement(&s, "Block or Conditional", s.span()))?; + return Err(ParserError::unexpected_statement(&s, "Block or Conditional", s.span()).into()); } } } else { @@ -245,7 +245,7 @@ impl ParserContext { chars } SpannedToken { token, span } => { - return Err(ParserError::unexpected_str(token, "formatted string", &span))?; + return Err(ParserError::unexpected_str(token, "formatted string", &span).into()); } }; @@ -280,11 +280,7 @@ impl ParserContext { "error" => ConsoleFunction::Error(self.parse_console_args()?), "log" => ConsoleFunction::Log(self.parse_console_args()?), x => { - return Err(ParserError::unexpected_ident( - x, - &["assert", "error", "log"], - &function.span, - ))?; + return Err(ParserError::unexpected_ident(x, &["assert", "error", "log"], &function.span).into()); } }; self.expect(Token::RightParen)?; @@ -303,7 +299,7 @@ impl ParserContext { pub fn parse_variable_name(&mut self, span: &SpannedToken) -> SyntaxResult { let mutable = self.eat(Token::Mut); if let Some(mutable) = &mutable { - return Err(ParserError::let_mut_statement(&(&mutable.span + &span.span)))?; + return Err(ParserError::let_mut_statement(&(&mutable.span + &span.span)).into()); } let name = self.expect_ident()?; diff --git a/parser/src/parser/type_.rs b/parser/src/parser/type_.rs index c72af90179..c052f19582 100644 --- a/parser/src/parser/type_.rs +++ b/parser/src/parser/type_.rs @@ -69,7 +69,7 @@ impl ParserContext { dimensions.push(int); } else { let token = self.peek()?; - return Err(ParserError::unexpected_str(&token.token, "int", &token.span))?; + return Err(ParserError::unexpected_str(&token.token, "int", &token.span).into()); } if self.eat(Token::Comma).is_none() { break; diff --git a/parser/src/tokenizer/mod.rs b/parser/src/tokenizer/mod.rs index 3543ac5479..022ed57173 100644 --- a/parser/src/tokenizer/mod.rs +++ b/parser/src/tokenizer/mod.rs @@ -70,7 +70,7 @@ pub(crate) fn tokenize(path: &str, input: StrTendril) -> Result { if !check_address(address) { - return Err(ParserError::invalid_address_lit(address, &span))?; + return Err(ParserError::invalid_address_lit(address, &span).into()); } } _ => (), @@ -96,7 +96,8 @@ pub(crate) fn tokenize(path: &str, input: StrTendril) -> Result Date: Wed, 4 Aug 2021 04:12:03 -0700 Subject: [PATCH 09/58] clippy, use leo result everywhere --- asg/src/const_value.rs | 4 +- asg/src/expression/array_access.rs | 4 +- asg/src/expression/array_init.rs | 6 +- asg/src/expression/array_inline.rs | 6 +- asg/src/expression/array_range_access.rs | 4 +- asg/src/expression/binary.rs | 4 +- asg/src/expression/call.rs | 6 +- asg/src/expression/cast.rs | 4 +- asg/src/expression/circuit_access.rs | 6 +- asg/src/expression/circuit_init.rs | 4 +- asg/src/expression/constant.rs | 4 +- asg/src/expression/mod.rs | 4 +- asg/src/expression/ternary.rs | 4 +- asg/src/expression/tuple_access.rs | 4 +- asg/src/expression/tuple_init.rs | 6 +- asg/src/expression/unary.rs | 4 +- asg/src/expression/variable_ref.rs | 4 +- asg/src/import.rs | 10 +- asg/src/lib.rs | 6 +- asg/src/node.rs | 4 +- asg/src/pass.rs | 4 +- asg/src/prelude.rs | 4 +- asg/src/program/circuit.rs | 8 +- asg/src/program/function.rs | 6 +- asg/src/program/mod.rs | 4 +- asg/src/scope.rs | 6 +- asg/src/statement/assign.rs | 8 +- asg/src/statement/block.rs | 4 +- asg/src/statement/conditional.rs | 6 +- asg/src/statement/console.rs | 6 +- asg/src/statement/definition.rs | 4 +- asg/src/statement/expression.rs | 4 +- asg/src/statement/iteration.rs | 4 +- asg/src/statement/mod.rs | 4 +- asg/src/statement/return_.rs | 4 +- ast/src/lib.rs | 12 +-- ast/src/reducer/canonicalization.rs | 18 ++-- ast/src/reducer/reconstructing_director.rs | 106 ++++++++----------- ast/src/reducer/reconstructing_reducer.rs | 113 ++++++++------------- imports/src/parser/import_parser.rs | 4 +- imports/src/parser/parse_package.rs | 6 +- imports/src/parser/parse_symbol.rs | 4 +- leo/commands/build.rs | 2 +- leo/commands/init.rs | 4 +- leo/commands/new.rs | 4 +- leo/commands/package/add.rs | 4 +- leo/commands/package/clone.rs | 4 +- leo/commands/package/login.rs | 8 +- leo/commands/package/publish.rs | 10 +- leo/commands/test.rs | 5 +- leo/config.rs | 4 +- leo/updater.rs | 6 +- package/src/imports/directory.rs | 6 +- package/src/inputs/directory.rs | 8 +- package/src/inputs/input.rs | 6 +- package/src/inputs/state.rs | 6 +- package/src/lib.rs | 6 +- package/src/outputs/checksum.rs | 8 +- package/src/outputs/circuit.rs | 8 +- package/src/outputs/directory.rs | 6 +- package/src/outputs/proof.rs | 8 +- package/src/outputs/proving_key.rs | 8 +- package/src/outputs/verification_key.rs | 8 +- package/src/package.rs | 8 +- package/src/root/gitignore.rs | 4 +- package/src/root/manifest.rs | 6 +- package/src/root/readme.rs | 4 +- package/src/root/zip.rs | 8 +- package/src/source/directory.rs | 6 +- package/src/source/main.rs | 4 +- parser/examples/parser.rs | 6 +- parser/src/lib.rs | 3 +- parser/src/parser/context.rs | 22 ++-- parser/src/parser/expression.rs | 44 ++++---- parser/src/parser/file.rs | 30 +++--- parser/src/parser/mod.rs | 8 +- parser/src/parser/statement.rs | 26 ++--- parser/src/parser/type_.rs | 6 +- parser/tests/serialization/json.rs | 4 +- 79 files changed, 352 insertions(+), 403 deletions(-) diff --git a/asg/src/const_value.rs b/asg/src/const_value.rs index 8f5d33f9f3..5ed2f9b40d 100644 --- a/asg/src/const_value.rs +++ b/asg/src/const_value.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use crate::{Circuit, Identifier, IntegerType, Type}; -use leo_errors::{AsgError, LeoError, Span}; +use leo_errors::{AsgError, Result, Span}; use indexmap::IndexMap; use num_bigint::BigInt; @@ -314,7 +314,7 @@ impl ConstInt { Type::Integer(self.get_int_type()) } - pub fn parse(int_type: &IntegerType, value: &str, span: &Span) -> Result { + pub fn parse(int_type: &IntegerType, value: &str, span: &Span) -> Result { Ok(match int_type { IntegerType::I8 => ConstInt::I8(value.parse().map_err(|_| AsgError::invalid_int(value, span))?), IntegerType::I16 => ConstInt::I16(value.parse().map_err(|_| AsgError::invalid_int(value, span))?), diff --git a/asg/src/expression/array_access.rs b/asg/src/expression/array_access.rs index 859356adae..5987a48fd9 100644 --- a/asg/src/expression/array_access.rs +++ b/asg/src/expression/array_access.rs @@ -16,7 +16,7 @@ use crate::{ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Type}; use leo_ast::IntegerType; -use leo_errors::{AsgError, LeoError, Span}; +use leo_errors::{AsgError, Result, Span}; use std::cell::Cell; @@ -84,7 +84,7 @@ impl<'a> FromAst<'a, leo_ast::ArrayAccessExpression> for ArrayAccessExpression<' scope: &'a Scope<'a>, value: &leo_ast::ArrayAccessExpression, expected_type: Option>, - ) -> Result, LeoError> { + ) -> Result> { let array = <&Expression<'a>>::from_ast( scope, &*value.array, diff --git a/asg/src/expression/array_init.rs b/asg/src/expression/array_init.rs index 0714e48e82..23ea049271 100644 --- a/asg/src/expression/array_init.rs +++ b/asg/src/expression/array_init.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use crate::{ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Type}; -use leo_errors::{AsgError, LeoError, Span}; +use leo_errors::{AsgError, Result, Span}; use std::cell::Cell; @@ -69,7 +69,7 @@ impl<'a> FromAst<'a, leo_ast::ArrayInitExpression> for ArrayInitExpression<'a> { scope: &'a Scope<'a>, value: &leo_ast::ArrayInitExpression, expected_type: Option>, - ) -> Result, LeoError> { + ) -> Result> { let (mut expected_item, expected_len) = match expected_type { Some(PartialType::Array(item, dims)) => (item.map(|x| *x), dims), None => (None, None), @@ -86,7 +86,7 @@ impl<'a> FromAst<'a, leo_ast::ArrayInitExpression> for ArrayInitExpression<'a> { .parse::() .map_err(|_| AsgError::parse_dimension_error(&value.span))?) }) - .collect::, LeoError>>()?; + .collect::>>()?; let len = *dimensions .get(0) diff --git a/asg/src/expression/array_inline.rs b/asg/src/expression/array_inline.rs index 1a67bd8663..56bd7d8987 100644 --- a/asg/src/expression/array_inline.rs +++ b/asg/src/expression/array_inline.rs @@ -16,7 +16,7 @@ use crate::{ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Type}; use leo_ast::SpreadOrExpression; -use leo_errors::{AsgError, LeoError, Span}; +use leo_errors::{AsgError, Result, Span}; use std::cell::Cell; @@ -104,7 +104,7 @@ impl<'a> FromAst<'a, leo_ast::ArrayInlineExpression> for ArrayInlineExpression<' scope: &'a Scope<'a>, value: &leo_ast::ArrayInlineExpression, expected_type: Option>, - ) -> Result, LeoError> { + ) -> Result> { let (mut expected_item, expected_len) = match expected_type { Some(PartialType::Array(item, dims)) => (item.map(|x| *x), dims), None => (None, None), @@ -181,7 +181,7 @@ impl<'a> FromAst<'a, leo_ast::ArrayInlineExpression> for ArrayInlineExpression<' Ok((Cell::new(expr), true)) } }) - .collect::, LeoError>>()?, + .collect::>>()?, }; if let Some(expected_len) = expected_len { if len != expected_len { diff --git a/asg/src/expression/array_range_access.rs b/asg/src/expression/array_range_access.rs index 190d0e829c..0d32f3933f 100644 --- a/asg/src/expression/array_range_access.rs +++ b/asg/src/expression/array_range_access.rs @@ -16,7 +16,7 @@ use crate::{ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Type}; use leo_ast::IntegerType; -use leo_errors::{AsgError, LeoError, Span}; +use leo_errors::{AsgError, Result, Span}; use std::cell::Cell; @@ -103,7 +103,7 @@ impl<'a> FromAst<'a, leo_ast::ArrayRangeAccessExpression> for ArrayRangeAccessEx scope: &'a Scope<'a>, value: &leo_ast::ArrayRangeAccessExpression, expected_type: Option>, - ) -> Result, LeoError> { + ) -> Result> { let (expected_array, expected_len) = match expected_type.clone() { Some(PartialType::Array(element, len)) => (Some(PartialType::Array(element, None)), len), None => (None, None), diff --git a/asg/src/expression/binary.rs b/asg/src/expression/binary.rs index 1ed79339e6..3029e2b98c 100644 --- a/asg/src/expression/binary.rs +++ b/asg/src/expression/binary.rs @@ -16,7 +16,7 @@ use crate::{ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Type}; pub use leo_ast::{BinaryOperation, BinaryOperationClass}; -use leo_errors::{AsgError, LeoError, Span}; +use leo_errors::{AsgError, Result, Span}; use std::cell::Cell; @@ -117,7 +117,7 @@ impl<'a> FromAst<'a, leo_ast::BinaryExpression> for BinaryExpression<'a> { scope: &'a Scope<'a>, value: &leo_ast::BinaryExpression, expected_type: Option>, - ) -> Result, LeoError> { + ) -> Result> { let class = value.op.class(); let expected_type = match class { BinaryOperationClass::Boolean => match expected_type { diff --git a/asg/src/expression/call.rs b/asg/src/expression/call.rs index 6592518110..2748ea9f6b 100644 --- a/asg/src/expression/call.rs +++ b/asg/src/expression/call.rs @@ -28,7 +28,7 @@ use crate::{ Type, }; pub use leo_ast::{BinaryOperation, Node as AstNode}; -use leo_errors::{AsgError, LeoError, Span}; +use leo_errors::{AsgError, Result, Span}; use std::cell::Cell; @@ -88,7 +88,7 @@ impl<'a> FromAst<'a, leo_ast::CallExpression> for CallExpression<'a> { scope: &'a Scope<'a>, value: &leo_ast::CallExpression, expected_type: Option>, - ) -> Result, LeoError> { + ) -> Result> { let (target, function) = match &*value.function { leo_ast::Expression::Identifier(name) => ( None, @@ -199,7 +199,7 @@ impl<'a> FromAst<'a, leo_ast::CallExpression> for CallExpression<'a> { } Ok(Cell::new(converted)) }) - .collect::, LeoError>>()?; + .collect::>>()?; if function.is_test() { return Err(AsgError::call_test_function(&value.span).into()); diff --git a/asg/src/expression/cast.rs b/asg/src/expression/cast.rs index bd5b2906e2..3f2765ba5a 100644 --- a/asg/src/expression/cast.rs +++ b/asg/src/expression/cast.rs @@ -16,7 +16,7 @@ use crate::{ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Type}; pub use leo_ast::UnaryOperation; -use leo_errors::{AsgError, LeoError, Span}; +use leo_errors::{AsgError, Result, Span}; use std::cell::Cell; @@ -76,7 +76,7 @@ impl<'a> FromAst<'a, leo_ast::CastExpression> for CastExpression<'a> { scope: &'a Scope<'a>, value: &leo_ast::CastExpression, expected_type: Option>, - ) -> Result, LeoError> { + ) -> Result> { let target_type = scope.resolve_ast_type(&value.target_type, &value.span)?; if let Some(expected_type) = &expected_type { if !expected_type.matches(&target_type) { diff --git a/asg/src/expression/circuit_access.rs b/asg/src/expression/circuit_access.rs index 79405afc44..2d3d75a267 100644 --- a/asg/src/expression/circuit_access.rs +++ b/asg/src/expression/circuit_access.rs @@ -28,7 +28,7 @@ use crate::{ Type, }; -use leo_errors::{AsgError, LeoError, Span}; +use leo_errors::{AsgError, Result, Span}; use std::cell::Cell; #[derive(Clone)] @@ -102,7 +102,7 @@ impl<'a> FromAst<'a, leo_ast::CircuitMemberAccessExpression> for CircuitAccessEx scope: &'a Scope<'a>, value: &leo_ast::CircuitMemberAccessExpression, expected_type: Option>, - ) -> Result, LeoError> { + ) -> Result> { let target = <&'a Expression<'a>>::from_ast(scope, &*value.circuit, None)?; let circuit = match target.get_type() { Some(Type::Circuit(circuit)) => circuit, @@ -171,7 +171,7 @@ impl<'a> FromAst<'a, leo_ast::CircuitStaticFunctionAccessExpression> for Circuit scope: &Scope<'a>, value: &leo_ast::CircuitStaticFunctionAccessExpression, expected_type: Option, - ) -> Result, LeoError> { + ) -> Result> { let circuit = match &*value.circuit { leo_ast::Expression::Identifier(name) => scope .resolve_circuit(&name.name) diff --git a/asg/src/expression/circuit_init.rs b/asg/src/expression/circuit_init.rs index 31759a82b6..2636c068fa 100644 --- a/asg/src/expression/circuit_init.rs +++ b/asg/src/expression/circuit_init.rs @@ -28,7 +28,7 @@ use crate::{ Type, }; -use leo_errors::{AsgError, LeoError, Span}; +use leo_errors::{AsgError, Result, Span}; use indexmap::{IndexMap, IndexSet}; use std::cell::Cell; @@ -93,7 +93,7 @@ impl<'a> FromAst<'a, leo_ast::CircuitInitExpression> for CircuitInitExpression<' scope: &'a Scope<'a>, value: &leo_ast::CircuitInitExpression, expected_type: Option>, - ) -> Result, LeoError> { + ) -> Result> { let circuit = scope .resolve_circuit(&value.name.name) .ok_or_else(|| AsgError::unresolved_circuit(&value.name.name, &value.name.span))?; diff --git a/asg/src/expression/constant.rs b/asg/src/expression/constant.rs index 9043e80577..81834d95c2 100644 --- a/asg/src/expression/constant.rs +++ b/asg/src/expression/constant.rs @@ -28,7 +28,7 @@ use crate::{ Type, }; -use leo_errors::{AsgError, LeoError, Span}; +use leo_errors::{AsgError, Result, Span}; use std::cell::Cell; @@ -78,7 +78,7 @@ impl<'a> FromAst<'a, leo_ast::ValueExpression> for Constant<'a> { _scope: &'a Scope<'a>, value: &leo_ast::ValueExpression, expected_type: Option>, - ) -> Result, LeoError> { + ) -> Result> { use leo_ast::ValueExpression::*; Ok(match value { Address(value, span) => { diff --git a/asg/src/expression/mod.rs b/asg/src/expression/mod.rs index 95dbd747f6..f72d3c8b43 100644 --- a/asg/src/expression/mod.rs +++ b/asg/src/expression/mod.rs @@ -66,7 +66,7 @@ mod cast; pub use cast::*; use crate::{ConstValue, FromAst, Node, PartialType, Scope, Type}; -use leo_errors::{LeoError, Span}; +use leo_errors::{Result, Span}; #[derive(Clone)] pub enum Expression<'a> { @@ -285,7 +285,7 @@ impl<'a> FromAst<'a, leo_ast::Expression> for &'a Expression<'a> { scope: &'a Scope<'a>, value: &leo_ast::Expression, expected_type: Option>, - ) -> Result { + ) -> Result { use leo_ast::Expression::*; let expression = match value { Identifier(identifier) => Self::from_ast(scope, identifier, expected_type)?, diff --git a/asg/src/expression/ternary.rs b/asg/src/expression/ternary.rs index 5e20f04734..8f286d4559 100644 --- a/asg/src/expression/ternary.rs +++ b/asg/src/expression/ternary.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use crate::{ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Type}; -use leo_errors::{AsgError, LeoError, Span}; +use leo_errors::{AsgError, Result, Span}; use std::cell::Cell; @@ -79,7 +79,7 @@ impl<'a> FromAst<'a, leo_ast::TernaryExpression> for TernaryExpression<'a> { scope: &'a Scope<'a>, value: &leo_ast::TernaryExpression, expected_type: Option>, - ) -> Result, LeoError> { + ) -> Result> { let if_true = Cell::new(<&Expression<'a>>::from_ast( scope, &*value.if_true, diff --git a/asg/src/expression/tuple_access.rs b/asg/src/expression/tuple_access.rs index 31edab6df4..327ed51548 100644 --- a/asg/src/expression/tuple_access.rs +++ b/asg/src/expression/tuple_access.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use crate::{ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Type}; -use leo_errors::{AsgError, LeoError, Span}; +use leo_errors::{AsgError, Result, Span}; use std::cell::Cell; @@ -75,7 +75,7 @@ impl<'a> FromAst<'a, leo_ast::TupleAccessExpression> for TupleAccessExpression<' scope: &'a Scope<'a>, value: &leo_ast::TupleAccessExpression, expected_type: Option>, - ) -> Result, LeoError> { + ) -> Result> { let index = value .index .value diff --git a/asg/src/expression/tuple_init.rs b/asg/src/expression/tuple_init.rs index 041e69ce14..317020f80a 100644 --- a/asg/src/expression/tuple_init.rs +++ b/asg/src/expression/tuple_init.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use crate::{ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Type}; -use leo_errors::{AsgError, LeoError, Span}; +use leo_errors::{AsgError, Result, Span}; use std::cell::Cell; @@ -81,7 +81,7 @@ impl<'a> FromAst<'a, leo_ast::TupleInitExpression> for TupleInitExpression<'a> { scope: &'a Scope<'a>, value: &leo_ast::TupleInitExpression, expected_type: Option>, - ) -> Result, LeoError> { + ) -> Result> { let tuple_types = match expected_type { Some(PartialType::Tuple(sub_types)) => Some(sub_types), None => None, @@ -120,7 +120,7 @@ impl<'a> FromAst<'a, leo_ast::TupleInitExpression> for TupleInitExpression<'a> { ) .map(Cell::new) }) - .collect::, LeoError>>()?; + .collect::>>()?; Ok(TupleInitExpression { parent: Cell::new(None), diff --git a/asg/src/expression/unary.rs b/asg/src/expression/unary.rs index 54baed3be6..a9da91eec6 100644 --- a/asg/src/expression/unary.rs +++ b/asg/src/expression/unary.rs @@ -16,7 +16,7 @@ use crate::{ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Type}; pub use leo_ast::UnaryOperation; -use leo_errors::{AsgError, LeoError, Span}; +use leo_errors::{AsgError, Result, Span}; use std::cell::Cell; @@ -90,7 +90,7 @@ impl<'a> FromAst<'a, leo_ast::UnaryExpression> for UnaryExpression<'a> { scope: &'a Scope<'a>, value: &leo_ast::UnaryExpression, expected_type: Option>, - ) -> Result, LeoError> { + ) -> Result> { let expected_type = match value.op { UnaryOperation::Not => match expected_type.map(|x| x.full()).flatten() { Some(Type::Boolean) | None => Some(Type::Boolean), diff --git a/asg/src/expression/variable_ref.rs b/asg/src/expression/variable_ref.rs index e31561c644..4df4849a35 100644 --- a/asg/src/expression/variable_ref.rs +++ b/asg/src/expression/variable_ref.rs @@ -29,7 +29,7 @@ use crate::{ Variable, }; -use leo_errors::{AsgError, LeoError, Span}; +use leo_errors::{AsgError, Result, Span}; use std::cell::Cell; @@ -135,7 +135,7 @@ impl<'a> FromAst<'a, leo_ast::Identifier> for &'a Expression<'a> { scope: &'a Scope<'a>, value: &leo_ast::Identifier, expected_type: Option>, - ) -> Result<&'a Expression<'a>, LeoError> { + ) -> Result<&'a Expression<'a>> { let variable = if value.name.as_ref() == "input" { if let Some(input) = scope.resolve_input() { input.container diff --git a/asg/src/import.rs b/asg/src/import.rs index 5fbb9fd42e..3e95ce1e22 100644 --- a/asg/src/import.rs +++ b/asg/src/import.rs @@ -19,7 +19,7 @@ use std::marker::PhantomData; use crate::{AsgContext, Program}; -use leo_errors::{LeoError, Span}; +use leo_errors::{Result, Span}; use indexmap::IndexMap; @@ -29,7 +29,7 @@ pub trait ImportResolver<'a> { context: AsgContext<'a>, package_segments: &[&str], span: &Span, - ) -> Result>, LeoError>; + ) -> Result>>; } pub struct NullImportResolver; @@ -40,7 +40,7 @@ impl<'a> ImportResolver<'a> for NullImportResolver { _context: AsgContext<'a>, _package_segments: &[&str], _span: &Span, - ) -> Result>, LeoError> { + ) -> Result>> { Ok(None) } } @@ -65,7 +65,7 @@ impl<'a, 'b, T: ImportResolver<'b>> ImportResolver<'b> for CoreImportResolver<'a context: AsgContext<'b>, package_segments: &[&str], span: &Span, - ) -> Result>, LeoError> { + ) -> Result>> { if !package_segments.is_empty() && package_segments.get(0).unwrap() == &"core" { Ok(crate::resolve_core_module(context, &*package_segments[1..].join("."))?) } else { @@ -84,7 +84,7 @@ impl<'a> ImportResolver<'a> for MockedImportResolver<'a> { _context: AsgContext<'a>, package_segments: &[&str], _span: &Span, - ) -> Result>, LeoError> { + ) -> Result>> { Ok(self.packages.get(&package_segments.join(".")).cloned()) } } diff --git a/asg/src/lib.rs b/asg/src/lib.rs index 218fa93267..844330208e 100644 --- a/asg/src/lib.rs +++ b/asg/src/lib.rs @@ -72,7 +72,7 @@ pub mod context; pub use context::*; pub use leo_ast::{Ast, Identifier}; -use leo_errors::LeoError; +use leo_errors::Result; /// The abstract semantic graph (ASG) for a Leo program. /// @@ -92,7 +92,7 @@ impl<'a> Asg<'a> { context: AsgContext<'a>, ast: Y, resolver: &mut T, - ) -> Result { + ) -> Result { Ok(Self { context, asg: Program::new(context, ast.as_ref(), resolver)?, @@ -125,7 +125,7 @@ pub fn load_asg<'a, T: ImportResolver<'a>>( context: AsgContext<'a>, content: &str, resolver: &mut T, -) -> Result, LeoError> { +) -> Result> { // Parses the Leo file and constructs a grammar ast. let ast = leo_parser::parse_ast("input.leo", content)?; diff --git a/asg/src/node.rs b/asg/src/node.rs index 9079a2d914..27d9998c03 100644 --- a/asg/src/node.rs +++ b/asg/src/node.rs @@ -16,7 +16,7 @@ use crate::{AsgContextInner, Circuit, Expression, Function, PartialType, Scope, Statement, Variable}; -use leo_errors::{LeoError, Span}; +use leo_errors::{Result, Span}; /// A node in the abstract semantic graph. pub trait Node { @@ -26,7 +26,7 @@ pub trait Node { pub(super) trait FromAst<'a, T: leo_ast::Node + 'static>: Sized { // expected_type contract: if present, output expression must be of type expected_type. // type of an element may NEVER be None unless it is functionally a non-expression. (static call targets, function ref call targets are not expressions) - fn from_ast(scope: &'a Scope<'a>, value: &T, expected_type: Option>) -> Result; + fn from_ast(scope: &'a Scope<'a>, value: &T, expected_type: Option>) -> Result; } pub enum ArenaNode<'a> { diff --git a/asg/src/pass.rs b/asg/src/pass.rs index 9406e1c14e..6828362e57 100644 --- a/asg/src/pass.rs +++ b/asg/src/pass.rs @@ -15,8 +15,8 @@ // along with the Leo library. If not, see . use crate::Program; -use leo_errors::LeoError; +use leo_errors::Result; pub trait AsgPass<'a> { - fn do_pass(asg: Program<'a>) -> Result, LeoError>; + fn do_pass(asg: Program<'a>) -> Result>; } diff --git a/asg/src/prelude.rs b/asg/src/prelude.rs index 4f32330c05..42d17a955c 100644 --- a/asg/src/prelude.rs +++ b/asg/src/prelude.rs @@ -17,12 +17,12 @@ // TODO (protryon): We should merge this with core use crate::{AsgContext, Program}; -use leo_errors::LeoError; +use leo_errors::Result; // TODO (protryon): Make asg deep copy so we can cache resolved core modules // TODO (protryon): Figure out how to do headers without bogus returns -pub fn resolve_core_module<'a>(context: AsgContext<'a>, module: &str) -> Result>, LeoError> { +pub fn resolve_core_module<'a>(context: AsgContext<'a>, module: &str) -> Result>> { match module { "unstable.blake2s" => { let asg = crate::load_asg( diff --git a/asg/src/program/circuit.rs b/asg/src/program/circuit.rs index e5584bd6b8..36fa24902e 100644 --- a/asg/src/program/circuit.rs +++ b/asg/src/program/circuit.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use crate::{Function, Identifier, Node, Scope, Type}; -use leo_errors::{AsgError, LeoError, Span}; +use leo_errors::{AsgError, Result, Span}; use indexmap::IndexMap; use std::cell::RefCell; @@ -54,7 +54,7 @@ impl<'a> Node for Circuit<'a> { } impl<'a> Circuit<'a> { - pub(super) fn init(scope: &'a Scope<'a>, value: &leo_ast::Circuit) -> Result<&'a Circuit<'a>, LeoError> { + pub(super) fn init(scope: &'a Scope<'a>, value: &leo_ast::Circuit) -> Result<&'a Circuit<'a>> { let new_scope = scope.make_subscope(); let circuit = scope.context.alloc_circuit(Circuit { @@ -85,7 +85,7 @@ impl<'a> Circuit<'a> { Ok(circuit) } - pub(super) fn init_member(scope: &'a Scope<'a>, value: &leo_ast::Circuit) -> Result<&'a Circuit<'a>, LeoError> { + pub(super) fn init_member(scope: &'a Scope<'a>, value: &leo_ast::Circuit) -> Result<&'a Circuit<'a>> { let new_scope = scope.make_subscope(); let circuits = scope.circuits.borrow(); @@ -118,7 +118,7 @@ impl<'a> Circuit<'a> { Ok(circuit) } - pub(super) fn fill_from_ast(self: &'a Circuit<'a>, value: &leo_ast::Circuit) -> Result<(), LeoError> { + pub(super) fn fill_from_ast(self: &'a Circuit<'a>, value: &leo_ast::Circuit) -> Result<()> { for member in value.members.iter() { match member { leo_ast::CircuitMember::CircuitVariable(..) => {} diff --git a/asg/src/program/function.rs b/asg/src/program/function.rs index 3135d66e8b..3297f5be8c 100644 --- a/asg/src/program/function.rs +++ b/asg/src/program/function.rs @@ -29,7 +29,7 @@ use crate::{ use indexmap::IndexMap; pub use leo_ast::Annotation; use leo_ast::FunctionInput; -use leo_errors::{AsgError, LeoError, Span}; +use leo_errors::{AsgError, Result, Span}; use std::cell::{Cell, RefCell}; @@ -67,7 +67,7 @@ impl<'a> PartialEq for Function<'a> { impl<'a> Eq for Function<'a> {} impl<'a> Function<'a> { - pub(crate) fn init(scope: &'a Scope<'a>, value: &leo_ast::Function) -> Result<&'a Function<'a>, LeoError> { + pub(crate) fn init(scope: &'a Scope<'a>, value: &leo_ast::Function) -> Result<&'a Function<'a>> { let output: Type<'a> = value .output .as_ref() @@ -126,7 +126,7 @@ impl<'a> Function<'a> { Ok(function) } - pub(super) fn fill_from_ast(self: &'a Function<'a>, value: &leo_ast::Function) -> Result<(), LeoError> { + pub(super) fn fill_from_ast(self: &'a Function<'a>, value: &leo_ast::Function) -> Result<()> { if self.qualifier != FunctionQualifier::Static { let circuit = self.circuit.get(); let self_variable = self.scope.context.alloc_variable(RefCell::new(crate::InnerVariable { diff --git a/asg/src/program/mod.rs b/asg/src/program/mod.rs index 2e5bb7f6c9..76a01fe028 100644 --- a/asg/src/program/mod.rs +++ b/asg/src/program/mod.rs @@ -26,7 +26,7 @@ pub use function::*; use crate::{node::FromAst, ArenaNode, AsgContext, DefinitionStatement, ImportResolver, Input, Scope, Statement}; use leo_ast::{Identifier, PackageAccess, PackageOrPackages}; -use leo_errors::{AsgError, LeoError, Span}; +use leo_errors::{AsgError, Result, Span}; use indexmap::IndexMap; use std::cell::{Cell, RefCell}; @@ -137,7 +137,7 @@ impl<'a> Program<'a> { context: AsgContext<'a>, program: &leo_ast::Program, import_resolver: &mut T, - ) -> Result, LeoError> { + ) -> Result> { // Recursively extract imported symbols. let mut imported_symbols: Vec<(Vec, ImportSymbol, Span)> = vec![]; for import in program.imports.iter() { diff --git a/asg/src/scope.rs b/asg/src/scope.rs index c932021ccc..ea83b3c019 100644 --- a/asg/src/scope.rs +++ b/asg/src/scope.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use crate::{AsgContext, Circuit, DefinitionStatement, Function, Input, Type, Variable}; -use leo_errors::{AsgError, LeoError, Span}; +use leo_errors::{AsgError, Result, Span}; use indexmap::IndexMap; use std::cell::{Cell, RefCell}; @@ -174,7 +174,7 @@ impl<'a> Scope<'a> { /// /// Returns the type returned by the current scope. /// - pub fn resolve_ast_type(&self, type_: &leo_ast::Type, span: &Span) -> Result, LeoError> { + pub fn resolve_ast_type(&self, type_: &leo_ast::Type, span: &Span) -> Result> { use leo_ast::Type::*; Ok(match type_ { Address => Type::Address, @@ -198,7 +198,7 @@ impl<'a> Scope<'a> { sub_types .iter() .map(|x| self.resolve_ast_type(x, span)) - .collect::, LeoError>>()?, + .collect::>>()?, ), Circuit(name) if name.name.as_ref() == "Self" => Type::Circuit( self.resolve_circuit_self() diff --git a/asg/src/statement/assign.rs b/asg/src/statement/assign.rs index aa39c1b053..76e76df82b 100644 --- a/asg/src/statement/assign.rs +++ b/asg/src/statement/assign.rs @@ -32,7 +32,7 @@ use crate::{ }; pub use leo_ast::AssignOperation; use leo_ast::AssigneeAccess as AstAssigneeAccess; -use leo_errors::{AsgError, LeoError, Span}; +use leo_errors::{AsgError, Result, Span}; use std::cell::Cell; @@ -65,7 +65,7 @@ impl<'a> FromAst<'a, leo_ast::AssignStatement> for &'a Statement<'a> { scope: &'a Scope<'a>, statement: &leo_ast::AssignStatement, _expected_type: Option>, - ) -> Result { + ) -> Result { let (name, span) = ( &statement.assignee.identifier.name.clone(), &statement.assignee.identifier.span, @@ -99,13 +99,13 @@ impl<'a> FromAst<'a, leo_ast::AssignStatement> for &'a Statement<'a> { let index_type = Some(PartialType::Integer(None, Some(IntegerType::U32))); let left = left .as_ref() - .map(|left: &leo_ast::Expression| -> Result<&'a Expression<'a>, LeoError> { + .map(|left: &leo_ast::Expression| -> Result<&'a Expression<'a>> { <&Expression<'a>>::from_ast(scope, left, index_type.clone()) }) .transpose()?; let right = right .as_ref() - .map(|right: &leo_ast::Expression| -> Result<&'a Expression<'a>, LeoError> { + .map(|right: &leo_ast::Expression| -> Result<&'a Expression<'a>> { <&Expression<'a>>::from_ast(scope, right, index_type) }) .transpose()?; diff --git a/asg/src/statement/block.rs b/asg/src/statement/block.rs index 8f83cc454d..f93faa0ad8 100644 --- a/asg/src/statement/block.rs +++ b/asg/src/statement/block.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use crate::{FromAst, Node, PartialType, Scope, Statement}; -use leo_errors::{LeoError, Span}; +use leo_errors::{Result, Span}; use std::cell::Cell; @@ -38,7 +38,7 @@ impl<'a> FromAst<'a, leo_ast::Block> for BlockStatement<'a> { scope: &'a Scope<'a>, statement: &leo_ast::Block, _expected_type: Option>, - ) -> Result { + ) -> Result { let new_scope = scope.make_subscope(); let mut output = vec![]; diff --git a/asg/src/statement/conditional.rs b/asg/src/statement/conditional.rs index 87a2045eed..fb14b9c6eb 100644 --- a/asg/src/statement/conditional.rs +++ b/asg/src/statement/conditional.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use crate::{BlockStatement, Expression, FromAst, Node, PartialType, Scope, Statement, Type}; -use leo_errors::{LeoError, Span}; +use leo_errors::{Result, Span}; use std::cell::Cell; @@ -39,7 +39,7 @@ impl<'a> FromAst<'a, leo_ast::ConditionalStatement> for ConditionalStatement<'a> scope: &'a Scope<'a>, statement: &leo_ast::ConditionalStatement, _expected_type: Option>, - ) -> Result { + ) -> Result { let condition = <&Expression<'a>>::from_ast(scope, &statement.condition, Some(Type::Boolean.into()))?; let result = scope.context.alloc_statement(Statement::Block(BlockStatement::from_ast( scope, @@ -49,7 +49,7 @@ impl<'a> FromAst<'a, leo_ast::ConditionalStatement> for ConditionalStatement<'a> let next = statement .next .as_deref() - .map(|next| -> Result<&'a Statement<'a>, LeoError> { <&'a Statement<'a>>::from_ast(scope, next, None) }) + .map(|next| -> Result<&'a Statement<'a>> { <&'a Statement<'a>>::from_ast(scope, next, None) }) .transpose()?; Ok(ConditionalStatement { diff --git a/asg/src/statement/console.rs b/asg/src/statement/console.rs index 14b93ff86b..3d34b1296e 100644 --- a/asg/src/statement/console.rs +++ b/asg/src/statement/console.rs @@ -16,7 +16,7 @@ use crate::{CharValue, Expression, FromAst, Node, PartialType, Scope, Statement, Type}; use leo_ast::ConsoleFunction as AstConsoleFunction; -use leo_errors::{LeoError, Span}; +use leo_errors::{Result, Span}; use std::cell::Cell; @@ -53,7 +53,7 @@ impl<'a> FromAst<'a, leo_ast::ConsoleArgs> for ConsoleArgs<'a> { scope: &'a Scope<'a>, value: &leo_ast::ConsoleArgs, _expected_type: Option>, - ) -> Result { + ) -> Result { let mut parameters = vec![]; for parameter in value.parameters.iter() { parameters.push(Cell::new(<&Expression<'a>>::from_ast(scope, parameter, None)?)); @@ -81,7 +81,7 @@ impl<'a> FromAst<'a, leo_ast::ConsoleStatement> for ConsoleStatement<'a> { scope: &'a Scope<'a>, statement: &leo_ast::ConsoleStatement, _expected_type: Option>, - ) -> Result { + ) -> Result { Ok(ConsoleStatement { parent: Cell::new(None), span: Some(statement.span.clone()), diff --git a/asg/src/statement/definition.rs b/asg/src/statement/definition.rs index cc54b7f80e..6a5f222ed3 100644 --- a/asg/src/statement/definition.rs +++ b/asg/src/statement/definition.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use crate::{Expression, ExpressionNode, FromAst, InnerVariable, Node, PartialType, Scope, Statement, Type, Variable}; -use leo_errors::{AsgError, LeoError, Span}; +use leo_errors::{AsgError, Result, Span}; use std::cell::{Cell, RefCell}; @@ -54,7 +54,7 @@ impl<'a> FromAst<'a, leo_ast::DefinitionStatement> for &'a Statement<'a> { scope: &'a Scope<'a>, statement: &leo_ast::DefinitionStatement, _expected_type: Option>, - ) -> Result { + ) -> Result { let type_ = statement .type_ .as_ref() diff --git a/asg/src/statement/expression.rs b/asg/src/statement/expression.rs index 59264dce56..02dbb0628a 100644 --- a/asg/src/statement/expression.rs +++ b/asg/src/statement/expression.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use crate::{Expression, FromAst, Node, PartialType, Scope, Statement}; -use leo_errors::{LeoError, Span}; +use leo_errors::{Result, Span}; use std::cell::Cell; @@ -37,7 +37,7 @@ impl<'a> FromAst<'a, leo_ast::ExpressionStatement> for ExpressionStatement<'a> { scope: &'a Scope<'a>, statement: &leo_ast::ExpressionStatement, _expected_type: Option>, - ) -> Result { + ) -> Result { let expression = <&Expression<'a>>::from_ast(scope, &statement.expression, None)?; Ok(ExpressionStatement { diff --git a/asg/src/statement/iteration.rs b/asg/src/statement/iteration.rs index af40f378d5..27de5b4deb 100644 --- a/asg/src/statement/iteration.rs +++ b/asg/src/statement/iteration.rs @@ -17,7 +17,7 @@ use leo_ast::IntegerType; use crate::{Expression, ExpressionNode, FromAst, InnerVariable, Node, PartialType, Scope, Statement, Variable}; -use leo_errors::{AsgError, LeoError, Span}; +use leo_errors::{AsgError, Result, Span}; use std::cell::{Cell, RefCell}; @@ -43,7 +43,7 @@ impl<'a> FromAst<'a, leo_ast::IterationStatement> for &'a Statement<'a> { scope: &'a Scope<'a>, statement: &leo_ast::IterationStatement, _expected_type: Option>, - ) -> Result { + ) -> Result { let expected_index_type = Some(PartialType::Integer(Some(IntegerType::U32), None)); let start = <&Expression<'a>>::from_ast(scope, &statement.start, expected_index_type.clone())?; let stop = <&Expression<'a>>::from_ast(scope, &statement.stop, expected_index_type)?; diff --git a/asg/src/statement/mod.rs b/asg/src/statement/mod.rs index ad5fcdb5de..e9da0f591b 100644 --- a/asg/src/statement/mod.rs +++ b/asg/src/statement/mod.rs @@ -43,7 +43,7 @@ mod return_; pub use return_::*; use crate::{FromAst, Node, PartialType, Scope}; -use leo_errors::{LeoError, Span}; +use leo_errors::{Result, Span}; #[derive(Clone)] pub enum Statement<'a> { @@ -80,7 +80,7 @@ impl<'a> FromAst<'a, leo_ast::Statement> for &'a Statement<'a> { scope: &'a Scope<'a>, value: &leo_ast::Statement, _expected_type: Option>, - ) -> Result<&'a Statement<'a>, LeoError> { + ) -> Result<&'a Statement<'a>> { use leo_ast::Statement::*; Ok(match value { Return(statement) => scope diff --git a/asg/src/statement/return_.rs b/asg/src/statement/return_.rs index cc111f553e..e4ed97db01 100644 --- a/asg/src/statement/return_.rs +++ b/asg/src/statement/return_.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use crate::{Expression, FromAst, Node, PartialType, Scope, Statement, Type}; -use leo_errors::{LeoError, Span}; +use leo_errors::{Result, Span}; use std::cell::Cell; #[derive(Clone)] @@ -36,7 +36,7 @@ impl<'a> FromAst<'a, leo_ast::ReturnStatement> for ReturnStatement<'a> { scope: &'a Scope<'a>, statement: &leo_ast::ReturnStatement, _expected_type: Option>, - ) -> Result { + ) -> Result { let return_type: Option = scope .resolve_current_function() .map(|x| x.output.clone()) diff --git a/ast/src/lib.rs b/ast/src/lib.rs index be32aba9c0..11e25a8adf 100644 --- a/ast/src/lib.rs +++ b/ast/src/lib.rs @@ -62,7 +62,7 @@ pub use self::types::*; mod node; pub use node::*; -use leo_errors::{AstError, LeoError}; +use leo_errors::{AstError, Result}; use backtrace::Backtrace; @@ -84,7 +84,7 @@ impl Ast { } /// Mutates the program ast by preforming canonicalization on it. - pub fn canonicalize(&mut self) -> Result<(), LeoError> { + pub fn canonicalize(&mut self) -> Result<()> { self.ast = ReconstructingDirector::new(Canonicalizer::default()).reduce_program(self.as_repr())?; Ok(()) } @@ -99,13 +99,13 @@ impl Ast { } /// Serializes the ast into a JSON string. - pub fn to_json_string(&self) -> Result { + pub fn to_json_string(&self) -> Result { Ok(serde_json::to_string_pretty(&self.ast) .map_err(|e| AstError::failed_to_convert_ast_to_json_string(&e, Backtrace::new()))?) } /// Serializes the ast into a JSON file. - pub fn to_json_file(&self, mut path: std::path::PathBuf, file_name: &str) -> Result<(), LeoError> { + pub fn to_json_file(&self, mut path: std::path::PathBuf, file_name: &str) -> Result<()> { path.push(file_name); let file = std::fs::File::create(&path) .map_err(|e| AstError::failed_to_create_ast_json_file(&path, &e, Backtrace::new()))?; @@ -115,14 +115,14 @@ impl Ast { } /// Deserializes the JSON string into a ast. - pub fn from_json_string(json: &str) -> Result { + pub fn from_json_string(json: &str) -> Result { let ast: Program = serde_json::from_str(json) .map_err(|e| AstError::failed_to_read_json_string_to_ast(&e, Backtrace::new()))?; Ok(Self { ast }) } /// Deserializes the JSON string into a ast from a file. - pub fn from_json_file(path: std::path::PathBuf) -> Result { + pub fn from_json_file(path: std::path::PathBuf) -> Result { let data = std::fs::read_to_string(&path) .map_err(|e| AstError::failed_to_read_json_file(&path, &e, Backtrace::new()))?; Self::from_json_string(&data) diff --git a/ast/src/reducer/canonicalization.rs b/ast/src/reducer/canonicalization.rs index b426a99ff3..b958cc4b72 100644 --- a/ast/src/reducer/canonicalization.rs +++ b/ast/src/reducer/canonicalization.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use crate::*; -use leo_errors::{AstError, LeoError, Span}; +use leo_errors::{AstError, Result, Span}; /// Replace Self when it is in a enclosing circuit type. /// Error when Self is outside an enclosing circuit type. @@ -44,7 +44,7 @@ impl Canonicalizer { start: Expression, accesses: &[AssigneeAccess], span: &Span, - ) -> Result, LeoError> { + ) -> Result> { let mut left = Box::new(start); for access in accesses.iter() { @@ -84,7 +84,7 @@ impl Canonicalizer { Ok(left) } - pub fn compound_operation_converstion(&mut self, operation: &AssignOperation) -> Result { + pub fn compound_operation_converstion(&mut self, operation: &AssignOperation) -> Result { match operation { AssignOperation::Assign => unreachable!(), AssignOperation::Add => Ok(BinaryOperation::Add), @@ -465,7 +465,7 @@ impl ReconstructingReducer for Canonicalizer { self.in_circuit = !self.in_circuit; } - fn reduce_type(&mut self, _type_: &Type, new: Type, span: &Span) -> Result { + fn reduce_type(&mut self, _type_: &Type, new: Type, span: &Span) -> Result { match new { Type::Array(type_, mut dimensions) => { if dimensions.is_zero() { @@ -491,7 +491,7 @@ impl ReconstructingReducer for Canonicalizer { } } - fn reduce_string(&mut self, string: &[Char], span: &Span) -> Result { + fn reduce_string(&mut self, string: &[Char], span: &Span) -> Result { if string.is_empty() { return Err(AstError::empty_string(span).into()); } @@ -550,7 +550,7 @@ impl ReconstructingReducer for Canonicalizer { &mut self, array_init: &ArrayInitExpression, element: Expression, - ) -> Result { + ) -> Result { if array_init.dimensions.is_zero() { return Err(AstError::invalid_array_dimension_size(&array_init.span).into()); } @@ -599,7 +599,7 @@ impl ReconstructingReducer for Canonicalizer { assign: &AssignStatement, assignee: Assignee, value: Expression, - ) -> Result { + ) -> Result { match value { value if assign.operation != AssignOperation::Assign => { let left = self.canonicalize_accesses( @@ -641,7 +641,7 @@ impl ReconstructingReducer for Canonicalizer { input: Vec, output: Option, block: Block, - ) -> Result { + ) -> Result { let new_output = match output { None => Some(Type::Tuple(vec![])), _ => output, @@ -662,7 +662,7 @@ impl ReconstructingReducer for Canonicalizer { _circuit: &Circuit, circuit_name: Identifier, members: Vec, - ) -> Result { + ) -> Result { self.circuit_name = Some(circuit_name.clone()); let circ = Circuit { circuit_name, diff --git a/ast/src/reducer/reconstructing_director.rs b/ast/src/reducer/reconstructing_director.rs index efe328bd18..15601cddb5 100644 --- a/ast/src/reducer/reconstructing_director.rs +++ b/ast/src/reducer/reconstructing_director.rs @@ -19,7 +19,7 @@ use crate::*; use indexmap::IndexMap; -use leo_errors::{AstError, LeoError, Span}; +use leo_errors::{AstError, Result, Span}; pub struct ReconstructingDirector { reducer: R, @@ -30,7 +30,7 @@ impl ReconstructingDirector { Self { reducer } } - pub fn reduce_type(&mut self, type_: &Type, span: &Span) -> Result { + pub fn reduce_type(&mut self, type_: &Type, span: &Span) -> Result { let new = match type_ { Type::Array(type_, dimensions) => Type::Array(Box::new(self.reduce_type(type_, span)?), dimensions.clone()), Type::Tuple(types) => { @@ -49,7 +49,7 @@ impl ReconstructingDirector { } // Expressions - pub fn reduce_expression(&mut self, expression: &Expression) -> Result { + pub fn reduce_expression(&mut self, expression: &Expression) -> Result { let new = match expression { Expression::Identifier(identifier) => Expression::Identifier(self.reduce_identifier(identifier)?), Expression::Value(value) => self.reduce_value(value)?, @@ -82,15 +82,15 @@ impl ReconstructingDirector { self.reducer.reduce_expression(expression, new) } - pub fn reduce_identifier(&mut self, identifier: &Identifier) -> Result { + pub fn reduce_identifier(&mut self, identifier: &Identifier) -> Result { self.reducer.reduce_identifier(identifier) } - pub fn reduce_group_tuple(&mut self, group_tuple: &GroupTuple) -> Result { + pub fn reduce_group_tuple(&mut self, group_tuple: &GroupTuple) -> Result { self.reducer.reduce_group_tuple(group_tuple) } - pub fn reduce_group_value(&mut self, group_value: &GroupValue) -> Result { + pub fn reduce_group_value(&mut self, group_value: &GroupValue) -> Result { let new = match group_value { GroupValue::Tuple(group_tuple) => GroupValue::Tuple(Box::new(self.reduce_group_tuple(group_tuple)?)), _ => group_value.clone(), @@ -99,11 +99,11 @@ impl ReconstructingDirector { self.reducer.reduce_group_value(group_value, new) } - pub fn reduce_string(&mut self, string: &[Char], span: &Span) -> Result { + pub fn reduce_string(&mut self, string: &[Char], span: &Span) -> Result { self.reducer.reduce_string(string, span) } - pub fn reduce_value(&mut self, value: &ValueExpression) -> Result { + pub fn reduce_value(&mut self, value: &ValueExpression) -> Result { let new = match value { ValueExpression::Group(group_value) => { Expression::Value(ValueExpression::Group(Box::new(self.reduce_group_value(group_value)?))) @@ -115,20 +115,20 @@ impl ReconstructingDirector { self.reducer.reduce_value(value, new) } - pub fn reduce_binary(&mut self, binary: &BinaryExpression) -> Result { + pub fn reduce_binary(&mut self, binary: &BinaryExpression) -> Result { let left = self.reduce_expression(&binary.left)?; let right = self.reduce_expression(&binary.right)?; self.reducer.reduce_binary(binary, left, right, binary.op.clone()) } - pub fn reduce_unary(&mut self, unary: &UnaryExpression) -> Result { + pub fn reduce_unary(&mut self, unary: &UnaryExpression) -> Result { let inner = self.reduce_expression(&unary.inner)?; self.reducer.reduce_unary(unary, inner, unary.op.clone()) } - pub fn reduce_ternary(&mut self, ternary: &TernaryExpression) -> Result { + pub fn reduce_ternary(&mut self, ternary: &TernaryExpression) -> Result { let condition = self.reduce_expression(&ternary.condition)?; let if_true = self.reduce_expression(&ternary.if_true)?; let if_false = self.reduce_expression(&ternary.if_false)?; @@ -136,17 +136,14 @@ impl ReconstructingDirector { self.reducer.reduce_ternary(ternary, condition, if_true, if_false) } - pub fn reduce_cast(&mut self, cast: &CastExpression) -> Result { + pub fn reduce_cast(&mut self, cast: &CastExpression) -> Result { let inner = self.reduce_expression(&cast.inner)?; let target_type = self.reduce_type(&cast.target_type, &cast.span)?; self.reducer.reduce_cast(cast, inner, target_type) } - pub fn reduce_array_inline( - &mut self, - array_inline: &ArrayInlineExpression, - ) -> Result { + pub fn reduce_array_inline(&mut self, array_inline: &ArrayInlineExpression) -> Result { let mut elements = vec![]; for element in array_inline.elements.iter() { let reduced_element = match element { @@ -164,16 +161,13 @@ impl ReconstructingDirector { self.reducer.reduce_array_inline(array_inline, elements) } - pub fn reduce_array_init(&mut self, array_init: &ArrayInitExpression) -> Result { + pub fn reduce_array_init(&mut self, array_init: &ArrayInitExpression) -> Result { let element = self.reduce_expression(&array_init.element)?; self.reducer.reduce_array_init(array_init, element) } - pub fn reduce_array_access( - &mut self, - array_access: &ArrayAccessExpression, - ) -> Result { + pub fn reduce_array_access(&mut self, array_access: &ArrayAccessExpression) -> Result { let array = self.reduce_expression(&array_access.array)?; let index = self.reduce_expression(&array_access.index)?; @@ -183,7 +177,7 @@ impl ReconstructingDirector { pub fn reduce_array_range_access( &mut self, array_range_access: &ArrayRangeAccessExpression, - ) -> Result { + ) -> Result { let array = self.reduce_expression(&array_range_access.array)?; let left = array_range_access .left @@ -200,7 +194,7 @@ impl ReconstructingDirector { .reduce_array_range_access(array_range_access, array, left, right) } - pub fn reduce_tuple_init(&mut self, tuple_init: &TupleInitExpression) -> Result { + pub fn reduce_tuple_init(&mut self, tuple_init: &TupleInitExpression) -> Result { let mut elements = vec![]; for element in tuple_init.elements.iter() { elements.push(self.reduce_expression(element)?); @@ -209,10 +203,7 @@ impl ReconstructingDirector { self.reducer.reduce_tuple_init(tuple_init, elements) } - pub fn reduce_tuple_access( - &mut self, - tuple_access: &TupleAccessExpression, - ) -> Result { + pub fn reduce_tuple_access(&mut self, tuple_access: &TupleAccessExpression) -> Result { let tuple = self.reduce_expression(&tuple_access.tuple)?; self.reducer.reduce_tuple_access(tuple_access, tuple) @@ -221,7 +212,7 @@ impl ReconstructingDirector { pub fn reduce_circuit_implied_variable_definition( &mut self, variable: &CircuitImpliedVariableDefinition, - ) -> Result { + ) -> Result { let identifier = self.reduce_identifier(&variable.identifier)?; let expression = variable .expression @@ -233,10 +224,7 @@ impl ReconstructingDirector { .reduce_circuit_implied_variable_definition(variable, identifier, expression) } - pub fn reduce_circuit_init( - &mut self, - circuit_init: &CircuitInitExpression, - ) -> Result { + pub fn reduce_circuit_init(&mut self, circuit_init: &CircuitInitExpression) -> Result { let name = self.reduce_identifier(&circuit_init.name)?; let mut members = vec![]; @@ -250,7 +238,7 @@ impl ReconstructingDirector { pub fn reduce_circuit_member_access( &mut self, circuit_member_access: &CircuitMemberAccessExpression, - ) -> Result { + ) -> Result { let circuit = self.reduce_expression(&circuit_member_access.circuit)?; let name = self.reduce_identifier(&circuit_member_access.name)?; @@ -261,7 +249,7 @@ impl ReconstructingDirector { pub fn reduce_circuit_static_fn_access( &mut self, circuit_static_fn_access: &CircuitStaticFunctionAccessExpression, - ) -> Result { + ) -> Result { let circuit = self.reduce_expression(&circuit_static_fn_access.circuit)?; let name = self.reduce_identifier(&circuit_static_fn_access.name)?; @@ -269,7 +257,7 @@ impl ReconstructingDirector { .reduce_circuit_static_fn_access(circuit_static_fn_access, circuit, name) } - pub fn reduce_call(&mut self, call: &CallExpression) -> Result { + pub fn reduce_call(&mut self, call: &CallExpression) -> Result { let function = self.reduce_expression(&call.function)?; let mut arguments = vec![]; @@ -281,7 +269,7 @@ impl ReconstructingDirector { } // Statements - pub fn reduce_statement(&mut self, statement: &Statement) -> Result { + pub fn reduce_statement(&mut self, statement: &Statement) -> Result { let new = match statement { Statement::Return(return_statement) => Statement::Return(self.reduce_return(return_statement)?), Statement::Definition(definition) => Statement::Definition(self.reduce_definition(definition)?), @@ -296,19 +284,19 @@ impl ReconstructingDirector { self.reducer.reduce_statement(statement, new) } - pub fn reduce_return(&mut self, return_statement: &ReturnStatement) -> Result { + pub fn reduce_return(&mut self, return_statement: &ReturnStatement) -> Result { let expression = self.reduce_expression(&return_statement.expression)?; self.reducer.reduce_return(return_statement, expression) } - pub fn reduce_variable_name(&mut self, variable_name: &VariableName) -> Result { + pub fn reduce_variable_name(&mut self, variable_name: &VariableName) -> Result { let identifier = self.reduce_identifier(&variable_name.identifier)?; self.reducer.reduce_variable_name(variable_name, identifier) } - pub fn reduce_definition(&mut self, definition: &DefinitionStatement) -> Result { + pub fn reduce_definition(&mut self, definition: &DefinitionStatement) -> Result { let mut variable_names = vec![]; for variable_name in definition.variable_names.iter() { variable_names.push(self.reduce_variable_name(variable_name)?); @@ -325,7 +313,7 @@ impl ReconstructingDirector { self.reducer.reduce_definition(definition, variable_names, type_, value) } - pub fn reduce_assignee_access(&mut self, access: &AssigneeAccess) -> Result { + pub fn reduce_assignee_access(&mut self, access: &AssigneeAccess) -> Result { let new = match access { AssigneeAccess::ArrayRange(left, right) => { let left = left.as_ref().map(|left| self.reduce_expression(left)).transpose()?; @@ -341,7 +329,7 @@ impl ReconstructingDirector { self.reducer.reduce_assignee_access(access, new) } - pub fn reduce_assignee(&mut self, assignee: &Assignee) -> Result { + pub fn reduce_assignee(&mut self, assignee: &Assignee) -> Result { let identifier = self.reduce_identifier(&assignee.identifier)?; let mut accesses = vec![]; @@ -352,14 +340,14 @@ impl ReconstructingDirector { self.reducer.reduce_assignee(assignee, identifier, accesses) } - pub fn reduce_assign(&mut self, assign: &AssignStatement) -> Result { + pub fn reduce_assign(&mut self, assign: &AssignStatement) -> Result { let assignee = self.reduce_assignee(&assign.assignee)?; let value = self.reduce_expression(&assign.value)?; self.reducer.reduce_assign(assign, assignee, value) } - pub fn reduce_conditional(&mut self, conditional: &ConditionalStatement) -> Result { + pub fn reduce_conditional(&mut self, conditional: &ConditionalStatement) -> Result { let condition = self.reduce_expression(&conditional.condition)?; let block = self.reduce_block(&conditional.block)?; let next = conditional @@ -371,7 +359,7 @@ impl ReconstructingDirector { self.reducer.reduce_conditional(conditional, condition, block, next) } - pub fn reduce_iteration(&mut self, iteration: &IterationStatement) -> Result { + pub fn reduce_iteration(&mut self, iteration: &IterationStatement) -> Result { let variable = self.reduce_identifier(&iteration.variable)?; let start = self.reduce_expression(&iteration.start)?; let stop = self.reduce_expression(&iteration.stop)?; @@ -380,7 +368,7 @@ impl ReconstructingDirector { self.reducer.reduce_iteration(iteration, variable, start, stop, block) } - pub fn reduce_console(&mut self, console_function_call: &ConsoleStatement) -> Result { + pub fn reduce_console(&mut self, console_function_call: &ConsoleStatement) -> Result { let function = match &console_function_call.function { ConsoleFunction::Assert(expression) => ConsoleFunction::Assert(self.reduce_expression(expression)?), ConsoleFunction::Error(args) | ConsoleFunction::Log(args) => { @@ -406,15 +394,12 @@ impl ReconstructingDirector { self.reducer.reduce_console(console_function_call, function) } - pub fn reduce_expression_statement( - &mut self, - expression: &ExpressionStatement, - ) -> Result { + pub fn reduce_expression_statement(&mut self, expression: &ExpressionStatement) -> Result { let inner_expression = self.reduce_expression(&expression.expression)?; self.reducer.reduce_expression_statement(expression, inner_expression) } - pub fn reduce_block(&mut self, block: &Block) -> Result { + pub fn reduce_block(&mut self, block: &Block) -> Result { let mut statements = vec![]; for statement in block.statements.iter() { statements.push(self.reduce_statement(statement)?); @@ -424,7 +409,7 @@ impl ReconstructingDirector { } // Program - pub fn reduce_program(&mut self, program: &Program) -> Result { + pub fn reduce_program(&mut self, program: &Program) -> Result { let mut inputs = vec![]; for input in program.expected_input.iter() { inputs.push(self.reduce_function_input(input)?); @@ -459,14 +444,14 @@ impl ReconstructingDirector { pub fn reduce_function_input_variable( &mut self, variable: &FunctionInputVariable, - ) -> Result { + ) -> Result { let identifier = self.reduce_identifier(&variable.identifier)?; let type_ = self.reduce_type(&variable.type_, &variable.span)?; self.reducer.reduce_function_input_variable(variable, identifier, type_) } - pub fn reduce_function_input(&mut self, input: &FunctionInput) -> Result { + pub fn reduce_function_input(&mut self, input: &FunctionInput) -> Result { let new = match input { FunctionInput::Variable(function_input_variable) => { FunctionInput::Variable(Box::new(self.reduce_function_input_variable(function_input_variable)?)) @@ -477,10 +462,7 @@ impl ReconstructingDirector { self.reducer.reduce_function_input(input, new) } - pub fn reduce_package_or_packages( - &mut self, - package_or_packages: &PackageOrPackages, - ) -> Result { + pub fn reduce_package_or_packages(&mut self, package_or_packages: &PackageOrPackages) -> Result { let new = match package_or_packages { PackageOrPackages::Package(package) => PackageOrPackages::Package(Package { name: self.reduce_identifier(&package.name)?, @@ -497,13 +479,13 @@ impl ReconstructingDirector { self.reducer.reduce_package_or_packages(package_or_packages, new) } - pub fn reduce_import(&mut self, import: &ImportStatement) -> Result { + pub fn reduce_import(&mut self, import: &ImportStatement) -> Result { let package_or_packages = self.reduce_package_or_packages(&import.package_or_packages)?; self.reducer.reduce_import(import, package_or_packages) } - pub fn reduce_circuit_member(&mut self, circuit_member: &CircuitMember) -> Result { + pub fn reduce_circuit_member(&mut self, circuit_member: &CircuitMember) -> Result { let new = match circuit_member { CircuitMember::CircuitVariable(identifier, type_) => CircuitMember::CircuitVariable( self.reduce_identifier(identifier)?, @@ -517,7 +499,7 @@ impl ReconstructingDirector { self.reducer.reduce_circuit_member(circuit_member, new) } - pub fn reduce_circuit(&mut self, circuit: &Circuit) -> Result { + pub fn reduce_circuit(&mut self, circuit: &Circuit) -> Result { let circuit_name = self.reduce_identifier(&circuit.circuit_name)?; let mut members = vec![]; @@ -528,13 +510,13 @@ impl ReconstructingDirector { self.reducer.reduce_circuit(circuit, circuit_name, members) } - fn reduce_annotation(&mut self, annotation: &Annotation) -> Result { + fn reduce_annotation(&mut self, annotation: &Annotation) -> Result { let name = self.reduce_identifier(&annotation.name)?; self.reducer.reduce_annotation(annotation, name) } - pub fn reduce_function(&mut self, function: &Function) -> Result { + pub fn reduce_function(&mut self, function: &Function) -> Result { let identifier = self.reduce_identifier(&function.identifier)?; let mut annotations = vec![]; diff --git a/ast/src/reducer/reconstructing_reducer.rs b/ast/src/reducer/reconstructing_reducer.rs index b31638390c..36acacf7e3 100644 --- a/ast/src/reducer/reconstructing_reducer.rs +++ b/ast/src/reducer/reconstructing_reducer.rs @@ -16,7 +16,7 @@ use crate::*; use indexmap::IndexMap; -use leo_errors::{LeoError, Span}; +use leo_errors::{Result, Span}; // Needed to fix clippy bug. #[allow(clippy::redundant_closure)] @@ -24,23 +24,23 @@ pub trait ReconstructingReducer { fn in_circuit(&self) -> bool; fn swap_in_circuit(&mut self); - fn reduce_type(&mut self, _type_: &Type, new: Type, _span: &Span) -> Result { + fn reduce_type(&mut self, _type_: &Type, new: Type, _span: &Span) -> Result { Ok(new) } // Expressions - fn reduce_expression(&mut self, _expression: &Expression, new: Expression) -> Result { + fn reduce_expression(&mut self, _expression: &Expression, new: Expression) -> Result { Ok(new) } - fn reduce_identifier(&mut self, identifier: &Identifier) -> Result { + fn reduce_identifier(&mut self, identifier: &Identifier) -> Result { Ok(Identifier { name: identifier.name.clone(), span: identifier.span.clone(), }) } - fn reduce_group_tuple(&mut self, group_tuple: &GroupTuple) -> Result { + fn reduce_group_tuple(&mut self, group_tuple: &GroupTuple) -> Result { Ok(GroupTuple { x: group_tuple.x.clone(), y: group_tuple.y.clone(), @@ -48,18 +48,18 @@ pub trait ReconstructingReducer { }) } - fn reduce_group_value(&mut self, _group_value: &GroupValue, new: GroupValue) -> Result { + fn reduce_group_value(&mut self, _group_value: &GroupValue, new: GroupValue) -> Result { Ok(new) } - fn reduce_string(&mut self, string: &[Char], span: &Span) -> Result { + fn reduce_string(&mut self, string: &[Char], span: &Span) -> Result { Ok(Expression::Value(ValueExpression::String( string.to_vec(), span.clone(), ))) } - fn reduce_value(&mut self, _value: &ValueExpression, new: Expression) -> Result { + fn reduce_value(&mut self, _value: &ValueExpression, new: Expression) -> Result { Ok(new) } @@ -69,7 +69,7 @@ pub trait ReconstructingReducer { left: Expression, right: Expression, op: BinaryOperation, - ) -> Result { + ) -> Result { Ok(BinaryExpression { left: Box::new(left), right: Box::new(right), @@ -83,7 +83,7 @@ pub trait ReconstructingReducer { unary: &UnaryExpression, inner: Expression, op: UnaryOperation, - ) -> Result { + ) -> Result { Ok(UnaryExpression { inner: Box::new(inner), op, @@ -97,7 +97,7 @@ pub trait ReconstructingReducer { condition: Expression, if_true: Expression, if_false: Expression, - ) -> Result { + ) -> Result { Ok(TernaryExpression { condition: Box::new(condition), if_true: Box::new(if_true), @@ -106,12 +106,7 @@ pub trait ReconstructingReducer { }) } - fn reduce_cast( - &mut self, - cast: &CastExpression, - inner: Expression, - target_type: Type, - ) -> Result { + fn reduce_cast(&mut self, cast: &CastExpression, inner: Expression, target_type: Type) -> Result { Ok(CastExpression { inner: Box::new(inner), target_type, @@ -123,7 +118,7 @@ pub trait ReconstructingReducer { &mut self, array_inline: &ArrayInlineExpression, elements: Vec, - ) -> Result { + ) -> Result { Ok(ArrayInlineExpression { elements, span: array_inline.span.clone(), @@ -134,7 +129,7 @@ pub trait ReconstructingReducer { &mut self, array_init: &ArrayInitExpression, element: Expression, - ) -> Result { + ) -> Result { Ok(ArrayInitExpression { element: Box::new(element), dimensions: array_init.dimensions.clone(), @@ -147,7 +142,7 @@ pub trait ReconstructingReducer { array_access: &ArrayAccessExpression, array: Expression, index: Expression, - ) -> Result { + ) -> Result { Ok(ArrayAccessExpression { array: Box::new(array), index: Box::new(index), @@ -161,7 +156,7 @@ pub trait ReconstructingReducer { array: Expression, left: Option, right: Option, - ) -> Result { + ) -> Result { Ok(ArrayRangeAccessExpression { array: Box::new(array), left: left.map(|expr| Box::new(expr)), @@ -174,7 +169,7 @@ pub trait ReconstructingReducer { &mut self, tuple_init: &TupleInitExpression, elements: Vec, - ) -> Result { + ) -> Result { Ok(TupleInitExpression { elements, span: tuple_init.span.clone(), @@ -185,7 +180,7 @@ pub trait ReconstructingReducer { &mut self, tuple_access: &TupleAccessExpression, tuple: Expression, - ) -> Result { + ) -> Result { Ok(TupleAccessExpression { tuple: Box::new(tuple), index: tuple_access.index.clone(), @@ -198,7 +193,7 @@ pub trait ReconstructingReducer { _variable: &CircuitImpliedVariableDefinition, identifier: Identifier, expression: Option, - ) -> Result { + ) -> Result { Ok(CircuitImpliedVariableDefinition { identifier, expression }) } @@ -207,7 +202,7 @@ pub trait ReconstructingReducer { circuit_init: &CircuitInitExpression, name: Identifier, members: Vec, - ) -> Result { + ) -> Result { Ok(CircuitInitExpression { name, members, @@ -220,7 +215,7 @@ pub trait ReconstructingReducer { circuit_member_access: &CircuitMemberAccessExpression, circuit: Expression, name: Identifier, - ) -> Result { + ) -> Result { Ok(CircuitMemberAccessExpression { circuit: Box::new(circuit), name, @@ -233,7 +228,7 @@ pub trait ReconstructingReducer { circuit_static_fn_access: &CircuitStaticFunctionAccessExpression, circuit: Expression, name: Identifier, - ) -> Result { + ) -> Result { Ok(CircuitStaticFunctionAccessExpression { circuit: Box::new(circuit), name, @@ -246,7 +241,7 @@ pub trait ReconstructingReducer { call: &CallExpression, function: Expression, arguments: Vec, - ) -> Result { + ) -> Result { Ok(CallExpression { function: Box::new(function), arguments, @@ -255,26 +250,18 @@ pub trait ReconstructingReducer { } // Statements - fn reduce_statement(&mut self, _statement: &Statement, new: Statement) -> Result { + fn reduce_statement(&mut self, _statement: &Statement, new: Statement) -> Result { Ok(new) } - fn reduce_return( - &mut self, - return_statement: &ReturnStatement, - expression: Expression, - ) -> Result { + fn reduce_return(&mut self, return_statement: &ReturnStatement, expression: Expression) -> Result { Ok(ReturnStatement { expression, span: return_statement.span.clone(), }) } - fn reduce_variable_name( - &mut self, - variable_name: &VariableName, - identifier: Identifier, - ) -> Result { + fn reduce_variable_name(&mut self, variable_name: &VariableName, identifier: Identifier) -> Result { Ok(VariableName { mutable: variable_name.mutable, identifier, @@ -288,7 +275,7 @@ pub trait ReconstructingReducer { variable_names: Vec, type_: Option, value: Expression, - ) -> Result { + ) -> Result { Ok(DefinitionStatement { declaration_type: definition.declaration_type.clone(), variable_names, @@ -298,11 +285,7 @@ pub trait ReconstructingReducer { }) } - fn reduce_assignee_access( - &mut self, - _access: &AssigneeAccess, - new: AssigneeAccess, - ) -> Result { + fn reduce_assignee_access(&mut self, _access: &AssigneeAccess, new: AssigneeAccess) -> Result { Ok(new) } @@ -311,7 +294,7 @@ pub trait ReconstructingReducer { assignee: &Assignee, identifier: Identifier, accesses: Vec, - ) -> Result { + ) -> Result { Ok(Assignee { identifier, accesses, @@ -324,7 +307,7 @@ pub trait ReconstructingReducer { assign: &AssignStatement, assignee: Assignee, value: Expression, - ) -> Result { + ) -> Result { Ok(AssignStatement { operation: assign.operation, assignee, @@ -339,7 +322,7 @@ pub trait ReconstructingReducer { condition: Expression, block: Block, statement: Option, - ) -> Result { + ) -> Result { Ok(ConditionalStatement { condition, block, @@ -355,7 +338,7 @@ pub trait ReconstructingReducer { start: Expression, stop: Expression, block: Block, - ) -> Result { + ) -> Result { Ok(IterationStatement { variable, start, @@ -366,11 +349,7 @@ pub trait ReconstructingReducer { }) } - fn reduce_console( - &mut self, - console: &ConsoleStatement, - function: ConsoleFunction, - ) -> Result { + fn reduce_console(&mut self, console: &ConsoleStatement, function: ConsoleFunction) -> Result { Ok(ConsoleStatement { function, span: console.span.clone(), @@ -381,14 +360,14 @@ pub trait ReconstructingReducer { &mut self, expression_statement: &ExpressionStatement, expression: Expression, - ) -> Result { + ) -> Result { Ok(ExpressionStatement { expression, span: expression_statement.span.clone(), }) } - fn reduce_block(&mut self, block: &Block, statements: Vec) -> Result { + fn reduce_block(&mut self, block: &Block, statements: Vec) -> Result { Ok(Block { statements, span: block.span.clone(), @@ -404,7 +383,7 @@ pub trait ReconstructingReducer { circuits: IndexMap, functions: IndexMap, global_consts: IndexMap, - ) -> Result { + ) -> Result { Ok(Program { name: program.name.clone(), expected_input, @@ -420,7 +399,7 @@ pub trait ReconstructingReducer { variable: &FunctionInputVariable, identifier: Identifier, type_: Type, - ) -> Result { + ) -> Result { Ok(FunctionInputVariable { identifier, const_: variable.const_, @@ -430,7 +409,7 @@ pub trait ReconstructingReducer { }) } - fn reduce_function_input(&mut self, _input: &FunctionInput, new: FunctionInput) -> Result { + fn reduce_function_input(&mut self, _input: &FunctionInput, new: FunctionInput) -> Result { Ok(new) } @@ -438,7 +417,7 @@ pub trait ReconstructingReducer { &mut self, _package_or_packages: &PackageOrPackages, new: PackageOrPackages, - ) -> Result { + ) -> Result { Ok(new) } @@ -446,18 +425,14 @@ pub trait ReconstructingReducer { &mut self, import: &ImportStatement, package_or_packages: PackageOrPackages, - ) -> Result { + ) -> Result { Ok(ImportStatement { package_or_packages, span: import.span.clone(), }) } - fn reduce_circuit_member( - &mut self, - _circuit_member: &CircuitMember, - new: CircuitMember, - ) -> Result { + fn reduce_circuit_member(&mut self, _circuit_member: &CircuitMember, new: CircuitMember) -> Result { Ok(new) } @@ -466,11 +441,11 @@ pub trait ReconstructingReducer { _circuit: &Circuit, circuit_name: Identifier, members: Vec, - ) -> Result { + ) -> Result { Ok(Circuit { circuit_name, members }) } - fn reduce_annotation(&mut self, annotation: &Annotation, name: Identifier) -> Result { + fn reduce_annotation(&mut self, annotation: &Annotation, name: Identifier) -> Result { Ok(Annotation { span: annotation.span.clone(), name, @@ -487,7 +462,7 @@ pub trait ReconstructingReducer { input: Vec, output: Option, block: Block, - ) -> Result { + ) -> Result { Ok(Function { identifier, annotations, diff --git a/imports/src/parser/import_parser.rs b/imports/src/parser/import_parser.rs index 163e789bcc..022b79e381 100644 --- a/imports/src/parser/import_parser.rs +++ b/imports/src/parser/import_parser.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use leo_asg::{AsgContext, ImportResolver, Program}; -use leo_errors::{ImportError, LeoError, Span}; +use leo_errors::{ImportError, LeoError, Result, Span}; use indexmap::{IndexMap, IndexSet}; use std::path::PathBuf; @@ -47,7 +47,7 @@ impl<'a> ImportResolver<'a> for ImportParser<'a> { context: AsgContext<'a>, package_segments: &[&str], span: &Span, - ) -> Result>, LeoError> { + ) -> Result>> { let full_path = package_segments.join("."); if self.partial_imports.contains(&full_path) { return Err(ImportError::recursive_imports(full_path, span).into()); diff --git a/imports/src/parser/parse_package.rs b/imports/src/parser/parse_package.rs index 1d3b39fe55..3f2079598b 100644 --- a/imports/src/parser/parse_package.rs +++ b/imports/src/parser/parse_package.rs @@ -16,7 +16,7 @@ use crate::ImportParser; use leo_asg::{AsgContext, Program}; -use leo_errors::{ImportError, LeoError, Span}; +use leo_errors::{ImportError, Result, Span}; use std::{fs, fs::DirEntry, path::PathBuf}; @@ -31,7 +31,7 @@ impl<'a> ImportParser<'a> { package: &DirEntry, remaining_segments: &[&str], span: &Span, - ) -> Result, LeoError> { + ) -> Result> { if !remaining_segments.is_empty() { return self.parse_package(context, package.path(), remaining_segments, span); } @@ -52,7 +52,7 @@ impl<'a> ImportParser<'a> { mut path: PathBuf, segments: &[&str], span: &Span, - ) -> Result, LeoError> { + ) -> Result> { let error_path = path.clone(); let package_name = segments[0]; diff --git a/imports/src/parser/parse_symbol.rs b/imports/src/parser/parse_symbol.rs index 2863f437c0..aa7f52a9fe 100644 --- a/imports/src/parser/parse_symbol.rs +++ b/imports/src/parser/parse_symbol.rs @@ -16,7 +16,7 @@ use crate::ImportParser; use leo_ast::Program; -use leo_errors::{ImportError, LeoError, Span}; +use leo_errors::{ImportError, Result, Span}; use std::fs::DirEntry; @@ -28,7 +28,7 @@ impl<'a> ImportParser<'a> { /// /// Builds an abstract syntax tree from the given file and then builds the Leo syntax tree. /// - pub(crate) fn parse_import_file(package: &DirEntry, span: &Span) -> Result { + pub(crate) fn parse_import_file(package: &DirEntry, span: &Span) -> Result { // Get the package file type. let file_type = package .file_type() diff --git a/leo/commands/build.rs b/leo/commands/build.rs index 18d9cca79e..b2ab71d5dc 100644 --- a/leo/commands/build.rs +++ b/leo/commands/build.rs @@ -145,7 +145,7 @@ impl Command for Build { // Compile the main.leo file along with constraints if !MainFile::exists_at(&package_path) { - return Err(CliError::package_main_file_not_found(new_backtrace()))?; + return Err(CliError::package_main_file_not_found(new_backtrace()).into()); } // Create the output directory diff --git a/leo/commands/init.rs b/leo/commands/init.rs index b1f11ab6a5..3b89ae9cb1 100644 --- a/leo/commands/init.rs +++ b/leo/commands/init.rs @@ -44,7 +44,7 @@ impl Command for Init { // Check that the current package directory path exists. if !path.exists() { - return Err(CliError::package_directory_does_not_exist(new_backtrace()))?; + return Err(CliError::package_directory_does_not_exist(new_backtrace()).into()); } // Check that the given package name is valid. @@ -54,7 +54,7 @@ impl Command for Init { .to_string_lossy() .to_string(); if !LeoPackage::is_package_name_valid(&package_name) { - return Err(CliError::invalid_package_name(&package_name, new_backtrace()))?; + return Err(CliError::invalid_package_name(&package_name, new_backtrace()).into()); } let username = read_username().ok(); diff --git a/leo/commands/new.rs b/leo/commands/new.rs index d2e7f4f7d8..3bdd717654 100644 --- a/leo/commands/new.rs +++ b/leo/commands/new.rs @@ -46,7 +46,7 @@ impl Command for New { // Check that the given package name is valid. let package_name = self.name; if !LeoPackage::is_package_name_valid(&package_name) { - return Err(CliError::invalid_project_name(new_backtrace()))?; + return Err(CliError::invalid_project_name(new_backtrace()).into()); } let username = read_username().ok(); @@ -57,7 +57,7 @@ impl Command for New { // Verify the package directory path does not exist yet. if path.exists() { - return Err(CliError::package_directory_already_exists(&path, new_backtrace()))?; + return Err(CliError::package_directory_already_exists(&path, new_backtrace()).into()); } // Create the package directory diff --git a/leo/commands/package/add.rs b/leo/commands/package/add.rs index 2db7cbac22..9308859eff 100644 --- a/leo/commands/package/add.rs +++ b/leo/commands/package/add.rs @@ -64,12 +64,12 @@ impl Add { if v.len() == 2 { Ok((v[0].to_string(), v[1].to_string())) } else { - Err(CliError::incorrect_command_argument(new_backtrace()))? + Err(CliError::incorrect_command_argument(new_backtrace()).into()) } } else if let (Some(author), Some(package)) = (&self.author, &self.package) { Ok((author.clone(), package.clone())) } else { - Err(CliError::incorrect_command_argument(new_backtrace()))? + Err(CliError::incorrect_command_argument(new_backtrace()).into()) } } } diff --git a/leo/commands/package/clone.rs b/leo/commands/package/clone.rs index 0efd2efd06..4f6005b272 100644 --- a/leo/commands/package/clone.rs +++ b/leo/commands/package/clone.rs @@ -68,12 +68,12 @@ impl Clone { if v.len() == 2 { Ok((v[0].to_string(), v[1].to_string())) } else { - Err(CliError::incorrect_command_argument(new_backtrace()))? + Err(CliError::incorrect_command_argument(new_backtrace()).into()) } } else if let (Some(author), Some(package)) = (&self.author, &self.package) { Ok((author.clone(), package.clone())) } else { - Err(CliError::incorrect_command_argument(new_backtrace()))? + Err(CliError::incorrect_command_argument(new_backtrace()).into()) } } diff --git a/leo/commands/package/login.rs b/leo/commands/package/login.rs index e586fafeb8..0d674b57d4 100644 --- a/leo/commands/package/login.rs +++ b/leo/commands/package/login.rs @@ -78,7 +78,7 @@ impl Command for Login { let tok_opt = res.remove("token"); if tok_opt.is_none() { - return Err(CliError::unable_to_get_token(new_backtrace()))?; + return Err(CliError::unable_to_get_token(new_backtrace()).into()); }; (tok_opt.unwrap(), email_username) @@ -92,7 +92,7 @@ impl Command for Login { match api.run_route(ProfileRoute {})? { Some(username) => (token, username), - None => return Err(CliError::supplied_token_is_incorrect(new_backtrace()))?, + None => return Err(CliError::supplied_token_is_incorrect(new_backtrace()).into()), } } @@ -109,10 +109,10 @@ impl Command for Login { (token, username) } else { remove_token_and_username()?; - return Err(CliError::stored_credentials_expired(new_backtrace()))?; + return Err(CliError::stored_credentials_expired(new_backtrace()).into()); } } - None => return Err(CliError::no_credentials_provided(new_backtrace()))?, + None => return Err(CliError::no_credentials_provided(new_backtrace()).into()), } } }; diff --git a/leo/commands/package/publish.rs b/leo/commands/package/publish.rs index c0a8c072ac..491009fe02 100644 --- a/leo/commands/package/publish.rs +++ b/leo/commands/package/publish.rs @@ -49,7 +49,7 @@ impl Command for Publish { let package_name = manifest.get_package_name(); if KEYWORD_TOKENS.iter().any(|keyword| keyword.to_string() == package_name) { - return Err(CliError::package_cannot_be_named_after_a_keyword(new_backtrace()))?; + return Err(CliError::package_cannot_be_named_after_a_keyword(new_backtrace()).into()); } let package_version = manifest.get_package_version(); @@ -59,9 +59,9 @@ impl Command for Publish { manifest.get_package_license(), manifest.get_package_remote(), ) { - (None, _, _) => return Err(CliError::no_package_description(new_backtrace()))?, - (_, None, _) => return Err(CliError::missing_package_license(new_backtrace()))?, - (_, _, None) => return Err(CliError::missing_package_remote(new_backtrace()))?, + (None, _, _) => return Err(CliError::no_package_description(new_backtrace()).into()), + (_, None, _) => return Err(CliError::missing_package_license(new_backtrace()).into()), + (_, _, None) => return Err(CliError::missing_package_remote(new_backtrace()).into()), (_, _, _) => (), }; @@ -70,7 +70,7 @@ impl Command for Publish { // Prevent most common error before accessing API. if username == AUTHOR_PLACEHOLDER { - return Err(CliError::package_author_is_not_set(new_backtrace()))?; + return Err(CliError::package_author_is_not_set(new_backtrace()).into()); } // Create the output directory. diff --git a/leo/commands/test.rs b/leo/commands/test.rs index ef33258861..cef2eda865 100644 --- a/leo/commands/test.rs +++ b/leo/commands/test.rs @@ -80,10 +80,7 @@ impl Command for Test { // when no main file and no files marked - error } else { - return Err(CliError::program_file_does_not_exist( - package_path.to_string_lossy(), - new_backtrace(), - ))?; + return Err(CliError::program_file_does_not_exist(package_path.to_string_lossy(), new_backtrace()).into()); } // Construct the path to the output directory; diff --git a/leo/config.rs b/leo/config.rs index 4e566b3337..2ea893abf5 100644 --- a/leo/config.rs +++ b/leo/config.rs @@ -189,10 +189,10 @@ pub fn read_username() -> Result { pub fn remove_token_and_username() -> Result<()> { if let Err(err) = fs::remove_file(&LEO_CREDENTIALS_PATH.to_path_buf()) { - Err(CliError::remove_token_and_username(err, new_backtrace()))? + return Err(CliError::remove_token_and_username(err, new_backtrace()).into()); } if let Err(err) = fs::remove_file(&LEO_USERNAME_PATH.to_path_buf()) { - Err(CliError::remove_token_and_username(err, new_backtrace()))? + return Err(CliError::remove_token_and_username(err, new_backtrace()).into()); } Ok(()) } diff --git a/leo/updater.rs b/leo/updater.rs index c00feaf25b..02919bb639 100644 --- a/leo/updater.rs +++ b/leo/updater.rs @@ -87,11 +87,7 @@ impl Updater { { Ok(latest_release.version) } else { - Err(CliError::old_release_version( - current_version, - latest_release.version, - new_backtrace(), - ))? + Err(CliError::old_release_version(current_version, latest_release.version, new_backtrace()).into()) } } diff --git a/package/src/imports/directory.rs b/package/src/imports/directory.rs index 38d497050f..aec8bd3b6c 100644 --- a/package/src/imports/directory.rs +++ b/package/src/imports/directory.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use leo_errors::{LeoError, PackageError}; +use leo_errors::{PackageError, Result}; use std::{borrow::Cow, fs, path::Path}; @@ -26,7 +26,7 @@ pub struct ImportsDirectory; impl ImportsDirectory { /// Creates a directory at the provided path with the default directory name. - pub fn create(path: &Path) -> Result<(), LeoError> { + pub fn create(path: &Path) -> Result<()> { let mut path = Cow::from(path); if path.is_dir() && !path.ends_with(IMPORTS_DIRECTORY_NAME) { path.to_mut().push(IMPORTS_DIRECTORY_NAME); @@ -37,7 +37,7 @@ impl ImportsDirectory { } /// Removes an imported package in the imports directory at the provided path. - pub fn remove_import(path: &Path, package_name: &str) -> Result<(), LeoError> { + pub fn remove_import(path: &Path, package_name: &str) -> Result<()> { let mut path = Cow::from(path); if path.is_dir() && !path.ends_with(IMPORTS_DIRECTORY_NAME) { path.to_mut().push(IMPORTS_DIRECTORY_NAME); diff --git a/package/src/inputs/directory.rs b/package/src/inputs/directory.rs index 448b251bec..cb79277c34 100644 --- a/package/src/inputs/directory.rs +++ b/package/src/inputs/directory.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use leo_errors::{LeoError, PackageError}; +use leo_errors::{PackageError, Result}; use std::{ borrow::Cow, @@ -31,7 +31,7 @@ pub struct InputsDirectory; impl InputsDirectory { /// Creates a directory at the provided path with the default directory name. - pub fn create(path: &Path) -> Result<(), LeoError> { + pub fn create(path: &Path) -> Result<()> { let mut path = Cow::from(path); if path.is_dir() && !path.ends_with(INPUTS_DIRECTORY_NAME) { path.to_mut().push(INPUTS_DIRECTORY_NAME); @@ -42,7 +42,7 @@ impl InputsDirectory { } /// Returns a list of files in the input directory. - pub fn files(path: &Path) -> Result, LeoError> { + pub fn files(path: &Path) -> Result> { let mut path = path.to_owned(); path.push(INPUTS_DIRECTORY_NAME); @@ -55,7 +55,7 @@ impl InputsDirectory { } } -fn parse_file_paths(directory: ReadDir, file_paths: &mut Vec) -> Result<(), LeoError> { +fn parse_file_paths(directory: ReadDir, file_paths: &mut Vec) -> Result<()> { for file_entry in directory.into_iter() { let file_entry = file_entry.map_err(|e| PackageError::failed_to_get_input_file_entry(e, Backtrace::new()))?; let file_path = file_entry.path(); diff --git a/package/src/inputs/input.rs b/package/src/inputs/input.rs index 15fc95c751..d832cbbbc8 100644 --- a/package/src/inputs/input.rs +++ b/package/src/inputs/input.rs @@ -18,7 +18,7 @@ use crate::inputs::INPUTS_DIRECTORY_NAME; -use leo_errors::{LeoError, PackageError}; +use leo_errors::{PackageError, Result}; use backtrace::Backtrace; use serde::Deserialize; @@ -56,7 +56,7 @@ impl InputFile { } /// Reads the program input variables from the given file path if it exists. - pub fn read_from<'a>(&self, path: &'a Path) -> Result<(String, Cow<'a, Path>), LeoError> { + pub fn read_from<'a>(&self, path: &'a Path) -> Result<(String, Cow<'a, Path>)> { let path = self.setup_file_path(path); let input = fs::read_to_string(&path) @@ -65,7 +65,7 @@ impl InputFile { } /// Writes the standard input format to a file. - pub fn write_to(self, path: &Path) -> Result<(), LeoError> { + pub fn write_to(self, path: &Path) -> Result<()> { let path = self.setup_file_path(path); let mut file = File::create(&path).map_err(|e| PackageError::io_error_input_file(e, Backtrace::new()))?; diff --git a/package/src/inputs/state.rs b/package/src/inputs/state.rs index 588c33fc8d..bafda5de55 100644 --- a/package/src/inputs/state.rs +++ b/package/src/inputs/state.rs @@ -17,7 +17,7 @@ //! The `program.state` file. use crate::inputs::INPUTS_DIRECTORY_NAME; -use leo_errors::{LeoError, PackageError}; +use leo_errors::{PackageError, Result}; use backtrace::Backtrace; use serde::Deserialize; @@ -55,7 +55,7 @@ impl StateFile { } /// Reads the state input variables from the given file path if it exists. - pub fn read_from<'a>(&self, path: &'a Path) -> Result<(String, Cow<'a, Path>), LeoError> { + pub fn read_from<'a>(&self, path: &'a Path) -> Result<(String, Cow<'a, Path>)> { let path = self.setup_file_path(path); let input = fs::read_to_string(&path) @@ -64,7 +64,7 @@ impl StateFile { } /// Writes the standard input format to a file. - pub fn write_to(self, path: &Path) -> Result<(), LeoError> { + pub fn write_to(self, path: &Path) -> Result<()> { let path = self.setup_file_path(path); let mut file = File::create(&path).map_err(|e| PackageError::io_error_state_file(e, Backtrace::new()))?; diff --git a/package/src/lib.rs b/package/src/lib.rs index a4f55605dc..428f583a62 100644 --- a/package/src/lib.rs +++ b/package/src/lib.rs @@ -23,13 +23,13 @@ pub mod source; use std::path::Path; -use leo_errors::LeoError; +use leo_errors::Result; pub struct LeoPackage; impl LeoPackage { /// Initializes a Leo package at the given path. - pub fn initialize(package_name: &str, path: &Path, author: Option) -> Result<(), LeoError> { + pub fn initialize(package_name: &str, path: &Path, author: Option) -> Result<()> { package::Package::initialize(package_name, path, author) } @@ -39,7 +39,7 @@ impl LeoPackage { } /// Removes an imported Leo package - pub fn remove_imported_package(package_name: &str, path: &Path) -> Result<(), LeoError> { + pub fn remove_imported_package(package_name: &str, path: &Path) -> Result<()> { package::Package::remove_imported_package(package_name, path) } } diff --git a/package/src/outputs/checksum.rs b/package/src/outputs/checksum.rs index f93ad885ef..933ab003d4 100644 --- a/package/src/outputs/checksum.rs +++ b/package/src/outputs/checksum.rs @@ -17,7 +17,7 @@ //! The build checksum file. use crate::outputs::OUTPUTS_DIRECTORY_NAME; -use leo_errors::{LeoError, PackageError}; +use leo_errors::{PackageError, Result}; use backtrace::Backtrace; use serde::Deserialize; @@ -51,7 +51,7 @@ impl ChecksumFile { } /// Reads the checksum from the given file path if it exists. - pub fn read_from(&self, path: &Path) -> Result { + pub fn read_from(&self, path: &Path) -> Result { let path = self.setup_file_path(path); let string = fs::read_to_string(&path) @@ -60,7 +60,7 @@ impl ChecksumFile { } /// Writes the given checksum to a file. - pub fn write_to(&self, path: &Path, checksum: String) -> Result<(), LeoError> { + pub fn write_to(&self, path: &Path, checksum: String) -> Result<()> { let path = self.setup_file_path(path); let mut file = File::create(&path).map_err(|e| PackageError::io_error_checksum_file(e, Backtrace::new()))?; @@ -71,7 +71,7 @@ impl ChecksumFile { /// Removes the checksum at the given path if it exists. Returns `true` on success, /// `false` if the file doesn't exist, and `Error` if the file system fails during operation. - pub fn remove(&self, path: &Path) -> Result { + pub fn remove(&self, path: &Path) -> Result { let path = self.setup_file_path(path); if !path.exists() { return Ok(false); diff --git a/package/src/outputs/circuit.rs b/package/src/outputs/circuit.rs index 42601616d2..364287f38e 100644 --- a/package/src/outputs/circuit.rs +++ b/package/src/outputs/circuit.rs @@ -17,7 +17,7 @@ //! The serialized circuit output file. use crate::outputs::OUTPUTS_DIRECTORY_NAME; -use leo_errors::{LeoError, PackageError}; +use leo_errors::{PackageError, Result}; use backtrace::Backtrace; use serde::Deserialize; @@ -51,7 +51,7 @@ impl CircuitFile { } /// Reads the serialized circuit from the given file path if it exists. - pub fn read_from(&self, path: &Path) -> Result { + pub fn read_from(&self, path: &Path) -> Result { let path = self.setup_file_path(path); let string = fs::read_to_string(&path) @@ -60,7 +60,7 @@ impl CircuitFile { } /// Writes the given serialized circuit to a file. - pub fn write_to(&self, path: &Path, circuit: String) -> Result<(), LeoError> { + pub fn write_to(&self, path: &Path, circuit: String) -> Result<()> { let path = self.setup_file_path(path); let mut file = File::create(&path).map_err(|e| PackageError::io_error_circuit_file(e, Backtrace::new()))?; @@ -71,7 +71,7 @@ impl CircuitFile { /// Removes the serialized circuit at the given path if it exists. Returns `true` on success, /// `false` if the file doesn't exist, and `Error` if the file system fails during operation. - pub fn remove(&self, path: &Path) -> Result { + pub fn remove(&self, path: &Path) -> Result { let path = self.setup_file_path(path); if !path.exists() { return Ok(false); diff --git a/package/src/outputs/directory.rs b/package/src/outputs/directory.rs index 4fb3898803..3f63d4a654 100644 --- a/package/src/outputs/directory.rs +++ b/package/src/outputs/directory.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use leo_errors::{LeoError, PackageError}; +use leo_errors::{PackageError, Result}; use backtrace::Backtrace; use std::{borrow::Cow, fs, path::Path}; @@ -25,7 +25,7 @@ pub struct OutputsDirectory; impl OutputsDirectory { /// Creates a directory at the provided path with the default directory name. - pub fn create(path: &Path) -> Result<(), LeoError> { + pub fn create(path: &Path) -> Result<()> { let mut path = Cow::from(path); if path.is_dir() && !path.ends_with(OUTPUTS_DIRECTORY_NAME) { path.to_mut().push(OUTPUTS_DIRECTORY_NAME); @@ -36,7 +36,7 @@ impl OutputsDirectory { } /// Removes the directory at the provided path. - pub fn remove(path: &Path) -> Result<(), LeoError> { + pub fn remove(path: &Path) -> Result<()> { let mut path = Cow::from(path); if path.is_dir() && !path.ends_with(OUTPUTS_DIRECTORY_NAME) { path.to_mut().push(OUTPUTS_DIRECTORY_NAME); diff --git a/package/src/outputs/proof.rs b/package/src/outputs/proof.rs index d4fd3ff83b..fc6823440e 100644 --- a/package/src/outputs/proof.rs +++ b/package/src/outputs/proof.rs @@ -17,7 +17,7 @@ //! The proof file. use crate::outputs::OUTPUTS_DIRECTORY_NAME; -use leo_errors::{LeoError, PackageError}; +use leo_errors::{PackageError, Result}; use backtrace::Backtrace; use serde::Deserialize; @@ -51,7 +51,7 @@ impl ProofFile { } /// Reads the proof from the given file path if it exists. - pub fn read_from(&self, path: &Path) -> Result { + pub fn read_from(&self, path: &Path) -> Result { let path = self.setup_file_path(path); let string = fs::read_to_string(&path) @@ -60,7 +60,7 @@ impl ProofFile { } /// Writes the given proof to a file. - pub fn write_to(&self, path: &Path, proof: &[u8]) -> Result<(), LeoError> { + pub fn write_to(&self, path: &Path, proof: &[u8]) -> Result<()> { let path = self.setup_file_path(path); let mut file = File::create(&path).map_err(|e| PackageError::io_error_proof_file(e, Backtrace::new()))?; @@ -73,7 +73,7 @@ impl ProofFile { /// Removes the proof at the given path if it exists. Returns `true` on success, /// `false` if the file doesn't exist, and `Error` if the file system fails during operation. - pub fn remove(&self, path: &Path) -> Result { + pub fn remove(&self, path: &Path) -> Result { let path = self.setup_file_path(path); if !path.exists() { return Ok(false); diff --git a/package/src/outputs/proving_key.rs b/package/src/outputs/proving_key.rs index 0cba0066cb..319e839236 100644 --- a/package/src/outputs/proving_key.rs +++ b/package/src/outputs/proving_key.rs @@ -17,7 +17,7 @@ //! The proving key file. use crate::outputs::OUTPUTS_DIRECTORY_NAME; -use leo_errors::{LeoError, PackageError}; +use leo_errors::{PackageError, Result}; use backtrace::Backtrace; use serde::Deserialize; @@ -55,7 +55,7 @@ impl ProvingKeyFile { } /// Reads the proving key from the given file path if it exists. - pub fn read_from(&self, path: &Path) -> Result, LeoError> { + pub fn read_from(&self, path: &Path) -> Result> { let path = self.setup_file_path(path); let bytes = @@ -64,7 +64,7 @@ impl ProvingKeyFile { } /// Writes the given proving key to a file. - pub fn write_to<'a>(&self, path: &'a Path, proving_key: &[u8]) -> Result, LeoError> { + pub fn write_to<'a>(&self, path: &'a Path, proving_key: &[u8]) -> Result> { let path = self.setup_file_path(path); let mut file = File::create(&path).map_err(|e| PackageError::io_error_proving_key_file(e, Backtrace::new()))?; @@ -75,7 +75,7 @@ impl ProvingKeyFile { /// Removes the proving key at the given path if it exists. Returns `true` on success, /// `false` if the file doesn't exist, and `Error` if the file system fails during operation. - pub fn remove(&self, path: &Path) -> Result { + pub fn remove(&self, path: &Path) -> Result { let path = self.setup_file_path(path); if !path.exists() { return Ok(false); diff --git a/package/src/outputs/verification_key.rs b/package/src/outputs/verification_key.rs index d09e21e7c5..440ef971d5 100644 --- a/package/src/outputs/verification_key.rs +++ b/package/src/outputs/verification_key.rs @@ -17,7 +17,7 @@ //! The verification key file. use crate::outputs::OUTPUTS_DIRECTORY_NAME; -use leo_errors::{LeoError, PackageError}; +use leo_errors::{PackageError, Result}; use backtrace::Backtrace; use serde::Deserialize; @@ -55,7 +55,7 @@ impl VerificationKeyFile { } /// Reads the verification key from the given file path if it exists. - pub fn read_from(&self, path: &Path) -> Result, LeoError> { + pub fn read_from(&self, path: &Path) -> Result> { let path = self.setup_file_path(path); let bytes = fs::read(&path) @@ -64,7 +64,7 @@ impl VerificationKeyFile { } /// Writes the given verification key to a file. - pub fn write_to<'a>(&self, path: &'a Path, verification_key: &[u8]) -> Result, LeoError> { + pub fn write_to<'a>(&self, path: &'a Path, verification_key: &[u8]) -> Result> { let path = self.setup_file_path(path); let mut file = File::create(&path).map_err(|e| PackageError::io_error_verification_key_file(e, Backtrace::new()))?; @@ -76,7 +76,7 @@ impl VerificationKeyFile { /// Removes the verification key at the given path if it exists. Returns `true` on success, /// `false` if the file doesn't exist, and `Error` if the file system fails during operation. - pub fn remove(&self, path: &Path) -> Result { + pub fn remove(&self, path: &Path) -> Result { let path = self.setup_file_path(path); if !path.exists() { return Ok(false); diff --git a/package/src/package.rs b/package/src/package.rs index eba5a35514..a05b2e32da 100644 --- a/package/src/package.rs +++ b/package/src/package.rs @@ -21,7 +21,7 @@ use crate::{ source::{MainFile, SourceDirectory}, }; -use leo_errors::{LeoError, PackageError}; +use leo_errors::{PackageError, Result}; use backtrace::Backtrace; use serde::Deserialize; @@ -36,7 +36,7 @@ pub struct Package { } impl Package { - pub fn new(package_name: &str) -> Result { + pub fn new(package_name: &str) -> Result { // Check that the package name is valid. if !Self::is_package_name_valid(package_name) { return Err(PackageError::invalid_package_name(package_name, Backtrace::new()).into()); @@ -184,7 +184,7 @@ impl Package { } /// Creates a package at the given path - pub fn initialize(package_name: &str, path: &Path, author: Option) -> Result<(), LeoError> { + pub fn initialize(package_name: &str, path: &Path, author: Option) -> Result<()> { // First, verify that this directory is not already initialized as a Leo package. { if !Self::can_initialize(package_name, path) { @@ -244,7 +244,7 @@ impl Package { } /// Removes the package at the given path - pub fn remove_imported_package(package_name: &str, path: &Path) -> Result<(), LeoError> { + pub fn remove_imported_package(package_name: &str, path: &Path) -> Result<()> { ImportsDirectory::remove_import(path, package_name) } } diff --git a/package/src/root/gitignore.rs b/package/src/root/gitignore.rs index 8190eb239a..80347361e4 100644 --- a/package/src/root/gitignore.rs +++ b/package/src/root/gitignore.rs @@ -16,7 +16,7 @@ //! The `.gitignore` file. -use leo_errors::{LeoError, PackageError}; +use leo_errors::{PackageError, Result}; use backtrace::Backtrace; use serde::Deserialize; @@ -40,7 +40,7 @@ impl Gitignore { path.exists() } - pub fn write_to(self, path: &Path) -> Result<(), LeoError> { + pub fn write_to(self, path: &Path) -> Result<()> { let mut path = Cow::from(path); if path.is_dir() { path.to_mut().push(GITIGNORE_FILENAME); diff --git a/package/src/root/manifest.rs b/package/src/root/manifest.rs index e281f5b0d3..605c93c438 100644 --- a/package/src/root/manifest.rs +++ b/package/src/root/manifest.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use crate::package::Package; -use leo_errors::{LeoError, PackageError}; +use leo_errors::{PackageError, Result}; use backtrace::Backtrace; use serde::Deserialize; @@ -42,7 +42,7 @@ pub struct Manifest { } impl Manifest { - pub fn new(package_name: &str, author: Option) -> Result { + pub fn new(package_name: &str, author: Option) -> Result { Ok(Self { project: Package::new(package_name)?, remote: author.map(|author| Remote { author }), @@ -81,7 +81,7 @@ impl Manifest { self.remote.clone() } - pub fn write_to(self, path: &Path) -> Result<(), LeoError> { + pub fn write_to(self, path: &Path) -> Result<()> { let mut path = Cow::from(path); if path.is_dir() { path.to_mut().push(MANIFEST_FILENAME); diff --git a/package/src/root/readme.rs b/package/src/root/readme.rs index cfe0872d57..c6b1a5a699 100644 --- a/package/src/root/readme.rs +++ b/package/src/root/readme.rs @@ -17,7 +17,7 @@ //! The `README.md` file. -use leo_errors::{LeoError, PackageError}; +use leo_errors::{PackageError, Result}; use backtrace::Backtrace; use serde::Deserialize; @@ -49,7 +49,7 @@ impl README { path.exists() } - pub fn write_to(self, path: &Path) -> Result<(), LeoError> { + pub fn write_to(self, path: &Path) -> Result<()> { let mut path = Cow::from(path); if path.is_dir() { path.to_mut().push(README_FILENAME); diff --git a/package/src/root/zip.rs b/package/src/root/zip.rs index 002ca5a92e..0779d0abda 100644 --- a/package/src/root/zip.rs +++ b/package/src/root/zip.rs @@ -30,7 +30,7 @@ use crate::{ root::{MANIFEST_FILENAME, README_FILENAME}, source::{SOURCE_DIRECTORY_NAME, SOURCE_FILE_EXTENSION}, }; -use leo_errors::{LeoError, PackageError}; +use leo_errors::{PackageError, Result}; use backtrace::Backtrace; @@ -71,14 +71,14 @@ impl ZipFile { } // /// Reads the program bytes from the given file path if it exists. - // pub fn read_from(&self, path: &Path) -> Result, LeoError> { + // pub fn read_from(&self, path: &Path) -> Result> { // let path = self.setup_file_path(path); // // Ok(fs::read(&path).map_err(|_| PackageError::FileReadError(path.clone()))?) // } /// Writes the current package contents to a zip file. - pub fn write(&self, src_dir: &Path) -> Result<(), LeoError> { + pub fn write(&self, src_dir: &Path) -> Result<()> { // Build walkdir iterator from current package let walkdir = WalkDir::new(src_dir); @@ -139,7 +139,7 @@ impl ZipFile { /// Removes the zip file at the given path if it exists. Returns `true` on success, /// `false` if the file doesn't exist, and `Error` if the file system fails during operation. - pub fn remove(&self, path: &Path) -> Result { + pub fn remove(&self, path: &Path) -> Result { let path = self.setup_file_path(path); if !path.exists() { return Ok(false); diff --git a/package/src/source/directory.rs b/package/src/source/directory.rs index fc82cd3add..534974eec0 100644 --- a/package/src/source/directory.rs +++ b/package/src/source/directory.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use leo_errors::{LeoError, PackageError}; +use leo_errors::{PackageError, Result}; use std::{ borrow::Cow, @@ -32,7 +32,7 @@ pub struct SourceDirectory; impl SourceDirectory { /// Creates a directory at the provided path with the default directory name. - pub fn create(path: &Path) -> Result<(), LeoError> { + pub fn create(path: &Path) -> Result<()> { let mut path = Cow::from(path); if path.is_dir() && !path.ends_with(SOURCE_DIRECTORY_NAME) { path.to_mut().push(SOURCE_DIRECTORY_NAME); @@ -43,7 +43,7 @@ impl SourceDirectory { } /// Returns a list of files in the source directory. - pub fn files(path: &Path) -> Result, LeoError> { + pub fn files(path: &Path) -> Result> { let mut path = Cow::from(path); path.to_mut().push(SOURCE_DIRECTORY_NAME); diff --git a/package/src/source/main.rs b/package/src/source/main.rs index 4d8d5d6b17..65b301f50c 100644 --- a/package/src/source/main.rs +++ b/package/src/source/main.rs @@ -17,7 +17,7 @@ //! The `main.leo` file. use crate::source::directory::SOURCE_DIRECTORY_NAME; -use leo_errors::{LeoError, PackageError}; +use leo_errors::{PackageError, Result}; use backtrace::Backtrace; use serde::Deserialize; @@ -52,7 +52,7 @@ impl MainFile { path.exists() } - pub fn write_to(self, path: &Path) -> Result<(), LeoError> { + pub fn write_to(self, path: &Path) -> Result<()> { let mut path = Cow::from(path); if path.is_dir() { if !path.ends_with(SOURCE_DIRECTORY_NAME) { diff --git a/parser/examples/parser.rs b/parser/examples/parser.rs index 554b21f899..04cb943625 100644 --- a/parser/examples/parser.rs +++ b/parser/examples/parser.rs @@ -15,10 +15,10 @@ // along with the Leo library. If not, see . use leo_ast::Ast; -use leo_errors::LeoError; +use leo_errors::Result; use std::{env, fs, path::Path}; -fn to_leo_tree(filepath: &Path) -> Result { +fn to_leo_tree(filepath: &Path) -> Result { // Loads the Leo code as a string from the given file path. let program_filepath = filepath.to_path_buf(); let program_string = fs::read_to_string(&program_filepath).expect("failed to open input file"); @@ -31,7 +31,7 @@ fn to_leo_tree(filepath: &Path) -> Result { Ok(serialized_leo_ast) } -fn main() -> Result<(), LeoError> { +fn main() -> Result<()> { // Parse the command-line arguments as strings. let cli_arguments = env::args().collect::>(); diff --git a/parser/src/lib.rs b/parser/src/lib.rs index b226b37215..3824b59903 100644 --- a/parser/src/lib.rs +++ b/parser/src/lib.rs @@ -29,11 +29,12 @@ pub mod parser; pub use parser::*; use leo_ast::Ast; +use leo_errors::Result; #[cfg(test)] mod test; /// Creates a new AST from a given file path and source code text. -pub fn parse_ast, Y: AsRef>(path: T, source: Y) -> SyntaxResult { +pub fn parse_ast, Y: AsRef>(path: T, source: Y) -> Result { Ok(Ast::new(parser::parse(path.as_ref(), source.as_ref())?)) } diff --git a/parser/src/parser/context.rs b/parser/src/parser/context.rs index 7e04957e2d..af64bd9c43 100644 --- a/parser/src/parser/context.rs +++ b/parser/src/parser/context.rs @@ -16,9 +16,9 @@ use std::{borrow::Cow, unimplemented}; -use crate::{assert_no_whitespace, tokenizer::*, SyntaxResult, Token, KEYWORD_TOKENS}; +use crate::{assert_no_whitespace, tokenizer::*, Token, KEYWORD_TOKENS}; use leo_ast::*; -use leo_errors::{LeoError, ParserError, Span}; +use leo_errors::{LeoError, ParserError, Result, Span}; use tendril::format_tendril; /// Stores a program in tokenized format plus additional context. @@ -70,14 +70,14 @@ impl ParserContext { /// /// Returns a reference to the next next token or error if it does not exist. /// - pub fn peek_next(&self) -> SyntaxResult<&SpannedToken> { + pub fn peek_next(&self) -> Result<&SpannedToken> { self.tokens.get(self.tokens.len() - 2).ok_or_else(|| self.eof()) } /// /// Returns a reference to the next token or error if it does not exist. /// - pub fn peek(&self) -> SyntaxResult<&SpannedToken> { + pub fn peek(&self) -> Result<&SpannedToken> { self.tokens.last().ok_or_else(|| self.eof()) } @@ -89,7 +89,7 @@ impl ParserContext { .unwrap_or_else(|| Cow::Owned(Token::Eof)) } - // pub fn peek_oneof(&self, token: &[Token]) -> SyntaxResult<&SpannedToken> { + // pub fn peek_oneof(&self, token: &[Token]) -> Result<&SpannedToken> { // if let Some(spanned_token) = self.inner.last() { // if token.iter().any(|x| x == &spanned_token.token) { // Ok(spanned_token) @@ -190,7 +190,7 @@ impl ParserContext { /// Removes the next two tokens if they are a pair of [`GroupCoordinate`] and returns them, /// or [None] if the next token is not a [`GroupCoordinate`]. /// - pub fn eat_group_partial(&mut self) -> Option> { + pub fn eat_group_partial(&mut self) -> Option> { let mut i = self.tokens.len(); if i < 1 { return None; @@ -295,7 +295,7 @@ impl ParserContext { /// /// Returns the span of the next token if it is equal to the given [`Token`], or error. /// - pub fn expect(&mut self, token: Token) -> SyntaxResult { + pub fn expect(&mut self, token: Token) -> Result { if let Some(SpannedToken { token: inner, span }) = self.tokens.last() { if &token == inner { Ok(self.tokens.pop().unwrap().span) @@ -310,7 +310,7 @@ impl ParserContext { /// /// Returns the span of the next token if it is equal to one of the given [`Token`]s, or error. /// - pub fn expect_oneof(&mut self, token: &[Token]) -> SyntaxResult { + pub fn expect_oneof(&mut self, token: &[Token]) -> Result { if let Some(SpannedToken { token: inner, span }) = self.tokens.last() { if token.iter().any(|x| x == inner) { Ok(self.tokens.pop().unwrap()) @@ -331,7 +331,7 @@ impl ParserContext { /// Returns the [`Identifier`] of the next token if it is a keyword, /// [`Token::Int(_)`], or an [`Identifier`], or error. /// - pub fn expect_loose_identifier(&mut self) -> SyntaxResult { + pub fn expect_loose_identifier(&mut self) -> Result { if let Some(token) = self.eat_any(KEYWORD_TOKENS) { return Ok(Identifier { name: token.token.to_string().into(), @@ -347,7 +347,7 @@ impl ParserContext { /// /// Returns the [`Identifier`] of the next token if it is an [`Identifier`], or error. /// - pub fn expect_ident(&mut self) -> SyntaxResult { + pub fn expect_ident(&mut self) -> Result { if let Some(SpannedToken { token: inner, span }) = self.tokens.last() { if let Token::Ident(_) = inner { let token = self.tokens.pop().unwrap(); @@ -371,7 +371,7 @@ impl ParserContext { /// /// Returns the next token if it exists or return end of function. /// - pub fn expect_any(&mut self) -> SyntaxResult { + pub fn expect_any(&mut self) -> Result { if let Some(x) = self.tokens.pop() { Ok(x) } else { diff --git a/parser/src/parser/expression.rs b/parser/src/parser/expression.rs index b25d9dddd3..6ba5f20da5 100644 --- a/parser/src/parser/expression.rs +++ b/parser/src/parser/expression.rs @@ -16,7 +16,7 @@ use tendril::format_tendril; -use leo_errors::ParserError; +use leo_errors::{ParserError, Result}; use super::*; @@ -40,7 +40,7 @@ impl ParserContext { /// Returns an [`Expression`] AST node if the next token is an expression. /// Includes circuit init expressions. /// - pub fn parse_expression(&mut self) -> SyntaxResult { + pub fn parse_expression(&mut self) -> Result { // Store current parser state. let prior_fuzzy_state = self.fuzzy_struct_state; @@ -62,7 +62,7 @@ impl ParserContext { /// /// Otherwise, tries to parse the next token using [`parse_disjunctive_expression`]. /// - pub fn parse_conditional_expression(&mut self) -> SyntaxResult { + pub fn parse_conditional_expression(&mut self) -> Result { // Try to parse the next expression. Try BinaryOperation::Or. let mut expr = self.parse_disjunctive_expression()?; @@ -87,7 +87,7 @@ impl ParserContext { /// /// Otherwise, tries to parse the next token using [`parse_conjunctive_expression`]. /// - pub fn parse_disjunctive_expression(&mut self) -> SyntaxResult { + pub fn parse_disjunctive_expression(&mut self) -> Result { let mut expr = self.parse_conjunctive_expression()?; while self.eat(Token::Or).is_some() { let right = self.parse_conjunctive_expression()?; @@ -107,7 +107,7 @@ impl ParserContext { /// /// Otherwise, tries to parse the next token using [`parse_bit_or_expression`]. /// - pub fn parse_conjunctive_expression(&mut self) -> SyntaxResult { + pub fn parse_conjunctive_expression(&mut self) -> Result { let mut expr = self.parse_equality_expression()?; while self.eat(Token::And).is_some() { let right = self.parse_equality_expression()?; @@ -127,7 +127,7 @@ impl ParserContext { /// /// Otherwise, tries to parse the next token using [`parse_bit_xor_expression`]. /// - // pub fn parse_bit_or_expression(&mut self) -> SyntaxResult { + // pub fn parse_bit_or_expression(&mut self) -> Result { // let mut expr = self.parse_bit_xor_expression()?; // while self.eat(Token::BitOr).is_some() { // let right = self.parse_bit_xor_expression()?; @@ -147,7 +147,7 @@ impl ParserContext { /// /// Otherwise, tries to parse the next token using [`parse_bit_and_expression`]. /// - // pub fn parse_bit_xor_expression(&mut self) -> SyntaxResult { + // pub fn parse_bit_xor_expression(&mut self) -> Result { // let mut expr = self.parse_bit_and_expression()?; // while self.eat(Token::BitXor).is_some() { // let right = self.parse_bit_and_expression()?; @@ -167,7 +167,7 @@ impl ParserContext { /// /// Otherwise, tries to parse the next token using [`parse_equality_expression`]. /// - // pub fn parse_bit_and_expression(&mut self) -> SyntaxResult { + // pub fn parse_bit_and_expression(&mut self) -> Result { // let mut expr = self.parse_equality_expression()?; // while self.eat(Token::BitAnd).is_some() { // let right = self.parse_equality_expression()?; @@ -187,7 +187,7 @@ impl ParserContext { /// /// Otherwise, tries to parse the next token using [`parse_ordering_expression`]. /// - pub fn parse_equality_expression(&mut self) -> SyntaxResult { + pub fn parse_equality_expression(&mut self) -> Result { let mut expr = self.parse_ordering_expression()?; if let Some(SpannedToken { token: op, .. }) = self.eat_any(&[Token::Eq, Token::NotEq]) { let right = self.parse_ordering_expression()?; @@ -211,7 +211,7 @@ impl ParserContext { /// /// Otherwise, tries to parse the next token using [`parse_shift_expression`]. /// - pub fn parse_ordering_expression(&mut self) -> SyntaxResult { + pub fn parse_ordering_expression(&mut self) -> Result { let mut expr = self.parse_additive_expression()?; while let Some(SpannedToken { token: op, .. }) = self.eat_any(&[Token::Lt, Token::LtEq, Token::Gt, Token::GtEq]) { @@ -238,7 +238,7 @@ impl ParserContext { /// /// Otherwise, tries to parse the next token using [`parse_additive_expression`]. /// - // pub fn parse_shift_expression(&mut self) -> SyntaxResult { + // pub fn parse_shift_expression(&mut self) -> Result { // let mut expr = self.parse_additive_expression()?; // while let Some(SpannedToken { token: op, .. }) = self.eat_any(&[Token::Shl, Token::Shr, Token::ShrSigned]) { // let right = self.parse_additive_expression()?; @@ -263,7 +263,7 @@ impl ParserContext { /// /// Otherwise, tries to parse the next token using [`parse_mul_div_pow_expression`]. /// - pub fn parse_additive_expression(&mut self) -> SyntaxResult { + pub fn parse_additive_expression(&mut self) -> Result { let mut expr = self.parse_multiplicative_expression()?; while let Some(SpannedToken { token: op, .. }) = self.eat_any(&[Token::Add, Token::Minus]) { let right = self.parse_multiplicative_expression()?; @@ -287,7 +287,7 @@ impl ParserContext { /// /// Otherwise, tries to parse the next token using [`parse_exponential_expression`]. /// - pub fn parse_multiplicative_expression(&mut self) -> SyntaxResult { + pub fn parse_multiplicative_expression(&mut self) -> Result { let mut expr = self.parse_exponential_expression()?; while let Some(SpannedToken { token: op, .. }) = self.eat_any(&[Token::Mul, Token::Div]) { let right = self.parse_exponential_expression()?; @@ -312,7 +312,7 @@ impl ParserContext { /// /// Otherwise, tries to parse the next token using [`parse_cast_expression`]. /// - pub fn parse_exponential_expression(&mut self) -> SyntaxResult { + pub fn parse_exponential_expression(&mut self) -> Result { let mut exprs = vec![self.parse_cast_expression()?]; while self.eat(Token::Exp).is_some() { exprs.push(self.parse_cast_expression()?); @@ -336,7 +336,7 @@ impl ParserContext { /// /// Otherwise, tries to parse the next token using [`parse_unary_expression`]. /// - pub fn parse_cast_expression(&mut self) -> SyntaxResult { + pub fn parse_cast_expression(&mut self) -> Result { let mut expr = self.parse_unary_expression()?; while self.eat(Token::As).is_some() { let (type_, type_span) = self.parse_type()?; @@ -355,7 +355,7 @@ impl ParserContext { /// /// Otherwise, tries to parse the next token using [`parse_postfix_expression`]. /// - pub fn parse_unary_expression(&mut self) -> SyntaxResult { + pub fn parse_unary_expression(&mut self) -> Result { let mut ops = Vec::new(); while let Some(token) = self.eat_any(&[Token::Not, Token::Minus]) { ops.push(token); @@ -400,7 +400,7 @@ impl ParserContext { /// /// Otherwise, tries to parse the next token using [`parse_primary_expression`]. /// - pub fn parse_postfix_expression(&mut self) -> SyntaxResult { + pub fn parse_postfix_expression(&mut self) -> Result { let mut expr = self.parse_primary_expression()?; while let Some(token) = self.eat_any(&[Token::LeftSquare, Token::Dot, Token::LeftParen, Token::DoubleColon]) { match token.token { @@ -505,7 +505,7 @@ impl ParserContext { /// /// This method should only be called in the context of an array access expression. /// - pub fn parse_spread_or_expression(&mut self) -> SyntaxResult { + pub fn parse_spread_or_expression(&mut self) -> Result { Ok(if self.eat(Token::DotDotDot).is_some() { SpreadOrExpression::Spread(self.parse_expression()?) } else { @@ -517,7 +517,7 @@ impl ParserContext { /// Returns an [`Expression`] AST node if the next tokens represent an /// circuit initialization expression. /// - pub fn parse_circuit_expression(&mut self, identifier: Identifier) -> SyntaxResult { + pub fn parse_circuit_expression(&mut self, identifier: Identifier) -> Result { self.expect(Token::LeftCurly)?; let mut members = Vec::new(); let end_span; @@ -555,7 +555,7 @@ impl ParserContext { /// Returns an [`Expression`] AST node if the next tokens represent an /// tuple initialization expression. /// - pub fn parse_tuple_expression(&mut self, span: &Span) -> SyntaxResult { + pub fn parse_tuple_expression(&mut self, span: &Span) -> Result { if let Some((left, right, span)) = self.eat_group_partial().transpose()? { return Ok(Expression::Value(ValueExpression::Group(Box::new(GroupValue::Tuple( Box::new(GroupTuple { @@ -594,7 +594,7 @@ impl ParserContext { /// Returns an [`Expression`] AST node if the next tokens represent an /// array initialization expression. /// - pub fn parse_array_expression(&mut self, span: &Span) -> SyntaxResult { + pub fn parse_array_expression(&mut self, span: &Span) -> Result { if let Some(end) = self.eat(Token::RightSquare) { return Ok(Expression::ArrayInline(ArrayInlineExpression { elements: Vec::new(), @@ -654,7 +654,7 @@ impl ParserContext { /// /// Returns an expression error if the token cannot be matched. /// - pub fn parse_primary_expression(&mut self) -> SyntaxResult { + pub fn parse_primary_expression(&mut self) -> Result { let SpannedToken { token, span } = self.expect_any()?; Ok(match token { Token::Int(value) => { diff --git a/parser/src/parser/file.rs b/parser/src/parser/file.rs index ed09efea59..9de6602f17 100644 --- a/parser/src/parser/file.rs +++ b/parser/src/parser/file.rs @@ -16,7 +16,7 @@ use tendril::format_tendril; -use leo_errors::ParserError; +use leo_errors::{ParserError, Result}; use crate::KEYWORD_TOKENS; @@ -26,7 +26,7 @@ impl ParserContext { /// /// Returns a [`Program`] AST if all tokens can be consumed and represent a valid Leo program. /// - pub fn parse_program(&mut self) -> SyntaxResult { + pub fn parse_program(&mut self) -> Result { let mut imports = Vec::new(); let mut circuits = IndexMap::new(); let mut functions = IndexMap::new(); @@ -93,7 +93,7 @@ impl ParserContext { /// /// Returns an [`Annotation`] AST node if the next tokens represent a supported annotation. /// - pub fn parse_annotation(&mut self) -> SyntaxResult { + pub fn parse_annotation(&mut self) -> Result { let start = self.expect(Token::At)?; let name = self.expect_ident()?; if name.name.as_ref() == "context" { @@ -154,7 +154,7 @@ impl ParserContext { /// Returns a vector of [`PackageAccess`] AST nodes if the next tokens represent package access /// expressions within an import statement. /// - pub fn parse_package_accesses(&mut self, span: &Span) -> SyntaxResult> { + pub fn parse_package_accesses(&mut self, span: &Span) -> Result> { let mut out = Vec::new(); self.expect(Token::LeftParen)?; while self.eat(Token::RightParen).is_none() { @@ -177,7 +177,7 @@ impl ParserContext { /// Returns a [`PackageAccess`] AST node if the next tokens represent a package access expression /// within an import statement. /// - pub fn parse_package_access(&mut self) -> SyntaxResult { + pub fn parse_package_access(&mut self) -> Result { if let Some(SpannedToken { span, .. }) = self.eat(Token::Mul) { Ok(PackageAccess::Star { span }) } else { @@ -211,7 +211,7 @@ impl ParserContext { /// /// Returns an [`Identifier`] AST node if the next tokens represent a valid package name. /// - pub fn parse_package_name(&mut self) -> SyntaxResult { + pub fn parse_package_name(&mut self) -> Result { // Build the package name, starting with valid characters up to a dash `-` (Token::Minus). let mut base = self.expect_loose_identifier()?; @@ -266,7 +266,7 @@ impl ParserContext { /// Returns a [`PackageOrPackages`] AST node if the next tokens represent a valid package import /// with accesses. /// - pub fn parse_package_path(&mut self) -> SyntaxResult { + pub fn parse_package_path(&mut self) -> Result { let package_name = self.parse_package_name()?; self.expect(Token::Dot)?; if self.peek()?.token == Token::LeftParen { @@ -289,7 +289,7 @@ impl ParserContext { /// /// Returns a [`ImportStatement`] AST node if the next tokens represent an import statement. /// - pub fn parse_import(&mut self) -> SyntaxResult { + pub fn parse_import(&mut self) -> Result { self.expect(Token::Import)?; let package_or_packages = self.parse_package_path()?; self.expect(Token::Semicolon)?; @@ -303,7 +303,7 @@ impl ParserContext { /// Returns a [`CircuitMember`] AST node if the next tokens represent a circuit member variable /// or circuit member function. /// - pub fn parse_circuit_declaration(&mut self) -> SyntaxResult> { + pub fn parse_circuit_declaration(&mut self) -> Result> { let mut members = Vec::new(); let peeked = &self.peek()?.token; let mut last_variable = peeked == &Token::Function || peeked == &Token::At; @@ -346,7 +346,7 @@ impl ParserContext { /// /// Returns a [`CircuitMember`] AST node if the next tokens represent a circuit member variable. /// - pub fn parse_member_variable_declaration(&mut self) -> SyntaxResult<(CircuitMember, bool)> { + pub fn parse_member_variable_declaration(&mut self) -> Result<(CircuitMember, bool)> { let name = self.expect_ident()?; self.expect(Token::Colon)?; let type_ = self.parse_type()?.0; @@ -367,7 +367,7 @@ impl ParserContext { /// /// Returns a [`CircuitMember`] AST node if the next tokens represent a circuit member function. /// - pub fn parse_member_function_declaration(&mut self) -> SyntaxResult { + pub fn parse_member_function_declaration(&mut self) -> Result { let peeked = self.peek()?.clone(); if peeked.token == Token::Function || peeked.token == Token::At { let function = self.parse_function_declaration()?; @@ -390,7 +390,7 @@ impl ParserContext { /// Returns an [`(Identifier, Circuit)`] tuple of AST nodes if the next tokens represent a /// circuit name and definition statement. /// - pub fn parse_circuit(&mut self) -> SyntaxResult<(Identifier, Circuit)> { + pub fn parse_circuit(&mut self) -> Result<(Identifier, Circuit)> { self.expect(Token::Circuit)?; let name = self.expect_ident()?; self.expect(Token::LeftCurly)?; @@ -405,7 +405,7 @@ impl ParserContext { /// /// Returns a [`FunctionInput`] AST node if the next tokens represent a function parameter. /// - pub fn parse_function_parameters(&mut self) -> SyntaxResult { + pub fn parse_function_parameters(&mut self) -> Result { let const_ = self.eat(Token::Const); let mutable = self.eat(Token::Mut); let mut name = if let Some(token) = self.eat(Token::LittleSelf) { @@ -453,7 +453,7 @@ impl ParserContext { /// Returns an [`(Identifier, Function)`] AST node if the next tokens represent a function name /// and function definition. /// - pub fn parse_function_declaration(&mut self) -> SyntaxResult<(Identifier, Function)> { + pub fn parse_function_declaration(&mut self) -> Result<(Identifier, Function)> { let mut annotations = Vec::new(); while self.peek_token().as_ref() == &Token::At { annotations.push(self.parse_annotation()?); @@ -490,7 +490,7 @@ impl ParserContext { /// Returns an [`(String, DefinitionStatement)`] AST node if the next tokens represent a global /// const definition statement and assignment. /// - pub fn parse_global_const_declaration(&mut self) -> SyntaxResult<(String, DefinitionStatement)> { + pub fn parse_global_const_declaration(&mut self) -> Result<(String, DefinitionStatement)> { let statement = self.parse_definition_statement()?; let variable_names = statement .variable_names diff --git a/parser/src/parser/mod.rs b/parser/src/parser/mod.rs index 8965ac9359..cf6ae0e5fc 100644 --- a/parser/src/parser/mod.rs +++ b/parser/src/parser/mod.rs @@ -32,11 +32,9 @@ use std::unimplemented; use crate::{tokenizer::*, Token}; use indexmap::IndexMap; use leo_ast::*; -use leo_errors::{LeoError, ParserError, Span}; +use leo_errors::{ParserError, Result, Span}; -pub type SyntaxResult = Result; - -pub(crate) fn assert_no_whitespace(left_span: &Span, right_span: &Span, left: &str, right: &str) -> SyntaxResult<()> { +pub(crate) fn assert_no_whitespace(left_span: &Span, right_span: &Span, left: &str, right: &str) -> Result<()> { if left_span.col_stop != right_span.col_start { let mut error_span = left_span + right_span; error_span.col_start = left_span.col_stop - 1; @@ -48,7 +46,7 @@ pub(crate) fn assert_no_whitespace(left_span: &Span, right_span: &Span, left: &s } /// Creates a new program from a given file path and source code text. -pub fn parse(path: &str, source: &str) -> SyntaxResult { +pub fn parse(path: &str, source: &str) -> Result { let mut tokens = ParserContext::new(crate::tokenize(path, source.into())?); tokens.parse_program() diff --git a/parser/src/parser/statement.rs b/parser/src/parser/statement.rs index 0c8c333cf0..c452549e62 100644 --- a/parser/src/parser/statement.rs +++ b/parser/src/parser/statement.rs @@ -16,7 +16,7 @@ use super::*; -use leo_errors::ParserError; +use leo_errors::{ParserError, Result}; const ASSIGN_TOKENS: &[Token] = &[ Token::Assign, @@ -41,7 +41,7 @@ impl ParserContext { /// Returns an [`Identifier`] AST node if the given [`Expression`] AST node evaluates to an /// identifier access. The access is stored in the given accesses. /// - pub fn construct_assignee_access(expr: Expression, accesses: &mut Vec) -> SyntaxResult { + pub fn construct_assignee_access(expr: Expression, accesses: &mut Vec) -> Result { let identifier; match expr { Expression::CircuitMemberAccess(expr) => { @@ -72,7 +72,7 @@ impl ParserContext { /// /// Returns an [`Assignee`] AST node from the given [`Expression`] AST node with accesses. /// - pub fn construct_assignee(expr: Expression) -> SyntaxResult { + pub fn construct_assignee(expr: Expression) -> Result { let expr_span = expr.span().clone(); let mut accesses = Vec::new(); let identifier = Self::construct_assignee_access(expr, &mut accesses)?; @@ -87,7 +87,7 @@ impl ParserContext { /// /// Returns a [`Statement`] AST node if the next tokens represent a statement. /// - pub fn parse_statement(&mut self) -> SyntaxResult { + pub fn parse_statement(&mut self) -> Result { match &self.peek()?.token { Token::Return => Ok(Statement::Return(self.parse_return_statement()?)), Token::If => Ok(Statement::Conditional(self.parse_conditional_statement()?)), @@ -102,7 +102,7 @@ impl ParserContext { /// /// Returns a [`Block`] AST node if the next tokens represent a assign, or expression statement. /// - pub fn parse_assign_statement(&mut self) -> SyntaxResult { + pub fn parse_assign_statement(&mut self) -> Result { let expr = self.parse_expression()?; if let Some(operator) = self.eat_any(ASSIGN_TOKENS) { @@ -144,7 +144,7 @@ impl ParserContext { /// /// Returns a [`Block`] AST node if the next tokens represent a block of statements. /// - pub fn parse_block(&mut self) -> SyntaxResult { + pub fn parse_block(&mut self) -> Result { let start = self.expect(Token::LeftCurly)?; let mut statements = Vec::new(); @@ -166,7 +166,7 @@ impl ParserContext { /// /// Returns a [`ReturnStatement`] AST node if the next tokens represent a return statement. /// - pub fn parse_return_statement(&mut self) -> SyntaxResult { + pub fn parse_return_statement(&mut self) -> Result { let start = self.expect(Token::Return)?; let expr = self.parse_expression()?; self.expect(Token::Semicolon)?; @@ -180,7 +180,7 @@ impl ParserContext { /// /// Returns a [`ConditionalStatement`] AST node if the next tokens represent a conditional statement. /// - pub fn parse_conditional_statement(&mut self) -> SyntaxResult { + pub fn parse_conditional_statement(&mut self) -> Result { let start = self.expect(Token::If)?; self.fuzzy_struct_state = true; let expr = self.parse_conditional_expression()?; @@ -209,7 +209,7 @@ impl ParserContext { /// /// Returns an [`IterationStatement`] AST node if the next tokens represent an iteration statement. /// - pub fn parse_loop_statement(&mut self) -> SyntaxResult { + pub fn parse_loop_statement(&mut self) -> Result { let start_span = self.expect(Token::For)?; let ident = self.expect_ident()?; self.expect(Token::In)?; @@ -234,7 +234,7 @@ impl ParserContext { /// /// Returns a [`ConsoleArgs`] AST node if the next tokens represent a formatted string. /// - pub fn parse_console_args(&mut self) -> SyntaxResult { + pub fn parse_console_args(&mut self) -> Result { let start_span; let string = match self.expect_any()? { SpannedToken { @@ -267,7 +267,7 @@ impl ParserContext { /// /// Returns a [`ConsoleStatement`] AST node if the next tokens represent a console statement. /// - pub fn parse_console_statement(&mut self) -> SyntaxResult { + pub fn parse_console_statement(&mut self) -> Result { let keyword = self.expect(Token::Console)?; self.expect(Token::Dot)?; let function = self.expect_ident()?; @@ -296,7 +296,7 @@ impl ParserContext { /// Returns a [`VariableName`] AST node if the next tokens represent a variable name with /// valid keywords. /// - pub fn parse_variable_name(&mut self, span: &SpannedToken) -> SyntaxResult { + pub fn parse_variable_name(&mut self, span: &SpannedToken) -> Result { let mutable = self.eat(Token::Mut); if let Some(mutable) = &mutable { return Err(ParserError::let_mut_statement(&(&mutable.span + &span.span)).into()); @@ -313,7 +313,7 @@ impl ParserContext { /// /// Returns a [`DefinitionStatement`] AST node if the next tokens represent a definition statement. /// - pub fn parse_definition_statement(&mut self) -> SyntaxResult { + pub fn parse_definition_statement(&mut self) -> Result { let declare = self.expect_oneof(&[Token::Let, Token::Const])?; let mut variable_names = Vec::new(); diff --git a/parser/src/parser/type_.rs b/parser/src/parser/type_.rs index c052f19582..e79cb494f4 100644 --- a/parser/src/parser/type_.rs +++ b/parser/src/parser/type_.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use super::*; -use leo_errors::ParserError; +use leo_errors::{ParserError, Result}; const TYPE_TOKENS: &[Token] = &[ Token::I8, @@ -58,7 +58,7 @@ impl ParserContext { /// /// Returns an [`ArrayDimensions`] AST node if the next tokens represent dimensions for an array type. /// - pub fn parse_array_dimensions(&mut self) -> SyntaxResult { + pub fn parse_array_dimensions(&mut self) -> Result { Ok(if let Some((int, _)) = self.eat_int() { ArrayDimensions(vec![int]) } else { @@ -84,7 +84,7 @@ impl ParserContext { /// Returns a [`(Type, Span)`] tuple of AST nodes if the next token represents a type. Also /// returns the span of the parsed token. /// - pub fn parse_type(&mut self) -> SyntaxResult<(Type, Span)> { + pub fn parse_type(&mut self) -> Result<(Type, Span)> { Ok(if let Some(token) = self.eat(Token::BigSelf) { (Type::SelfType, token.span) } else if let Some(ident) = self.eat_identifier() { diff --git a/parser/tests/serialization/json.rs b/parser/tests/serialization/json.rs index eb19310a9a..b3ec1e6f6f 100644 --- a/parser/tests/serialization/json.rs +++ b/parser/tests/serialization/json.rs @@ -17,11 +17,11 @@ use leo_ast::Ast; #[cfg(not(feature = "ci_skip"))] use leo_ast::Program; -use leo_errors::LeoError; +use leo_errors::{LeoError, Result}; use std::path::{Path, PathBuf}; -fn to_ast(program_filepath: &Path) -> Result { +fn to_ast(program_filepath: &Path) -> Result { let program_string = std::fs::read_to_string(program_filepath).expect("failed to open test"); // Parses the Leo file and constructs a leo ast. From b1f93e95b3b55908265f0f2f74be59e777f95f96 Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Wed, 4 Aug 2021 05:52:08 -0700 Subject: [PATCH 10/58] dep clean up, clippy, leo result --- Cargo.lock | 4 - asg/src/const_value.rs | 62 +++++++-- asg/src/expression/array_access.rs | 12 +- asg/src/expression/array_init.rs | 12 +- asg/src/expression/array_inline.rs | 6 +- asg/src/expression/array_range_access.rs | 27 ++-- asg/src/expression/binary.rs | 17 ++- asg/src/expression/call.rs | 67 ++++++---- asg/src/expression/cast.rs | 4 +- asg/src/expression/circuit_access.rs | 25 ++-- asg/src/expression/circuit_init.rs | 42 ++++-- asg/src/expression/constant.rs | 32 +++-- asg/src/expression/ternary.rs | 4 +- asg/src/expression/tuple_access.rs | 5 +- asg/src/expression/tuple_init.rs | 4 +- asg/src/expression/unary.rs | 16 ++- asg/src/expression/variable_ref.rs | 9 +- asg/src/program/circuit.rs | 15 ++- asg/src/program/function.rs | 12 +- asg/src/program/mod.rs | 20 ++- asg/src/scope.rs | 10 +- asg/src/statement/assign.rs | 46 +++++-- asg/src/statement/definition.rs | 12 +- asg/src/statement/iteration.rs | 12 +- ast/Cargo.toml | 3 - ast/src/lib.rs | 16 +-- ast/src/reducer/canonicalization.rs | 12 +- ast/src/reducer/reconstructing_director.rs | 4 +- compiler/Cargo.toml | 6 - compiler/src/compiler.rs | 30 ++--- compiler/src/console/assert.rs | 11 +- compiler/src/console/console.rs | 4 +- compiler/src/console/format.rs | 18 ++- compiler/src/constraints/constraints.rs | 13 +- compiler/src/expression/arithmetic/add.rs | 10 +- compiler/src/expression/arithmetic/bit_not.rs | 6 +- compiler/src/expression/arithmetic/div.rs | 8 +- compiler/src/expression/arithmetic/mul.rs | 10 +- compiler/src/expression/arithmetic/negate.rs | 6 +- compiler/src/expression/arithmetic/pow.rs | 8 +- compiler/src/expression/arithmetic/sub.rs | 10 +- compiler/src/expression/array/access.rs | 46 ++++--- compiler/src/expression/array/array.rs | 10 +- compiler/src/expression/array/index.rs | 6 +- compiler/src/expression/binary/binary.rs | 4 +- compiler/src/expression/circuit/access.rs | 21 ++- compiler/src/expression/circuit/circuit.rs | 6 +- .../src/expression/conditional/conditional.rs | 13 +- compiler/src/expression/expression.rs | 6 +- .../src/expression/function/core_circuit.rs | 4 +- compiler/src/expression/function/function.rs | 4 +- compiler/src/expression/logical/and.rs | 8 +- compiler/src/expression/logical/not.rs | 8 +- compiler/src/expression/logical/or.rs | 8 +- compiler/src/expression/relational/eq.rs | 11 +- compiler/src/expression/relational/ge.rs | 11 +- compiler/src/expression/relational/gt.rs | 11 +- compiler/src/expression/relational/le.rs | 11 +- compiler/src/expression/relational/lt.rs | 11 +- compiler/src/expression/tuple/access.rs | 8 +- compiler/src/expression/tuple/tuple.rs | 4 +- .../expression/variable_ref/variable_ref.rs | 13 +- compiler/src/function/function.rs | 5 +- compiler/src/function/input/array.rs | 16 ++- compiler/src/function/input/input_keyword.rs | 4 +- compiler/src/function/input/input_section.rs | 8 +- .../src/function/input/main_function_input.rs | 39 ++++-- compiler/src/function/input/tuple.rs | 16 ++- compiler/src/function/main_function.rs | 30 +++-- compiler/src/function/mut_target.rs | 6 +- compiler/src/function/result/result.rs | 12 +- compiler/src/output/mod.rs | 14 +- compiler/src/output/output_bytes.rs | 14 +- compiler/src/output/output_file.rs | 14 +- compiler/src/phases/phase.rs | 4 +- compiler/src/phases/reducing_director.rs | 120 ++++++----------- compiler/src/prelude/blake2s.rs | 12 +- compiler/src/prelude/mod.rs | 4 +- compiler/src/statement/assign/assign.rs | 8 +- .../statement/assign/assignee/array_index.rs | 52 +++++--- .../assign/assignee/array_range_index.rs | 10 +- .../src/statement/assign/assignee/member.rs | 13 +- compiler/src/statement/assign/assignee/mod.rs | 24 ++-- .../src/statement/assign/assignee/tuple.rs | 16 ++- .../src/statement/conditional/conditional.rs | 7 +- .../src/statement/definition/definition.rs | 9 +- compiler/src/statement/iteration/iteration.rs | 6 +- compiler/src/statement/return_/return_.rs | 4 +- compiler/src/statement/statement.rs | 12 +- compiler/src/test.rs | 4 +- compiler/src/value/address/address.rs | 14 +- compiler/src/value/boolean/input.rs | 10 +- compiler/src/value/char/char.rs | 13 +- compiler/src/value/field/field_type.rs | 38 +++--- compiler/src/value/field/input.rs | 23 ++-- compiler/src/value/group/group_type.rs | 12 +- compiler/src/value/group/input.rs | 10 +- .../src/value/group/targets/edwards_bls12.rs | 98 +++++++------- compiler/src/value/integer/integer.rs | 67 ++++------ compiler/src/value/integer/macros.rs | 123 +++++++++++------- compiler/src/value/value.rs | 4 +- errors/src/common/formatted.rs | 5 +- errors/src/common/macros.rs | 7 +- errors/src/common/span.rs | 13 +- errors/src/common/traits.rs | 2 +- imports/src/parser/import_parser.rs | 4 +- imports/src/parser/parse_package.rs | 16 +-- imports/src/parser/parse_symbol.rs | 12 +- package/Cargo.toml | 3 - package/src/imports/directory.rs | 10 +- package/src/inputs/directory.rs | 16 +-- package/src/inputs/input.rs | 9 +- package/src/inputs/pairs.rs | 8 +- package/src/inputs/state.rs | 9 +- package/src/outputs/checksum.rs | 11 +- package/src/outputs/circuit.rs | 11 +- package/src/outputs/directory.rs | 7 +- package/src/outputs/proof.rs | 11 +- package/src/outputs/proving_key.rs | 11 +- package/src/outputs/verification_key.rs | 11 +- package/src/package.rs | 9 +- package/src/root/gitignore.rs | 7 +- package/src/root/manifest.rs | 19 ++- package/src/root/readme.rs | 7 +- package/src/root/zip.rs | 20 ++- package/src/source/directory.rs | 18 ++- package/src/source/main.rs | 7 +- parser/Cargo.toml | 6 +- parser/src/parser/context.rs | 9 +- parser/src/parser/expression.rs | 14 +- parser/src/parser/file.rs | 29 +++-- parser/src/parser/mod.rs | 4 +- parser/src/parser/statement.rs | 24 +++- parser/src/parser/type_.rs | 4 +- parser/src/tokenizer/mod.rs | 5 +- .../array/array_range_access_fail.leo.out | 2 +- .../array/array_size_zero_fail.leo.out | 2 +- .../array/input_nested_3x2_fail.leo.out | 2 +- .../array/multi_fail_initializer.leo.out | 2 +- .../compiler/array/multi_fail_inline.leo.out | 2 +- .../array/multi_initializer_fail.leo.out | 2 +- .../array/nested_3x2_value_fail.leo.out | 2 +- .../array/tuple_3x2_value_fail.leo.out | 2 +- .../compiler/compiler/array/type_fail.leo.out | 2 +- .../type_nested_value_nested_3x2_fail.leo.out | 2 +- ...ype_nested_value_nested_4x3x2_fail.leo.out | 2 +- .../type_nested_value_tuple_3x2_fail.leo.out | 2 +- ...type_nested_value_tuple_4x3x2_fail.leo.out | 2 +- .../type_tuple_value_nested_3x2_fail.leo.out | 2 +- ...type_tuple_value_nested_4x3x2_fail.leo.out | 2 +- .../type_tuple_value_tuple_3x2_fail.leo.out | 2 +- .../type_tuple_value_tuple_4x3x2_fail.leo.out | 2 +- .../array/variable_slice_fail.leo.out | 2 +- .../compiler/char/invalid_char.leo.out | 2 +- .../big_self_outside_circuit_fail.leo.out | 2 +- .../circuits/const_self_variable_fail.leo.out | 2 +- .../compiler/circuits/inline_fail.leo.out | 2 +- .../circuits/inline_member_fail.leo.out | 2 +- .../circuits/inline_undefined.leo.out | 2 +- .../circuits/member_function_fail.leo.out | 2 +- .../circuits/member_function_invalid.leo.out | 2 +- .../member_static_function_invalid.leo.out | 2 +- .../member_static_function_undefined.leo.out | 2 +- .../circuits/member_variable_fail.leo.out | 2 +- .../circuits/mut_function_fail.leo.out | 2 +- .../circuits/mut_self_function_fail.leo.out | 2 +- .../mut_self_static_function_fail.leo.out | 2 +- .../circuits/mut_self_variable_fail.leo.out | 2 +- .../circuits/mut_static_function_fail.leo.out | 2 +- .../circuits/mut_variable_fail.leo.out | 2 +- .../compiler/circuits/self_circuit.leo.out | 2 +- .../compiler/circuits/self_fail.leo.out | 2 +- .../circuits/self_member_invalid.leo.out | 2 +- .../circuits/self_member_undefined.leo.out | 2 +- .../compiler/console/log_fail.leo.out | 2 +- .../console/log_parameter_fail_empty.leo.out | 2 +- .../console/log_parameter_fail_none.leo.out | 2 +- .../log_parameter_fail_unknown.leo.out | 2 +- .../core/core_circuit_invalid.leo.out | 2 +- .../core/core_circuit_star_fail.leo.out | 2 +- .../core/core_package_invalid.leo.out | 2 +- .../core_unstable_package_invalid.leo.out | 2 +- .../field/no_space_between_literal.leo.out | 2 +- .../duplicate_definition_fail.leo.out | 2 +- .../function/multiple_returns_fail.leo.out | 2 +- .../multiple_returns_fail_conditional.leo.out | 2 +- .../function/return_array_nested_fail.leo.out | 2 +- .../function/return_array_tuple_fail.leo.out | 2 +- .../compiler/function/scope_fail.leo.out | 2 +- .../compiler/function/undefined.leo.out | 2 +- .../global_consts/modify_global_const.leo.out | 2 +- .../const_input_non_const.leo.out | 2 +- .../const_var_in_both_sections_fail.leo.out | 2 +- .../program_input/main_array_fail.leo.out | 2 +- .../program_input/main_tuple_fail.leo.out | 2 +- .../non_const_input_const.leo.out | 2 +- .../var_in_both_sections_fail.leo.out | 2 +- .../main_array_fail.leo.out | 2 +- .../main_tuple_fail.leo.out | 2 +- .../program_registers/registers_fail.leo.out | 2 +- .../compiler/integers/i128/max_fail.leo.out | 2 +- .../compiler/integers/i128/min_fail.leo.out | 2 +- .../i128/no_space_between_literal.leo.out | 2 +- .../compiler/integers/i16/max_fail.leo.out | 2 +- .../compiler/integers/i16/min_fail.leo.out | 2 +- .../i16/no_space_between_literal.leo.out | 2 +- .../compiler/integers/i32/max_fail.leo.out | 2 +- .../compiler/integers/i32/min_fail.leo.out | 2 +- .../i32/no_space_between_literal.leo.out | 2 +- .../compiler/integers/i64/max_fail.leo.out | 2 +- .../compiler/integers/i64/min_fail.leo.out | 2 +- .../i64/no_space_between_literal.leo.out | 2 +- .../compiler/integers/i8/max_fail.leo.out | 2 +- .../compiler/integers/i8/min_fail.leo.out | 2 +- .../compiler/integers/i8/negate_min.leo.out | 2 +- .../i8/no_space_between_literal.leo.out | 2 +- .../compiler/integers/u128/max_fail.leo.out | 2 +- .../compiler/integers/u128/min_fail.leo.out | 2 +- .../integers/u128/negative_input_fail.leo.out | 2 +- .../u128/no_space_between_literal.leo.out | 2 +- .../compiler/integers/u16/max_fail.leo.out | 2 +- .../compiler/integers/u16/min_fail.leo.out | 2 +- .../integers/u16/negative_input_fail.leo.out | 2 +- .../u16/no_space_between_literal.leo.out | 2 +- .../compiler/integers/u32/max_fail.leo.out | 2 +- .../compiler/integers/u32/min_fail.leo.out | 2 +- .../integers/u32/negative_input_fail.leo.out | 2 +- .../u32/no_space_between_literal.leo.out | 2 +- .../compiler/integers/u64/max_fail.leo.out | 2 +- .../compiler/integers/u64/min_fail.leo.out | 2 +- .../integers/u64/negative_input_fail.leo.out | 2 +- .../u64/no_space_between_literal.leo.out | 2 +- .../compiler/integers/u8/max_fail.leo.out | 2 +- .../compiler/integers/u8/min_fail.leo.out | 2 +- .../integers/u8/negative_input_fail.leo.out | 2 +- .../u8/no_space_between_literal.leo.out | 2 +- .../compiler/mutability/array_fail.leo.out | 2 +- .../compiler/mutability/circuit_fail.leo.out | 2 +- .../mutability/circuit_function_const.leo.out | 2 +- .../circuit_static_function_mut_fail.leo.out | 2 +- .../compiler/mutability/const.leo.out | 2 +- .../mutability/function_input.leo.out | 2 +- .../compiler/mutability/let_fail.leo.out | 2 +- .../statements/assign_ternary.leo.out | 2 +- .../statements/duplicate_variable.leo.out | 2 +- .../statements/ternary_non_const_fail.leo.out | 2 +- .../parser/circuits/fields_fail.leo.out | 2 +- .../parser/expression/array_init_fail.leo.out | 4 +- .../expression/array_inline_fail.leo.out | 10 +- .../expression/circuit_init_fail.leo.out | 22 ++-- .../expression/literal/address_fail.leo.out | 18 +-- .../expression/literal/char_fail.leo.out | 70 +++++----- .../expression/literal/group_fail.leo.out | 8 +- .../expression/literal/string_fail.leo.out | 14 +- .../parser/functions/annotated_fail.leo.out | 2 +- .../parser/functions/const_input_fail.leo.out | 2 +- .../import/import_empty_list_fail.leo.out | 2 +- .../parser/parser/import/invalid.leo.out | 2 +- .../parser/statement/conditional_fail.leo.out | 2 +- .../parser/statement/definition_fail.leo.out | 46 +++---- .../parser/statement/return_fail.leo.out | 6 +- 261 files changed, 1418 insertions(+), 1141 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 367f5d9031..e4827c7909 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1210,7 +1210,6 @@ dependencies = [ name = "leo-ast" version = "1.5.3" dependencies = [ - "backtrace", "criterion", "indexmap", "leo-errors", @@ -1225,7 +1224,6 @@ dependencies = [ name = "leo-compiler" version = "1.5.3" dependencies = [ - "backtrace", "bincode", "hex", "indexmap", @@ -1257,7 +1255,6 @@ dependencies = [ "snarkvm-utilities", "tempfile", "tendril", - "thiserror", "tracing", ] @@ -1351,7 +1348,6 @@ version = "1.5.3" name = "leo-package" version = "1.5.3" dependencies = [ - "backtrace", "lazy_static", "leo-errors", "serde", diff --git a/asg/src/const_value.rs b/asg/src/const_value.rs index 5ed2f9b40d..bb83469e95 100644 --- a/asg/src/const_value.rs +++ b/asg/src/const_value.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use crate::{Circuit, Identifier, IntegerType, Type}; -use leo_errors::{AsgError, Result, Span}; +use leo_errors::{new_backtrace, AsgError, Result, Span}; use indexmap::IndexMap; use num_bigint::BigInt; @@ -316,16 +316,56 @@ impl ConstInt { pub fn parse(int_type: &IntegerType, value: &str, span: &Span) -> Result { Ok(match int_type { - IntegerType::I8 => ConstInt::I8(value.parse().map_err(|_| AsgError::invalid_int(value, span))?), - IntegerType::I16 => ConstInt::I16(value.parse().map_err(|_| AsgError::invalid_int(value, span))?), - IntegerType::I32 => ConstInt::I32(value.parse().map_err(|_| AsgError::invalid_int(value, span))?), - IntegerType::I64 => ConstInt::I64(value.parse().map_err(|_| AsgError::invalid_int(value, span))?), - IntegerType::I128 => ConstInt::I128(value.parse().map_err(|_| AsgError::invalid_int(value, span))?), - IntegerType::U8 => ConstInt::U8(value.parse().map_err(|_| AsgError::invalid_int(value, span))?), - IntegerType::U16 => ConstInt::U16(value.parse().map_err(|_| AsgError::invalid_int(value, span))?), - IntegerType::U32 => ConstInt::U32(value.parse().map_err(|_| AsgError::invalid_int(value, span))?), - IntegerType::U64 => ConstInt::U64(value.parse().map_err(|_| AsgError::invalid_int(value, span))?), - IntegerType::U128 => ConstInt::U128(value.parse().map_err(|_| AsgError::invalid_int(value, span))?), + IntegerType::I8 => ConstInt::I8( + value + .parse() + .map_err(|_| AsgError::invalid_int(value, span, new_backtrace()))?, + ), + IntegerType::I16 => ConstInt::I16( + value + .parse() + .map_err(|_| AsgError::invalid_int(value, span, new_backtrace()))?, + ), + IntegerType::I32 => ConstInt::I32( + value + .parse() + .map_err(|_| AsgError::invalid_int(value, span, new_backtrace()))?, + ), + IntegerType::I64 => ConstInt::I64( + value + .parse() + .map_err(|_| AsgError::invalid_int(value, span, new_backtrace()))?, + ), + IntegerType::I128 => ConstInt::I128( + value + .parse() + .map_err(|_| AsgError::invalid_int(value, span, new_backtrace()))?, + ), + IntegerType::U8 => ConstInt::U8( + value + .parse() + .map_err(|_| AsgError::invalid_int(value, span, new_backtrace()))?, + ), + IntegerType::U16 => ConstInt::U16( + value + .parse() + .map_err(|_| AsgError::invalid_int(value, span, new_backtrace()))?, + ), + IntegerType::U32 => ConstInt::U32( + value + .parse() + .map_err(|_| AsgError::invalid_int(value, span, new_backtrace()))?, + ), + IntegerType::U64 => ConstInt::U64( + value + .parse() + .map_err(|_| AsgError::invalid_int(value, span, new_backtrace()))?, + ), + IntegerType::U128 => ConstInt::U128( + value + .parse() + .map_err(|_| AsgError::invalid_int(value, span, new_backtrace()))?, + ), }) } } diff --git a/asg/src/expression/array_access.rs b/asg/src/expression/array_access.rs index 5987a48fd9..903a3af83c 100644 --- a/asg/src/expression/array_access.rs +++ b/asg/src/expression/array_access.rs @@ -16,7 +16,7 @@ use crate::{ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Type}; use leo_ast::IntegerType; -use leo_errors::{AsgError, Result, Span}; +use leo_errors::{new_backtrace, AsgError, Result, Span}; use std::cell::Cell; @@ -97,6 +97,7 @@ impl<'a> FromAst<'a, leo_ast::ArrayAccessExpression> for ArrayAccessExpression<' "array", type_.map(|x| x.to_string()).unwrap_or_else(|| "unknown".to_string()), &value.span, + new_backtrace(), ) .into()); } @@ -114,9 +115,12 @@ impl<'a> FromAst<'a, leo_ast::ArrayAccessExpression> for ArrayAccessExpression<' .flatten() { if index >= array_len { - return Err( - AsgError::array_index_out_of_bounds(index, &array.span().cloned().unwrap_or_default()).into(), - ); + return Err(AsgError::array_index_out_of_bounds( + index, + &array.span().cloned().unwrap_or_default(), + new_backtrace(), + ) + .into()); } } diff --git a/asg/src/expression/array_init.rs b/asg/src/expression/array_init.rs index 23ea049271..b3482fc8bb 100644 --- a/asg/src/expression/array_init.rs +++ b/asg/src/expression/array_init.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use crate::{ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Type}; -use leo_errors::{AsgError, Result, Span}; +use leo_errors::{new_backtrace, AsgError, Result, Span}; use std::cell::Cell; @@ -74,7 +74,7 @@ impl<'a> FromAst<'a, leo_ast::ArrayInitExpression> for ArrayInitExpression<'a> { Some(PartialType::Array(item, dims)) => (item.map(|x| *x), dims), None => (None, None), Some(type_) => { - return Err(AsgError::unexpected_type(type_, "array", &value.span).into()); + return Err(AsgError::unexpected_type(type_, "array", &value.span, new_backtrace()).into()); } }; let dimensions = value @@ -84,19 +84,20 @@ impl<'a> FromAst<'a, leo_ast::ArrayInitExpression> for ArrayInitExpression<'a> { .map(|x| { Ok(x.value .parse::() - .map_err(|_| AsgError::parse_dimension_error(&value.span))?) + .map_err(|_| AsgError::parse_dimension_error(&value.span, new_backtrace()))?) }) .collect::>>()?; let len = *dimensions .get(0) - .ok_or_else(|| AsgError::parse_dimension_error(&value.span))?; + .ok_or_else(|| AsgError::parse_dimension_error(&value.span, new_backtrace()))?; if let Some(expected_len) = expected_len { if expected_len != len { return Err(AsgError::unexpected_type( format!("array of length {}", expected_len), format!("array of length {}", len), &value.span, + new_backtrace(), ) .into()); } @@ -111,6 +112,7 @@ impl<'a> FromAst<'a, leo_ast::ArrayInitExpression> for ArrayInitExpression<'a> { format!("array of length {}", dimension), format!("array of length {}", len), &value.span, + new_backtrace(), ) .into()); } @@ -120,7 +122,7 @@ impl<'a> FromAst<'a, leo_ast::ArrayInitExpression> for ArrayInitExpression<'a> { } None => None, Some(type_) => { - return Err(AsgError::unexpected_type("array", type_, &value.span).into()); + return Err(AsgError::unexpected_type("array", type_, &value.span, new_backtrace()).into()); } } } diff --git a/asg/src/expression/array_inline.rs b/asg/src/expression/array_inline.rs index 56bd7d8987..a16b6b3515 100644 --- a/asg/src/expression/array_inline.rs +++ b/asg/src/expression/array_inline.rs @@ -16,7 +16,7 @@ use crate::{ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Type}; use leo_ast::SpreadOrExpression; -use leo_errors::{AsgError, Result, Span}; +use leo_errors::{new_backtrace, AsgError, Result, Span}; use std::cell::Cell; @@ -109,7 +109,7 @@ impl<'a> FromAst<'a, leo_ast::ArrayInlineExpression> for ArrayInlineExpression<' Some(PartialType::Array(item, dims)) => (item.map(|x| *x), dims), None => (None, None), Some(type_) => { - return Err(AsgError::unexpected_type(type_, "array", &value.span).into()); + return Err(AsgError::unexpected_type(type_, "array", &value.span, new_backtrace()).into()); } }; @@ -174,6 +174,7 @@ impl<'a> FromAst<'a, leo_ast::ArrayInlineExpression> for ArrayInlineExpression<' .unwrap_or("unknown"), type_.map(|x| x.to_string()).unwrap_or_else(|| "unknown".to_string()), &value.span, + new_backtrace(), ) .into()); } @@ -189,6 +190,7 @@ impl<'a> FromAst<'a, leo_ast::ArrayInlineExpression> for ArrayInlineExpression<' format!("array of length {}", expected_len), format!("array of length {}", len), &value.span, + new_backtrace(), ) .into()); } diff --git a/asg/src/expression/array_range_access.rs b/asg/src/expression/array_range_access.rs index 0d32f3933f..469d1ec87a 100644 --- a/asg/src/expression/array_range_access.rs +++ b/asg/src/expression/array_range_access.rs @@ -16,7 +16,7 @@ use crate::{ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Type}; use leo_ast::IntegerType; -use leo_errors::{AsgError, Result, Span}; +use leo_errors::{new_backtrace, AsgError, Result, Span}; use std::cell::Cell; @@ -108,7 +108,7 @@ impl<'a> FromAst<'a, leo_ast::ArrayRangeAccessExpression> for ArrayRangeAccessEx Some(PartialType::Array(element, len)) => (Some(PartialType::Array(element, None)), len), None => (None, None), Some(x) => { - return Err(AsgError::unexpected_type(x, "array", &value.span).into()); + return Err(AsgError::unexpected_type(x, "array", &value.span, new_backtrace()).into()); } }; let array = <&Expression<'a>>::from_ast(scope, &*value.array, expected_array)?; @@ -120,6 +120,7 @@ impl<'a> FromAst<'a, leo_ast::ArrayRangeAccessExpression> for ArrayRangeAccessEx "array", type_.map(|x| x.to_string()).unwrap_or_else(|| "unknown".to_string()), &value.span, + new_backtrace(), ) .into()); } @@ -155,7 +156,9 @@ impl<'a> FromAst<'a, leo_ast::ArrayRangeAccessExpression> for ArrayRangeAccessEx } else { value.span.clone() }; - return Err(AsgError::array_index_out_of_bounds(inner_value, &error_span).into()); + return Err( + AsgError::array_index_out_of_bounds(inner_value, &error_span, new_backtrace()).into(), + ); } else if let Some(left) = const_left { if left > inner_value { let error_span = if let Some(right) = right { @@ -163,7 +166,9 @@ impl<'a> FromAst<'a, leo_ast::ArrayRangeAccessExpression> for ArrayRangeAccessEx } else { value.span.clone() }; - return Err(AsgError::array_index_out_of_bounds(inner_value, &error_span).into()); + return Err( + AsgError::array_index_out_of_bounds(inner_value, &error_span, new_backtrace()).into(), + ); } } } @@ -183,9 +188,13 @@ impl<'a> FromAst<'a, leo_ast::ArrayRangeAccessExpression> for ArrayRangeAccessEx if let Some(length) = length { if length != expected_len { let concrete_type = Type::Array(parent_element, length); - return Err( - AsgError::unexpected_type(expected_type.as_ref().unwrap(), concrete_type, &value.span).into(), - ); + return Err(AsgError::unexpected_type( + expected_type.as_ref().unwrap(), + concrete_type, + &value.span, + new_backtrace(), + ) + .into()); } } if let Some(left_value) = const_left { @@ -195,13 +204,13 @@ impl<'a> FromAst<'a, leo_ast::ArrayRangeAccessExpression> for ArrayRangeAccessEx } else { value.span.clone() }; - return Err(AsgError::array_index_out_of_bounds(left_value, &error_span).into()); + return Err(AsgError::array_index_out_of_bounds(left_value, &error_span, new_backtrace()).into()); } } length = Some(expected_len); } if length.is_none() { - return Err(AsgError::unknown_array_size(&value.span).into()); + return Err(AsgError::unknown_array_size(&value.span, new_backtrace()).into()); } Ok(ArrayRangeAccessExpression { diff --git a/asg/src/expression/binary.rs b/asg/src/expression/binary.rs index 3029e2b98c..cda0e82e65 100644 --- a/asg/src/expression/binary.rs +++ b/asg/src/expression/binary.rs @@ -16,7 +16,7 @@ use crate::{ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Type}; pub use leo_ast::{BinaryOperation, BinaryOperationClass}; -use leo_errors::{AsgError, Result, Span}; +use leo_errors::{new_backtrace, AsgError, Result, Span}; use std::cell::Cell; @@ -123,7 +123,7 @@ impl<'a> FromAst<'a, leo_ast::BinaryExpression> for BinaryExpression<'a> { BinaryOperationClass::Boolean => match expected_type { Some(PartialType::Type(Type::Boolean)) | None => None, Some(x) => { - return Err(AsgError::unexpected_type(x, Type::Boolean, &value.span).into()); + return Err(AsgError::unexpected_type(x, Type::Boolean, &value.span, new_backtrace()).into()); } }, BinaryOperationClass::Numeric => match expected_type { @@ -131,7 +131,9 @@ impl<'a> FromAst<'a, leo_ast::BinaryExpression> for BinaryExpression<'a> { Some(x @ PartialType::Type(Type::Field)) => Some(x), Some(x @ PartialType::Type(Type::Group)) => Some(x), Some(x) => { - return Err(AsgError::unexpected_type(x, "integer, field, or group", &value.span).into()); + return Err( + AsgError::unexpected_type(x, "integer, field, or group", &value.span, new_backtrace()).into(), + ); } None => None, }, @@ -184,6 +186,7 @@ impl<'a> FromAst<'a, leo_ast::BinaryExpression> for BinaryExpression<'a> { "integer", type_.map(|x| x.to_string()).unwrap_or_else(|| "unknown".to_string()), &value.span, + new_backtrace(), ) .into()); } @@ -192,14 +195,14 @@ impl<'a> FromAst<'a, leo_ast::BinaryExpression> for BinaryExpression<'a> { BinaryOperation::And | BinaryOperation::Or => match left_type { Some(Type::Boolean) | None => (), Some(x) => { - return Err(AsgError::unexpected_type(x, Type::Boolean, &value.span).into()); + return Err(AsgError::unexpected_type(x, Type::Boolean, &value.span, new_backtrace()).into()); } }, BinaryOperation::Eq | BinaryOperation::Ne => (), // all types allowed _ => match left_type { Some(Type::Integer(_)) | None => (), Some(x) => { - return Err(AsgError::unexpected_type(x, "integer", &value.span).into()); + return Err(AsgError::unexpected_type(x, "integer", &value.span, new_backtrace()).into()); } }, }, @@ -210,11 +213,11 @@ impl<'a> FromAst<'a, leo_ast::BinaryExpression> for BinaryExpression<'a> { match (left_type, right_type) { (Some(left_type), Some(right_type)) => { if !left_type.is_assignable_from(&right_type) { - return Err(AsgError::unexpected_type(left_type, right_type, &value.span).into()); + return Err(AsgError::unexpected_type(left_type, right_type, &value.span, new_backtrace()).into()); } } (None, None) => { - return Err(AsgError::unexpected_type("any type", "unknown type", &value.span).into()); + return Err(AsgError::unexpected_type("any type", "unknown type", &value.span, new_backtrace()).into()); } (_, _) => (), } diff --git a/asg/src/expression/call.rs b/asg/src/expression/call.rs index 2748ea9f6b..d444d38fbb 100644 --- a/asg/src/expression/call.rs +++ b/asg/src/expression/call.rs @@ -28,7 +28,7 @@ use crate::{ Type, }; pub use leo_ast::{BinaryOperation, Node as AstNode}; -use leo_errors::{AsgError, Result, Span}; +use leo_errors::{new_backtrace, AsgError, Result, Span}; use std::cell::Cell; @@ -94,7 +94,7 @@ impl<'a> FromAst<'a, leo_ast::CallExpression> for CallExpression<'a> { None, scope .resolve_function(&name.name) - .ok_or_else(|| AsgError::unresolved_function(&name.name, &name.span))?, + .ok_or_else(|| AsgError::unresolved_function(&name.name, &name.span, new_backtrace()))?, ), leo_ast::Expression::CircuitMemberAccess(leo_ast::CircuitMemberAccessExpression { circuit: ast_circuit, @@ -109,28 +109,41 @@ impl<'a> FromAst<'a, leo_ast::CallExpression> for CallExpression<'a> { "circuit", type_.map(|x| x.to_string()).unwrap_or_else(|| "unknown".to_string()), span, + new_backtrace(), ) .into()); } }; let circuit_name = circuit.name.borrow().name.clone(); let member = circuit.members.borrow(); - let member = member - .get(name.name.as_ref()) - .ok_or_else(|| AsgError::unresolved_circuit_member(&circuit_name, &name.name, span))?; + let member = member.get(name.name.as_ref()).ok_or_else(|| { + AsgError::unresolved_circuit_member(&circuit_name, &name.name, span, new_backtrace()) + })?; match member { CircuitMember::Function(body) => { if body.qualifier == FunctionQualifier::Static { - return Err(AsgError::circuit_static_call_invalid(&circuit_name, &name.name, span).into()); + return Err(AsgError::circuit_static_call_invalid( + &circuit_name, + &name.name, + span, + new_backtrace(), + ) + .into()); } else if body.qualifier == FunctionQualifier::MutSelfRef && !target.is_mut_ref() { - return Err( - AsgError::circuit_member_mut_call_invalid(circuit_name, &name.name, span).into(), - ); + return Err(AsgError::circuit_member_mut_call_invalid( + circuit_name, + &name.name, + span, + new_backtrace(), + ) + .into()); } (Some(target), *body) } CircuitMember::Variable(_) => { - return Err(AsgError::circuit_variable_call(circuit_name, &name.name, span).into()); + return Err( + AsgError::circuit_variable_call(circuit_name, &name.name, span, new_backtrace()).into(), + ); } } } @@ -140,27 +153,35 @@ impl<'a> FromAst<'a, leo_ast::CallExpression> for CallExpression<'a> { span, }) => { let circuit = if let leo_ast::Expression::Identifier(circuit_name) = &**ast_circuit { - scope - .resolve_circuit(&circuit_name.name) - .ok_or_else(|| AsgError::unresolved_circuit(&circuit_name.name, &circuit_name.span))? + scope.resolve_circuit(&circuit_name.name).ok_or_else(|| { + AsgError::unresolved_circuit(&circuit_name.name, &circuit_name.span, new_backtrace()) + })? } else { - return Err(AsgError::unexpected_type("circuit", "unknown", span).into()); + return Err(AsgError::unexpected_type("circuit", "unknown", span, new_backtrace()).into()); }; let circuit_name = circuit.name.borrow().name.clone(); let member = circuit.members.borrow(); - let member = member - .get(name.name.as_ref()) - .ok_or_else(|| AsgError::unresolved_circuit_member(&circuit_name, &name.name, span))?; + let member = member.get(name.name.as_ref()).ok_or_else(|| { + AsgError::unresolved_circuit_member(&circuit_name, &name.name, span, new_backtrace()) + })?; match member { CircuitMember::Function(body) => { if body.qualifier != FunctionQualifier::Static { - return Err(AsgError::circuit_member_call_invalid(circuit_name, &name.name, span).into()); + return Err(AsgError::circuit_member_call_invalid( + circuit_name, + &name.name, + span, + new_backtrace(), + ) + .into()); } (None, *body) } CircuitMember::Variable(_) => { - return Err(AsgError::circuit_variable_call(circuit_name, &name.name, span).into()); + return Err( + AsgError::circuit_variable_call(circuit_name, &name.name, span, new_backtrace()).into(), + ); } } } @@ -168,6 +189,7 @@ impl<'a> FromAst<'a, leo_ast::CallExpression> for CallExpression<'a> { return Err(AsgError::illegal_ast_structure( "non Identifier/CircuitMemberAccess/CircuitStaticFunctionAccess as call target", &value.span, + new_backtrace(), ) .into()); } @@ -175,7 +197,7 @@ impl<'a> FromAst<'a, leo_ast::CallExpression> for CallExpression<'a> { if let Some(expected) = expected_type { let output: Type = function.output.clone(); if !expected.matches(&output) { - return Err(AsgError::unexpected_type(expected, output, &value.span).into()); + return Err(AsgError::unexpected_type(expected, output, &value.span, new_backtrace()).into()); } } if value.arguments.len() != function.arguments.len() { @@ -183,6 +205,7 @@ impl<'a> FromAst<'a, leo_ast::CallExpression> for CallExpression<'a> { function.arguments.len(), value.arguments.len(), &value.span, + new_backtrace(), ) .into()); } @@ -195,14 +218,14 @@ impl<'a> FromAst<'a, leo_ast::CallExpression> for CallExpression<'a> { let argument = argument.get().borrow(); let converted = <&Expression<'a>>::from_ast(scope, expr, Some(argument.type_.clone().partial()))?; if argument.const_ && !converted.is_consty() { - return Err(AsgError::unexpected_nonconst(expr.span()).into()); + return Err(AsgError::unexpected_nonconst(expr.span(), new_backtrace()).into()); } Ok(Cell::new(converted)) }) .collect::>>()?; if function.is_test() { - return Err(AsgError::call_test_function(&value.span).into()); + return Err(AsgError::call_test_function(&value.span, new_backtrace()).into()); } Ok(CallExpression { parent: Cell::new(None), diff --git a/asg/src/expression/cast.rs b/asg/src/expression/cast.rs index 3f2765ba5a..d7ac7b5e4d 100644 --- a/asg/src/expression/cast.rs +++ b/asg/src/expression/cast.rs @@ -16,7 +16,7 @@ use crate::{ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Type}; pub use leo_ast::UnaryOperation; -use leo_errors::{AsgError, Result, Span}; +use leo_errors::{new_backtrace, AsgError, Result, Span}; use std::cell::Cell; @@ -80,7 +80,7 @@ impl<'a> FromAst<'a, leo_ast::CastExpression> for CastExpression<'a> { let target_type = scope.resolve_ast_type(&value.target_type, &value.span)?; if let Some(expected_type) = &expected_type { if !expected_type.matches(&target_type) { - return Err(AsgError::unexpected_type(expected_type, target_type, &value.span).into()); + return Err(AsgError::unexpected_type(expected_type, target_type, &value.span, new_backtrace()).into()); } } diff --git a/asg/src/expression/circuit_access.rs b/asg/src/expression/circuit_access.rs index 2d3d75a267..5efbfed9e3 100644 --- a/asg/src/expression/circuit_access.rs +++ b/asg/src/expression/circuit_access.rs @@ -28,7 +28,7 @@ use crate::{ Type, }; -use leo_errors::{AsgError, Result, Span}; +use leo_errors::{new_backtrace, AsgError, Result, Span}; use std::cell::Cell; #[derive(Clone)] @@ -111,6 +111,7 @@ impl<'a> FromAst<'a, leo_ast::CircuitMemberAccessExpression> for CircuitAccessEx "circuit", x.map(|x| x.to_string()).unwrap_or_else(|| "unknown".to_string()), &value.span, + new_backtrace(), ) .into()); } @@ -123,7 +124,9 @@ impl<'a> FromAst<'a, leo_ast::CircuitMemberAccessExpression> for CircuitAccessEx if let CircuitMember::Variable(type_) = &member { let type_: Type = type_.clone(); if !expected_type.matches(&type_) { - return Err(AsgError::unexpected_type(expected_type, type_, &value.span).into()); + return Err( + AsgError::unexpected_type(expected_type, type_, &value.span, new_backtrace()).into(), + ); } } // used by call expression } @@ -143,15 +146,20 @@ impl<'a> FromAst<'a, leo_ast::CircuitMemberAccessExpression> for CircuitAccessEx CircuitMember::Variable(expected_type.clone()), ); } else { - return Err( - AsgError::input_ref_needs_type(&circuit.name.borrow().name, &value.name.name, &value.span).into(), - ); + return Err(AsgError::input_ref_needs_type( + &circuit.name.borrow().name, + &value.name.name, + &value.span, + new_backtrace(), + ) + .into()); } } else { return Err(AsgError::unresolved_circuit_member( &circuit.name.borrow().name, &value.name.name, &value.span, + new_backtrace(), ) .into()); } @@ -175,14 +183,14 @@ impl<'a> FromAst<'a, leo_ast::CircuitStaticFunctionAccessExpression> for Circuit let circuit = match &*value.circuit { leo_ast::Expression::Identifier(name) => scope .resolve_circuit(&name.name) - .ok_or_else(|| AsgError::unresolved_circuit(&name.name, &name.span))?, + .ok_or_else(|| AsgError::unresolved_circuit(&name.name, &name.span, new_backtrace()))?, _ => { - return Err(AsgError::unexpected_type("circuit", "unknown", &value.span).into()); + return Err(AsgError::unexpected_type("circuit", "unknown", &value.span, new_backtrace()).into()); } }; if let Some(expected_type) = expected_type { - return Err(AsgError::unexpected_type(expected_type, "none", &value.span).into()); + return Err(AsgError::unexpected_type(expected_type, "none", &value.span, new_backtrace()).into()); } if let Some(CircuitMember::Function(_)) = circuit.members.borrow().get(value.name.name.as_ref()) { @@ -192,6 +200,7 @@ impl<'a> FromAst<'a, leo_ast::CircuitStaticFunctionAccessExpression> for Circuit &circuit.name.borrow().name, &value.name.name, &value.span, + new_backtrace(), ) .into()); } diff --git a/asg/src/expression/circuit_init.rs b/asg/src/expression/circuit_init.rs index 2636c068fa..26f53754d3 100644 --- a/asg/src/expression/circuit_init.rs +++ b/asg/src/expression/circuit_init.rs @@ -28,7 +28,7 @@ use crate::{ Type, }; -use leo_errors::{AsgError, Result, Span}; +use leo_errors::{new_backtrace, AsgError, Result, Span}; use indexmap::{IndexMap, IndexSet}; use std::cell::Cell; @@ -96,12 +96,18 @@ impl<'a> FromAst<'a, leo_ast::CircuitInitExpression> for CircuitInitExpression<' ) -> Result> { let circuit = scope .resolve_circuit(&value.name.name) - .ok_or_else(|| AsgError::unresolved_circuit(&value.name.name, &value.name.span))?; + .ok_or_else(|| AsgError::unresolved_circuit(&value.name.name, &value.name.span, new_backtrace()))?; match expected_type { Some(PartialType::Type(Type::Circuit(expected_circuit))) if expected_circuit == circuit => (), None => (), Some(x) => { - return Err(AsgError::unexpected_type(x, circuit.name.borrow().name.to_string(), &value.span).into()); + return Err(AsgError::unexpected_type( + x, + circuit.name.borrow().name.to_string(), + &value.span, + new_backtrace(), + ) + .into()); } } let members: IndexMap<&str, (&Identifier, Option<&leo_ast::Expression>)> = value @@ -117,9 +123,13 @@ impl<'a> FromAst<'a, leo_ast::CircuitInitExpression> for CircuitInitExpression<' let circuit_members = circuit.members.borrow(); for (name, member) in circuit_members.iter() { if defined_variables.contains(name) { - return Err( - AsgError::overridden_circuit_member(&circuit.name.borrow().name, name, &value.span).into(), - ); + return Err(AsgError::overridden_circuit_member( + &circuit.name.borrow().name, + name, + &value.span, + new_backtrace(), + ) + .into()); } defined_variables.insert(name.clone()); let type_: Type = if let CircuitMember::Variable(type_) = &member { @@ -139,17 +149,25 @@ impl<'a> FromAst<'a, leo_ast::CircuitInitExpression> for CircuitInitExpression<' }; values.push(((*identifier).clone(), Cell::new(received))); } else { - return Err( - AsgError::missing_circuit_member(&circuit.name.borrow().name, name, &value.span).into(), - ); + return Err(AsgError::missing_circuit_member( + &circuit.name.borrow().name, + name, + &value.span, + new_backtrace(), + ) + .into()); } } for (name, (identifier, _expression)) in members.iter() { if circuit_members.get(*name).is_none() { - return Err( - AsgError::extra_circuit_member(&circuit.name.borrow().name, name, &identifier.span).into(), - ); + return Err(AsgError::extra_circuit_member( + &circuit.name.borrow().name, + name, + &identifier.span, + new_backtrace(), + ) + .into()); } } } diff --git a/asg/src/expression/constant.rs b/asg/src/expression/constant.rs index 81834d95c2..b79e1b4183 100644 --- a/asg/src/expression/constant.rs +++ b/asg/src/expression/constant.rs @@ -28,7 +28,7 @@ use crate::{ Type, }; -use leo_errors::{AsgError, Result, Span}; +use leo_errors::{new_backtrace, AsgError, Result, Span}; use std::cell::Cell; @@ -85,7 +85,7 @@ impl<'a> FromAst<'a, leo_ast::ValueExpression> for Constant<'a> { match expected_type.map(PartialType::full).flatten() { Some(Type::Address) | None => (), Some(x) => { - return Err(AsgError::unexpected_type(x, Type::Address, span).into()); + return Err(AsgError::unexpected_type(x, Type::Address, span, new_backtrace()).into()); } } Constant { @@ -98,7 +98,7 @@ impl<'a> FromAst<'a, leo_ast::ValueExpression> for Constant<'a> { match expected_type.map(PartialType::full).flatten() { Some(Type::Boolean) | None => (), Some(x) => { - return Err(AsgError::unexpected_type(x, Type::Boolean, span).into()); + return Err(AsgError::unexpected_type(x, Type::Boolean, span, new_backtrace()).into()); } } Constant { @@ -107,7 +107,7 @@ impl<'a> FromAst<'a, leo_ast::ValueExpression> for Constant<'a> { value: ConstValue::Boolean( value .parse::() - .map_err(|_| AsgError::invalid_boolean(value, span))?, + .map_err(|_| AsgError::invalid_boolean(value, span, new_backtrace()))?, ), } } @@ -115,7 +115,7 @@ impl<'a> FromAst<'a, leo_ast::ValueExpression> for Constant<'a> { match expected_type.map(PartialType::full).flatten() { Some(Type::Char) | None => (), Some(x) => { - return Err(AsgError::unexpected_type(x, Type::Char, value.span()).into()); + return Err(AsgError::unexpected_type(x, Type::Char, value.span(), new_backtrace()).into()); } } @@ -129,20 +129,24 @@ impl<'a> FromAst<'a, leo_ast::ValueExpression> for Constant<'a> { match expected_type.map(PartialType::full).flatten() { Some(Type::Field) | None => (), Some(x) => { - return Err(AsgError::unexpected_type(x, Type::Field, span).into()); + return Err(AsgError::unexpected_type(x, Type::Field, span, new_backtrace()).into()); } } Constant { parent: Cell::new(None), span: Some(span.clone()), - value: ConstValue::Field(value.parse().map_err(|_| AsgError::invalid_int(value, span))?), + value: ConstValue::Field( + value + .parse() + .map_err(|_| AsgError::invalid_int(value, span, new_backtrace()))?, + ), } } Group(value) => { match expected_type.map(PartialType::full).flatten() { Some(Type::Group) | None => (), Some(x) => { - return Err(AsgError::unexpected_type(x, Type::Group, value.span()).into()); + return Err(AsgError::unexpected_type(x, Type::Group, value.span(), new_backtrace()).into()); } } Constant { @@ -159,7 +163,7 @@ impl<'a> FromAst<'a, leo_ast::ValueExpression> for Constant<'a> { } } Implicit(value, span) => match expected_type { - None => return Err(AsgError::unresolved_type("unknown", span).into()), + None => return Err(AsgError::unresolved_type("unknown", span, new_backtrace()).into()), Some(PartialType::Integer(Some(sub_type), _)) | Some(PartialType::Integer(None, Some(sub_type))) => { Constant { parent: Cell::new(None), @@ -170,7 +174,11 @@ impl<'a> FromAst<'a, leo_ast::ValueExpression> for Constant<'a> { Some(PartialType::Type(Type::Field)) => Constant { parent: Cell::new(None), span: Some(span.clone()), - value: ConstValue::Field(value.parse().map_err(|_| AsgError::invalid_int(value, span))?), + value: ConstValue::Field( + value + .parse() + .map_err(|_| AsgError::invalid_int(value, span, new_backtrace()))?, + ), }, Some(PartialType::Type(Type::Group)) => Constant { parent: Cell::new(None), @@ -183,7 +191,7 @@ impl<'a> FromAst<'a, leo_ast::ValueExpression> for Constant<'a> { value: ConstValue::Address(value.clone()), }, Some(x) => { - return Err(AsgError::unexpected_type(x, "unknown", span).into()); + return Err(AsgError::unexpected_type(x, "unknown", span, new_backtrace()).into()); } }, Integer(int_type, value, span) => { @@ -192,7 +200,7 @@ impl<'a> FromAst<'a, leo_ast::ValueExpression> for Constant<'a> { Some(PartialType::Integer(None, Some(_))) => (), None => (), Some(x) => { - return Err(AsgError::unexpected_type(x, int_type, span).into()); + return Err(AsgError::unexpected_type(x, int_type, span, new_backtrace()).into()); } } Constant { diff --git a/asg/src/expression/ternary.rs b/asg/src/expression/ternary.rs index 8f286d4559..7c0f9527af 100644 --- a/asg/src/expression/ternary.rs +++ b/asg/src/expression/ternary.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use crate::{ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Type}; -use leo_errors::{AsgError, Result, Span}; +use leo_errors::{new_backtrace, AsgError, Result, Span}; use std::cell::Cell; @@ -91,7 +91,7 @@ impl<'a> FromAst<'a, leo_ast::TernaryExpression> for TernaryExpression<'a> { let right = if_false.get().get_type().unwrap().into(); if left != right { - return Err(AsgError::ternary_different_types(left, right, &value.span).into()); + return Err(AsgError::ternary_different_types(left, right, &value.span, new_backtrace()).into()); } Ok(TernaryExpression { diff --git a/asg/src/expression/tuple_access.rs b/asg/src/expression/tuple_access.rs index 327ed51548..44619936e5 100644 --- a/asg/src/expression/tuple_access.rs +++ b/asg/src/expression/tuple_access.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use crate::{ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Type}; -use leo_errors::{AsgError, Result, Span}; +use leo_errors::{new_backtrace, AsgError, Result, Span}; use std::cell::Cell; @@ -80,7 +80,7 @@ impl<'a> FromAst<'a, leo_ast::TupleAccessExpression> for TupleAccessExpression<' .index .value .parse::() - .map_err(|_| AsgError::parse_index_error(&value.span))?; + .map_err(|_| AsgError::parse_index_error(&value.span, new_backtrace()))?; let mut expected_tuple = vec![None; index + 1]; expected_tuple[index] = expected_type; @@ -95,6 +95,7 @@ impl<'a> FromAst<'a, leo_ast::TupleAccessExpression> for TupleAccessExpression<' .map(|x| x.to_string()) .unwrap_or_else(|| "unknown".to_string()), &value.span, + new_backtrace(), ) .into()); } diff --git a/asg/src/expression/tuple_init.rs b/asg/src/expression/tuple_init.rs index 317020f80a..b0a6791206 100644 --- a/asg/src/expression/tuple_init.rs +++ b/asg/src/expression/tuple_init.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use crate::{ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Type}; -use leo_errors::{AsgError, Result, Span}; +use leo_errors::{new_backtrace, AsgError, Result, Span}; use std::cell::Cell; @@ -90,6 +90,7 @@ impl<'a> FromAst<'a, leo_ast::TupleInitExpression> for TupleInitExpression<'a> { "tuple", x.map(|x| x.to_string()).unwrap_or_else(|| "unknown".to_string()), &value.span, + new_backtrace(), ) .into()); } @@ -103,6 +104,7 @@ impl<'a> FromAst<'a, leo_ast::TupleInitExpression> for TupleInitExpression<'a> { format!("tuple of length {}", tuple_types.len()), format!("tuple of length {}", value.elements.len()), &value.span, + new_backtrace(), ) .into()); } diff --git a/asg/src/expression/unary.rs b/asg/src/expression/unary.rs index a9da91eec6..612a3c59e8 100644 --- a/asg/src/expression/unary.rs +++ b/asg/src/expression/unary.rs @@ -16,7 +16,7 @@ use crate::{ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Type}; pub use leo_ast::UnaryOperation; -use leo_errors::{AsgError, Result, Span}; +use leo_errors::{new_backtrace, AsgError, Result, Span}; use std::cell::Cell; @@ -95,7 +95,7 @@ impl<'a> FromAst<'a, leo_ast::UnaryExpression> for UnaryExpression<'a> { UnaryOperation::Not => match expected_type.map(|x| x.full()).flatten() { Some(Type::Boolean) | None => Some(Type::Boolean), Some(type_) => { - return Err(AsgError::unexpected_type(type_, Type::Boolean, &value.span).into()); + return Err(AsgError::unexpected_type(type_, Type::Boolean, &value.span, new_backtrace()).into()); } }, UnaryOperation::Negate => match expected_type.map(|x| x.full()).flatten() { @@ -104,14 +104,20 @@ impl<'a> FromAst<'a, leo_ast::UnaryExpression> for UnaryExpression<'a> { Some(Type::Field) => Some(Type::Field), None => None, Some(type_) => { - return Err(AsgError::unexpected_type(type_, "integer, group, field", &value.span).into()); + return Err(AsgError::unexpected_type( + type_, + "integer, group, field", + &value.span, + new_backtrace(), + ) + .into()); } }, UnaryOperation::BitNot => match expected_type.map(|x| x.full()).flatten() { Some(type_ @ Type::Integer(_)) => Some(type_), None => None, Some(type_) => { - return Err(AsgError::unexpected_type(type_, "integer", &value.span).into()); + return Err(AsgError::unexpected_type(type_, "integer", &value.span, new_backtrace()).into()); } }, }; @@ -126,7 +132,7 @@ impl<'a> FromAst<'a, leo_ast::UnaryExpression> for UnaryExpression<'a> { }) .unwrap_or(false); if is_expr_unsigned { - return Err(AsgError::unsigned_negation(&value.span).into()); + return Err(AsgError::unsigned_negation(&value.span, new_backtrace()).into()); } } Ok(UnaryExpression { diff --git a/asg/src/expression/variable_ref.rs b/asg/src/expression/variable_ref.rs index 4df4849a35..46af2ab766 100644 --- a/asg/src/expression/variable_ref.rs +++ b/asg/src/expression/variable_ref.rs @@ -29,7 +29,7 @@ use crate::{ Variable, }; -use leo_errors::{AsgError, Result, Span}; +use leo_errors::{new_backtrace, AsgError, Result, Span}; use std::cell::Cell; @@ -143,6 +143,7 @@ impl<'a> FromAst<'a, leo_ast::Identifier> for &'a Expression<'a> { return Err(AsgError::illegal_input_variable_reference( "attempted to reference input when none is in scope", &value.span, + new_backtrace(), ) .into()); } @@ -157,7 +158,7 @@ impl<'a> FromAst<'a, leo_ast::Identifier> for &'a Expression<'a> { value: ConstValue::Address(value.name.clone()), }))); } - return Err(AsgError::unresolved_reference(&value.name, &value.span).into()); + return Err(AsgError::unresolved_reference(&value.name, &value.span, new_backtrace()).into()); } } }; @@ -172,9 +173,9 @@ impl<'a> FromAst<'a, leo_ast::Identifier> for &'a Expression<'a> { if let Some(expected_type) = expected_type { let type_ = expression .get_type() - .ok_or_else(|| AsgError::unresolved_reference(&value.name, &value.span))?; + .ok_or_else(|| AsgError::unresolved_reference(&value.name, &value.span, new_backtrace()))?; if !expected_type.matches(&type_) { - return Err(AsgError::unexpected_type(expected_type, type_, &value.span).into()); + return Err(AsgError::unexpected_type(expected_type, type_, &value.span, new_backtrace()).into()); } } diff --git a/asg/src/program/circuit.rs b/asg/src/program/circuit.rs index 36fa24902e..cdc29f7981 100644 --- a/asg/src/program/circuit.rs +++ b/asg/src/program/circuit.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use crate::{Function, Identifier, Node, Scope, Type}; -use leo_errors::{AsgError, Result, Span}; +use leo_errors::{new_backtrace, AsgError, Result, Span}; use indexmap::IndexMap; use std::cell::RefCell; @@ -71,9 +71,13 @@ impl<'a> Circuit<'a> { for member in value.members.iter() { if let leo_ast::CircuitMember::CircuitVariable(name, type_) = member { if members.contains_key(name.name.as_ref()) { - return Err( - AsgError::redefined_circuit_member(&value.circuit_name.name, &name.name, &name.span).into(), - ); + return Err(AsgError::redefined_circuit_member( + &value.circuit_name.name, + &name.name, + &name.span, + new_backtrace(), + ) + .into()); } members.insert( name.name.to_string(), @@ -100,13 +104,14 @@ impl<'a> Circuit<'a> { &value.circuit_name.name, &function.identifier.name, &function.identifier.span, + new_backtrace(), ) .into()); } let asg_function = Function::init(new_scope, function)?; asg_function.circuit.replace(Some(circuit)); if asg_function.is_test() { - return Err(AsgError::circuit_test_function(&function.identifier.span).into()); + return Err(AsgError::circuit_test_function(&function.identifier.span, new_backtrace()).into()); } members.insert( function.identifier.name.to_string(), diff --git a/asg/src/program/function.rs b/asg/src/program/function.rs index 3297f5be8c..c7215fd1c0 100644 --- a/asg/src/program/function.rs +++ b/asg/src/program/function.rs @@ -29,7 +29,7 @@ use crate::{ use indexmap::IndexMap; pub use leo_ast::Annotation; use leo_ast::FunctionInput; -use leo_errors::{AsgError, Result, Span}; +use leo_errors::{new_backtrace, AsgError, Result, Span}; use std::cell::{Cell, RefCell}; @@ -107,7 +107,7 @@ impl<'a> Function<'a> { } } if qualifier != FunctionQualifier::Static && scope.circuit_self.get().is_none() { - return Err(AsgError::invalid_self_in_global(&value.span).into()); + return Err(AsgError::invalid_self_in_global(&value.span, new_backtrace()).into()); } let function = scope.context.alloc_function(Function { id: scope.context.get_id(), @@ -151,12 +151,16 @@ impl<'a> Function<'a> { let main_block = BlockStatement::from_ast(self.scope, &value.block, None)?; let mut director = MonoidalDirector::new(ReturnPathReducer::new()); if !director.reduce_block(&main_block).0 && !self.output.is_unit() { - return Err(AsgError::function_missing_return(&self.name.borrow().name, &value.span).into()); + return Err( + AsgError::function_missing_return(&self.name.borrow().name, &value.span, new_backtrace()).into(), + ); } #[allow(clippy::never_loop)] // TODO @Protryon: How should we return multiple errors? for (span, error) in director.reducer().errors { - return Err(AsgError::function_return_validation(&self.name.borrow().name, error, &span).into()); + return Err( + AsgError::function_return_validation(&self.name.borrow().name, error, &span, new_backtrace()).into(), + ); } self.body diff --git a/asg/src/program/mod.rs b/asg/src/program/mod.rs index 76a01fe028..8f118ba117 100644 --- a/asg/src/program/mod.rs +++ b/asg/src/program/mod.rs @@ -26,7 +26,7 @@ pub use function::*; use crate::{node::FromAst, ArenaNode, AsgContext, DefinitionStatement, ImportResolver, Input, Scope, Statement}; use leo_ast::{Identifier, PackageAccess, PackageOrPackages}; -use leo_errors::{AsgError, Result, Span}; +use leo_errors::{new_backtrace, AsgError, Result, Span}; use indexmap::IndexMap; use std::cell::{Cell, RefCell}; @@ -164,7 +164,7 @@ impl<'a> Program<'a> { )? { Some(x) => x, None => { - return Err(AsgError::unresolved_import(pretty_package, &Span::default()).into()); + return Err(AsgError::unresolved_import(pretty_package, &Span::default(), new_backtrace()).into()); } }; @@ -196,7 +196,12 @@ impl<'a> Program<'a> { } else if let Some(global_const) = resolved_package.global_consts.get(&name) { imported_global_consts.insert(name.clone(), *global_const); } else { - return Err(AsgError::unresolved_import(format!("{}.{}", pretty_package, name), &span).into()); + return Err(AsgError::unresolved_import( + format!("{}.{}", pretty_package, name), + &span, + new_backtrace(), + ) + .into()); } } ImportSymbol::Alias(name, alias) => { @@ -207,7 +212,12 @@ impl<'a> Program<'a> { } else if let Some(global_const) = resolved_package.global_consts.get(&name) { imported_global_consts.insert(alias.clone(), *global_const); } else { - return Err(AsgError::unresolved_import(format!("{}.{}", pretty_package, name), &span).into()); + return Err(AsgError::unresolved_import( + format!("{}.{}", pretty_package, name), + &span, + new_backtrace(), + ) + .into()); } } } @@ -298,7 +308,7 @@ impl<'a> Program<'a> { let name = name.name.to_string(); if functions.contains_key(&name) { - return Err(AsgError::duplicate_function_definition(name, &function.span).into()); + return Err(AsgError::duplicate_function_definition(name, &function.span, new_backtrace()).into()); } functions.insert(name, asg_function); diff --git a/asg/src/scope.rs b/asg/src/scope.rs index ea83b3c019..ec1bc3b9bc 100644 --- a/asg/src/scope.rs +++ b/asg/src/scope.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use crate::{AsgContext, Circuit, DefinitionStatement, Function, Input, Type, Variable}; -use leo_errors::{AsgError, Result, Span}; +use leo_errors::{new_backtrace, AsgError, Result, Span}; use indexmap::IndexMap; use std::cell::{Cell, RefCell}; @@ -189,7 +189,7 @@ impl<'a> Scope<'a> { let dimension = dimension .value .parse::() - .map_err(|_| AsgError::parse_index_error(span))?; + .map_err(|_| AsgError::parse_index_error(span, new_backtrace()))?; item = Box::new(Type::Array(item, dimension)); } *item @@ -202,15 +202,15 @@ impl<'a> Scope<'a> { ), Circuit(name) if name.name.as_ref() == "Self" => Type::Circuit( self.resolve_circuit_self() - .ok_or_else(|| AsgError::unresolved_circuit(&name.name, &name.span))?, + .ok_or_else(|| AsgError::unresolved_circuit(&name.name, &name.span, new_backtrace()))?, ), SelfType => Type::Circuit( self.resolve_circuit_self() - .ok_or_else(|| AsgError::reference_self_outside_circuit(span))?, + .ok_or_else(|| AsgError::reference_self_outside_circuit(span, new_backtrace()))?, ), Circuit(name) => Type::Circuit( self.resolve_circuit(&name.name) - .ok_or_else(|| AsgError::unresolved_circuit(&name.name, &name.span))?, + .ok_or_else(|| AsgError::unresolved_circuit(&name.name, &name.span, new_backtrace()))?, ), }) } diff --git a/asg/src/statement/assign.rs b/asg/src/statement/assign.rs index 76e76df82b..7a25c93ceb 100644 --- a/asg/src/statement/assign.rs +++ b/asg/src/statement/assign.rs @@ -32,7 +32,7 @@ use crate::{ }; pub use leo_ast::AssignOperation; use leo_ast::AssigneeAccess as AstAssigneeAccess; -use leo_errors::{AsgError, Result, Span}; +use leo_errors::{new_backtrace, AsgError, Result, Span}; use std::cell::Cell; @@ -78,17 +78,18 @@ impl<'a> FromAst<'a, leo_ast::AssignStatement> for &'a Statement<'a> { return Err(AsgError::illegal_input_variable_reference( "attempted to reference input when none is in scope", &statement.span, + new_backtrace(), ) .into()); } } else { scope .resolve_variable(name) - .ok_or_else(|| AsgError::unresolved_reference(name, span))? + .ok_or_else(|| AsgError::unresolved_reference(name, span, new_backtrace()))? }; if !variable.borrow().mutable { - return Err(AsgError::immutable_assignment(name, &statement.span).into()); + return Err(AsgError::immutable_assignment(name, &statement.span, new_backtrace()).into()); } let mut target_type: Option = Some(variable.borrow().type_.clone().into()); @@ -123,13 +124,23 @@ impl<'a> FromAst<'a, leo_ast::AssignStatement> for &'a Statement<'a> { ) { let left = match left { ConstValue::Int(x) => x.to_usize().ok_or_else(|| { - AsgError::invalid_assign_index(name, x.to_string(), &statement.span) + AsgError::invalid_assign_index( + name, + x.to_string(), + &statement.span, + new_backtrace(), + ) })?, _ => unimplemented!(), }; let right = match right { ConstValue::Int(x) => x.to_usize().ok_or_else(|| { - AsgError::invalid_assign_index(name, x.to_string(), &statement.span) + AsgError::invalid_assign_index( + name, + x.to_string(), + &statement.span, + new_backtrace(), + ) })?, _ => unimplemented!(), }; @@ -141,12 +152,13 @@ impl<'a> FromAst<'a, leo_ast::AssignStatement> for &'a Statement<'a> { left, right, &statement.span, + new_backtrace(), ) .into()); } } } - _ => return Err(AsgError::index_into_non_array(name, &statement.span).into()), + _ => return Err(AsgError::index_into_non_array(name, &statement.span, new_backtrace()).into()), } AssignAccess::ArrayRange(Cell::new(left), Cell::new(right)) @@ -154,7 +166,7 @@ impl<'a> FromAst<'a, leo_ast::AssignStatement> for &'a Statement<'a> { AstAssigneeAccess::ArrayIndex(index) => { target_type = match target_type.clone() { Some(PartialType::Array(item, _)) => item.map(|x| *x), - _ => return Err(AsgError::index_into_non_array(name, &statement.span).into()), + _ => return Err(AsgError::index_into_non_array(name, &statement.span, new_backtrace()).into()), }; AssignAccess::ArrayIndex(Cell::new(<&Expression<'a>>::from_ast( scope, @@ -166,13 +178,12 @@ impl<'a> FromAst<'a, leo_ast::AssignStatement> for &'a Statement<'a> { let index = index .value .parse::() - .map_err(|_| AsgError::parse_index_error(span))?; + .map_err(|_| AsgError::parse_index_error(span, new_backtrace()))?; target_type = match target_type { - Some(PartialType::Tuple(types)) => types - .get(index) - .cloned() - .ok_or_else(|| AsgError::tuple_index_out_of_bounds(index, &statement.span))?, - _ => return Err(AsgError::index_into_non_tuple(name, &statement.span).into()), + Some(PartialType::Tuple(types)) => types.get(index).cloned().ok_or_else(|| { + AsgError::tuple_index_out_of_bounds(index, &statement.span, new_backtrace()) + })?, + _ => return Err(AsgError::index_into_non_tuple(name, &statement.span, new_backtrace()).into()), }; AssignAccess::Tuple(index) } @@ -187,13 +198,19 @@ impl<'a> FromAst<'a, leo_ast::AssignStatement> for &'a Statement<'a> { &circuit.name.borrow().name, &name.name, &statement.span, + new_backtrace(), ) })?; let x = match &member { CircuitMember::Variable(type_) => type_.clone(), CircuitMember::Function(_) => { - return Err(AsgError::illegal_function_assign(&name.name, &statement.span).into()); + return Err(AsgError::illegal_function_assign( + &name.name, + &statement.span, + new_backtrace(), + ) + .into()); } }; Some(x.partial()) @@ -202,6 +219,7 @@ impl<'a> FromAst<'a, leo_ast::AssignStatement> for &'a Statement<'a> { return Err(AsgError::index_into_non_tuple( &statement.assignee.identifier.name, &statement.span, + new_backtrace(), ) .into()); } diff --git a/asg/src/statement/definition.rs b/asg/src/statement/definition.rs index 6a5f222ed3..b32db5816c 100644 --- a/asg/src/statement/definition.rs +++ b/asg/src/statement/definition.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use crate::{Expression, ExpressionNode, FromAst, InnerVariable, Node, PartialType, Scope, Statement, Type, Variable}; -use leo_errors::{AsgError, Result, Span}; +use leo_errors::{new_backtrace, AsgError, Result, Span}; use std::cell::{Cell, RefCell}; @@ -71,7 +71,7 @@ impl<'a> FromAst<'a, leo_ast::DefinitionStatement> for &'a Statement<'a> { .collect::>() .join(" ,"); - return Err(AsgError::invalid_const_assign(var_names, &statement.span).into()); + return Err(AsgError::invalid_const_assign(var_names, &statement.span, new_backtrace()).into()); } let type_ = type_.or_else(|| value.get_type()); @@ -83,6 +83,7 @@ impl<'a> FromAst<'a, leo_ast::DefinitionStatement> for &'a Statement<'a> { return Err(AsgError::illegal_ast_structure( "cannot have 0 variable names in destructuring tuple", &statement.span, + new_backtrace(), ) .into()); } @@ -100,6 +101,7 @@ impl<'a> FromAst<'a, leo_ast::DefinitionStatement> for &'a Statement<'a> { format!("{}-ary tuple", statement.variable_names.len()), type_.map(|x| x.to_string()).unwrap_or_else(|| "unknown".to_string()), &statement.span, + new_backtrace(), ) .into()); } @@ -110,7 +112,9 @@ impl<'a> FromAst<'a, leo_ast::DefinitionStatement> for &'a Statement<'a> { variables.push(&*scope.context.alloc_variable(RefCell::new(InnerVariable { id: scope.context.get_id(), name: variable.identifier.clone(), - type_: type_.ok_or_else(|| AsgError::unresolved_type(&variable.identifier.name, &statement.span))?, + type_: type_.ok_or_else(|| { + AsgError::unresolved_type(&variable.identifier.name, &statement.span, new_backtrace()) + })?, mutable: variable.mutable, const_: false, declaration: crate::VariableDeclaration::Definition, @@ -123,7 +127,7 @@ impl<'a> FromAst<'a, leo_ast::DefinitionStatement> for &'a Statement<'a> { let mut variables = scope.variables.borrow_mut(); let var_name = variable.borrow().name.name.to_string(); if variables.contains_key(&var_name) { - return Err(AsgError::duplicate_variable_definition(var_name, &statement.span).into()); + return Err(AsgError::duplicate_variable_definition(var_name, &statement.span, new_backtrace()).into()); } variables.insert(var_name, *variable); diff --git a/asg/src/statement/iteration.rs b/asg/src/statement/iteration.rs index 27de5b4deb..2177943a5d 100644 --- a/asg/src/statement/iteration.rs +++ b/asg/src/statement/iteration.rs @@ -17,7 +17,7 @@ use leo_ast::IntegerType; use crate::{Expression, ExpressionNode, FromAst, InnerVariable, Node, PartialType, Scope, Statement, Variable}; -use leo_errors::{AsgError, Result, Span}; +use leo_errors::{new_backtrace, AsgError, Result, Span}; use std::cell::{Cell, RefCell}; @@ -50,10 +50,14 @@ impl<'a> FromAst<'a, leo_ast::IterationStatement> for &'a Statement<'a> { // Return an error if start or stop is not constant. if !start.is_consty() { - return Err(AsgError::unexpected_nonconst(&start.span().cloned().unwrap_or_default()).into()); + return Err( + AsgError::unexpected_nonconst(&start.span().cloned().unwrap_or_default(), new_backtrace()).into(), + ); } if !stop.is_consty() { - return Err(AsgError::unexpected_nonconst(&stop.span().cloned().unwrap_or_default()).into()); + return Err( + AsgError::unexpected_nonconst(&stop.span().cloned().unwrap_or_default(), new_backtrace()).into(), + ); } let variable = scope.context.alloc_variable(RefCell::new(InnerVariable { @@ -61,7 +65,7 @@ impl<'a> FromAst<'a, leo_ast::IterationStatement> for &'a Statement<'a> { name: statement.variable.clone(), type_: start .get_type() - .ok_or_else(|| AsgError::unresolved_type(&statement.variable.name, &statement.span))?, + .ok_or_else(|| AsgError::unresolved_type(&statement.variable.name, &statement.span, new_backtrace()))?, mutable: false, const_: true, declaration: crate::VariableDeclaration::IterationDefinition, diff --git a/ast/Cargo.toml b/ast/Cargo.toml index 96fcd30d0b..845221644a 100644 --- a/ast/Cargo.toml +++ b/ast/Cargo.toml @@ -25,9 +25,6 @@ version = "1.5.3" path = "../errors" version = "1.5.3" -[dependencies.backtrace] -version = "0.3.61" - [dependencies.indexmap] version = "1.7.0" features = [ "serde-1" ] diff --git a/ast/src/lib.rs b/ast/src/lib.rs index 11e25a8adf..b7272eed87 100644 --- a/ast/src/lib.rs +++ b/ast/src/lib.rs @@ -62,9 +62,7 @@ pub use self::types::*; mod node; pub use node::*; -use leo_errors::{AstError, Result}; - -use backtrace::Backtrace; +use leo_errors::{new_backtrace, AstError, Result}; /// The abstract syntax tree (AST) for a Leo program. /// @@ -101,30 +99,30 @@ impl Ast { /// Serializes the ast into a JSON string. pub fn to_json_string(&self) -> Result { Ok(serde_json::to_string_pretty(&self.ast) - .map_err(|e| AstError::failed_to_convert_ast_to_json_string(&e, Backtrace::new()))?) + .map_err(|e| AstError::failed_to_convert_ast_to_json_string(&e, new_backtrace()))?) } /// Serializes the ast into a JSON file. pub fn to_json_file(&self, mut path: std::path::PathBuf, file_name: &str) -> Result<()> { path.push(file_name); let file = std::fs::File::create(&path) - .map_err(|e| AstError::failed_to_create_ast_json_file(&path, &e, Backtrace::new()))?; + .map_err(|e| AstError::failed_to_create_ast_json_file(&path, &e, new_backtrace()))?; let writer = std::io::BufWriter::new(file); Ok(serde_json::to_writer_pretty(writer, &self.ast) - .map_err(|e| AstError::failed_to_write_ast_to_json_file(&path, &e, Backtrace::new()))?) + .map_err(|e| AstError::failed_to_write_ast_to_json_file(&path, &e, new_backtrace()))?) } /// Deserializes the JSON string into a ast. pub fn from_json_string(json: &str) -> Result { - let ast: Program = serde_json::from_str(json) - .map_err(|e| AstError::failed_to_read_json_string_to_ast(&e, Backtrace::new()))?; + let ast: Program = + serde_json::from_str(json).map_err(|e| AstError::failed_to_read_json_string_to_ast(&e, new_backtrace()))?; Ok(Self { ast }) } /// Deserializes the JSON string into a ast from a file. pub fn from_json_file(path: std::path::PathBuf) -> Result { let data = std::fs::read_to_string(&path) - .map_err(|e| AstError::failed_to_read_json_file(&path, &e, Backtrace::new()))?; + .map_err(|e| AstError::failed_to_read_json_file(&path, &e, new_backtrace()))?; Self::from_json_string(&data) } } diff --git a/ast/src/reducer/canonicalization.rs b/ast/src/reducer/canonicalization.rs index b958cc4b72..459020cb31 100644 --- a/ast/src/reducer/canonicalization.rs +++ b/ast/src/reducer/canonicalization.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use crate::*; -use leo_errors::{AstError, Result, Span}; +use leo_errors::{new_backtrace, AstError, Result, Span}; /// Replace Self when it is in a enclosing circuit type. /// Error when Self is outside an enclosing circuit type. @@ -469,7 +469,7 @@ impl ReconstructingReducer for Canonicalizer { match new { Type::Array(type_, mut dimensions) => { if dimensions.is_zero() { - return Err(AstError::invalid_array_dimension_size(span).into()); + return Err(AstError::invalid_array_dimension_size(span, new_backtrace()).into()); } let mut next = Type::Array(type_, ArrayDimensions(vec![dimensions.remove_last().unwrap()])); @@ -486,14 +486,16 @@ impl ReconstructingReducer for Canonicalizer { Ok(array) } - Type::SelfType if !self.in_circuit => Err(AstError::big_self_outside_of_circuit(span).into()), + Type::SelfType if !self.in_circuit => { + Err(AstError::big_self_outside_of_circuit(span, new_backtrace()).into()) + } _ => Ok(new.clone()), } } fn reduce_string(&mut self, string: &[Char], span: &Span) -> Result { if string.is_empty() { - return Err(AstError::empty_string(span).into()); + return Err(AstError::empty_string(span, new_backtrace()).into()); } let mut elements = Vec::new(); @@ -552,7 +554,7 @@ impl ReconstructingReducer for Canonicalizer { element: Expression, ) -> Result { if array_init.dimensions.is_zero() { - return Err(AstError::invalid_array_dimension_size(&array_init.span).into()); + return Err(AstError::invalid_array_dimension_size(&array_init.span, new_backtrace()).into()); } let element = Box::new(element); diff --git a/ast/src/reducer/reconstructing_director.rs b/ast/src/reducer/reconstructing_director.rs index 15601cddb5..6d44194915 100644 --- a/ast/src/reducer/reconstructing_director.rs +++ b/ast/src/reducer/reconstructing_director.rs @@ -19,7 +19,7 @@ use crate::*; use indexmap::IndexMap; -use leo_errors::{AstError, Result, Span}; +use leo_errors::{new_backtrace, AstError, Result, Span}; pub struct ReconstructingDirector { reducer: R, @@ -386,7 +386,7 @@ impl ReconstructingDirector { match &console_function_call.function { ConsoleFunction::Error(_) => ConsoleFunction::Error(formatted), ConsoleFunction::Log(_) => ConsoleFunction::Log(formatted), - _ => return Err(AstError::impossible_console_assert_call(&args.span).into()), + _ => return Err(AstError::impossible_console_assert_call(&args.span, new_backtrace()).into()), } } }; diff --git a/compiler/Cargo.toml b/compiler/Cargo.toml index 31ed940610..e876794943 100644 --- a/compiler/Cargo.toml +++ b/compiler/Cargo.toml @@ -84,9 +84,6 @@ default-features = false [dependencies.snarkvm-utilities] version = "0.7.4" -[dependencies.backtrace] -version = "0.3.61" - [dependencies.bincode] version = "1.3" @@ -109,9 +106,6 @@ version = "1.0" [dependencies.sha2] version = "0.9" -[dependencies.thiserror] -version = "1.0" - [dependencies.tracing] version = "0.1" diff --git a/compiler/src/compiler.rs b/compiler/src/compiler.rs index b5e37be810..f3767c8fe0 100644 --- a/compiler/src/compiler.rs +++ b/compiler/src/compiler.rs @@ -27,7 +27,7 @@ use crate::{ pub use leo_asg::{new_context, AsgContext as Context, AsgContext}; use leo_asg::{Asg, AsgPass, Program as AsgProgram}; use leo_ast::{Input, MainInput, Program as AstProgram}; -use leo_errors::{CompilerError, LeoError}; +use leo_errors::{new_backtrace, CompilerError, Result}; use leo_input::LeoInputParser; use leo_package::inputs::InputPairs; use leo_parser::parse_ast; @@ -37,7 +37,6 @@ use snarkvm_dpc::testnet1::{instantiated::Components, parameters::SystemParamete use snarkvm_fields::PrimeField; use snarkvm_r1cs::{ConstraintSynthesizer, ConstraintSystem, SynthesisError}; -use backtrace::Backtrace; use sha2::{Digest, Sha256}; use std::{ fs, @@ -114,7 +113,7 @@ impl<'a, F: PrimeField, G: GroupType> Compiler<'a, F, G> { context: AsgContext<'a>, options: Option, ast_snapshot_options: Option, - ) -> Result { + ) -> Result { let mut compiler = Self::new( package_name, main_file_path, @@ -153,7 +152,7 @@ impl<'a, F: PrimeField, G: GroupType> Compiler<'a, F, G> { context: AsgContext<'a>, options: Option, ast_snapshot_options: Option, - ) -> Result { + ) -> Result { let mut compiler = Self::new( package_name, main_file_path, @@ -181,7 +180,7 @@ impl<'a, F: PrimeField, G: GroupType> Compiler<'a, F, G> { input_path: &Path, state_string: &str, state_path: &Path, - ) -> Result<(), LeoError> { + ) -> Result<()> { let input_syntax_tree = LeoInputParser::parse_file(input_string).map_err(|mut e| { e.set_path( input_path.to_str().unwrap_or_default(), @@ -224,10 +223,10 @@ impl<'a, F: PrimeField, G: GroupType> Compiler<'a, F, G> { /// /// Parses and stores all programs imported by the main program file. /// - pub fn parse_program(&mut self) -> Result<(), LeoError> { + pub fn parse_program(&mut self) -> Result<()> { // Load the program file. let content = fs::read_to_string(&self.main_file_path) - .map_err(|e| CompilerError::file_read_error(self.main_file_path.clone(), e, Backtrace::new()))?; + .map_err(|e| CompilerError::file_read_error(self.main_file_path.clone(), e, new_backtrace()))?; self.parse_program_from_string(&content) } @@ -236,7 +235,7 @@ impl<'a, F: PrimeField, G: GroupType> Compiler<'a, F, G> { /// Equivalent to parse_and_check_program but uses the given program_string instead of a main /// file path. /// - pub fn parse_program_from_string(&mut self, program_string: &str) -> Result<(), LeoError> { + pub fn parse_program_from_string(&mut self, program_string: &str) -> Result<()> { // Use the parser to construct the abstract syntax tree (ast). let mut ast: leo_ast::Ast = parse_ast(self.main_file_path.to_str().unwrap_or_default(), program_string)?; @@ -287,7 +286,7 @@ impl<'a, F: PrimeField, G: GroupType> Compiler<'a, F, G> { /// /// Run compiler optimization passes on the program in asg format. /// - fn do_asg_passes(&mut self) -> Result<(), LeoError> { + fn do_asg_passes(&mut self) -> Result<()> { assert!(self.asg.is_some()); // Do constant folding. @@ -308,24 +307,24 @@ impl<'a, F: PrimeField, G: GroupType> Compiler<'a, F, G> { /// /// Synthesizes the circuit with program input to verify correctness. /// - pub fn compile_constraints>(&self, cs: &mut CS) -> Result { + pub fn compile_constraints>(&self, cs: &mut CS) -> Result { generate_constraints::(cs, self.asg.as_ref().unwrap(), &self.program_input) } /// /// Synthesizes the circuit for test functions with program input. /// - pub fn compile_test_constraints(self, input_pairs: InputPairs) -> Result<(u32, u32), LeoError> { + pub fn compile_test_constraints(self, input_pairs: InputPairs) -> Result<(u32, u32)> { generate_test_constraints::(self.asg.as_ref().unwrap(), input_pairs, &self.output_directory) } /// /// Returns a SHA256 checksum of the program file. /// - pub fn checksum(&self) -> Result { + pub fn checksum(&self) -> Result { // Read in the main file as string let unparsed_file = fs::read_to_string(&self.main_file_path) - .map_err(|e| CompilerError::file_read_error(self.main_file_path.clone(), e, Backtrace::new()))?; + .map_err(|e| CompilerError::file_read_error(self.main_file_path.clone(), e, new_backtrace()))?; // Hash the file contents let mut hasher = Sha256::new(); @@ -340,10 +339,7 @@ impl<'a, F: PrimeField, G: GroupType> Compiler<'a, F, G> { /// /// Verifies the input to the program. /// - pub fn verify_local_data_commitment( - &self, - system_parameters: &SystemParameters, - ) -> Result { + pub fn verify_local_data_commitment(&self, system_parameters: &SystemParameters) -> Result { // TODO CONVERT STATE ERROR TO LEO ERROR let result = verify_local_data_commitment(system_parameters, &self.program_input).unwrap(); // .map_err(|e| SnarkVMError::new(e))?; diff --git a/compiler/src/console/assert.rs b/compiler/src/console/assert.rs index 0d2e278764..f17f1e0398 100644 --- a/compiler/src/console/assert.rs +++ b/compiler/src/console/assert.rs @@ -18,7 +18,7 @@ use crate::{get_indicator_value, program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::Expression; -use leo_errors::{CompilerError, LeoError, Span}; +use leo_errors::{new_backtrace, CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::boolean::Boolean; @@ -31,7 +31,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { indicator: &Boolean, expression: &'a Expression<'a>, span: &Span, - ) -> Result<(), LeoError> { + ) -> Result<()> { // Evaluate assert expression let assert_expression = self.enforce_expression(cs, expression)?; @@ -45,13 +45,14 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let result_option = match assert_expression { ConstrainedValue::Boolean(boolean) => boolean.get_value(), _ => { - return Err(CompilerError::console_assertion_must_be_boolean(span).into()); + return Err(CompilerError::console_assertion_must_be_boolean(span, new_backtrace()).into()); } }; - let result_bool = result_option.ok_or_else(|| CompilerError::console_assertion_depends_on_input(span))?; + let result_bool = + result_option.ok_or_else(|| CompilerError::console_assertion_depends_on_input(span, new_backtrace()))?; if !result_bool { - return Err(CompilerError::console_assertion_failed(span).into()); + return Err(CompilerError::console_assertion_failed(span, new_backtrace()).into()); } Ok(()) diff --git a/compiler/src/console/console.rs b/compiler/src/console/console.rs index e4ada0afbb..89184f91af 100644 --- a/compiler/src/console/console.rs +++ b/compiler/src/console/console.rs @@ -18,7 +18,7 @@ use crate::{program::ConstrainedProgram, statement::get_indicator_value, GroupType}; use leo_asg::{ConsoleFunction, ConsoleStatement}; -use leo_errors::LeoError; +use leo_errors::Result; use snarkvm_fields::PrimeField; use snarkvm_gadgets::boolean::Boolean; @@ -30,7 +30,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { cs: &mut CS, indicator: &Boolean, console: &ConsoleStatement<'a>, - ) -> Result<(), LeoError> { + ) -> Result<()> { match &console.function { ConsoleFunction::Assert(expression) => { self.evaluate_console_assert( diff --git a/compiler/src/console/format.rs b/compiler/src/console/format.rs index 22711bde43..a3ee97b32a 100644 --- a/compiler/src/console/format.rs +++ b/compiler/src/console/format.rs @@ -18,13 +18,13 @@ use crate::{program::ConstrainedProgram, GroupType}; use leo_asg::{CharValue, ConsoleArgs}; -use leo_errors::{CompilerError, LeoError}; +use leo_errors::{new_backtrace, CompilerError, Result}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { - pub fn format>(&mut self, cs: &mut CS, args: &ConsoleArgs<'a>) -> Result { + pub fn format>(&mut self, cs: &mut CS, args: &ConsoleArgs<'a>) -> Result { let mut out = Vec::new(); let mut in_container = false; let mut substring = String::new(); @@ -55,6 +55,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { arg_index + 1, args.parameters.len(), &args.span, + new_backtrace(), ) .into()); } @@ -68,12 +69,20 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { substring.push('}'); escape_right_bracket = true; } else { - return Err(CompilerError::console_fmt_expected_escaped_right_brace(&args.span).into()); + return Err(CompilerError::console_fmt_expected_escaped_right_brace( + &args.span, + new_backtrace(), + ) + .into()); } } } _ if in_container => { - return Err(CompilerError::console_fmt_expected_left_or_right_brace(&args.span).into()); + return Err(CompilerError::console_fmt_expected_left_or_right_brace( + &args.span, + new_backtrace(), + ) + .into()); } _ => substring.push(*scalar), }, @@ -91,6 +100,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { arg_index, args.parameters.len(), &args.span, + new_backtrace(), ) .into()); } diff --git a/compiler/src/constraints/constraints.rs b/compiler/src/constraints/constraints.rs index 20479f683d..35aef9401d 100644 --- a/compiler/src/constraints/constraints.rs +++ b/compiler/src/constraints/constraints.rs @@ -19,11 +19,10 @@ use crate::{ConstrainedProgram, GroupType, Output, OutputFile}; use leo_asg::Program; use leo_ast::Input; -use leo_errors::{CompilerError, LeoError}; +use leo_errors::{new_backtrace, CompilerError, Result}; use leo_input::LeoInputParser; use leo_package::inputs::InputPairs; -use backtrace::Backtrace; use snarkvm_fields::PrimeField; use snarkvm_r1cs::{ConstraintSystem, TestConstraintSystem}; use std::path::Path; @@ -32,7 +31,7 @@ pub fn generate_constraints<'a, F: PrimeField, G: GroupType, CS: ConstraintSy cs: &mut CS, program: &Program<'a>, input: &Input, -) -> Result { +) -> Result { let mut resolved_program = ConstrainedProgram::::new(program.clone()); for (_, global_const) in program.global_consts.iter() { @@ -49,7 +48,7 @@ pub fn generate_constraints<'a, F: PrimeField, G: GroupType, CS: ConstraintSy let result = resolved_program.enforce_main_function(cs, function, input)?; Ok(result) } - _ => Err(CompilerError::no_main_function(Backtrace::new()).into()), + _ => Err(CompilerError::no_main_function(new_backtrace()).into()), } } @@ -57,7 +56,7 @@ pub fn generate_test_constraints<'a, F: PrimeField, G: GroupType>( program: &Program<'a>, input: InputPairs, output_directory: &Path, -) -> Result<(u32, u32), LeoError> { +) -> Result<(u32, u32)> { let mut resolved_program = ConstrainedProgram::::new(program.clone()); let program_name = program.name.clone(); @@ -104,11 +103,11 @@ pub fn generate_test_constraints<'a, F: PrimeField, G: GroupType>( { Some(pair) => pair.to_owned(), None => { - return Err(CompilerError::invalid_test_context(file_name, Backtrace::new()).into()); + return Err(CompilerError::invalid_test_context(file_name, new_backtrace()).into()); } } } - None => default.ok_or_else(|| CompilerError::no_test_input(Backtrace::new()))?, + None => default.ok_or_else(|| CompilerError::no_test_input(new_backtrace()))?, }; // parse input files to abstract syntax trees diff --git a/compiler/src/expression/arithmetic/add.rs b/compiler/src/expression/arithmetic/add.rs index 211c2b2f62..79807b2019 100644 --- a/compiler/src/expression/arithmetic/add.rs +++ b/compiler/src/expression/arithmetic/add.rs @@ -17,7 +17,7 @@ //! Enforces an arithmetic `+` operator in a resolved Leo program. use crate::{value::ConstrainedValue, GroupType}; -use leo_errors::{CompilerError, LeoError, Span}; +use leo_errors::{new_backtrace, CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -27,7 +27,7 @@ pub fn enforce_add<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( left: ConstrainedValue<'a, F, G>, right: ConstrainedValue<'a, F, G>, span: &Span, -) -> Result, LeoError> { +) -> Result> { match (left, right) { (ConstrainedValue::Integer(num_1), ConstrainedValue::Integer(num_2)) => { Ok(ConstrainedValue::Integer(num_1.add(cs, num_2, span)?)) @@ -38,6 +38,10 @@ pub fn enforce_add<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( (ConstrainedValue::Group(point_1), ConstrainedValue::Group(point_2)) => { Ok(ConstrainedValue::Group(point_1.add(cs, &point_2, span)?)) } - (val_1, val_2) => return Err(CompilerError::incompatible_types(format!("{} + {}", val_1, val_2), span).into()), + (val_1, val_2) => { + return Err( + CompilerError::incompatible_types(format!("{} + {}", val_1, val_2), span, new_backtrace()).into(), + ); + } } } diff --git a/compiler/src/expression/arithmetic/bit_not.rs b/compiler/src/expression/arithmetic/bit_not.rs index 0aa4defcd9..8e97afdb88 100644 --- a/compiler/src/expression/arithmetic/bit_not.rs +++ b/compiler/src/expression/arithmetic/bit_not.rs @@ -17,13 +17,13 @@ //! Enforces a logical `!` operator in a resolved Leo program. use crate::{value::ConstrainedValue, GroupType}; -use leo_errors::{CompilerError, LeoError, Span}; +use leo_errors::{new_backtrace, CompilerError, Result, Span}; use snarkvm_fields::PrimeField; pub fn evaluate_bit_not<'a, F: PrimeField, G: GroupType>( value: ConstrainedValue<'a, F, G>, span: &Span, -) -> Result, LeoError> { - return Err(CompilerError::cannot_evaluate_expression(format!("!{}", value), span).into()); +) -> Result> { + return Err(CompilerError::cannot_evaluate_expression(format!("!{}", value), span, new_backtrace()).into()); } diff --git a/compiler/src/expression/arithmetic/div.rs b/compiler/src/expression/arithmetic/div.rs index df5109946a..9e2a6be9a6 100644 --- a/compiler/src/expression/arithmetic/div.rs +++ b/compiler/src/expression/arithmetic/div.rs @@ -17,7 +17,7 @@ //! Enforces an arithmetic `/` operator in a resolved Leo program. use crate::{value::ConstrainedValue, GroupType}; -use leo_errors::{CompilerError, LeoError, Span}; +use leo_errors::{new_backtrace, CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -27,7 +27,7 @@ pub fn enforce_div<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( left: ConstrainedValue<'a, F, G>, right: ConstrainedValue<'a, F, G>, span: &Span, -) -> Result, LeoError> { +) -> Result> { match (left, right) { (ConstrainedValue::Integer(num_1), ConstrainedValue::Integer(num_2)) => { Ok(ConstrainedValue::Integer(num_1.div(cs, num_2, span)?)) @@ -36,7 +36,9 @@ pub fn enforce_div<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( Ok(ConstrainedValue::Field(field_1.div(cs, &field_2, span)?)) } (val_1, val_2) => { - return Err(CompilerError::incompatible_types(format!("{} / {}", val_1, val_2,), span).into()); + return Err( + CompilerError::incompatible_types(format!("{} / {}", val_1, val_2,), span, new_backtrace()).into(), + ); } } } diff --git a/compiler/src/expression/arithmetic/mul.rs b/compiler/src/expression/arithmetic/mul.rs index dee25df379..1a6921c6aa 100644 --- a/compiler/src/expression/arithmetic/mul.rs +++ b/compiler/src/expression/arithmetic/mul.rs @@ -17,7 +17,7 @@ //! Enforces an arithmetic `*` operator in a resolved Leo program. use crate::{value::ConstrainedValue, GroupType}; -use leo_errors::{CompilerError, LeoError, Span}; +use leo_errors::{new_backtrace, CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -27,7 +27,7 @@ pub fn enforce_mul<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( left: ConstrainedValue<'a, F, G>, right: ConstrainedValue<'a, F, G>, span: &Span, -) -> Result, LeoError> { +) -> Result> { match (left, right) { (ConstrainedValue::Integer(num_1), ConstrainedValue::Integer(num_2)) => { Ok(ConstrainedValue::Integer(num_1.mul(cs, num_2, span)?)) @@ -35,6 +35,10 @@ pub fn enforce_mul<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( (ConstrainedValue::Field(field_1), ConstrainedValue::Field(field_2)) => { Ok(ConstrainedValue::Field(field_1.mul(cs, &field_2, span)?)) } - (val_1, val_2) => return Err(CompilerError::incompatible_types(format!("{} * {}", val_1, val_2), span).into()), + (val_1, val_2) => { + return Err( + CompilerError::incompatible_types(format!("{} * {}", val_1, val_2), span, new_backtrace()).into(), + ); + } } } diff --git a/compiler/src/expression/arithmetic/negate.rs b/compiler/src/expression/arithmetic/negate.rs index 2c041a73a0..db99bbb06d 100644 --- a/compiler/src/expression/arithmetic/negate.rs +++ b/compiler/src/expression/arithmetic/negate.rs @@ -17,7 +17,7 @@ //! Enforces a unary negate `-` operator in a resolved Leo program. use crate::{value::ConstrainedValue, GroupType}; -use leo_errors::{CompilerError, LeoError, Span}; +use leo_errors::{new_backtrace, CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -26,11 +26,11 @@ pub fn enforce_negate<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem, span: &Span, -) -> Result, LeoError> { +) -> Result> { match value { ConstrainedValue::Integer(integer) => Ok(ConstrainedValue::Integer(integer.negate(cs, span)?)), ConstrainedValue::Field(field) => Ok(ConstrainedValue::Field(field.negate(cs, span)?)), ConstrainedValue::Group(group) => Ok(ConstrainedValue::Group(group.negate(cs, span)?)), - value => return Err(CompilerError::incompatible_types(format!("-{}", value), span).into()), + value => return Err(CompilerError::incompatible_types(format!("-{}", value), span, new_backtrace()).into()), } } diff --git a/compiler/src/expression/arithmetic/pow.rs b/compiler/src/expression/arithmetic/pow.rs index afc748709f..b7c1a77a45 100644 --- a/compiler/src/expression/arithmetic/pow.rs +++ b/compiler/src/expression/arithmetic/pow.rs @@ -17,7 +17,7 @@ //! Enforces an arithmetic `**` operator in a resolved Leo program. use crate::{value::ConstrainedValue, GroupType}; -use leo_errors::{CompilerError, LeoError, Span}; +use leo_errors::{new_backtrace, CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -27,13 +27,15 @@ pub fn enforce_pow<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( left: ConstrainedValue<'a, F, G>, right: ConstrainedValue<'a, F, G>, span: &Span, -) -> Result, LeoError> { +) -> Result> { match (left, right) { (ConstrainedValue::Integer(num_1), ConstrainedValue::Integer(num_2)) => { Ok(ConstrainedValue::Integer(num_1.pow(cs, num_2, span)?)) } (val_1, val_2) => { - return Err(CompilerError::incompatible_types(format!("{} ** {}", val_1, val_2,), span).into()); + return Err( + CompilerError::incompatible_types(format!("{} ** {}", val_1, val_2,), span, new_backtrace()).into(), + ); } } } diff --git a/compiler/src/expression/arithmetic/sub.rs b/compiler/src/expression/arithmetic/sub.rs index 9e3e036723..4b96642c06 100644 --- a/compiler/src/expression/arithmetic/sub.rs +++ b/compiler/src/expression/arithmetic/sub.rs @@ -17,7 +17,7 @@ //! Enforces an arithmetic `-` operator in a resolved Leo program. use crate::{value::ConstrainedValue, GroupType}; -use leo_errors::{CompilerError, LeoError, Span}; +use leo_errors::{new_backtrace, CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -27,7 +27,7 @@ pub fn enforce_sub<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( left: ConstrainedValue<'a, F, G>, right: ConstrainedValue<'a, F, G>, span: &Span, -) -> Result, LeoError> { +) -> Result> { match (left, right) { (ConstrainedValue::Integer(num_1), ConstrainedValue::Integer(num_2)) => { Ok(ConstrainedValue::Integer(num_1.sub(cs, num_2, span)?)) @@ -38,6 +38,10 @@ pub fn enforce_sub<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( (ConstrainedValue::Group(point_1), ConstrainedValue::Group(point_2)) => { Ok(ConstrainedValue::Group(point_1.sub(cs, &point_2, span)?)) } - (val_1, val_2) => return Err(CompilerError::incompatible_types(format!("{} - {}", val_1, val_2), span).into()), + (val_1, val_2) => { + return Err( + CompilerError::incompatible_types(format!("{} - {}", val_1, val_2), span, new_backtrace()).into(), + ); + } } } diff --git a/compiler/src/expression/array/access.rs b/compiler/src/expression/array/access.rs index 849d6f04c1..05845fb5e6 100644 --- a/compiler/src/expression/array/access.rs +++ b/compiler/src/expression/array/access.rs @@ -26,7 +26,7 @@ use crate::{ GroupType, }; use leo_asg::{ConstInt, Expression}; -use leo_errors::{CompilerError, LeoError, Span}; +use leo_errors::{new_backtrace, CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::{ @@ -45,7 +45,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { index_resolved: &Integer, array_len: u32, span: &Span, - ) -> Result<(), LeoError> { + ) -> Result<()> { let bounds_check = evaluate_lt::( cs, ConstrainedValue::Integer(index_resolved.clone()), @@ -62,7 +62,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let mut unique_namespace = cs.ns(|| namespace_string); bounds_check .enforce_equal(&mut unique_namespace, &Boolean::Constant(true)) - .map_err(|e| CompilerError::cannot_enforce_expression("array bounds check", e, span))?; + .map_err(|e| CompilerError::cannot_enforce_expression("array bounds check", e, span, new_backtrace()))?; Ok(()) } @@ -73,28 +73,28 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { array: &'a Expression<'a>, index: &'a Expression<'a>, span: &Span, - ) -> Result, LeoError> { + ) -> Result> { let mut array = match self.enforce_expression(cs, array)? { ConstrainedValue::Array(array) => array, - value => return Err(CompilerError::undefined_array(value.to_string(), span).into()), + value => return Err(CompilerError::undefined_array(value.to_string(), span, new_backtrace()).into()), }; let index_resolved = self.enforce_index(cs, index, span)?; if let Some(resolved) = index_resolved.to_usize() { if resolved >= array.len() { - return Err(CompilerError::array_index_out_of_bounds(resolved, span).into()); + return Err(CompilerError::array_index_out_of_bounds(resolved, span, new_backtrace()).into()); } Ok(array[resolved].to_owned()) } else { if array.is_empty() { - return Err(CompilerError::array_index_out_of_bounds(0, span).into()); + return Err(CompilerError::array_index_out_of_bounds(0, span, new_backtrace()).into()); } { let array_len: u32 = array .len() .try_into() - .map_err(|_| CompilerError::array_length_out_of_bounds(span))?; + .map_err(|_| CompilerError::array_length_out_of_bounds(span, new_backtrace()))?; self.array_bounds_check(cs, &index_resolved, array_len, span)?; } @@ -105,17 +105,19 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let index_bounded = i .try_into() - .map_err(|_| CompilerError::array_index_out_of_legal_bounds(span))?; + .map_err(|_| CompilerError::array_index_out_of_legal_bounds(span, new_backtrace()))?; let const_index = ConstInt::U32(index_bounded).cast_to(&index_resolved.get_type()); let index_comparison = index_resolved .evaluate_equal(eq_namespace, &Integer::new(&const_index)) - .map_err(|_| CompilerError::cannot_evaluate_expression("==", span))?; + .map_err(|_| CompilerError::cannot_evaluate_expression("==", span, new_backtrace()))?; let unique_namespace = cs.ns(|| format!("select array access {} {}:{}", i, span.line_start, span.col_start)); let value = ConstrainedValue::conditionally_select(unique_namespace, &index_comparison, &item, ¤t_value) - .map_err(|e| CompilerError::cannot_enforce_expression("conditional select", e, span))?; + .map_err(|e| { + CompilerError::cannot_enforce_expression("conditional select", e, span, new_backtrace()) + })?; current_value = value; } Ok(current_value) @@ -131,10 +133,10 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { right: Option<&'a Expression<'a>>, length: usize, span: &Span, - ) -> Result, LeoError> { + ) -> Result> { let array = match self.enforce_expression(cs, array)? { ConstrainedValue::Array(array) => array, - value => return Err(CompilerError::undefined_array(value, span).into()), + value => return Err(CompilerError::undefined_array(value, span, new_backtrace()).into()), }; let from_resolved = match left { @@ -147,7 +149,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let index_bounded: u32 = array .len() .try_into() - .map_err(|_| CompilerError::array_length_out_of_bounds(span))?; + .map_err(|_| CompilerError::array_length_out_of_bounds(span, new_backtrace()))?; Integer::new(&ConstInt::U32(index_bounded)) } // Array slice ends at array length }; @@ -159,10 +161,10 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { }; Ok(if let Some((left, right)) = const_dimensions { if right - left != length { - return Err(CompilerError::array_invalid_slice_length(span).into()); + return Err(CompilerError::array_invalid_slice_length(span, new_backtrace()).into()); } if right > array.len() { - return Err(CompilerError::array_index_out_of_bounds(right, span).into()); + return Err(CompilerError::array_index_out_of_bounds(right, span, new_backtrace()).into()); } ConstrainedValue::Array(array[left..right].to_owned()) } else { @@ -184,7 +186,9 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let mut unique_namespace = cs.ns(|| namespace_string); calc_len .enforce_equal(&mut unique_namespace, &Integer::new(&ConstInt::U32(length as u32))) - .map_err(|e| CompilerError::cannot_enforce_expression("array length check", e, span))?; + .map_err(|e| { + CompilerError::cannot_enforce_expression("array length check", e, span, new_backtrace()) + })?; } { let bounds_check = evaluate_le::( @@ -204,7 +208,9 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let mut unique_namespace = cs.ns(|| namespace_string); bounds_check .enforce_equal(&mut unique_namespace, &Boolean::Constant(true)) - .map_err(|e| CompilerError::cannot_enforce_expression("array bounds check", e, span))?; + .map_err(|e| { + CompilerError::cannot_enforce_expression("array bounds check", e, span, new_backtrace()) + })?; } let mut windows = array.windows(length); let mut result = ConstrainedValue::Array(vec![]); @@ -233,7 +239,9 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let unique_namespace = unique_namespace.ns(|| format!("array index {} {}:{}", i, span.line_start, span.col_start)); result = ConstrainedValue::conditionally_select(unique_namespace, &equality, &array_value, &result) - .map_err(|e| CompilerError::cannot_enforce_expression("conditional select", e, span))?; + .map_err(|e| { + CompilerError::cannot_enforce_expression("conditional select", e, span, new_backtrace()) + })?; } result }) diff --git a/compiler/src/expression/array/array.rs b/compiler/src/expression/array/array.rs index 960fb3b984..32ff507471 100644 --- a/compiler/src/expression/array/array.rs +++ b/compiler/src/expression/array/array.rs @@ -20,7 +20,7 @@ use std::cell::Cell; use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::Expression; -use leo_errors::{CompilerError, LeoError, Span}; +use leo_errors::{new_backtrace, CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -32,7 +32,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { cs: &mut CS, array: &[(Cell<&'a Expression<'a>>, bool)], span: &Span, - ) -> Result, LeoError> { + ) -> Result> { let expected_dimension: Option = None; let mut result = vec![]; @@ -52,7 +52,9 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { if let Some(dimension) = expected_dimension { // Return an error if the expected dimension != the actual dimension. if dimension != result.len() { - return Err(CompilerError::unexpected_array_length(dimension, result.len(), span).into()); + return Err( + CompilerError::unexpected_array_length(dimension, result.len(), span, new_backtrace()).into(), + ); } } @@ -68,7 +70,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { cs: &mut CS, element_expression: &'a Expression<'a>, actual_size: usize, - ) -> Result, LeoError> { + ) -> Result> { let mut value = self.enforce_expression(cs, element_expression)?; // Allocate the array. diff --git a/compiler/src/expression/array/index.rs b/compiler/src/expression/array/index.rs index 246df2e943..dce7c376b4 100644 --- a/compiler/src/expression/array/index.rs +++ b/compiler/src/expression/array/index.rs @@ -18,7 +18,7 @@ use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType, Integer}; use leo_asg::Expression; -use leo_errors::{CompilerError, LeoError, Span}; +use leo_errors::{new_backtrace, CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -29,10 +29,10 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { cs: &mut CS, index: &'a Expression<'a>, span: &Span, - ) -> Result { + ) -> Result { match self.enforce_expression(cs, index)? { ConstrainedValue::Integer(number) => Ok(number), - value => Err(CompilerError::invalid_index_expression(value, span).into()), + value => Err(CompilerError::invalid_index_expression(value, span, new_backtrace()).into()), } } } diff --git a/compiler/src/expression/binary/binary.rs b/compiler/src/expression/binary/binary.rs index f74d6ebfb8..be91649e3f 100644 --- a/compiler/src/expression/binary/binary.rs +++ b/compiler/src/expression/binary/binary.rs @@ -18,7 +18,7 @@ use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::Expression; -use leo_errors::LeoError; +use leo_errors::Result; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -32,7 +32,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { cs: &mut CS, left: &'a Expression<'a>, right: &'a Expression<'a>, - ) -> Result, LeoError> { + ) -> Result> { let resolved_left = { let mut left_namespace = cs.ns(|| "left".to_string()); self.enforce_expression(&mut left_namespace, left)? diff --git a/compiler/src/expression/circuit/access.rs b/compiler/src/expression/circuit/access.rs index bb2115c458..e5fb0bf066 100644 --- a/compiler/src/expression/circuit/access.rs +++ b/compiler/src/expression/circuit/access.rs @@ -18,7 +18,7 @@ use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::{CircuitAccessExpression, Node}; -use leo_errors::{CompilerError, LeoError}; +use leo_errors::{new_backtrace, CompilerError, Result}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -29,7 +29,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { &mut self, cs: &mut CS, expr: &CircuitAccessExpression<'a>, - ) -> Result, LeoError> { + ) -> Result> { if let Some(target) = expr.target.get() { //todo: we can prob pass values by ref here to avoid copying the entire circuit on access let target_value = self.enforce_expression(cs, target)?; @@ -43,18 +43,27 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { expr.circuit.get().name.borrow(), &expr.member.name, &expr.member.span, + new_backtrace(), ) .into()); } } value => { - return Err( - CompilerError::undefined_circuit(value, &target.span().cloned().unwrap_or_default()).into(), - ); + return Err(CompilerError::undefined_circuit( + value, + &target.span().cloned().unwrap_or_default(), + new_backtrace(), + ) + .into()); } } } else { - Err(CompilerError::invalid_circuit_static_member_access(&expr.member.name, &expr.member.span).into()) + Err(CompilerError::invalid_circuit_static_member_access( + &expr.member.name, + &expr.member.span, + new_backtrace(), + ) + .into()) } } } diff --git a/compiler/src/expression/circuit/circuit.rs b/compiler/src/expression/circuit/circuit.rs index a47ea9bb5d..e02b72cb49 100644 --- a/compiler/src/expression/circuit/circuit.rs +++ b/compiler/src/expression/circuit/circuit.rs @@ -22,7 +22,7 @@ use crate::{ GroupType, }; use leo_asg::{CircuitInitExpression, CircuitMember}; -use leo_errors::{CompilerError, LeoError, Span}; +use leo_errors::{new_backtrace, CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -33,7 +33,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { cs: &mut CS, expr: &CircuitInitExpression<'a>, span: &Span, - ) -> Result, LeoError> { + ) -> Result> { let circuit = expr.circuit.get(); let members = circuit.members.borrow(); @@ -50,7 +50,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { resolved_members.push(ConstrainedCircuitMember(name.clone(), variable_value)); } _ => { - return Err(CompilerError::expected_circuit_member(name, span).into()); + return Err(CompilerError::expected_circuit_member(name, span, new_backtrace()).into()); } } } diff --git a/compiler/src/expression/conditional/conditional.rs b/compiler/src/expression/conditional/conditional.rs index ab536e0a6b..c1fe131fef 100644 --- a/compiler/src/expression/conditional/conditional.rs +++ b/compiler/src/expression/conditional/conditional.rs @@ -18,7 +18,7 @@ use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::Expression; -use leo_errors::{CompilerError, LeoError, Span}; +use leo_errors::{new_backtrace, CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::traits::select::CondSelectGadget; @@ -34,11 +34,16 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { first: &'a Expression<'a>, second: &'a Expression<'a>, span: &Span, - ) -> Result, LeoError> { + ) -> Result> { let conditional_value = match self.enforce_expression(cs, conditional)? { ConstrainedValue::Boolean(resolved) => resolved, value => { - return Err(CompilerError::conditional_boolean_expression_fails_to_resolve_to_bool(value, span).into()); + return Err(CompilerError::conditional_boolean_expression_fails_to_resolve_to_bool( + value, + span, + new_backtrace(), + ) + .into()); } }; @@ -55,7 +60,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { Ok( ConstrainedValue::conditionally_select(unique_namespace, &conditional_value, &first_value, &second_value) - .map_err(|e| CompilerError::cannot_enforce_expression("conditional select", e, span))?, + .map_err(|e| CompilerError::cannot_enforce_expression("conditional select", e, span, new_backtrace()))?, ) } } diff --git a/compiler/src/expression/expression.rs b/compiler/src/expression/expression.rs index 6a5acd0f67..ceb42ffa6f 100644 --- a/compiler/src/expression/expression.rs +++ b/compiler/src/expression/expression.rs @@ -27,7 +27,7 @@ use crate::{ GroupType, }; use leo_asg::{expression::*, ConstValue, Expression, Node}; -use leo_errors::{LeoError, Span}; +use leo_errors::{Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::boolean::Boolean; @@ -39,7 +39,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { cs: &mut CS, value: &'a ConstValue<'a>, span: &Span, - ) -> Result, LeoError> { + ) -> Result> { Ok(match value { ConstValue::Address(value) => ConstrainedValue::Address(Address::constant(value.to_string(), span)?), ConstValue::Boolean(value) => ConstrainedValue::Boolean(Boolean::Constant(*value)), @@ -93,7 +93,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { &mut self, cs: &mut CS, expression: &'a Expression<'a>, - ) -> Result, LeoError> { + ) -> Result> { let span = &expression.span().cloned().unwrap_or_default(); match expression { // Cast diff --git a/compiler/src/expression/function/core_circuit.rs b/compiler/src/expression/function/core_circuit.rs index acfc84cb4e..3a596b132c 100644 --- a/compiler/src/expression/function/core_circuit.rs +++ b/compiler/src/expression/function/core_circuit.rs @@ -19,7 +19,7 @@ use std::cell::Cell; use crate::{program::ConstrainedProgram, value::ConstrainedValue, CoreCircuit, GroupType}; use leo_asg::{Expression, Function}; -use leo_errors::{LeoError, Span}; +use leo_errors::{Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -35,7 +35,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { target: Option<&'a Expression<'a>>, arguments: &[Cell<&'a Expression<'a>>], span: &Span, - ) -> Result, LeoError> { + ) -> Result> { let target_value = target.map(|target| self.enforce_expression(cs, target)).transpose()?; // Get the value of each core function argument diff --git a/compiler/src/expression/function/function.rs b/compiler/src/expression/function/function.rs index 0122f24107..538945ef81 100644 --- a/compiler/src/expression/function/function.rs +++ b/compiler/src/expression/function/function.rs @@ -20,7 +20,7 @@ use std::cell::Cell; use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::{Expression, Function}; -use leo_errors::{LeoError, Span}; +use leo_errors::{Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -34,7 +34,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { target: Option<&'a Expression<'a>>, arguments: &[Cell<&'a Expression<'a>>], span: &Span, - ) -> Result, LeoError> { + ) -> Result> { let name_unique = || { format!( "function call {} {}:{}", diff --git a/compiler/src/expression/logical/and.rs b/compiler/src/expression/logical/and.rs index 3175eb4c29..e7acefb64d 100644 --- a/compiler/src/expression/logical/and.rs +++ b/compiler/src/expression/logical/and.rs @@ -17,7 +17,7 @@ //! Enforces a logical `&&` operator in a resolved Leo program. use crate::{value::ConstrainedValue, GroupType}; -use leo_errors::{CompilerError, LeoError, Span}; +use leo_errors::{new_backtrace, CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::boolean::Boolean; @@ -28,7 +28,7 @@ pub fn enforce_and<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( left: ConstrainedValue<'a, F, G>, right: ConstrainedValue<'a, F, G>, span: &Span, -) -> Result, LeoError> { +) -> Result> { let name = format!("{} && {}", left, right); if let (ConstrainedValue::Boolean(left_bool), ConstrainedValue::Boolean(right_bool)) = (left, right) { @@ -37,10 +37,10 @@ pub fn enforce_and<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( &left_bool, &right_bool, ) - .map_err(|e| CompilerError::cannot_enforce_expression("&&", e, span))?; + .map_err(|e| CompilerError::cannot_enforce_expression("&&", e, span, new_backtrace()))?; return Ok(ConstrainedValue::Boolean(result)); } - Err(CompilerError::cannot_evaluate_expression(name, span).into()) + Err(CompilerError::cannot_evaluate_expression(name, span, new_backtrace()).into()) } diff --git a/compiler/src/expression/logical/not.rs b/compiler/src/expression/logical/not.rs index 8f8747c2f5..c2b55a9e23 100644 --- a/compiler/src/expression/logical/not.rs +++ b/compiler/src/expression/logical/not.rs @@ -17,16 +17,18 @@ //! Enforces a logical `!` operator in a resolved Leo program. use crate::{value::ConstrainedValue, GroupType}; -use leo_errors::{CompilerError, LeoError, Span}; +use leo_errors::{new_backtrace, CompilerError, Result, Span}; use snarkvm_fields::PrimeField; pub fn evaluate_not<'a, F: PrimeField, G: GroupType>( value: ConstrainedValue<'a, F, G>, span: &Span, -) -> Result, LeoError> { +) -> Result> { match value { ConstrainedValue::Boolean(boolean) => Ok(ConstrainedValue::Boolean(boolean.not())), - value => return Err(CompilerError::cannot_evaluate_expression(format!("!{}", value), span).into()), + value => { + return Err(CompilerError::cannot_evaluate_expression(format!("!{}", value), span, new_backtrace()).into()); + } } } diff --git a/compiler/src/expression/logical/or.rs b/compiler/src/expression/logical/or.rs index 842653e8bf..b8385b4139 100644 --- a/compiler/src/expression/logical/or.rs +++ b/compiler/src/expression/logical/or.rs @@ -17,7 +17,7 @@ //! Enforces a logical `||` operator in a resolved Leo program. use crate::{value::ConstrainedValue, GroupType}; -use leo_errors::{CompilerError, LeoError, Span}; +use leo_errors::{new_backtrace, CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::boolean::Boolean; @@ -28,7 +28,7 @@ pub fn enforce_or<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( left: ConstrainedValue<'a, F, G>, right: ConstrainedValue<'a, F, G>, span: &Span, -) -> Result, LeoError> { +) -> Result> { let name = format!("{} || {}", left, right); if let (ConstrainedValue::Boolean(left_bool), ConstrainedValue::Boolean(right_bool)) = (left, right) { @@ -37,10 +37,10 @@ pub fn enforce_or<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( &left_bool, &right_bool, ) - .map_err(|e| CompilerError::cannot_enforce_expression("||", e, span))?; + .map_err(|e| CompilerError::cannot_enforce_expression("||", e, span, new_backtrace()))?; return Ok(ConstrainedValue::Boolean(result)); } - Err(CompilerError::cannot_evaluate_expression(name, span).into()) + Err(CompilerError::cannot_evaluate_expression(name, span, new_backtrace()).into()) } diff --git a/compiler/src/expression/relational/eq.rs b/compiler/src/expression/relational/eq.rs index 4bd0d26805..e9793126a4 100644 --- a/compiler/src/expression/relational/eq.rs +++ b/compiler/src/expression/relational/eq.rs @@ -17,7 +17,7 @@ //! Enforces a relational `==` operator in a resolved Leo program. use crate::{enforce_and, value::ConstrainedValue, GroupType}; -use leo_errors::{CompilerError, LeoError, Span}; +use leo_errors::{new_backtrace, CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::{boolean::Boolean, traits::eq::EvaluateEqGadget}; @@ -28,7 +28,7 @@ pub fn evaluate_eq<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( left: ConstrainedValue<'a, F, G>, right: ConstrainedValue<'a, F, G>, span: &Span, -) -> Result, LeoError> { +) -> Result> { let namespace_string = format!("evaluate {} == {} {}:{}", left, right, span.line_start, span.col_start); let constraint_result = match (left, right) { (ConstrainedValue::Address(address_1), ConstrainedValue::Address(address_2)) => { @@ -75,11 +75,14 @@ pub fn evaluate_eq<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( return Ok(current); } (val_1, val_2) => { - return Err(CompilerError::incompatible_types(format!("{} == {}", val_1, val_2,), span).into()); + return Err( + CompilerError::incompatible_types(format!("{} == {}", val_1, val_2,), span, new_backtrace()).into(), + ); } }; - let boolean = constraint_result.map_err(|_| CompilerError::cannot_evaluate_expression("==", span))?; + let boolean = + constraint_result.map_err(|_| CompilerError::cannot_evaluate_expression("==", span, new_backtrace()))?; Ok(ConstrainedValue::Boolean(boolean)) } diff --git a/compiler/src/expression/relational/ge.rs b/compiler/src/expression/relational/ge.rs index e3014dfb61..08bb351893 100644 --- a/compiler/src/expression/relational/ge.rs +++ b/compiler/src/expression/relational/ge.rs @@ -17,7 +17,7 @@ //! Enforces a relational `>=` operator in a resolved Leo program. use crate::{value::ConstrainedValue, GroupType}; -use leo_errors::{CompilerError, LeoError, Span}; +use leo_errors::{new_backtrace, CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::traits::bits::ComparatorGadget; @@ -28,18 +28,21 @@ pub fn evaluate_ge<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( left: ConstrainedValue<'a, F, G>, right: ConstrainedValue<'a, F, G>, span: &Span, -) -> Result, LeoError> { +) -> Result> { let unique_namespace = cs.ns(|| format!("evaluate {} >= {} {}:{}", left, right, span.line_start, span.col_start)); let constraint_result = match (left, right) { (ConstrainedValue::Integer(num_1), ConstrainedValue::Integer(num_2)) => { num_1.greater_than_or_equal(unique_namespace, &num_2) } (val_1, val_2) => { - return Err(CompilerError::incompatible_types(format!("{} >= {}", val_1, val_2), span).into()); + return Err( + CompilerError::incompatible_types(format!("{} >= {}", val_1, val_2), span, new_backtrace()).into(), + ); } }; - let boolean = constraint_result.map_err(|_| CompilerError::cannot_evaluate_expression(">=", span))?; + let boolean = + constraint_result.map_err(|_| CompilerError::cannot_evaluate_expression(">=", span, new_backtrace()))?; Ok(ConstrainedValue::Boolean(boolean)) } diff --git a/compiler/src/expression/relational/gt.rs b/compiler/src/expression/relational/gt.rs index feb128084b..fff3aed20a 100644 --- a/compiler/src/expression/relational/gt.rs +++ b/compiler/src/expression/relational/gt.rs @@ -17,7 +17,7 @@ //! Enforces a relational `>` operator in a resolved Leo program. use crate::{value::ConstrainedValue, GroupType}; -use leo_errors::{CompilerError, LeoError, Span}; +use leo_errors::{new_backtrace, CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::traits::bits::ComparatorGadget; @@ -28,18 +28,21 @@ pub fn evaluate_gt<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( left: ConstrainedValue<'a, F, G>, right: ConstrainedValue<'a, F, G>, span: &Span, -) -> Result, LeoError> { +) -> Result> { let unique_namespace = cs.ns(|| format!("evaluate {} > {} {}:{}", left, right, span.line_start, span.col_start)); let constraint_result = match (left, right) { (ConstrainedValue::Integer(num_1), ConstrainedValue::Integer(num_2)) => { num_1.greater_than(unique_namespace, &num_2) } (val_1, val_2) => { - return Err(CompilerError::incompatible_types(format!("{} > {}", val_1, val_2), span).into()); + return Err( + CompilerError::incompatible_types(format!("{} > {}", val_1, val_2), span, new_backtrace()).into(), + ); } }; - let boolean = constraint_result.map_err(|_| CompilerError::cannot_evaluate_expression(">", span))?; + let boolean = + constraint_result.map_err(|_| CompilerError::cannot_evaluate_expression(">", span, new_backtrace()))?; Ok(ConstrainedValue::Boolean(boolean)) } diff --git a/compiler/src/expression/relational/le.rs b/compiler/src/expression/relational/le.rs index 7efb797ec9..31afe1bea6 100644 --- a/compiler/src/expression/relational/le.rs +++ b/compiler/src/expression/relational/le.rs @@ -17,7 +17,7 @@ //! Enforces a relational `<=` operator in a resolved Leo program. use crate::{value::ConstrainedValue, GroupType}; -use leo_errors::{CompilerError, LeoError, Span}; +use leo_errors::{new_backtrace, CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::traits::bits::ComparatorGadget; @@ -28,18 +28,21 @@ pub fn evaluate_le<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( left: ConstrainedValue<'a, F, G>, right: ConstrainedValue<'a, F, G>, span: &Span, -) -> Result, LeoError> { +) -> Result> { let unique_namespace = cs.ns(|| format!("evaluate {} <= {} {}:{}", left, right, span.line_start, span.col_start)); let constraint_result = match (left, right) { (ConstrainedValue::Integer(num_1), ConstrainedValue::Integer(num_2)) => { num_1.less_than_or_equal(unique_namespace, &num_2) } (val_1, val_2) => { - return Err(CompilerError::incompatible_types(format!("{} <= {}", val_1, val_2), span).into()); + return Err( + CompilerError::incompatible_types(format!("{} <= {}", val_1, val_2), span, new_backtrace()).into(), + ); } }; - let boolean = constraint_result.map_err(|_| CompilerError::cannot_evaluate_expression("<=", span))?; + let boolean = + constraint_result.map_err(|_| CompilerError::cannot_evaluate_expression("<=", span, new_backtrace()))?; Ok(ConstrainedValue::Boolean(boolean)) } diff --git a/compiler/src/expression/relational/lt.rs b/compiler/src/expression/relational/lt.rs index 8392bf6fe3..4c6fa1d654 100644 --- a/compiler/src/expression/relational/lt.rs +++ b/compiler/src/expression/relational/lt.rs @@ -17,7 +17,7 @@ //! Enforces a relational `<` operator in a resolved Leo program. use crate::{value::ConstrainedValue, GroupType}; -use leo_errors::{CompilerError, LeoError, Span}; +use leo_errors::{new_backtrace, CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::traits::bits::EvaluateLtGadget; @@ -28,18 +28,21 @@ pub fn evaluate_lt<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( left: ConstrainedValue<'a, F, G>, right: ConstrainedValue<'a, F, G>, span: &Span, -) -> Result, LeoError> { +) -> Result> { let unique_namespace = cs.ns(|| format!("evaluate {} < {} {}:{}", left, right, span.line_start, span.col_start)); let constraint_result = match (left, right) { (ConstrainedValue::Integer(num_1), ConstrainedValue::Integer(num_2)) => { num_1.less_than(unique_namespace, &num_2) } (val_1, val_2) => { - return Err(CompilerError::incompatible_types(format!("{} < {}", val_1, val_2), span).into()); + return Err( + CompilerError::incompatible_types(format!("{} < {}", val_1, val_2), span, new_backtrace()).into(), + ); } }; - let boolean = constraint_result.map_err(|_| CompilerError::cannot_evaluate_expression("<", span))?; + let boolean = + constraint_result.map_err(|_| CompilerError::cannot_evaluate_expression("<", span, new_backtrace()))?; Ok(ConstrainedValue::Boolean(boolean)) } diff --git a/compiler/src/expression/tuple/access.rs b/compiler/src/expression/tuple/access.rs index e9ba0e45cb..0a7bd262e4 100644 --- a/compiler/src/expression/tuple/access.rs +++ b/compiler/src/expression/tuple/access.rs @@ -18,7 +18,7 @@ use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::Expression; -use leo_errors::{CompilerError, LeoError, Span}; +use leo_errors::{new_backtrace, CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -31,17 +31,17 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { tuple: &'a Expression<'a>, index: usize, span: &Span, - ) -> Result, LeoError> { + ) -> Result> { // Get the tuple values. let tuple = match self.enforce_expression(cs, tuple)? { ConstrainedValue::Tuple(tuple) => tuple, - value => return Err(CompilerError::undefined_array(value, span).into()), + value => return Err(CompilerError::undefined_array(value, span, new_backtrace()).into()), }; // Check for out of bounds access. if index > tuple.len() - 1 { // probably safe to be a panic here - return Err(CompilerError::tuple_index_out_of_bounds(index, span).into()); + return Err(CompilerError::tuple_index_out_of_bounds(index, span, new_backtrace()).into()); } Ok(tuple[index].to_owned()) diff --git a/compiler/src/expression/tuple/tuple.rs b/compiler/src/expression/tuple/tuple.rs index c707080460..95dc276d79 100644 --- a/compiler/src/expression/tuple/tuple.rs +++ b/compiler/src/expression/tuple/tuple.rs @@ -20,7 +20,7 @@ use std::cell::Cell; use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::Expression; -use leo_errors::LeoError; +use leo_errors::Result; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -31,7 +31,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { &mut self, cs: &mut CS, tuple: &[Cell<&'a Expression<'a>>], - ) -> Result, LeoError> { + ) -> Result> { let mut result = Vec::with_capacity(tuple.len()); for expression in tuple.iter() { result.push(self.enforce_expression(cs, expression.get())?); diff --git a/compiler/src/expression/variable_ref/variable_ref.rs b/compiler/src/expression/variable_ref/variable_ref.rs index 86a6a63a19..721b8fc1f2 100644 --- a/compiler/src/expression/variable_ref/variable_ref.rs +++ b/compiler/src/expression/variable_ref/variable_ref.rs @@ -18,13 +18,13 @@ use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::VariableRef; -use leo_errors::{CompilerError, LeoError}; +use leo_errors::{new_backtrace, CompilerError, Result}; use snarkvm_fields::PrimeField; impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { /// Enforce a variable expression by getting the resolved value - pub fn evaluate_ref(&mut self, variable_ref: &VariableRef) -> Result, LeoError> { + pub fn evaluate_ref(&mut self, variable_ref: &VariableRef) -> Result> { // Evaluate the identifier name in the current function scope let span = variable_ref.span.clone(); let variable = variable_ref.variable.borrow(); @@ -32,9 +32,12 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let result_value = if let Some(value) = self.get(variable.id) { value.clone() } else { - return Err( - CompilerError::undefined_identifier(&variable.name.clone().name, &span.unwrap_or_default()).into(), - ); + return Err(CompilerError::undefined_identifier( + &variable.name.clone().name, + &span.unwrap_or_default(), + new_backtrace(), + ) + .into()); // todo: probably can be a panic here instead }; diff --git a/compiler/src/function/function.rs b/compiler/src/function/function.rs index 6b7f637022..9f16619976 100644 --- a/compiler/src/function/function.rs +++ b/compiler/src/function/function.rs @@ -19,7 +19,7 @@ use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::{Expression, Function, FunctionQualifier}; -use leo_errors::{CompilerError, LeoError}; +use leo_errors::{new_backtrace, CompilerError, Result}; use std::cell::Cell; use snarkvm_fields::PrimeField; @@ -33,7 +33,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { function: &'a Function<'a>, target: Option<&'a Expression<'a>>, arguments: &[Cell<&'a Expression<'a>>], - ) -> Result, LeoError> { + ) -> Result> { let target_value = target.map(|target| self.enforce_expression(cs, target)).transpose()?; let self_var = if let Some(target) = &target_value { @@ -52,6 +52,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { &function.name.borrow().name.to_string(), "arguments length invalid", &function.span.clone().unwrap_or_default(), + new_backtrace(), ) .into()); } diff --git a/compiler/src/function/input/array.rs b/compiler/src/function/input/array.rs index ef971b3b17..b79e3c295a 100644 --- a/compiler/src/function/input/array.rs +++ b/compiler/src/function/input/array.rs @@ -20,7 +20,7 @@ use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::Type; use leo_ast::InputValue; -use leo_errors::{CompilerError, LeoError, Span}; +use leo_errors::{new_backtrace, CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -34,14 +34,20 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { array_len: usize, input_value: Option, span: &Span, - ) -> Result, LeoError> { + ) -> Result> { // Build the array value using the expected types. let mut array_value = vec![]; match input_value { Some(InputValue::Array(arr)) => { if array_len != arr.len() { - return Err(CompilerError::invalid_input_array_dimensions(arr.len(), array_len, span).into()); + return Err(CompilerError::invalid_input_array_dimensions( + arr.len(), + array_len, + span, + new_backtrace(), + ) + .into()); } // Allocate each value in the current row @@ -66,7 +72,9 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { } } _ => { - return Err(CompilerError::invalid_function_input_array(input_value.unwrap(), span).into()); + return Err( + CompilerError::invalid_function_input_array(input_value.unwrap(), span, new_backtrace()).into(), + ); } } diff --git a/compiler/src/function/input/input_keyword.rs b/compiler/src/function/input/input_keyword.rs index a7d3dfd8f2..17c218d564 100644 --- a/compiler/src/function/input/input_keyword.rs +++ b/compiler/src/function/input/input_keyword.rs @@ -17,7 +17,7 @@ use crate::{ConstrainedCircuitMember, ConstrainedProgram, ConstrainedValue, GroupType}; use leo_asg::{Circuit, CircuitMember, Type}; use leo_ast::{Identifier, Input}; -use leo_errors::{LeoError, Span}; +use leo_errors::{Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -35,7 +35,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { span: &Span, expected_type: &'a Circuit<'a>, input: &Input, - ) -> Result, LeoError> { + ) -> Result> { // Create an identifier for each input variable let registers_name = Identifier { diff --git a/compiler/src/function/input/input_section.rs b/compiler/src/function/input/input_section.rs index e3b81e23b6..2641f885f5 100644 --- a/compiler/src/function/input/input_section.rs +++ b/compiler/src/function/input/input_section.rs @@ -17,7 +17,7 @@ use crate::{ConstrainedCircuitMember, ConstrainedProgram, ConstrainedValue, GroupType}; use leo_asg::{Circuit, CircuitMember}; use leo_ast::{Identifier, InputValue, Parameter}; -use leo_errors::{AsgError, LeoError}; +use leo_errors::{new_backtrace, AsgError, Result}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -31,7 +31,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { identifier: Identifier, expected_type: &'a Circuit<'a>, section: IndexMap>, - ) -> Result, LeoError> { + ) -> Result> { let mut members = Vec::with_capacity(section.len()); // Allocate each section definition as a circuit member value @@ -43,7 +43,9 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { }; let declared_type = self.asg.scope.resolve_ast_type(¶meter.type_, ¶meter.span)?; if !expected_type.is_assignable_from(&declared_type) { - return Err(AsgError::unexpected_type(expected_type, declared_type, &identifier.span).into()); + return Err( + AsgError::unexpected_type(expected_type, declared_type, &identifier.span, new_backtrace()).into(), + ); } let member_name = parameter.variable.clone(); let member_value = self.allocate_main_function_input( diff --git a/compiler/src/function/input/main_function_input.rs b/compiler/src/function/input/main_function_input.rs index e122761740..d77e7eb148 100644 --- a/compiler/src/function/input/main_function_input.rs +++ b/compiler/src/function/input/main_function_input.rs @@ -33,7 +33,7 @@ use crate::{ }; use leo_asg::{ConstInt, Type}; use leo_ast::{Char, InputValue}; -use leo_errors::{CompilerError, LeoError, Span}; +use leo_errors::{new_backtrace, CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::boolean::Boolean; @@ -47,7 +47,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { name: &str, input_option: Option, span: &Span, - ) -> Result, LeoError> { + ) -> Result> { match type_ { Type::Address => Ok(Address::from_input(cs, name, input_option, span)?), Type::Boolean => Ok(bool_from_input(cs, name, input_option, span)?), @@ -77,8 +77,9 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { name: &str, input_option: Option, span: &Span, - ) -> Result, LeoError> { - let input = input_option.ok_or_else(|| CompilerError::function_input_not_found("main", name, span))?; + ) -> Result> { + let input = + input_option.ok_or_else(|| CompilerError::function_input_not_found("main", name, span, new_backtrace()))?; match (type_, input) { (Type::Address, InputValue::Address(addr)) => Ok(ConstrainedValue::Address(Address::constant(addr, span)?)), @@ -108,15 +109,25 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let parsed_type = parsed.get_int_type(); let input_type = input_type.into(); if std::mem::discriminant(&parsed_type) != std::mem::discriminant(&input_type) { - return Err( - CompilerError::integer_value_integer_type_mismatch(input_type, parsed_type, span).into(), - ); + return Err(CompilerError::integer_value_integer_type_mismatch( + input_type, + parsed_type, + span, + new_backtrace(), + ) + .into()); } Ok(ConstrainedValue::Integer(Integer::new(&parsed))) } (Type::Array(type_, arr_len), InputValue::Array(values)) => { if *arr_len != values.len() { - return Err(CompilerError::invalid_input_array_dimensions(*arr_len, values.len(), span).into()); + return Err(CompilerError::invalid_input_array_dimensions( + *arr_len, + values.len(), + span, + new_backtrace(), + ) + .into()); } Ok(ConstrainedValue::Array( @@ -128,7 +139,13 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { } (Type::Tuple(types), InputValue::Tuple(values)) => { if values.len() != types.len() { - return Err(CompilerError::input_tuple_size_mismatch(types.len(), values.len(), span).into()); + return Err(CompilerError::input_tuple_size_mismatch( + types.len(), + values.len(), + span, + new_backtrace(), + ) + .into()); } Ok(ConstrainedValue::Tuple( @@ -144,7 +161,9 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { (Type::Circuit(_), _) => unimplemented!("main function input not implemented for type {}", type_), // Should not happen. // Return an error if the input type and input value do not match. - (_, input) => Err(CompilerError::input_variable_type_mismatch(type_, input, name, span).into()), + (_, input) => { + Err(CompilerError::input_variable_type_mismatch(type_, input, name, span, new_backtrace()).into()) + } } } } diff --git a/compiler/src/function/input/tuple.rs b/compiler/src/function/input/tuple.rs index 6621221d50..7fcaabdd21 100644 --- a/compiler/src/function/input/tuple.rs +++ b/compiler/src/function/input/tuple.rs @@ -20,7 +20,7 @@ use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::Type; use leo_ast::InputValue; -use leo_errors::{CompilerError, LeoError, Span}; +use leo_errors::{new_backtrace, CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -33,13 +33,19 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { types: &[Type], input_value: Option, span: &Span, - ) -> Result, LeoError> { + ) -> Result> { let mut tuple_values = vec![]; match input_value { Some(InputValue::Tuple(values)) => { if values.len() != types.len() { - return Err(CompilerError::input_tuple_size_mismatch(types.len(), values.len(), span).into()); + return Err(CompilerError::input_tuple_size_mismatch( + types.len(), + values.len(), + span, + new_backtrace(), + ) + .into()); } // Allocate each value in the tuple. @@ -58,7 +64,9 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { } } _ => { - return Err(CompilerError::invalid_function_input_tuple(input_value.unwrap(), span).into()); + return Err( + CompilerError::invalid_function_input_tuple(input_value.unwrap(), span, new_backtrace()).into(), + ); } } diff --git a/compiler/src/function/main_function.rs b/compiler/src/function/main_function.rs index 6c5e15adcf..3792754f94 100644 --- a/compiler/src/function/main_function.rs +++ b/compiler/src/function/main_function.rs @@ -20,7 +20,7 @@ use crate::{program::ConstrainedProgram, GroupType, Output}; use leo_asg::{Expression, Function, FunctionQualifier}; use leo_ast::Input; -use leo_errors::{CompilerError, LeoError}; +use leo_errors::{new_backtrace, CompilerError, Result}; use std::cell::Cell; use snarkvm_fields::PrimeField; @@ -32,7 +32,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { cs: &mut CS, function: &'a Function<'a>, input: &Input, - ) -> Result { + ) -> Result { let registers = input.get_registers(); // Iterate over main function input variables and allocate new values @@ -66,7 +66,12 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { ) { // If variable is in both [main] and [constants] sections - error. (_, Some(_), Some(_)) => { - return Err(CompilerError::double_input_declaration(name, &input_variable.name.span).into()); + return Err(CompilerError::double_input_declaration( + name, + &input_variable.name.span, + new_backtrace(), + ) + .into()); } // If input option is found in [main] section and input is not const. (false, Some(input_option), _) => self.allocate_main_function_input( @@ -86,15 +91,21 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { )?, // Function argument is const, input is not. (true, Some(_), None) => { - return Err( - CompilerError::expected_const_input_variable(name, &input_variable.name.span).into(), - ); + return Err(CompilerError::expected_const_input_variable( + name, + &input_variable.name.span, + new_backtrace(), + ) + .into()); } // Input is const, function argument is not. (false, None, Some(_)) => { - return Err( - CompilerError::expected_non_const_input_variable(name, &input_variable.name.span).into(), - ); + return Err(CompilerError::expected_non_const_input_variable( + name, + &input_variable.name.span, + new_backtrace(), + ) + .into()); } // When not found - Error out. (_, _, _) => { @@ -102,6 +113,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { function.name.borrow().name.to_string(), name, &input_variable.name.span, + new_backtrace(), ) .into()); } diff --git a/compiler/src/function/mut_target.rs b/compiler/src/function/mut_target.rs index cd2dbc13cd..7414601bd4 100644 --- a/compiler/src/function/mut_target.rs +++ b/compiler/src/function/mut_target.rs @@ -31,7 +31,7 @@ use leo_asg::{ TupleAccessExpression, Variable, }; -use leo_errors::LeoError; +use leo_errors::Result; use snarkvm_fields::PrimeField; use snarkvm_gadgets::boolean::Boolean; @@ -41,7 +41,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { fn prepare_mut_access( out: &mut Vec>, expr: &'a Expression<'a>, - ) -> Result>, LeoError> { + ) -> Result>> { match expr { Expression::ArrayRangeAccess(ArrayRangeAccessExpression { array, left, right, .. }) => { let inner = Self::prepare_mut_access(out, array.get())?; @@ -85,7 +85,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { assignee: &'a Expression<'a>, target_value: ConstrainedValue<'a, F, G>, indicator: &Boolean, - ) -> Result { + ) -> Result { let mut accesses = vec![]; let target = Self::prepare_mut_access(&mut accesses, assignee)?; if target.is_none() { diff --git a/compiler/src/function/result/result.rs b/compiler/src/function/result/result.rs index 56c7742919..8779684ba1 100644 --- a/compiler/src/function/result/result.rs +++ b/compiler/src/function/result/result.rs @@ -19,7 +19,7 @@ use crate::{get_indicator_value, program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::Type; -use leo_errors::{CompilerError, LeoError, Span}; +use leo_errors::{new_backtrace, CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::{boolean::Boolean, traits::select::CondSelectGadget}; @@ -35,7 +35,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { expected_return: &Type<'a>, results: Vec<(Boolean, ConstrainedValue<'a, F, G>)>, span: &Span, - ) -> Result, LeoError> { + ) -> Result> { // Initialize empty return value. let mut return_value = None; @@ -55,7 +55,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { if get_indicator_value(&indicator) { // Error if we already have a return value. if return_value.is_some() { - return Err(CompilerError::statement_multiple_returns(span).into()); + return Err(CompilerError::statement_multiple_returns(span, new_backtrace()).into()); } else { // Set the function return value. return_value = Some(result); @@ -79,7 +79,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { &result, value, ) - .map_err(|_| CompilerError::statement_select_fail(result, value, span))?, + .map_err(|_| CompilerError::statement_select_fail(result, value, span, new_backtrace()))?, ); } else { return_value = Some(result); // we ignore indicator for default -- questionable @@ -89,7 +89,9 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { if expected_return.is_unit() { Ok(ConstrainedValue::Tuple(vec![])) } else { - Ok(return_value.ok_or_else(|| CompilerError::statement_no_returns(expected_return.to_string(), span))?) + Ok(return_value.ok_or_else(|| { + CompilerError::statement_no_returns(expected_return.to_string(), span, new_backtrace()) + })?) } } } diff --git a/compiler/src/output/mod.rs b/compiler/src/output/mod.rs index 4fbe9c2aa9..60871c5955 100644 --- a/compiler/src/output/mod.rs +++ b/compiler/src/output/mod.rs @@ -25,7 +25,7 @@ pub use self::output_bytes::*; use crate::{Char, CharType, ConstrainedValue, GroupType, REGISTERS_VARIABLE_NAME}; use leo_asg::Program; use leo_ast::{Parameter, Registers}; -use leo_errors::{CompilerError, LeoError, Span}; +use leo_errors::{new_backtrace, CompilerError, Result, Span}; use snarkvm_fields::PrimeField; @@ -89,7 +89,7 @@ impl Output { registers: &Registers, value: ConstrainedValue<'a, F, G>, span: &Span, - ) -> Result { + ) -> Result { let return_values = match value { ConstrainedValue::Tuple(tuple) => tuple, value => vec![value], @@ -106,7 +106,7 @@ impl Output { // Return an error if we do not have enough return registers if register_values.len() < return_values.len() { - return Err(CompilerError::output_not_enough_registers(span).into()); + return Err(CompilerError::output_not_enough_registers(span, new_backtrace()).into()); } let mut registers = BTreeMap::new(); @@ -119,7 +119,13 @@ impl Output { let return_value_type = value.to_type(span)?; if !register_type.is_assignable_from(&return_value_type) { - return Err(CompilerError::output_mismatched_types(register_type, return_value_type, span).into()); + return Err(CompilerError::output_mismatched_types( + register_type, + return_value_type, + span, + new_backtrace(), + ) + .into()); } let value = match value { diff --git a/compiler/src/output/output_bytes.rs b/compiler/src/output/output_bytes.rs index 50ce93b4a8..452eece86e 100644 --- a/compiler/src/output/output_bytes.rs +++ b/compiler/src/output/output_bytes.rs @@ -17,7 +17,7 @@ use crate::{ConstrainedValue, GroupType, REGISTERS_VARIABLE_NAME}; use leo_asg::Program; use leo_ast::{Parameter, Registers}; -use leo_errors::{CompilerError, LeoError, Span}; +use leo_errors::{new_backtrace, CompilerError, Result, Span}; use snarkvm_fields::PrimeField; @@ -38,7 +38,7 @@ impl OutputBytes { value: ConstrainedValue<'a, F, G>, span: &Span, - ) -> Result { + ) -> Result { let return_values = match value { ConstrainedValue::Tuple(values) => values, value => vec![value], @@ -55,7 +55,7 @@ impl OutputBytes { // Return an error if we do not have enough return registers if register_values.len() < return_values.len() { - return Err(CompilerError::output_not_enough_registers(span).into()); + return Err(CompilerError::output_not_enough_registers(span, new_backtrace()).into()); } // Manually construct result string @@ -73,7 +73,13 @@ impl OutputBytes { let return_value_type = value.to_type(span)?; if !register_type.is_assignable_from(&return_value_type) { - return Err(CompilerError::output_mismatched_types(register_type, return_value_type, span).into()); + return Err(CompilerError::output_mismatched_types( + register_type, + return_value_type, + span, + new_backtrace(), + ) + .into()); } let value = value.to_string(); diff --git a/compiler/src/output/output_file.rs b/compiler/src/output/output_file.rs index 03d702213e..76cd9f5f20 100644 --- a/compiler/src/output/output_file.rs +++ b/compiler/src/output/output_file.rs @@ -16,9 +16,7 @@ //! The `program.out` file. -use leo_errors::{CompilerError, LeoError}; - -use backtrace::Backtrace; +use leo_errors::{new_backtrace, CompilerError, Result}; use std::{ borrow::Cow, @@ -45,25 +43,25 @@ impl OutputFile { } /// Writes output to a file. - pub fn write(&self, path: &Path, bytes: &[u8]) -> Result<(), LeoError> { + pub fn write(&self, path: &Path, bytes: &[u8]) -> Result<()> { // create output file let path = self.setup_file_path(path); - let mut file = File::create(&path).map_err(|e| CompilerError::output_file_io_error(e, Backtrace::new()))?; + let mut file = File::create(&path).map_err(|e| CompilerError::output_file_io_error(e, new_backtrace()))?; Ok(file .write_all(bytes) - .map_err(|e| CompilerError::output_file_io_error(e, Backtrace::new()))?) + .map_err(|e| CompilerError::output_file_io_error(e, new_backtrace()))?) } /// Removes the output file at the given path if it exists. Returns `true` on success, /// `false` if the file doesn't exist, and `Error` if the file system fails during operation. - pub fn remove(&self, path: &Path) -> Result { + pub fn remove(&self, path: &Path) -> Result { let path = self.setup_file_path(path); if !path.exists() { return Ok(false); } - fs::remove_file(&path).map_err(|_| CompilerError::output_file_cannot_remove(path, Backtrace::new()))?; + fs::remove_file(&path).map_err(|_| CompilerError::output_file_cannot_remove(path, new_backtrace()))?; Ok(true) } diff --git a/compiler/src/phases/phase.rs b/compiler/src/phases/phase.rs index 69d32849ad..c5d7d1424c 100644 --- a/compiler/src/phases/phase.rs +++ b/compiler/src/phases/phase.rs @@ -19,7 +19,7 @@ use crate::{CombineAstAsgDirector, CombinerOptions}; use leo_asg::Program as AsgProgram; use leo_ast::{Ast, Program as AstProgram, ReconstructingReducer}; -use leo_errors::LeoError; +use leo_errors::Result; macro_rules! phase { ($phase_name:ident, $function:item) => { @@ -50,7 +50,7 @@ macro_rules! phase { } impl $phase_name { - pub fn phase_ast(&self, ast: &AstProgram, asg: &AsgProgram) -> Result { + pub fn phase_ast(&self, ast: &AstProgram, asg: &AsgProgram) -> Result { Ok(Ast::new(CombineAstAsgDirector::new(Self::default(), Options{}) .reduce_program(ast, asg)?)) } diff --git a/compiler/src/phases/reducing_director.rs b/compiler/src/phases/reducing_director.rs index bb33c0e264..faad243de0 100644 --- a/compiler/src/phases/reducing_director.rs +++ b/compiler/src/phases/reducing_director.rs @@ -97,7 +97,7 @@ use leo_ast::{ UnaryExpression as AstUnaryExpression, ValueExpression, }; -use leo_errors::{AstError, LeoError, Span}; +use leo_errors::{new_backtrace, AstError, Result, Span}; use tendril::StrTendril; pub trait CombinerOptions { @@ -116,7 +116,7 @@ impl CombineAstAsgDirector { Self { ast_reducer, options } } - pub fn reduce_type(&mut self, ast: &AstType, asg: &AsgType, span: &Span) -> Result { + pub fn reduce_type(&mut self, ast: &AstType, asg: &AsgType, span: &Span) -> Result { let new = match (ast, asg) { (AstType::Array(ast_type, ast_dimensions), AsgType::Array(asg_type, asg_dimensions)) => { if self.options.type_inference_enabled() { @@ -147,7 +147,7 @@ impl CombineAstAsgDirector { self.ast_reducer.reduce_type(ast, new, span) } - pub fn reduce_expression(&mut self, ast: &AstExpression, asg: &AsgExpression) -> Result { + pub fn reduce_expression(&mut self, ast: &AstExpression, asg: &AsgExpression) -> Result { let new = match (ast, asg) { (AstExpression::Value(value), AsgExpression::Constant(const_)) => self.reduce_value(value, const_)?, (AstExpression::Binary(ast), AsgExpression::Binary(asg)) => { @@ -202,7 +202,7 @@ impl CombineAstAsgDirector { &mut self, ast: &AstArrayAccessExpression, asg: &AsgArrayAccessExpression, - ) -> Result { + ) -> Result { let array = self.reduce_expression(&ast.array, asg.array.get())?; let index = self.reduce_expression(&ast.index, asg.index.get())?; @@ -213,7 +213,7 @@ impl CombineAstAsgDirector { &mut self, ast: &AstArrayInitExpression, asg: &AsgArrayInitExpression, - ) -> Result { + ) -> Result { let element = self.reduce_expression(&ast.element, asg.element.get())?; self.ast_reducer.reduce_array_init(ast, element) @@ -223,7 +223,7 @@ impl CombineAstAsgDirector { &mut self, ast: &AstArrayInlineExpression, asg: &AsgArrayInlineExpression, - ) -> Result { + ) -> Result { let mut elements = vec![]; for (ast_element, asg_element) in ast.elements.iter().zip(asg.elements.iter()) { let reduced_element = match ast_element { @@ -245,7 +245,7 @@ impl CombineAstAsgDirector { &mut self, ast: &AstArrayRangeAccessExpression, asg: &AsgArrayRangeAccessExpression, - ) -> Result { + ) -> Result { let array = self.reduce_expression(&ast.array, asg.array.get())?; let left = match (ast.left.as_ref(), asg.left.get()) { (Some(ast_left), Some(asg_left)) => Some(self.reduce_expression(ast_left, asg_left)?), @@ -263,18 +263,14 @@ impl CombineAstAsgDirector { &mut self, ast: &AstBinaryExpression, asg: &AsgBinaryExpression, - ) -> Result { + ) -> Result { let left = self.reduce_expression(&ast.left, asg.left.get())?; let right = self.reduce_expression(&ast.right, asg.right.get())?; self.ast_reducer.reduce_binary(ast, left, right, ast.op.clone()) } - pub fn reduce_call( - &mut self, - ast: &AstCallExpression, - asg: &AsgCallExpression, - ) -> Result { + pub fn reduce_call(&mut self, ast: &AstCallExpression, asg: &AsgCallExpression) -> Result { // TODO FIGURE IT OUT // let function = self.reduce_expression(&ast.function, asg.function.get())?; // let target = asg.target.get().map(|exp| self.reduce_expression()) @@ -288,11 +284,7 @@ impl CombineAstAsgDirector { self.ast_reducer.reduce_call(ast, *ast.function.clone(), arguments) } - pub fn reduce_cast( - &mut self, - ast: &AstCastExpression, - asg: &AsgCastExpression, - ) -> Result { + pub fn reduce_cast(&mut self, ast: &AstCastExpression, asg: &AsgCastExpression) -> Result { let inner = self.reduce_expression(&ast.inner, asg.inner.get())?; let target_type = self.reduce_type(&ast.target_type, &asg.target_type, &ast.span)?; @@ -303,7 +295,7 @@ impl CombineAstAsgDirector { &mut self, ast: &CircuitMemberAccessExpression, _asg: &AsgCircuitAccessExpression, - ) -> Result { + ) -> Result { // let circuit = self.reduce_expression(&circuit_member_access.circuit)?; // let name = self.reduce_identifier(&circuit_member_access.name)?; // let target = input.target.get().map(|e| self.reduce_expression(e)); @@ -316,7 +308,7 @@ impl CombineAstAsgDirector { &mut self, ast: &CircuitStaticFunctionAccessExpression, _asg: &AsgCircuitAccessExpression, - ) -> Result { + ) -> Result { // let circuit = self.reduce_expression(&circuit_member_access.circuit)?; // let name = self.reduce_identifier(&circuit_member_access.name)?; // let target = input.target.get().map(|e| self.reduce_expression(e)); @@ -329,7 +321,7 @@ impl CombineAstAsgDirector { &mut self, ast: &CircuitImpliedVariableDefinition, asg: &AsgExpression, - ) -> Result { + ) -> Result { let expression = ast .expression .as_ref() @@ -344,7 +336,7 @@ impl CombineAstAsgDirector { &mut self, ast: &AstCircuitInitExpression, asg: &AsgCircuitInitExpression, - ) -> Result { + ) -> Result { let mut members = vec![]; for (ast_member, asg_member) in ast.members.iter().zip(asg.values.iter()) { members.push(self.reduce_circuit_implied_variable_definition(ast_member, asg_member.1.get())?); @@ -357,7 +349,7 @@ impl CombineAstAsgDirector { &mut self, ast: &AstTernaryExpression, asg: &AsgTernaryExpression, - ) -> Result { + ) -> Result { let condition = self.reduce_expression(&ast.condition, asg.condition.get())?; let if_true = self.reduce_expression(&ast.if_true, asg.if_true.get())?; let if_false = self.reduce_expression(&ast.if_false, asg.if_false.get())?; @@ -369,7 +361,7 @@ impl CombineAstAsgDirector { &mut self, ast: &AstTupleAccessExpression, asg: &AsgTupleAccessExpression, - ) -> Result { + ) -> Result { let tuple = self.reduce_expression(&ast.tuple, asg.tuple_ref.get())?; self.ast_reducer.reduce_tuple_access(ast, tuple) @@ -379,7 +371,7 @@ impl CombineAstAsgDirector { &mut self, ast: &AstTupleInitExpression, asg: &AsgTupleInitExpression, - ) -> Result { + ) -> Result { let mut elements = vec![]; for (ast_element, asg_element) in ast.elements.iter().zip(asg.elements.iter()) { let element = self.reduce_expression(ast_element, asg_element.get())?; @@ -389,17 +381,13 @@ impl CombineAstAsgDirector { self.ast_reducer.reduce_tuple_init(ast, elements) } - pub fn reduce_unary( - &mut self, - ast: &AstUnaryExpression, - asg: &AsgUnaryExpression, - ) -> Result { + pub fn reduce_unary(&mut self, ast: &AstUnaryExpression, asg: &AsgUnaryExpression) -> Result { let inner = self.reduce_expression(&ast.inner, asg.inner.get())?; self.ast_reducer.reduce_unary(ast, inner, ast.op.clone()) } - pub fn reduce_value(&mut self, ast: &ValueExpression, asg: &AsgConstant) -> Result { + pub fn reduce_value(&mut self, ast: &ValueExpression, asg: &AsgConstant) -> Result { let mut new = ast.clone(); if self.options.type_inference_enabled() { @@ -448,11 +436,7 @@ impl CombineAstAsgDirector { self.ast_reducer.reduce_value(ast, AstExpression::Value(new)) } - pub fn reduce_variable_ref( - &mut self, - ast: &ValueExpression, - _asg: &AsgVariableRef, - ) -> Result { + pub fn reduce_variable_ref(&mut self, ast: &ValueExpression, _asg: &AsgVariableRef) -> Result { // TODO FIGURE IT OUT let new = match ast { // ValueExpression::Group(group_value) => { @@ -469,7 +453,7 @@ impl CombineAstAsgDirector { &mut self, ast_statement: &AstStatement, asg_statement: &AsgStatement, - ) -> Result { + ) -> Result { let new = match (ast_statement, asg_statement) { (AstStatement::Assign(ast), AsgStatement::Assign(asg)) => { AstStatement::Assign(Box::new(self.reduce_assign(ast, asg)?)) @@ -499,11 +483,7 @@ impl CombineAstAsgDirector { self.ast_reducer.reduce_statement(ast_statement, new) } - pub fn reduce_assign_access( - &mut self, - ast: &AstAssignAccess, - asg: &AsgAssignAccess, - ) -> Result { + pub fn reduce_assign_access(&mut self, ast: &AstAssignAccess, asg: &AsgAssignAccess) -> Result { let new = match (ast, asg) { (AstAssignAccess::ArrayRange(ast_left, ast_right), AsgAssignAccess::ArrayRange(asg_left, asg_right)) => { let left = match (ast_left.as_ref(), asg_left.get()) { @@ -527,7 +507,7 @@ impl CombineAstAsgDirector { self.ast_reducer.reduce_assignee_access(ast, new) } - pub fn reduce_assignee(&mut self, ast: &Assignee, asg: &[AsgAssignAccess]) -> Result { + pub fn reduce_assignee(&mut self, ast: &Assignee, asg: &[AsgAssignAccess]) -> Result { let mut accesses = vec![]; for (ast_access, asg_access) in ast.accesses.iter().zip(asg) { accesses.push(self.reduce_assign_access(ast_access, asg_access)?); @@ -536,22 +516,14 @@ impl CombineAstAsgDirector { self.ast_reducer.reduce_assignee(ast, ast.identifier.clone(), accesses) } - pub fn reduce_assign( - &mut self, - ast: &AstAssignStatement, - asg: &AsgAssignStatement, - ) -> Result { + pub fn reduce_assign(&mut self, ast: &AstAssignStatement, asg: &AsgAssignStatement) -> Result { let assignee = self.reduce_assignee(&ast.assignee, &asg.target_accesses)?; let value = self.reduce_expression(&ast.value, asg.value.get())?; self.ast_reducer.reduce_assign(ast, assignee, value) } - pub fn reduce_block( - &mut self, - ast: &AstBlockStatement, - asg: &AsgBlockStatement, - ) -> Result { + pub fn reduce_block(&mut self, ast: &AstBlockStatement, asg: &AsgBlockStatement) -> Result { let mut statements = vec![]; for (ast_statement, asg_statement) in ast.statements.iter().zip(asg.statements.iter()) { statements.push(self.reduce_statement(ast_statement, asg_statement.get())?); @@ -564,15 +536,13 @@ impl CombineAstAsgDirector { &mut self, ast: &AstConditionalStatement, asg: &AsgConditionalStatement, - ) -> Result { + ) -> Result { let condition = self.reduce_expression(&ast.condition, asg.condition.get())?; let block; if let AsgStatement::Block(asg_block) = asg.result.get() { block = self.reduce_block(&ast.block, asg_block)?; } else { - return Err(LeoError::from(AstError::asg_statement_not_block( - asg.span.as_ref().unwrap(), - ))); + return Err(AstError::asg_statement_not_block(asg.span.as_ref().unwrap(), new_backtrace()).into()); } let next = match (ast.next.as_ref(), asg.next.get()) { (Some(ast_next), Some(asg_next)) => Some(self.reduce_statement(ast_next, asg_next)?), @@ -586,7 +556,7 @@ impl CombineAstAsgDirector { &mut self, ast: &AstConsoleStatement, asg: &AsgConsoleStatement, - ) -> Result { + ) -> Result { let function = match (&ast.function, &asg.function) { (AstConsoleFunction::Assert(ast_expression), AsgConsoleFunction::Assert(asg_expression)) => { AstConsoleFunction::Assert(self.reduce_expression(ast_expression, asg_expression.get())?) @@ -610,9 +580,9 @@ impl CombineAstAsgDirector { AstConsoleFunction::Error(_) => AstConsoleFunction::Error(args), AstConsoleFunction::Log(_) => AstConsoleFunction::Log(args), _ => { - return Err(LeoError::from(AstError::impossible_console_assert_call( - &ast_console_args.span, - ))); + return Err( + AstError::impossible_console_assert_call(&ast_console_args.span, new_backtrace()).into(), + ); } } } @@ -626,7 +596,7 @@ impl CombineAstAsgDirector { &mut self, ast: &AstDefinitionStatement, asg: &AsgDefinitionStatement, - ) -> Result { + ) -> Result { let type_; if asg.variables.len() > 1 { @@ -664,7 +634,7 @@ impl CombineAstAsgDirector { &mut self, ast: &AstExpressionStatement, asg: &AsgExpressionStatement, - ) -> Result { + ) -> Result { let inner_expression = self.reduce_expression(&ast.expression, asg.expression.get())?; self.ast_reducer.reduce_expression_statement(ast, inner_expression) } @@ -673,37 +643,27 @@ impl CombineAstAsgDirector { &mut self, ast: &AstIterationStatement, asg: &AsgIterationStatement, - ) -> Result { + ) -> Result { let start = self.reduce_expression(&ast.start, asg.start.get())?; let stop = self.reduce_expression(&ast.stop, asg.stop.get())?; let block; if let AsgStatement::Block(asg_block) = asg.body.get() { block = self.reduce_block(&ast.block, asg_block)?; } else { - return Err(LeoError::from(AstError::asg_statement_not_block( - asg.span.as_ref().unwrap(), - ))); + return Err(AstError::asg_statement_not_block(asg.span.as_ref().unwrap(), new_backtrace()).into()); } self.ast_reducer .reduce_iteration(ast, ast.variable.clone(), start, stop, block) } - pub fn reduce_return( - &mut self, - ast: &AstReturnStatement, - asg: &AsgReturnStatement, - ) -> Result { + pub fn reduce_return(&mut self, ast: &AstReturnStatement, asg: &AsgReturnStatement) -> Result { let expression = self.reduce_expression(&ast.expression, asg.expression.get())?; self.ast_reducer.reduce_return(ast, expression) } - pub fn reduce_program( - &mut self, - ast: &leo_ast::Program, - asg: &leo_asg::Program, - ) -> Result { + pub fn reduce_program(&mut self, ast: &leo_ast::Program, asg: &leo_asg::Program) -> Result { self.ast_reducer.swap_in_circuit(); let mut circuits = IndexMap::new(); for ((ast_ident, ast_circuit), (_asg_ident, asg_circuit)) in ast.circuits.iter().zip(&asg.circuits) { @@ -732,7 +692,7 @@ impl CombineAstAsgDirector { ) } - pub fn reduce_function(&mut self, ast: &AstFunction, asg: &AsgFunction) -> Result { + pub fn reduce_function(&mut self, ast: &AstFunction, asg: &AsgFunction) -> Result { let output = ast .output .as_ref() @@ -765,7 +725,7 @@ impl CombineAstAsgDirector { &mut self, ast: &AstCircuitMember, asg: &AsgCircuitMember, - ) -> Result { + ) -> Result { let new = match (ast, asg) { (AstCircuitMember::CircuitVariable(identifier, ast_type), AsgCircuitMember::Variable(asg_type)) => { AstCircuitMember::CircuitVariable( @@ -782,7 +742,7 @@ impl CombineAstAsgDirector { self.ast_reducer.reduce_circuit_member(ast, new) } - pub fn reduce_circuit(&mut self, ast: &AstCircuit, asg: &AsgCircuit) -> Result { + pub fn reduce_circuit(&mut self, ast: &AstCircuit, asg: &AsgCircuit) -> Result { let mut members = vec![]; for (ast_member, asg_member) in ast.members.iter().zip(asg.members.borrow().iter()) { members.push(self.reduce_circuit_member(ast_member, asg_member.1)?); diff --git a/compiler/src/prelude/blake2s.rs b/compiler/src/prelude/blake2s.rs index efc353bc59..378f2a19e2 100644 --- a/compiler/src/prelude/blake2s.rs +++ b/compiler/src/prelude/blake2s.rs @@ -17,7 +17,7 @@ use super::CoreCircuit; use crate::{ConstrainedValue, GroupType, Integer}; use leo_asg::Function; -use leo_errors::{CompilerError, LeoError, Span}; +use leo_errors::{new_backtrace, CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::{ @@ -55,20 +55,22 @@ impl<'a, F: PrimeField, G: GroupType> CoreCircuit<'a, F, G> for Blake2s { span: &Span, target: Option>, mut arguments: Vec>, - ) -> Result, LeoError> { + ) -> Result> { assert_eq!(arguments.len(), 2); // asg enforced assert!(function.name.borrow().name.as_ref() == "hash"); // asg enforced assert!(target.is_none()); // asg enforced let input = unwrap_argument(arguments.remove(1)); let seed = unwrap_argument(arguments.remove(0)); - let digest = Blake2sGadget::check_evaluation_gadget(cs.ns(|| "blake2s hash"), &seed[..], &input[..]) - .map_err(|e| CompilerError::cannot_enforce_expression("Blake2s check evaluation gadget", e, span))?; + let digest = + Blake2sGadget::check_evaluation_gadget(cs.ns(|| "blake2s hash"), &seed[..], &input[..]).map_err(|e| { + CompilerError::cannot_enforce_expression("Blake2s check evaluation gadget", e, span, new_backtrace()) + })?; Ok(ConstrainedValue::Array( digest .to_bytes(cs) - .map_err(|e| CompilerError::cannot_enforce_expression("Vec ToBytes", e, span))? + .map_err(|e| CompilerError::cannot_enforce_expression("Vec ToBytes", e, span, new_backtrace()))? .into_iter() .map(Integer::U8) .map(ConstrainedValue::Integer) diff --git a/compiler/src/prelude/mod.rs b/compiler/src/prelude/mod.rs index d73a6d079e..4189c374c9 100644 --- a/compiler/src/prelude/mod.rs +++ b/compiler/src/prelude/mod.rs @@ -19,7 +19,7 @@ pub use blake2s::*; use crate::{ConstrainedValue, GroupType}; use leo_asg::Function; -use leo_errors::{LeoError, Span}; +use leo_errors::{Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -32,7 +32,7 @@ pub trait CoreCircuit<'a, F: PrimeField, G: GroupType>: Send + Sync { span: &Span, target: Option>, arguments: Vec>, - ) -> Result, LeoError>; + ) -> Result>; } pub fn resolve_core_circuit<'a, F: PrimeField, G: GroupType>(name: &str) -> impl CoreCircuit<'a, F, G> { diff --git a/compiler/src/statement/assign/assign.rs b/compiler/src/statement/assign/assign.rs index d1d34829cf..5ee60a3ad1 100644 --- a/compiler/src/statement/assign/assign.rs +++ b/compiler/src/statement/assign/assign.rs @@ -18,7 +18,7 @@ use crate::{arithmetic::*, program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::{AssignOperation, AssignStatement}; -use leo_errors::{CompilerError, LeoError, Span}; +use leo_errors::{new_backtrace, CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::{boolean::Boolean, traits::select::CondSelectGadget}; @@ -31,7 +31,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { cs: &mut CS, indicator: &Boolean, statement: &AssignStatement<'a>, - ) -> Result<(), LeoError> { + ) -> Result<()> { // Get the name of the variable we are assigning to let new_value = self.enforce_expression(cs, statement.value.get())?; @@ -48,7 +48,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { target: &mut ConstrainedValue<'a, F, G>, new_value: ConstrainedValue<'a, F, G>, span: &Span, - ) -> Result<(), LeoError> { + ) -> Result<()> { let new_value = match operation { AssignOperation::Assign => new_value, AssignOperation::Add => enforce_add(cs, target.clone(), new_value, span)?, @@ -59,7 +59,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { _ => unimplemented!("unimplemented assign operator"), }; let selected_value = ConstrainedValue::conditionally_select(cs.ns(|| scope), condition, &new_value, target) - .map_err(|_| CompilerError::statement_select_fail(new_value, target.clone(), span))?; + .map_err(|_| CompilerError::statement_select_fail(new_value, target.clone(), span, new_backtrace()))?; *target = selected_value; Ok(()) diff --git a/compiler/src/statement/assign/assignee/array_index.rs b/compiler/src/statement/assign/assignee/array_index.rs index 6d46492d59..c3532dba3a 100644 --- a/compiler/src/statement/assign/assignee/array_index.rs +++ b/compiler/src/statement/assign/assignee/array_index.rs @@ -20,7 +20,7 @@ use std::convert::TryInto; use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType, Integer}; use leo_asg::{ConstInt, Expression, Node}; -use leo_errors::{CompilerError, LeoError}; +use leo_errors::{new_backtrace, CompilerError, Result}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::traits::{eq::EvaluateEqGadget, select::CondSelectGadget}; @@ -34,7 +34,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { cs: &mut CS, mut context: ResolverContext<'a, 'b, F, G>, index: &'a Expression<'a>, - ) -> Result<(), LeoError> { + ) -> Result<()> { let input_len = context.input.len(); let index_resolved = self.enforce_index(cs, index, &context.span)?; @@ -43,10 +43,13 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { ConstrainedValue::Array(input) => { if let Some(index) = index_resolved.to_usize() { if index >= input.len() { - Err( - CompilerError::statement_array_assign_index_bounds(index, input.len(), &context.span) - .into(), + Err(CompilerError::statement_array_assign_index_bounds( + index, + input.len(), + &context.span, + new_backtrace(), ) + .into()) } else { let target = input.get_mut(index).unwrap(); if context.remaining_accesses.is_empty() { @@ -62,7 +65,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let array_len: u32 = input .len() .try_into() - .map_err(|_| CompilerError::array_length_out_of_bounds(&span))?; + .map_err(|_| CompilerError::array_length_out_of_bounds(&span, new_backtrace()))?; self.array_bounds_check(cs, &index_resolved, array_len, &span)?; } @@ -75,11 +78,11 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let index_bounded = i .try_into() - .map_err(|_| CompilerError::array_index_out_of_legal_bounds(&span))?; + .map_err(|_| CompilerError::array_index_out_of_legal_bounds(&span, new_backtrace()))?; let const_index = ConstInt::U32(index_bounded).cast_to(&index_resolved.get_type()); let index_comparison = index_resolved .evaluate_equal(eq_namespace, &Integer::new(&const_index)) - .map_err(|_| CompilerError::cannot_evaluate_expression("==", &span))?; + .map_err(|_| CompilerError::cannot_evaluate_expression("==", &span, new_backtrace()))?; let mut unique_namespace = cs.ns(|| { format!( @@ -112,21 +115,32 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { &temp_item, item, ) - .map_err(|e| CompilerError::cannot_enforce_expression("conditional select", e, &span))?; + .map_err(|e| { + CompilerError::cannot_enforce_expression( + "conditional select", + e, + &span, + new_backtrace(), + ) + })?; *item = value; } Ok(()) } } - _ => Err(CompilerError::statement_array_assign_interior_index(&context.span).into()), + _ => Err(CompilerError::statement_array_assign_interior_index(&context.span, new_backtrace()).into()), } } else if context.from_range && input_len != 0 { context.from_range = false; if let Some(index) = index_resolved.to_usize() { if index >= input_len { - return Err( - CompilerError::statement_array_assign_index_bounds(index, input_len, &context.span).into(), - ); + return Err(CompilerError::statement_array_assign_index_bounds( + index, + input_len, + &context.span, + new_backtrace(), + ) + .into()); } let target = context.input.remove(index); @@ -144,7 +158,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { .input .len() .try_into() - .map_err(|_| CompilerError::array_length_out_of_bounds(&span))?; + .map_err(|_| CompilerError::array_length_out_of_bounds(&span, new_backtrace()))?; self.array_bounds_check(cs, &index_resolved, array_len, &span)?; } @@ -157,11 +171,11 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let index_bounded = i .try_into() - .map_err(|_| CompilerError::array_index_out_of_legal_bounds(&span))?; + .map_err(|_| CompilerError::array_index_out_of_legal_bounds(&span, new_backtrace()))?; let const_index = ConstInt::U32(index_bounded).cast_to(&index_resolved.get_type()); let index_comparison = index_resolved .evaluate_equal(eq_namespace, &Integer::new(&const_index)) - .map_err(|_| CompilerError::cannot_evaluate_expression("==", &span))?; + .map_err(|_| CompilerError::cannot_evaluate_expression("==", &span, new_backtrace()))?; let mut unique_namespace = cs.ns(|| { format!( @@ -190,13 +204,15 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { }; let value = ConstrainedValue::conditionally_select(unique_namespace, &index_comparison, &temp_item, item) - .map_err(|e| CompilerError::cannot_enforce_expression("conditional select", e, &span))?; + .map_err(|e| { + CompilerError::cannot_enforce_expression("conditional select", e, &span, new_backtrace()) + })?; **item = value; } Ok(()) } } else { - Err(CompilerError::statement_array_assign_interior_index(&context.span).into()) + Err(CompilerError::statement_array_assign_interior_index(&context.span, new_backtrace()).into()) } } } diff --git a/compiler/src/statement/assign/assignee/array_range_index.rs b/compiler/src/statement/assign/assignee/array_range_index.rs index 060f5eca50..66f7c833b4 100644 --- a/compiler/src/statement/assign/assignee/array_range_index.rs +++ b/compiler/src/statement/assign/assignee/array_range_index.rs @@ -18,7 +18,7 @@ use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::Expression; -use leo_errors::{CompilerError, LeoError}; +use leo_errors::{new_backtrace, CompilerError, Result}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -32,13 +32,13 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { mut context: ResolverContext<'a, 'b, F, G>, start: Option<&'a Expression<'a>>, stop: Option<&'a Expression<'a>>, - ) -> Result<(), LeoError> { + ) -> Result<()> { let start_index = start .map(|start| self.enforce_index(cs, start, &context.span)) .transpose()? .map(|x| { x.to_usize() - .ok_or_else(|| CompilerError::statement_array_assign_index_const(&context.span)) + .ok_or_else(|| CompilerError::statement_array_assign_index_const(&context.span, new_backtrace())) }) .transpose()?; let stop_index = stop @@ -46,7 +46,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { .transpose()? .map(|x| { x.to_usize() - .ok_or_else(|| CompilerError::statement_array_assign_index_const(&context.span)) + .ok_or_else(|| CompilerError::statement_array_assign_index_const(&context.span, new_backtrace())) }) .transpose()?; let start_index = start_index.unwrap_or(0); @@ -75,7 +75,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { } Ok(()) } - _ => Err(CompilerError::statement_array_assign_index(&context.span).into()), + _ => Err(CompilerError::statement_array_assign_index(&context.span, new_backtrace()).into()), } } else { // range of a range diff --git a/compiler/src/statement/assign/assignee/member.rs b/compiler/src/statement/assign/assignee/member.rs index f6ecc243b1..7f73029a31 100644 --- a/compiler/src/statement/assign/assignee/member.rs +++ b/compiler/src/statement/assign/assignee/member.rs @@ -16,7 +16,7 @@ use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::Identifier; -use leo_errors::{CompilerError, LeoError}; +use leo_errors::{new_backtrace, CompilerError, Result}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -29,9 +29,9 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { cs: &mut CS, mut context: ResolverContext<'a, 'b, F, G>, name: &Identifier, - ) -> Result<(), LeoError> { + ) -> Result<()> { if context.input.len() != 1 { - return Err(CompilerError::statement_array_assign_interior_index(&context.span).into()); + return Err(CompilerError::statement_array_assign_interior_index(&context.span, new_backtrace()).into()); } match context.input.remove(0) { ConstrainedValue::CircuitExpression(_variable, members) => { @@ -45,12 +45,15 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { } None => { // Throw an error if the circuit variable does not exist in the circuit - Err(CompilerError::statement_undefined_circuit_variable(name, &context.span).into()) + Err( + CompilerError::statement_undefined_circuit_variable(name, &context.span, new_backtrace()) + .into(), + ) } } } // Throw an error if the circuit definition does not exist in the file - x => Err(CompilerError::undefined_circuit(x, &context.span).into()), + x => Err(CompilerError::undefined_circuit(x, &context.span, new_backtrace()).into()), } } } diff --git a/compiler/src/statement/assign/assignee/mod.rs b/compiler/src/statement/assign/assignee/mod.rs index 6b299823a7..ade94837d5 100644 --- a/compiler/src/statement/assign/assignee/mod.rs +++ b/compiler/src/statement/assign/assignee/mod.rs @@ -18,7 +18,7 @@ use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::{AssignAccess, AssignOperation, AssignStatement}; -use leo_errors::{CompilerError, LeoError, Span}; +use leo_errors::{new_backtrace, CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::boolean::Boolean; @@ -45,7 +45,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { cs: &mut CS, context: &ResolverContext<'a, 'b, F, G>, target: &mut ConstrainedValue<'a, F, G>, - ) -> Result<(), LeoError> { + ) -> Result<()> { Self::enforce_assign_operation( cs, context.indicator, @@ -61,7 +61,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { &mut self, cs: &mut CS, mut context: ResolverContext<'a, 'b, F, G>, - ) -> Result<(), LeoError> { + ) -> Result<()> { if context.remaining_accesses.is_empty() { if context.input.len() != 1 { panic!("invalid non-array-context multi-value assignment"); @@ -90,7 +90,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { assignee: &AssignStatement<'a>, target_value: ConstrainedValue<'a, F, G>, indicator: &Boolean, - ) -> Result<(), LeoError> { + ) -> Result<()> { let span = assignee.span.clone().unwrap_or_default(); let variable = assignee.target_variable.get().borrow(); @@ -109,18 +109,16 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { Ok(()) } - pub(crate) fn check_range_index( - start_index: usize, - stop_index: usize, - len: usize, - span: &Span, - ) -> Result<(), LeoError> { + pub(crate) fn check_range_index(start_index: usize, stop_index: usize, len: usize, span: &Span) -> Result<()> { if stop_index < start_index { - Err(CompilerError::statement_array_assign_range_order(start_index, stop_index, len, span).into()) + Err( + CompilerError::statement_array_assign_range_order(start_index, stop_index, len, span, new_backtrace()) + .into(), + ) } else if start_index > len { - Err(CompilerError::statement_array_assign_index_bounds(start_index, len, span).into()) + Err(CompilerError::statement_array_assign_index_bounds(start_index, len, span, new_backtrace()).into()) } else if stop_index > len { - Err(CompilerError::statement_array_assign_index_bounds(stop_index, len, span).into()) + Err(CompilerError::statement_array_assign_index_bounds(stop_index, len, span, new_backtrace()).into()) } else { Ok(()) } diff --git a/compiler/src/statement/assign/assignee/tuple.rs b/compiler/src/statement/assign/assignee/tuple.rs index e69a4072d4..2a56d9122c 100644 --- a/compiler/src/statement/assign/assignee/tuple.rs +++ b/compiler/src/statement/assign/assignee/tuple.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; -use leo_errors::{CompilerError, LeoError}; +use leo_errors::{new_backtrace, CompilerError, Result}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -28,20 +28,26 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { cs: &mut CS, mut context: ResolverContext<'a, 'b, F, G>, index: usize, - ) -> Result<(), LeoError> { + ) -> Result<()> { if context.input.len() != 1 { - return Err(CompilerError::statement_array_assign_interior_index(&context.span).into()); + return Err(CompilerError::statement_array_assign_interior_index(&context.span, new_backtrace()).into()); } match context.input.remove(0) { ConstrainedValue::Tuple(old) => { if index > old.len() { - Err(CompilerError::statement_tuple_assign_index_bounds(index, old.len(), &context.span).into()) + Err(CompilerError::statement_tuple_assign_index_bounds( + index, + old.len(), + &context.span, + new_backtrace(), + ) + .into()) } else { context.input = vec![&mut old[index]]; self.resolve_target_access(cs, context) } } - _ => Err(CompilerError::statement_tuple_assign_index(&context.span).into()), + _ => Err(CompilerError::statement_tuple_assign_index(&context.span, new_backtrace()).into()), } } } diff --git a/compiler/src/statement/conditional/conditional.rs b/compiler/src/statement/conditional/conditional.rs index c37a4a336d..de04f77092 100644 --- a/compiler/src/statement/conditional/conditional.rs +++ b/compiler/src/statement/conditional/conditional.rs @@ -24,7 +24,7 @@ use crate::{ StatementResult, }; use leo_asg::ConditionalStatement; -use leo_errors::CompilerError; +use leo_errors::{new_backtrace, CompilerError}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::boolean::Boolean; @@ -60,6 +60,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { return Err(CompilerError::conditional_boolean_expression_fails_to_resolve_to_bool( value.to_string(), &span, + new_backtrace(), ) .into()); } @@ -77,7 +78,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { outer_indicator, &inner_indicator, ) - .map_err(|_| CompilerError::statement_indicator_calculation(branch_1_name, &span))?; + .map_err(|_| CompilerError::statement_indicator_calculation(branch_1_name, &span, new_backtrace()))?; let mut results = vec![]; @@ -98,7 +99,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { outer_indicator, &inner_indicator, ) - .map_err(|_| CompilerError::statement_indicator_calculation(branch_2_name, &span))?; + .map_err(|_| CompilerError::statement_indicator_calculation(branch_2_name, &span, new_backtrace()))?; // Evaluate branch 2 let mut branch_2_result = match statement.next.get() { diff --git a/compiler/src/statement/definition/definition.rs b/compiler/src/statement/definition/definition.rs index c2699a8594..369ed7374d 100644 --- a/compiler/src/statement/definition/definition.rs +++ b/compiler/src/statement/definition/definition.rs @@ -18,7 +18,7 @@ use crate::{program::ConstrainedProgram, ConstrainedValue, GroupType}; use leo_asg::{DefinitionStatement, Variable}; -use leo_errors::{CompilerError, LeoError, Span}; +use leo_errors::{new_backtrace, CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -29,12 +29,13 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { variable_names: &[&'a Variable<'a>], values: Vec>, span: &Span, - ) -> Result<(), LeoError> { + ) -> Result<()> { if values.len() != variable_names.len() { return Err(CompilerError::statement_invalid_number_of_definitions( values.len(), variable_names.len(), span, + new_backtrace(), ) .into()); } @@ -51,7 +52,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { &mut self, cs: &mut CS, statement: &DefinitionStatement<'a>, - ) -> Result<(), LeoError> { + ) -> Result<()> { let num_variables = statement.variables.len(); let expression = self.enforce_expression(cs, statement.value.get())?; @@ -66,7 +67,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { // ConstrainedValue::Return(values) => values, ConstrainedValue::Tuple(values) => values, value => { - return Err(CompilerError::statement_multiple_definition(value, &span).into()); + return Err(CompilerError::statement_multiple_definition(value, &span, new_backtrace()).into()); } }; diff --git a/compiler/src/statement/iteration/iteration.rs b/compiler/src/statement/iteration/iteration.rs index 801811e4be..229a2962bc 100644 --- a/compiler/src/statement/iteration/iteration.rs +++ b/compiler/src/statement/iteration/iteration.rs @@ -26,7 +26,7 @@ use crate::{ StatementResult, }; use leo_asg::IterationStatement; -use leo_errors::CompilerError; +use leo_errors::{new_backtrace, CompilerError}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::{boolean::Boolean, integers::uint::UInt32}; @@ -47,11 +47,11 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let from = self .enforce_index(cs, statement.start.get(), &span)? .to_usize() - .ok_or_else(|| CompilerError::statement_loop_index_const(&span))?; + .ok_or_else(|| CompilerError::statement_loop_index_const(&span, new_backtrace()))?; let to = self .enforce_index(cs, statement.stop.get(), &span)? .to_usize() - .ok_or_else(|| CompilerError::statement_loop_index_const(&span))?; + .ok_or_else(|| CompilerError::statement_loop_index_const(&span, new_backtrace()))?; let iter: Box> = match (from < to, statement.inclusive) { (true, true) => Box::new(from..=to), diff --git a/compiler/src/statement/return_/return_.rs b/compiler/src/statement/return_/return_.rs index 3563d82e33..a539592b4e 100644 --- a/compiler/src/statement/return_/return_.rs +++ b/compiler/src/statement/return_/return_.rs @@ -18,7 +18,7 @@ use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::ReturnStatement; -use leo_errors::LeoError; +use leo_errors::Result; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -28,7 +28,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { &mut self, cs: &mut CS, statement: &ReturnStatement<'a>, - ) -> Result, LeoError> { + ) -> Result> { let result = self.enforce_expression(cs, statement.expression.get())?; Ok(result) } diff --git a/compiler/src/statement/statement.rs b/compiler/src/statement/statement.rs index eb351f100e..970600ad62 100644 --- a/compiler/src/statement/statement.rs +++ b/compiler/src/statement/statement.rs @@ -18,13 +18,13 @@ use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::{Node, Statement}; -use leo_errors::{CompilerError, LeoError}; +use leo_errors::{new_backtrace, CompilerError, Result}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::boolean::Boolean; use snarkvm_r1cs::ConstraintSystem; -pub type StatementResult = Result; +pub type StatementResult = Result; pub type IndicatorAndConstrainedValue<'a, T, U> = (Boolean, ConstrainedValue<'a, T, U>); impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { @@ -82,9 +82,11 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { } } _ => { - return Err( - CompilerError::statement_unassigned(&statement.span.clone().unwrap_or_default()).into(), - ); + return Err(CompilerError::statement_unassigned( + &statement.span.clone().unwrap_or_default(), + new_backtrace(), + ) + .into()); } } } diff --git a/compiler/src/test.rs b/compiler/src/test.rs index 82f77395e2..b8d1a6fa83 100644 --- a/compiler/src/test.rs +++ b/compiler/src/test.rs @@ -18,7 +18,7 @@ use std::path::{Path, PathBuf}; use leo_asg::*; use leo_ast::{Ast, Program}; -use leo_errors::LeoError; +use leo_errors::Result; use leo_synthesizer::{CircuitSynthesizer, SerializedCircuit, SummarizedCircuit}; use leo_test_framework::{ @@ -66,7 +66,7 @@ fn hash(input: String) -> String { pub(crate) fn parse_program( program_string: &str, theorem_options: Option, -) -> Result { +) -> Result { let mut compiler = new_compiler("compiler-test".into(), theorem_options); compiler.parse_program_from_string(program_string)?; diff --git a/compiler/src/value/address/address.rs b/compiler/src/value/address/address.rs index b9a0ae444d..9d6bfc1d17 100644 --- a/compiler/src/value/address/address.rs +++ b/compiler/src/value/address/address.rs @@ -16,7 +16,7 @@ use crate::{ConstrainedValue, GroupType, IntegerTrait}; use leo_ast::InputValue; -use leo_errors::{CompilerError, LeoError, Span}; +use leo_errors::{new_backtrace, CompilerError, Result, Span}; use snarkvm_dpc::{account::Address as AleoAddress, testnet1::instantiated::Components}; use snarkvm_fields::PrimeField; @@ -41,9 +41,9 @@ pub struct Address { } impl Address { - pub(crate) fn constant(address: String, span: &Span) -> Result { - let address = - AleoAddress::from_str(&address).map_err(|e| CompilerError::address_value_account_error(e, span))?; + pub(crate) fn constant(address: String, span: &Span) -> Result { + let address = AleoAddress::from_str(&address) + .map_err(|e| CompilerError::address_value_account_error(e, span, new_backtrace()))?; let mut address_bytes = vec![]; address.write_le(&mut address_bytes).unwrap(); @@ -65,14 +65,14 @@ impl Address { name: &str, input_value: Option, span: &Span, - ) -> Result, LeoError> { + ) -> Result> { // Check that the input value is the correct type let address_value = match input_value { Some(input) => { if let InputValue::Address(string) = input { Some(string) } else { - return Err(CompilerError::address_value_invalid_address(name, span).into()); + return Err(CompilerError::address_value_invalid_address(name, span, new_backtrace()).into()); } } None => None, @@ -82,7 +82,7 @@ impl Address { cs.ns(|| format!("`{}: address` {}:{}", name, span.line_start, span.col_start)), || address_value.ok_or(SynthesisError::AssignmentMissing), ) - .map_err(|_| CompilerError::address_value_missing_address(span))?; + .map_err(|_| CompilerError::address_value_missing_address(span, new_backtrace()))?; Ok(ConstrainedValue::Address(address)) } diff --git a/compiler/src/value/boolean/input.rs b/compiler/src/value/boolean/input.rs index 0ee07d62c5..cc20523092 100644 --- a/compiler/src/value/boolean/input.rs +++ b/compiler/src/value/boolean/input.rs @@ -18,7 +18,7 @@ use crate::{value::ConstrainedValue, GroupType}; use leo_ast::InputValue; -use leo_errors::{CompilerError, LeoError, Span}; +use leo_errors::{new_backtrace, CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::{boolean::Boolean, traits::alloc::AllocGadget}; @@ -29,12 +29,12 @@ pub(crate) fn allocate_bool>( name: &str, option: Option, span: &Span, -) -> Result { +) -> Result { Ok(Boolean::alloc( cs.ns(|| format!("`{}: bool` {}:{}", name, span.line_start, span.col_start)), || option.ok_or(SynthesisError::AssignmentMissing), ) - .map_err(|_| CompilerError::boolean_value_missing_boolean(format!("{}: bool", name), span))?) + .map_err(|_| CompilerError::boolean_value_missing_boolean(format!("{}: bool", name), span, new_backtrace()))?) } pub(crate) fn bool_from_input<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( @@ -42,14 +42,14 @@ pub(crate) fn bool_from_input<'a, F: PrimeField, G: GroupType, CS: Constraint name: &str, input_value: Option, span: &Span, -) -> Result, LeoError> { +) -> Result> { // Check that the input value is the correct type let option = match input_value { Some(input) => { if let InputValue::Boolean(bool) = input { Some(bool) } else { - return Err(CompilerError::boolean_value_invalid_boolean(name, span).into()); + return Err(CompilerError::boolean_value_invalid_boolean(name, span, new_backtrace()).into()); } } None => None, diff --git a/compiler/src/value/char/char.rs b/compiler/src/value/char/char.rs index 3f7c094e53..65bf190ff7 100644 --- a/compiler/src/value/char/char.rs +++ b/compiler/src/value/char/char.rs @@ -21,7 +21,7 @@ use crate::{ }; use leo_ast::InputValue; -use leo_errors::{CompilerError, LeoError, Span}; +use leo_errors::{new_backtrace, CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::{ @@ -48,12 +48,7 @@ pub struct Char { } impl Char { - pub fn constant>( - cs: CS, - character: CharType, - field: String, - span: &Span, - ) -> Result { + pub fn constant>(cs: CS, character: CharType, field: String, span: &Span) -> Result { Ok(Self { character, field: FieldType::constant(cs, field, span)?, @@ -148,7 +143,7 @@ pub(crate) fn char_from_input<'a, F: PrimeField, G: GroupType, CS: Constraint name: &str, input_value: Option, span: &Span, -) -> Result, LeoError> { +) -> Result> { // Check that the parameter value is the correct type let option = match input_value { Some(input) => { @@ -160,7 +155,7 @@ pub(crate) fn char_from_input<'a, F: PrimeField, G: GroupType, CS: Constraint } } } else { - return Err(CompilerError::char_value_invalid_char(input, span).into()); + return Err(CompilerError::char_value_invalid_char(input, span, new_backtrace()).into()); } } None => (CharType::Scalar(0 as char), None), diff --git a/compiler/src/value/field/field_type.rs b/compiler/src/value/field/field_type.rs index 1753c5af08..6008f1a13f 100644 --- a/compiler/src/value/field/field_type.rs +++ b/compiler/src/value/field/field_type.rs @@ -17,7 +17,7 @@ //! A data type that represents a field value use crate::number_string_typing; -use leo_errors::{CompilerError, LeoError, Span}; +use leo_errors::{new_backtrace, CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::{ @@ -46,76 +46,74 @@ impl FieldType { } /// Returns a new `FieldType` from the given `String` or returns a `FieldError`. - pub fn constant>(cs: CS, string: String, span: &Span) -> Result { + pub fn constant>(cs: CS, string: String, span: &Span) -> Result { let number_info = number_string_typing(&string); let value = match number_info { - (number, neg) if neg => { - -F::from_str(&number).map_err(|_| CompilerError::field_value_invalid_field(string.clone(), span))? - } - (number, _) => { - F::from_str(&number).map_err(|_| CompilerError::field_value_invalid_field(string.clone(), span))? - } + (number, neg) if neg => -F::from_str(&number) + .map_err(|_| CompilerError::field_value_invalid_field(string.clone(), span, new_backtrace()))?, + (number, _) => F::from_str(&number) + .map_err(|_| CompilerError::field_value_invalid_field(string.clone(), span, new_backtrace()))?, }; let value = FpGadget::alloc_constant(cs, || Ok(value)) - .map_err(|_| CompilerError::field_value_invalid_field(string, span))?; + .map_err(|_| CompilerError::field_value_invalid_field(string, span, new_backtrace()))?; Ok(FieldType(value)) } /// Returns a new `FieldType` by calling the `FpGadget` `negate` function. - pub fn negate>(&self, cs: CS, span: &Span) -> Result { + pub fn negate>(&self, cs: CS, span: &Span) -> Result { let result = self .0 .negate(cs) - .map_err(|e| CompilerError::field_value_negate_operation(e, span))?; + .map_err(|e| CompilerError::field_value_negate_operation(e, span, new_backtrace()))?; Ok(FieldType(result)) } /// Returns a new `FieldType` by calling the `FpGadget` `add` function. - pub fn add>(&self, cs: CS, other: &Self, span: &Span) -> Result { + pub fn add>(&self, cs: CS, other: &Self, span: &Span) -> Result { let value = self .0 .add(cs, &other.0) - .map_err(|e| CompilerError::field_value_binary_operation("+", e, span))?; + .map_err(|e| CompilerError::field_value_binary_operation("+", e, span, new_backtrace()))?; Ok(FieldType(value)) } /// Returns a new `FieldType` by calling the `FpGadget` `sub` function. - pub fn sub>(&self, cs: CS, other: &Self, span: &Span) -> Result { + pub fn sub>(&self, cs: CS, other: &Self, span: &Span) -> Result { let value = self .0 .sub(cs, &other.0) - .map_err(|e| CompilerError::field_value_binary_operation("-", e, span))?; + .map_err(|e| CompilerError::field_value_binary_operation("-", e, span, new_backtrace()))?; Ok(FieldType(value)) } /// Returns a new `FieldType` by calling the `FpGadget` `mul` function. - pub fn mul>(&self, cs: CS, other: &Self, span: &Span) -> Result { + pub fn mul>(&self, cs: CS, other: &Self, span: &Span) -> Result { let value = self .0 .mul(cs, &other.0) - .map_err(|e| CompilerError::field_value_binary_operation("*", e, span))?; + .map_err(|e| CompilerError::field_value_binary_operation("*", e, span, new_backtrace()))?; Ok(FieldType(value)) } /// Returns a new `FieldType` by calling the `FpGadget` `inverse` function. - pub fn inverse>(&self, cs: CS, span: &Span) -> Result { + pub fn inverse>(&self, cs: CS, span: &Span) -> Result { let value = self .0 .inverse(cs) - .map_err(|e| CompilerError::field_value_binary_operation("inv", e, span))?; + .map_err(|e| CompilerError::field_value_binary_operation("inv", e, span, new_backtrace()))?; Ok(FieldType(value)) } /// Returns a new `FieldType` by calling the `FpGadget` `div` function. - pub fn div>(&self, mut cs: CS, other: &Self, span: &Span) -> Result { + pub fn div>(&self, mut cs: CS, other: &Self, span: &Span) -> Result { let inverse = other.inverse(cs.ns(|| "division inverse"), span)?; self.mul(cs, &inverse, span) diff --git a/compiler/src/value/field/input.rs b/compiler/src/value/field/input.rs index 74a30b3a95..eb3dceb5a1 100644 --- a/compiler/src/value/field/input.rs +++ b/compiler/src/value/field/input.rs @@ -18,7 +18,7 @@ use crate::{number_string_typing, value::ConstrainedValue, FieldType, GroupType}; use leo_ast::InputValue; -use leo_errors::{CompilerError, LeoError, Span}; +use leo_errors::{new_backtrace, CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::traits::alloc::AllocGadget; @@ -29,7 +29,7 @@ pub(crate) fn allocate_field>( name: &str, option: Option, span: &Span, -) -> Result, LeoError> { +) -> Result> { match option { Some(string) => { let number_info = number_string_typing(&string); @@ -40,20 +40,23 @@ pub(crate) fn allocate_field>( || Some(number).ok_or(SynthesisError::AssignmentMissing), ) .map(|value| value.negate(cs, span)) - .map_err(|_| CompilerError::field_value_missing_field(format!("{}: field", name), span))?, + .map_err(|_| { + CompilerError::field_value_missing_field(format!("{}: field", name), span, new_backtrace()) + })?, (number, _) => Ok(FieldType::alloc( cs.ns(|| format!("`{}: field` {}:{}", name, span.line_start, span.col_start)), || Some(number).ok_or(SynthesisError::AssignmentMissing), ) .map_err(|_| { - LeoError::from(CompilerError::field_value_missing_field( - format!("{}: field", name), - span, - )) + CompilerError::field_value_missing_field(format!("{}: field", name), span, new_backtrace()) })?), } } - None => return Err(CompilerError::field_value_missing_field(format!("{}: field", name), span).into()), + None => { + return Err( + CompilerError::field_value_missing_field(format!("{}: field", name), span, new_backtrace()).into(), + ); + } } } @@ -62,14 +65,14 @@ pub(crate) fn field_from_input<'a, F: PrimeField, G: GroupType, CS: Constrain name: &str, input_value: Option, span: &Span, -) -> Result, LeoError> { +) -> Result> { // Check that the parameter value is the correct type let option = match input_value { Some(input) => { if let InputValue::Field(string) = input { Some(string) } else { - return Err(CompilerError::field_value_invalid_field(input, span).into()); + return Err(CompilerError::field_value_invalid_field(input, span, new_backtrace()).into()); } } None => None, diff --git a/compiler/src/value/group/group_type.rs b/compiler/src/value/group/group_type.rs index f7e9fb2401..8ce9ffff7a 100644 --- a/compiler/src/value/group/group_type.rs +++ b/compiler/src/value/group/group_type.rs @@ -17,7 +17,7 @@ //! A data type that represents members in the group formed by the set of affine points on a curve. use leo_asg::GroupValue; -use leo_errors::{LeoError, Span}; +use leo_errors::{Result, Span}; use snarkvm_fields::{Field, One}; use snarkvm_gadgets::{ @@ -45,13 +45,13 @@ pub trait GroupType: + ToBitsBEGadget + ToBytesGadget { - fn constant(value: &GroupValue, span: &Span) -> Result; + fn constant(value: &GroupValue, span: &Span) -> Result; - fn to_allocated>(&self, cs: CS, span: &Span) -> Result; + fn to_allocated>(&self, cs: CS, span: &Span) -> Result; - fn negate>(&self, cs: CS, span: &Span) -> Result; + fn negate>(&self, cs: CS, span: &Span) -> Result; - fn add>(&self, cs: CS, other: &Self, span: &Span) -> Result; + fn add>(&self, cs: CS, other: &Self, span: &Span) -> Result; - fn sub>(&self, cs: CS, other: &Self, span: &Span) -> Result; + fn sub>(&self, cs: CS, other: &Self, span: &Span) -> Result; } diff --git a/compiler/src/value/group/input.rs b/compiler/src/value/group/input.rs index 93d1e7abcb..77181ac26e 100644 --- a/compiler/src/value/group/input.rs +++ b/compiler/src/value/group/input.rs @@ -19,7 +19,7 @@ use crate::{ConstrainedValue, GroupType}; use leo_asg::GroupValue; use leo_ast::InputValue; -use leo_errors::{CompilerError, LeoError, Span}; +use leo_errors::{new_backtrace, CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::{ConstraintSystem, SynthesisError}; @@ -29,12 +29,12 @@ pub(crate) fn allocate_group, CS: ConstraintSyste name: &str, option: Option, span: &Span, -) -> Result { +) -> Result { Ok(G::alloc( cs.ns(|| format!("`{}: group` {}:{}", name, span.line_start, span.col_start)), || option.ok_or(SynthesisError::AssignmentMissing), ) - .map_err(|_| CompilerError::group_value_missing_group(format!("{}: group", name), span))?) + .map_err(|_| CompilerError::group_value_missing_group(format!("{}: group", name), span, new_backtrace()))?) } pub(crate) fn group_from_input<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( @@ -42,14 +42,14 @@ pub(crate) fn group_from_input<'a, F: PrimeField, G: GroupType, CS: Constrain name: &str, input_value: Option, span: &Span, -) -> Result, LeoError> { +) -> Result> { // Check that the parameter value is the correct type let option = match input_value { Some(input) => { if let InputValue::Group(string) = input { Some(string) } else { - return Err(CompilerError::group_value_missing_group(input, span).into()); + return Err(CompilerError::group_value_missing_group(input, span, new_backtrace()).into()); } } None => None, diff --git a/compiler/src/value/group/targets/edwards_bls12.rs b/compiler/src/value/group/targets/edwards_bls12.rs index 65ae635f12..15107fb394 100644 --- a/compiler/src/value/group/targets/edwards_bls12.rs +++ b/compiler/src/value/group/targets/edwards_bls12.rs @@ -16,7 +16,7 @@ use crate::{number_string_typing, GroupType}; use leo_asg::{GroupCoordinate, GroupValue}; -use leo_errors::{CompilerError, LeoError, Span}; +use leo_errors::{new_backtrace, CompilerError, Result, Span}; use snarkvm_curves::{ edwards_bls12::{EdwardsAffine, EdwardsParameters, Fq}, @@ -53,32 +53,32 @@ pub enum EdwardsGroupType { } impl GroupType for EdwardsGroupType { - fn constant(group: &GroupValue, span: &Span) -> Result { + fn constant(group: &GroupValue, span: &Span) -> Result { let value = Self::edwards_affine_from_value(group, span)?; Ok(EdwardsGroupType::Constant(value)) } - fn to_allocated>(&self, mut cs: CS, span: &Span) -> Result { + fn to_allocated>(&self, mut cs: CS, span: &Span) -> Result { Ok(self .allocated(cs.ns(|| format!("allocate affine point {}:{}", span.line_start, span.col_start))) .map(|ebg| EdwardsGroupType::Allocated(Box::new(ebg))) - .map_err(|e| CompilerError::group_value_synthesis_error(e, span))?) + .map_err(|e| CompilerError::group_value_synthesis_error(e, span, new_backtrace()))?) } - fn negate>(&self, cs: CS, span: &Span) -> Result { + fn negate>(&self, cs: CS, span: &Span) -> Result { match self { EdwardsGroupType::Constant(group) => Ok(EdwardsGroupType::Constant(group.neg())), EdwardsGroupType::Allocated(group) => { let result = , Fq>>::negate(group, cs) - .map_err(|e| CompilerError::group_value_negate_operation(e, span))?; + .map_err(|e| CompilerError::group_value_negate_operation(e, span, new_backtrace()))?; Ok(EdwardsGroupType::Allocated(Box::new(result))) } } } - fn add>(&self, cs: CS, other: &Self, span: &Span) -> Result { + fn add>(&self, cs: CS, other: &Self, span: &Span) -> Result { match (self, other) { (EdwardsGroupType::Constant(self_value), EdwardsGroupType::Constant(other_value)) => { Ok(EdwardsGroupType::Constant(self_value.add(other_value))) @@ -90,7 +90,7 @@ impl GroupType for EdwardsGroupType { cs, other_value, ) - .map_err(|e| CompilerError::group_value_binary_operation("+", e, span))?; + .map_err(|e| CompilerError::group_value_binary_operation("+", e, span, new_backtrace()))?; Ok(EdwardsGroupType::Allocated(Box::new(result))) } @@ -100,13 +100,13 @@ impl GroupType for EdwardsGroupType { Ok(EdwardsGroupType::Allocated(Box::new( allocated_value .add_constant(cs, constant_value) - .map_err(|e| CompilerError::group_value_binary_operation("+", e, span))?, + .map_err(|e| CompilerError::group_value_binary_operation("+", e, span, new_backtrace()))?, ))) } } } - fn sub>(&self, cs: CS, other: &Self, span: &Span) -> Result { + fn sub>(&self, cs: CS, other: &Self, span: &Span) -> Result { match (self, other) { (EdwardsGroupType::Constant(self_value), EdwardsGroupType::Constant(other_value)) => { Ok(EdwardsGroupType::Constant(self_value.sub(other_value))) @@ -118,7 +118,7 @@ impl GroupType for EdwardsGroupType { cs, other_value, ) - .map_err(|e| CompilerError::group_value_binary_operation("-", e, span))?; + .map_err(|e| CompilerError::group_value_binary_operation("-", e, span, new_backtrace()))?; Ok(EdwardsGroupType::Allocated(Box::new(result))) } @@ -128,7 +128,7 @@ impl GroupType for EdwardsGroupType { Ok(EdwardsGroupType::Allocated(Box::new( allocated_value .sub_constant(cs, constant_value) - .map_err(|e| CompilerError::group_value_binary_operation("-", e, span))?, + .map_err(|e| CompilerError::group_value_binary_operation("-", e, span, new_backtrace()))?, ))) } } @@ -136,14 +136,14 @@ impl GroupType for EdwardsGroupType { } impl EdwardsGroupType { - pub fn edwards_affine_from_value(value: &GroupValue, span: &Span) -> Result { + pub fn edwards_affine_from_value(value: &GroupValue, span: &Span) -> Result { match value { GroupValue::Single(number, ..) => Self::edwards_affine_from_single(number, span), GroupValue::Tuple(x, y) => Self::edwards_affine_from_tuple(x, y, span), } } - pub fn edwards_affine_from_single(number: &str, span: &Span) -> Result { + pub fn edwards_affine_from_single(number: &str, span: &Span) -> Result { let number_info = number_string_typing(number); if number_info.0.eq("0") { @@ -151,12 +151,10 @@ impl EdwardsGroupType { } else { let one = edwards_affine_one(); let number_value = match number_info { - (number, neg) if neg => { - -Fp256::from_str(&number).map_err(|_| CompilerError::group_value_n_group(number, span))? - } - (number, _) => { - Fp256::from_str(&number).map_err(|_| CompilerError::group_value_n_group(number, span))? - } + (number, neg) if neg => -Fp256::from_str(&number) + .map_err(|_| CompilerError::group_value_n_group(number, span, new_backtrace()))?, + (number, _) => Fp256::from_str(&number) + .map_err(|_| CompilerError::group_value_n_group(number, span, new_backtrace()))?, }; let result: EdwardsAffine = one.mul(number_value); @@ -165,11 +163,7 @@ impl EdwardsGroupType { } } - pub fn edwards_affine_from_tuple( - x: &GroupCoordinate, - y: &GroupCoordinate, - span: &Span, - ) -> Result { + pub fn edwards_affine_from_tuple(x: &GroupCoordinate, y: &GroupCoordinate, span: &Span) -> Result { let x = x.clone(); let y = y.clone(); @@ -207,7 +201,11 @@ impl EdwardsGroupType { Self::edwards_affine_from_y_str(number_string_typing(&y_string), span, None, span) } // Invalid - (x, y) => return Err(CompilerError::group_value_invalid_group(format!("({}, {})", x, y), span).into()), + (x, y) => { + return Err( + CompilerError::group_value_invalid_group(format!("({}, {})", x, y), span, new_backtrace()).into(), + ); + } } } @@ -216,18 +214,18 @@ impl EdwardsGroupType { x_span: &Span, greatest: Option, element_span: &Span, - ) -> Result { + ) -> Result { let x = match x_info { - (x_str, neg) if neg => { - -Fq::from_str(&x_str).map_err(|_| CompilerError::group_value_x_invalid(x_str, x_span))? - } - (x_str, _) => Fq::from_str(&x_str).map_err(|_| CompilerError::group_value_x_invalid(x_str, x_span))?, + (x_str, neg) if neg => -Fq::from_str(&x_str) + .map_err(|_| CompilerError::group_value_x_invalid(x_str, x_span, new_backtrace()))?, + (x_str, _) => Fq::from_str(&x_str) + .map_err(|_| CompilerError::group_value_x_invalid(x_str, x_span, new_backtrace()))?, }; match greatest { // Sign provided Some(greatest) => Ok(EdwardsAffine::from_x_coordinate(x, greatest) - .ok_or_else(|| CompilerError::group_value_x_recover(element_span))?), + .ok_or_else(|| CompilerError::group_value_x_recover(element_span, new_backtrace()))?), // Sign inferred None => { // Attempt to recover with a sign_low bit. @@ -241,7 +239,7 @@ impl EdwardsGroupType { } // Otherwise return error. - Err(CompilerError::group_value_x_recover(element_span).into()) + Err(CompilerError::group_value_x_recover(element_span, new_backtrace()).into()) } } } @@ -251,18 +249,18 @@ impl EdwardsGroupType { y_span: &Span, greatest: Option, element_span: &Span, - ) -> Result { + ) -> Result { let y = match y_info { - (y_str, neg) if neg => { - -Fq::from_str(&y_str).map_err(|_| CompilerError::group_value_y_invalid(y_str, y_span))? - } - (y_str, _) => Fq::from_str(&y_str).map_err(|_| CompilerError::group_value_y_invalid(y_str, y_span))?, + (y_str, neg) if neg => -Fq::from_str(&y_str) + .map_err(|_| CompilerError::group_value_y_invalid(y_str, y_span, new_backtrace()))?, + (y_str, _) => Fq::from_str(&y_str) + .map_err(|_| CompilerError::group_value_y_invalid(y_str, y_span, new_backtrace()))?, }; match greatest { // Sign provided Some(greatest) => Ok(EdwardsAffine::from_y_coordinate(y, greatest) - .ok_or_else(|| CompilerError::group_value_y_recover(element_span))?), + .ok_or_else(|| CompilerError::group_value_y_recover(element_span, new_backtrace()))?), // Sign inferred None => { // Attempt to recover with a sign_low bit. @@ -276,7 +274,7 @@ impl EdwardsGroupType { } // Otherwise return error. - Err(CompilerError::group_value_y_recover(element_span).into()) + Err(CompilerError::group_value_y_recover(element_span, new_backtrace()).into()) } } } @@ -287,19 +285,19 @@ impl EdwardsGroupType { x_span: &Span, y_span: &Span, element_span: &Span, - ) -> Result { + ) -> Result { let x = match x_info { - (x_str, neg) if neg => { - -Fq::from_str(&x_str).map_err(|_| CompilerError::group_value_x_invalid(x_str, x_span))? - } - (x_str, _) => Fq::from_str(&x_str).map_err(|_| CompilerError::group_value_x_invalid(x_str, x_span))?, + (x_str, neg) if neg => -Fq::from_str(&x_str) + .map_err(|_| CompilerError::group_value_x_invalid(x_str, x_span, new_backtrace()))?, + (x_str, _) => Fq::from_str(&x_str) + .map_err(|_| CompilerError::group_value_x_invalid(x_str, x_span, new_backtrace()))?, }; let y = match y_info { - (y_str, neg) if neg => { - -Fq::from_str(&y_str).map_err(|_| CompilerError::group_value_y_invalid(y_str, y_span))? - } - (y_str, _) => Fq::from_str(&y_str).map_err(|_| CompilerError::group_value_y_invalid(y_str, y_span))?, + (y_str, neg) if neg => -Fq::from_str(&y_str) + .map_err(|_| CompilerError::group_value_y_invalid(y_str, y_span, new_backtrace()))?, + (y_str, _) => Fq::from_str(&y_str) + .map_err(|_| CompilerError::group_value_y_invalid(y_str, y_span, new_backtrace()))?, }; let element = EdwardsAffine::new(x, y); @@ -307,7 +305,7 @@ impl EdwardsGroupType { if element.is_on_curve() { Ok(element) } else { - Err(CompilerError::group_value_not_on_curve(element, element_span).into()) + Err(CompilerError::group_value_not_on_curve(element, element_span, new_backtrace()).into()) } } diff --git a/compiler/src/value/integer/integer.rs b/compiler/src/value/integer/integer.rs index 04d93af54e..5f7c276fa4 100644 --- a/compiler/src/value/integer/integer.rs +++ b/compiler/src/value/integer/integer.rs @@ -18,7 +18,7 @@ use crate::IntegerTrait; use leo_asg::{ConstInt, IntegerType}; use leo_ast::InputValue; -use leo_errors::{CompilerError, LeoError, Span}; +use leo_errors::{new_backtrace, CompilerError, Result, Span}; use snarkvm_fields::{Field, PrimeField}; use snarkvm_gadgets::{ @@ -132,7 +132,7 @@ impl Integer { name: &str, option: Option, span: &Span, - ) -> Result { + ) -> Result { Ok(match integer_type { IntegerType::U8 => allocate_type!(u8, UInt8, Integer::U8, cs, name, option, span), IntegerType::U16 => allocate_type!(u16, UInt16, Integer::U16, cs, name, option, span), @@ -154,20 +154,24 @@ impl Integer { name: &str, integer_value: Option, span: &Span, - ) -> Result { + ) -> Result { // Check that the input value is the correct type let option = match integer_value { Some(input) => { if let InputValue::Integer(type_, number) = input { let asg_type = IntegerType::from(type_); if std::mem::discriminant(&asg_type) != std::mem::discriminant(integer_type) { - return Err( - CompilerError::integer_value_integer_type_mismatch(integer_type, asg_type, span).into(), - ); + return Err(CompilerError::integer_value_integer_type_mismatch( + integer_type, + asg_type, + span, + new_backtrace(), + ) + .into()); } Some(number) } else { - return Err(CompilerError::integer_value_invalid_integer(input, span).into()); + return Err(CompilerError::integer_value_invalid_integer(input, span, new_backtrace()).into()); } } None => None, @@ -176,22 +180,17 @@ impl Integer { Self::allocate_type(cs, integer_type, name, option, span) } - pub fn negate>(self, cs: &mut CS, span: &Span) -> Result { + pub fn negate>(self, cs: &mut CS, span: &Span) -> Result { let unique_namespace = format!("enforce -{} {}:{}", self, span.line_start, span.col_start); let a = self; let result = match_signed_integer!(a, span => a.neg(cs.ns(|| unique_namespace))); - Ok(result.ok_or_else(|| CompilerError::integer_value_negate_operation(span))?) + Ok(result.ok_or_else(|| CompilerError::integer_value_negate_operation(span, new_backtrace()))?) } - pub fn add>( - self, - cs: &mut CS, - other: Self, - span: &Span, - ) -> Result { + pub fn add>(self, cs: &mut CS, other: Self, span: &Span) -> Result { let unique_namespace = format!("enforce {} + {} {}:{}", self, other, span.line_start, span.col_start); let a = self; @@ -199,15 +198,10 @@ impl Integer { let result = match_integers_span!((a, b), span => a.add(cs.ns(|| unique_namespace), &b)); - Ok(result.ok_or_else(|| CompilerError::integer_value_binary_operation("+", span))?) + Ok(result.ok_or_else(|| CompilerError::integer_value_binary_operation("+", span, new_backtrace()))?) } - pub fn sub>( - self, - cs: &mut CS, - other: Self, - span: &Span, - ) -> Result { + pub fn sub>(self, cs: &mut CS, other: Self, span: &Span) -> Result { let unique_namespace = format!("enforce {} - {} {}:{}", self, other, span.line_start, span.col_start); let a = self; @@ -215,15 +209,10 @@ impl Integer { let result = match_integers_span!((a, b), span => a.sub(cs.ns(|| unique_namespace), &b)); - Ok(result.ok_or_else(|| CompilerError::integer_value_binary_operation("-", span))?) + Ok(result.ok_or_else(|| CompilerError::integer_value_binary_operation("-", span, new_backtrace()))?) } - pub fn mul>( - self, - cs: &mut CS, - other: Self, - span: &Span, - ) -> Result { + pub fn mul>(self, cs: &mut CS, other: Self, span: &Span) -> Result { let unique_namespace = format!("enforce {} * {} {}:{}", self, other, span.line_start, span.col_start); let a = self; @@ -231,15 +220,10 @@ impl Integer { let result = match_integers_span!((a, b), span => a.mul(cs.ns(|| unique_namespace), &b)); - Ok(result.ok_or_else(|| CompilerError::integer_value_binary_operation("*", span))?) + Ok(result.ok_or_else(|| CompilerError::integer_value_binary_operation("*", span, new_backtrace()))?) } - pub fn div>( - self, - cs: &mut CS, - other: Self, - span: &Span, - ) -> Result { + pub fn div>(self, cs: &mut CS, other: Self, span: &Span) -> Result { let unique_namespace = format!("enforce {} ÷ {} {}:{}", self, other, span.line_start, span.col_start); let a = self; @@ -247,15 +231,10 @@ impl Integer { let result = match_integers_span!((a, b), span => a.div(cs.ns(|| unique_namespace), &b)); - Ok(result.ok_or_else(|| CompilerError::integer_value_binary_operation("÷", span))?) + Ok(result.ok_or_else(|| CompilerError::integer_value_binary_operation("÷", span, new_backtrace()))?) } - pub fn pow>( - self, - cs: &mut CS, - other: Self, - span: &Span, - ) -> Result { + pub fn pow>(self, cs: &mut CS, other: Self, span: &Span) -> Result { let unique_namespace = format!("enforce {} ** {} {}:{}", self, other, span.line_start, span.col_start); let a = self; @@ -263,7 +242,7 @@ impl Integer { let result = match_integers_span!((a, b), span => a.pow(cs.ns(|| unique_namespace), &b)); - Ok(result.ok_or_else(|| CompilerError::integer_value_binary_operation("**", span))?) + Ok(result.ok_or_else(|| CompilerError::integer_value_binary_operation("**", span, new_backtrace()))?) } } diff --git a/compiler/src/value/integer/macros.rs b/compiler/src/value/integer/macros.rs index 67ae416946..9ebf29ccd6 100644 --- a/compiler/src/value/integer/macros.rs +++ b/compiler/src/value/integer/macros.rs @@ -55,21 +55,31 @@ macro_rules! match_unsigned_integer { macro_rules! match_signed_integer { ($integer: ident, $span: ident => $expression: expr) => { match $integer { - Integer::I8($integer) => Some(Integer::I8( - $expression.map_err(|e| CompilerError::integer_value_signed(e, $span))?, - )), - Integer::I16($integer) => Some(Integer::I16( - $expression.map_err(|e| CompilerError::integer_value_signed(e, $span))?, - )), - Integer::I32($integer) => Some(Integer::I32( - $expression.map_err(|e| CompilerError::integer_value_signed(e, $span))?, - )), - Integer::I64($integer) => Some(Integer::I64( - $expression.map_err(|e| CompilerError::integer_value_signed(e, $span))?, - )), - Integer::I128($integer) => Some(Integer::I128( - $expression.map_err(|e| CompilerError::integer_value_signed(e, $span))?, - )), + Integer::I8($integer) => { + Some(Integer::I8($expression.map_err(|e| { + CompilerError::integer_value_signed(e, $span, new_backtrace()) + })?)) + } + Integer::I16($integer) => { + Some(Integer::I16($expression.map_err(|e| { + CompilerError::integer_value_signed(e, $span, new_backtrace()) + })?)) + } + Integer::I32($integer) => { + Some(Integer::I32($expression.map_err(|e| { + CompilerError::integer_value_signed(e, $span, new_backtrace()) + })?)) + } + Integer::I64($integer) => { + Some(Integer::I64($expression.map_err(|e| { + CompilerError::integer_value_signed(e, $span, new_backtrace()) + })?)) + } + Integer::I128($integer) => { + Some(Integer::I128($expression.map_err(|e| { + CompilerError::integer_value_signed(e, $span, new_backtrace()) + })?)) + } _ => None, } @@ -100,37 +110,57 @@ macro_rules! match_integers { macro_rules! match_integers_span { (($a: ident, $b: ident), $span: ident => $expression:expr) => { match ($a, $b) { - (Integer::U8($a), Integer::U8($b)) => Some(Integer::U8( - $expression.map_err(|e| CompilerError::integer_value_unsigned(e, $span))?, - )), - (Integer::U16($a), Integer::U16($b)) => Some(Integer::U16( - $expression.map_err(|e| CompilerError::integer_value_unsigned(e, $span))?, - )), - (Integer::U32($a), Integer::U32($b)) => Some(Integer::U32( - $expression.map_err(|e| CompilerError::integer_value_unsigned(e, $span))?, - )), - (Integer::U64($a), Integer::U64($b)) => Some(Integer::U64( - $expression.map_err(|e| CompilerError::integer_value_unsigned(e, $span))?, - )), - (Integer::U128($a), Integer::U128($b)) => Some(Integer::U128( - $expression.map_err(|e| CompilerError::integer_value_unsigned(e, $span))?, - )), + (Integer::U8($a), Integer::U8($b)) => { + Some(Integer::U8($expression.map_err(|e| { + CompilerError::integer_value_unsigned(e, $span, new_backtrace()) + })?)) + } + (Integer::U16($a), Integer::U16($b)) => { + Some(Integer::U16($expression.map_err(|e| { + CompilerError::integer_value_unsigned(e, $span, new_backtrace()) + })?)) + } + (Integer::U32($a), Integer::U32($b)) => { + Some(Integer::U32($expression.map_err(|e| { + CompilerError::integer_value_unsigned(e, $span, new_backtrace()) + })?)) + } + (Integer::U64($a), Integer::U64($b)) => { + Some(Integer::U64($expression.map_err(|e| { + CompilerError::integer_value_unsigned(e, $span, new_backtrace()) + })?)) + } + (Integer::U128($a), Integer::U128($b)) => { + Some(Integer::U128($expression.map_err(|e| { + CompilerError::integer_value_unsigned(e, $span, new_backtrace()) + })?)) + } - (Integer::I8($a), Integer::I8($b)) => Some(Integer::I8( - $expression.map_err(|e| CompilerError::integer_value_unsigned(e, $span))?, - )), - (Integer::I16($a), Integer::I16($b)) => Some(Integer::I16( - $expression.map_err(|e| CompilerError::integer_value_unsigned(e, $span))?, - )), - (Integer::I32($a), Integer::I32($b)) => Some(Integer::I32( - $expression.map_err(|e| CompilerError::integer_value_unsigned(e, $span))?, - )), - (Integer::I64($a), Integer::I64($b)) => Some(Integer::I64( - $expression.map_err(|e| CompilerError::integer_value_unsigned(e, $span))?, - )), - (Integer::I128($a), Integer::I128($b)) => Some(Integer::I128( - $expression.map_err(|e| CompilerError::integer_value_unsigned(e, $span))?, - )), + (Integer::I8($a), Integer::I8($b)) => { + Some(Integer::I8($expression.map_err(|e| { + CompilerError::integer_value_unsigned(e, $span, new_backtrace()) + })?)) + } + (Integer::I16($a), Integer::I16($b)) => { + Some(Integer::I16($expression.map_err(|e| { + CompilerError::integer_value_unsigned(e, $span, new_backtrace()) + })?)) + } + (Integer::I32($a), Integer::I32($b)) => { + Some(Integer::I32($expression.map_err(|e| { + CompilerError::integer_value_unsigned(e, $span, new_backtrace()) + })?)) + } + (Integer::I64($a), Integer::I64($b)) => { + Some(Integer::I64($expression.map_err(|e| { + CompilerError::integer_value_unsigned(e, $span, new_backtrace()) + })?)) + } + (Integer::I128($a), Integer::I128($b)) => { + Some(Integer::I128($expression.map_err(|e| { + CompilerError::integer_value_unsigned(e, $span, new_backtrace()) + })?)) + } (_, _) => None, } }; @@ -141,7 +171,7 @@ macro_rules! allocate_type { let option = $option .map(|s| { s.parse::<$rust_ty>() - .map_err(|_| CompilerError::integer_value_invalid_integer(s, $span)) + .map_err(|_| CompilerError::integer_value_invalid_integer(s, $span, new_backtrace())) }) .transpose()?; @@ -161,6 +191,7 @@ macro_rules! allocate_type { CompilerError::integer_value_missing_integer( format!("{}: {}", $name.to_string(), stringify!($rust_ty)), $span, + new_backtrace(), ) })?; diff --git a/compiler/src/value/value.rs b/compiler/src/value/value.rs index fdcdc903a4..2a227ba845 100644 --- a/compiler/src/value/value.rs +++ b/compiler/src/value/value.rs @@ -18,7 +18,7 @@ use crate::{Address, Char, FieldType, GroupType, Integer}; use leo_asg::{Circuit, Identifier, Type}; -use leo_errors::{LeoError, Span}; +use leo_errors::{Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::{ @@ -52,7 +52,7 @@ pub enum ConstrainedValue<'a, F: PrimeField, G: GroupType> { } impl<'a, F: PrimeField, G: GroupType> ConstrainedValue<'a, F, G> { - pub(crate) fn to_type(&self, span: &Span) -> Result, LeoError> { + pub(crate) fn to_type(&self, span: &Span) -> Result> { Ok(match self { // Data types ConstrainedValue::Address(_address) => Type::Address, diff --git a/errors/src/common/formatted.rs b/errors/src/common/formatted.rs index 7e735b5ddc..623b668443 100644 --- a/errors/src/common/formatted.rs +++ b/errors/src/common/formatted.rs @@ -18,6 +18,8 @@ use crate::{BacktracedError, Span}; use std::{fmt, sync::Arc}; +use backtrace::Backtrace; + pub const INDENT: &str = " "; /// Formatted compiler error type @@ -47,6 +49,7 @@ impl FormattedError { code_identifier: u32, error_type: String, span: &Span, + backtrace: Backtrace, ) -> Self where S: ToString, @@ -64,7 +67,7 @@ impl FormattedError { exit_code, code_identifier, error_type, - span.backtrace.clone(), + backtrace, ), } } diff --git a/errors/src/common/macros.rs b/errors/src/common/macros.rs index cf84897fa9..9c39eb96a5 100644 --- a/errors/src/common/macros.rs +++ b/errors/src/common/macros.rs @@ -71,7 +71,7 @@ macro_rules! create_errors { ).into() } - fn new_from_span(message: S, help: Option, exit_code: u32, span: &Span) -> Self + fn new_from_span(message: S, help: Option, exit_code: u32, span: &Span, backtrace: Backtrace) -> Self where S: ToString { FormattedError::new_from_span( message, @@ -80,6 +80,7 @@ macro_rules! create_errors { Self::code_identifier(), Self::error_type(), span, + backtrace, ).into() } } @@ -89,9 +90,9 @@ macro_rules! create_errors { } }; (@step $code:expr, (formatted, $error_name:ident($($arg_names:ident: $arg_types:ty,)*), $message:expr, $help:expr), $(($formatted_or_backtraced_tail:ident, $names:ident($($tail_arg_names:ident: $tail_arg_types:ty,)*), $messages:expr, $helps:expr),)*) => { - pub fn $error_name($($arg_names: $arg_types,)* span: &Span) -> Self { + pub fn $error_name($($arg_names: $arg_types,)* span: &Span, backtrace: Backtrace) -> Self { - Self::new_from_span($message, $help, $code, span) + Self::new_from_span($message, $help, $code, span, backtrace) } create_errors!(@step $code + 1u32, $(($formatted_or_backtraced_tail, $names($($tail_arg_names: $tail_arg_types,)*), $messages, $helps),)*); diff --git a/errors/src/common/span.rs b/errors/src/common/span.rs index 0c2d4d8a29..edebeb5d21 100644 --- a/errors/src/common/span.rs +++ b/errors/src/common/span.rs @@ -16,14 +16,11 @@ use std::{fmt, sync::Arc, usize}; -use backtrace::Backtrace; -use derivative::Derivative; use pest::Span as PestSpan; use serde::{Deserialize, Serialize}; use tendril::StrTendril; -#[derive(Derivative, Deserialize, Serialize)] -#[derivative(Clone, Debug, Default, Eq, Hash, PartialEq)] +#[derive(Clone, Debug, Default, Deserialize, Eq, Hash, PartialEq, Serialize)] pub struct Span { pub line_start: usize, pub line_stop: usize, @@ -32,10 +29,6 @@ pub struct Span { pub path: Arc, #[serde(with = "crate::tendril_json")] pub content: StrTendril, - #[derivative(PartialEq = "ignore")] - #[derivative(Hash = "ignore")] - #[serde(skip)] - pub backtrace: Backtrace, } impl Span { @@ -54,7 +47,6 @@ impl Span { col_stop, path, content, - backtrace: Backtrace::new(), } } } @@ -110,7 +102,6 @@ impl std::ops::Add for Span { col_stop: self.col_stop.max(other.col_stop), path: self.path, content: self.content, - backtrace: self.backtrace, } } else { let mut new_content = vec![]; @@ -134,7 +125,6 @@ impl std::ops::Add for Span { col_stop: other.col_stop, path: self.path, content: new_content, - backtrace: self.backtrace, } } else { Span { @@ -144,7 +134,6 @@ impl std::ops::Add for Span { col_stop: self.col_stop, path: self.path, content: new_content, - backtrace: self.backtrace, } } } diff --git a/errors/src/common/traits.rs b/errors/src/common/traits.rs index 5e34f0db83..a08d9b11cc 100644 --- a/errors/src/common/traits.rs +++ b/errors/src/common/traits.rs @@ -29,7 +29,7 @@ pub trait ErrorCode: Sized { where S: ToString; - fn new_from_span(message: S, help: Option, exit_code: u32, span: &Span) -> Self + fn new_from_span(message: S, help: Option, exit_code: u32, span: &Span, backtrace: Backtrace) -> Self where S: ToString; } diff --git a/imports/src/parser/import_parser.rs b/imports/src/parser/import_parser.rs index 022b79e381..0f49b70d5b 100644 --- a/imports/src/parser/import_parser.rs +++ b/imports/src/parser/import_parser.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use leo_asg::{AsgContext, ImportResolver, Program}; -use leo_errors::{ImportError, LeoError, Result, Span}; +use leo_errors::{new_backtrace, ImportError, LeoError, Result, Span}; use indexmap::{IndexMap, IndexSet}; use std::path::PathBuf; @@ -50,7 +50,7 @@ impl<'a> ImportResolver<'a> for ImportParser<'a> { ) -> Result>> { let full_path = package_segments.join("."); if self.partial_imports.contains(&full_path) { - return Err(ImportError::recursive_imports(full_path, span).into()); + return Err(ImportError::recursive_imports(full_path, span, new_backtrace()).into()); } if let Some(program) = self.imports.get(&full_path) { return Ok(Some(program.clone())); diff --git a/imports/src/parser/parse_package.rs b/imports/src/parser/parse_package.rs index 3f2079598b..f76456c8f7 100644 --- a/imports/src/parser/parse_package.rs +++ b/imports/src/parser/parse_package.rs @@ -16,7 +16,7 @@ use crate::ImportParser; use leo_asg::{AsgContext, Program}; -use leo_errors::{ImportError, Result, Span}; +use leo_errors::{new_backtrace, ImportError, Result, Span}; use std::{fs, fs::DirEntry, path::PathBuf}; @@ -83,9 +83,9 @@ impl<'a> ImportParser<'a> { // Get a vector of all packages in the source directory. let entries = fs::read_dir(path) - .map_err(|error| ImportError::directory_error(error, &error_path, span))? + .map_err(|error| ImportError::directory_error(error, &error_path, span, new_backtrace()))? .collect::, std::io::Error>>() - .map_err(|error| ImportError::directory_error(error, &error_path, span))?; + .map_err(|error| ImportError::directory_error(error, &error_path, span, new_backtrace()))?; // Check if the imported package name is in the source directory. let matched_source_entry = entries.into_iter().find(|entry| { @@ -100,9 +100,9 @@ impl<'a> ImportParser<'a> { if imports_directory.exists() { // Get a vector of all packages in the imports directory. let entries = fs::read_dir(imports_directory) - .map_err(|error| ImportError::directory_error(error, &error_path, span))? + .map_err(|error| ImportError::directory_error(error, &error_path, span, new_backtrace()))? .collect::, std::io::Error>>() - .map_err(|error| ImportError::directory_error(error, error_path, span))?; + .map_err(|error| ImportError::directory_error(error, error_path, span, new_backtrace()))?; // Check if the imported package name is in the imports directory. let matched_import_entry = entries @@ -111,16 +111,16 @@ impl<'a> ImportParser<'a> { // Check if the package name was found in both the source and imports directory. match (matched_source_entry, matched_import_entry) { - (Some(_), Some(_)) => Err(ImportError::conflicting_imports(package_name, span).into()), + (Some(_), Some(_)) => Err(ImportError::conflicting_imports(package_name, span, new_backtrace()).into()), (Some(source_entry), None) => self.parse_package_access(context, &source_entry, &segments[1..], span), (None, Some(import_entry)) => self.parse_package_access(context, &import_entry, &segments[1..], span), - (None, None) => Err(ImportError::unknown_package(package_name, span).into()), + (None, None) => Err(ImportError::unknown_package(package_name, span, new_backtrace()).into()), } } else { // Enforce local package access with no found imports directory match matched_source_entry { Some(source_entry) => self.parse_package_access(context, &source_entry, &segments[1..], span), - None => Err(ImportError::unknown_package(package_name, span).into()), + None => Err(ImportError::unknown_package(package_name, span, new_backtrace()).into()), } } } diff --git a/imports/src/parser/parse_symbol.rs b/imports/src/parser/parse_symbol.rs index aa7f52a9fe..95e1961e10 100644 --- a/imports/src/parser/parse_symbol.rs +++ b/imports/src/parser/parse_symbol.rs @@ -16,7 +16,7 @@ use crate::ImportParser; use leo_ast::Program; -use leo_errors::{ImportError, Result, Span}; +use leo_errors::{new_backtrace, ImportError, Result, Span}; use std::fs::DirEntry; @@ -32,26 +32,26 @@ impl<'a> ImportParser<'a> { // Get the package file type. let file_type = package .file_type() - .map_err(|error| ImportError::directory_error(error, package.path(), span))?; + .map_err(|error| ImportError::directory_error(error, package.path(), span, new_backtrace()))?; let file_name = package .file_name() .into_string() - .map_err(|_| ImportError::convert_os_string(span))?; + .map_err(|_| ImportError::convert_os_string(span, new_backtrace()))?; let mut file_path = package.path(); if file_type.is_dir() { file_path.push(MAIN_FILE); if !file_path.exists() { - return Err(ImportError::expected_main_file(file_path.as_path(), span).into()); + return Err(ImportError::expected_main_file(file_path.as_path(), span, new_backtrace()).into()); } } let file_path_str = file_path.to_str().unwrap_or_default(); // Build the package abstract syntax tree. - let program_string = - &std::fs::read_to_string(&file_path).map_err(|x| ImportError::io_error(file_path_str, x, span))?; + let program_string = &std::fs::read_to_string(&file_path) + .map_err(|x| ImportError::io_error(file_path_str, x, span, new_backtrace()))?; let mut program = leo_parser::parse(file_path_str, program_string)?; program.name = file_name; let mut ast = leo_ast::Ast::new(program); diff --git a/package/Cargo.toml b/package/Cargo.toml index 507d05acf4..2e79acfb60 100644 --- a/package/Cargo.toml +++ b/package/Cargo.toml @@ -21,9 +21,6 @@ edition = "2018" path = "../errors" version = "1.5.3" -[dependencies.backtrace] -version = "0.3.61" - [dependencies.serde] version = "1.0" features = [ "derive" ] diff --git a/package/src/imports/directory.rs b/package/src/imports/directory.rs index aec8bd3b6c..17a98fd41a 100644 --- a/package/src/imports/directory.rs +++ b/package/src/imports/directory.rs @@ -14,12 +14,10 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use leo_errors::{PackageError, Result}; +use leo_errors::{new_backtrace, PackageError, Result}; use std::{borrow::Cow, fs, path::Path}; -use backtrace::Backtrace; - pub static IMPORTS_DIRECTORY_NAME: &str = "imports/"; pub struct ImportsDirectory; @@ -32,7 +30,7 @@ impl ImportsDirectory { path.to_mut().push(IMPORTS_DIRECTORY_NAME); } - fs::create_dir_all(&path).map_err(|e| PackageError::failed_to_create_imports_directory(e, Backtrace::new()))?; + fs::create_dir_all(&path).map_err(|e| PackageError::failed_to_create_imports_directory(e, new_backtrace()))?; Ok(()) } @@ -46,10 +44,10 @@ impl ImportsDirectory { path.to_mut().push(package_name); if !path.exists() || !path.is_dir() { - return Err(PackageError::import_does_not_exist(package_name, Backtrace::new()).into()); + return Err(PackageError::import_does_not_exist(package_name, new_backtrace()).into()); } - fs::remove_dir_all(&path).map_err(|e| PackageError::failed_to_remove_imports_directory(e, Backtrace::new()))?; + fs::remove_dir_all(&path).map_err(|e| PackageError::failed_to_remove_imports_directory(e, new_backtrace()))?; Ok(()) } diff --git a/package/src/inputs/directory.rs b/package/src/inputs/directory.rs index cb79277c34..76e748c8a7 100644 --- a/package/src/inputs/directory.rs +++ b/package/src/inputs/directory.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use leo_errors::{PackageError, Result}; +use leo_errors::{new_backtrace, PackageError, Result}; use std::{ borrow::Cow, @@ -23,8 +23,6 @@ use std::{ path::{Path, PathBuf}, }; -use backtrace::Backtrace; - pub static INPUTS_DIRECTORY_NAME: &str = "inputs/"; pub struct InputsDirectory; @@ -37,7 +35,7 @@ impl InputsDirectory { path.to_mut().push(INPUTS_DIRECTORY_NAME); } - fs::create_dir_all(&path).map_err(|e| PackageError::failed_to_create_inputs_directory(e, Backtrace::new()))?; + fs::create_dir_all(&path).map_err(|e| PackageError::failed_to_create_inputs_directory(e, new_backtrace()))?; Ok(()) } @@ -47,7 +45,7 @@ impl InputsDirectory { path.push(INPUTS_DIRECTORY_NAME); let directory = - fs::read_dir(&path).map_err(|e| PackageError::failed_to_read_inputs_directory(e, Backtrace::new()))?; + fs::read_dir(&path).map_err(|e| PackageError::failed_to_read_inputs_directory(e, new_backtrace()))?; let mut file_paths = Vec::new(); parse_file_paths(directory, &mut file_paths)?; @@ -57,16 +55,16 @@ impl InputsDirectory { fn parse_file_paths(directory: ReadDir, file_paths: &mut Vec) -> Result<()> { for file_entry in directory.into_iter() { - let file_entry = file_entry.map_err(|e| PackageError::failed_to_get_input_file_entry(e, Backtrace::new()))?; + let file_entry = file_entry.map_err(|e| PackageError::failed_to_get_input_file_entry(e, new_backtrace()))?; let file_path = file_entry.path(); // Verify that the entry is structured as a valid file or directory let file_type = file_entry.file_type().map_err(|e| { - PackageError::failed_to_get_input_file_type(file_path.as_os_str().to_owned(), e, Backtrace::new()) + PackageError::failed_to_get_input_file_type(file_path.as_os_str().to_owned(), e, new_backtrace()) })?; if file_type.is_dir() { let directory = fs::read_dir(&file_path) - .map_err(|e| PackageError::failed_to_read_inputs_directory(e, Backtrace::new()))?; + .map_err(|e| PackageError::failed_to_read_inputs_directory(e, new_backtrace()))?; parse_file_paths(directory, file_paths)?; continue; @@ -74,7 +72,7 @@ fn parse_file_paths(directory: ReadDir, file_paths: &mut Vec) -> Result return Err(PackageError::invalid_input_file_type( file_path.as_os_str().to_owned(), file_type, - Backtrace::new(), + new_backtrace(), ) .into()); } diff --git a/package/src/inputs/input.rs b/package/src/inputs/input.rs index d832cbbbc8..d0bf718950 100644 --- a/package/src/inputs/input.rs +++ b/package/src/inputs/input.rs @@ -18,9 +18,8 @@ use crate::inputs::INPUTS_DIRECTORY_NAME; -use leo_errors::{PackageError, Result}; +use leo_errors::{new_backtrace, PackageError, Result}; -use backtrace::Backtrace; use serde::Deserialize; use std::{ borrow::Cow, @@ -60,17 +59,17 @@ impl InputFile { let path = self.setup_file_path(path); let input = fs::read_to_string(&path) - .map_err(|_| PackageError::failed_to_read_input_file(path.clone().into_owned(), Backtrace::new()))?; + .map_err(|_| PackageError::failed_to_read_input_file(path.clone().into_owned(), new_backtrace()))?; Ok((input, path)) } /// Writes the standard input format to a file. pub fn write_to(self, path: &Path) -> Result<()> { let path = self.setup_file_path(path); - let mut file = File::create(&path).map_err(|e| PackageError::io_error_input_file(e, Backtrace::new()))?; + let mut file = File::create(&path).map_err(|e| PackageError::io_error_input_file(e, new_backtrace()))?; file.write_all(self.template().as_bytes()) - .map_err(|e| PackageError::io_error_input_file(e, Backtrace::new()))?; + .map_err(|e| PackageError::io_error_input_file(e, new_backtrace()))?; Ok(()) } diff --git a/package/src/inputs/pairs.rs b/package/src/inputs/pairs.rs index 6fca57fb73..7294b5bb28 100644 --- a/package/src/inputs/pairs.rs +++ b/package/src/inputs/pairs.rs @@ -15,12 +15,10 @@ // along with the Leo library. If not, see . use crate::inputs::{InputFile, InputsDirectory, StateFile, INPUT_FILE_EXTENSION, STATE_FILE_EXTENSION}; -use leo_errors::{LeoError, PackageError}; +use leo_errors::{new_backtrace, LeoError, PackageError}; use std::{collections::HashMap, convert::TryFrom, path::Path}; -use backtrace::Backtrace; - #[derive(Default)] pub struct InputPairs { /// Maps file names to input file pairs @@ -61,12 +59,12 @@ impl TryFrom<&Path> for InputPairs { Some(file_name) => file_name, None => { return Err( - PackageError::failed_to_get_input_file_name(file.as_os_str(), Backtrace::new()).into(), + PackageError::failed_to_get_input_file_name(file.as_os_str(), new_backtrace()).into(), ); } }, None => { - return Err(PackageError::failed_to_get_input_file_name(file.as_os_str(), Backtrace::new()).into()); + return Err(PackageError::failed_to_get_input_file_name(file.as_os_str(), new_backtrace()).into()); } }; diff --git a/package/src/inputs/state.rs b/package/src/inputs/state.rs index bafda5de55..057d72bd0e 100644 --- a/package/src/inputs/state.rs +++ b/package/src/inputs/state.rs @@ -17,9 +17,8 @@ //! The `program.state` file. use crate::inputs::INPUTS_DIRECTORY_NAME; -use leo_errors::{PackageError, Result}; +use leo_errors::{new_backtrace, PackageError, Result}; -use backtrace::Backtrace; use serde::Deserialize; use std::{ borrow::Cow, @@ -59,18 +58,18 @@ impl StateFile { let path = self.setup_file_path(path); let input = fs::read_to_string(&path) - .map_err(|_| PackageError::failed_to_read_state_file(path.clone().into_owned(), Backtrace::new()))?; + .map_err(|_| PackageError::failed_to_read_state_file(path.clone().into_owned(), new_backtrace()))?; Ok((input, path)) } /// Writes the standard input format to a file. pub fn write_to(self, path: &Path) -> Result<()> { let path = self.setup_file_path(path); - let mut file = File::create(&path).map_err(|e| PackageError::io_error_state_file(e, Backtrace::new()))?; + let mut file = File::create(&path).map_err(|e| PackageError::io_error_state_file(e, new_backtrace()))?; Ok(file .write_all(self.template().as_bytes()) - .map_err(|e| PackageError::io_error_state_file(e, Backtrace::new()))?) + .map_err(|e| PackageError::io_error_state_file(e, new_backtrace()))?) } fn template(&self) -> String { diff --git a/package/src/outputs/checksum.rs b/package/src/outputs/checksum.rs index 933ab003d4..e0b3f10b8d 100644 --- a/package/src/outputs/checksum.rs +++ b/package/src/outputs/checksum.rs @@ -17,9 +17,8 @@ //! The build checksum file. use crate::outputs::OUTPUTS_DIRECTORY_NAME; -use leo_errors::{PackageError, Result}; +use leo_errors::{new_backtrace, PackageError, Result}; -use backtrace::Backtrace; use serde::Deserialize; use std::{ borrow::Cow, @@ -55,17 +54,17 @@ impl ChecksumFile { let path = self.setup_file_path(path); let string = fs::read_to_string(&path) - .map_err(|_| PackageError::failed_to_read_checksum_file(path.into_owned(), Backtrace::new()))?; + .map_err(|_| PackageError::failed_to_read_checksum_file(path.into_owned(), new_backtrace()))?; Ok(string) } /// Writes the given checksum to a file. pub fn write_to(&self, path: &Path, checksum: String) -> Result<()> { let path = self.setup_file_path(path); - let mut file = File::create(&path).map_err(|e| PackageError::io_error_checksum_file(e, Backtrace::new()))?; + let mut file = File::create(&path).map_err(|e| PackageError::io_error_checksum_file(e, new_backtrace()))?; file.write_all(checksum.as_bytes()) - .map_err(|e| PackageError::io_error_checksum_file(e, Backtrace::new()))?; + .map_err(|e| PackageError::io_error_checksum_file(e, new_backtrace()))?; Ok(()) } @@ -78,7 +77,7 @@ impl ChecksumFile { } fs::remove_file(&path) - .map_err(|_| PackageError::failed_to_remove_checksum_file(path.into_owned(), Backtrace::new()))?; + .map_err(|_| PackageError::failed_to_remove_checksum_file(path.into_owned(), new_backtrace()))?; Ok(true) } diff --git a/package/src/outputs/circuit.rs b/package/src/outputs/circuit.rs index 364287f38e..eaa2052d4e 100644 --- a/package/src/outputs/circuit.rs +++ b/package/src/outputs/circuit.rs @@ -17,9 +17,8 @@ //! The serialized circuit output file. use crate::outputs::OUTPUTS_DIRECTORY_NAME; -use leo_errors::{PackageError, Result}; +use leo_errors::{new_backtrace, PackageError, Result}; -use backtrace::Backtrace; use serde::Deserialize; use std::{ borrow::Cow, @@ -55,17 +54,17 @@ impl CircuitFile { let path = self.setup_file_path(path); let string = fs::read_to_string(&path) - .map_err(|_| PackageError::failed_to_read_circuit_file(path.into_owned(), Backtrace::new()))?; + .map_err(|_| PackageError::failed_to_read_circuit_file(path.into_owned(), new_backtrace()))?; Ok(string) } /// Writes the given serialized circuit to a file. pub fn write_to(&self, path: &Path, circuit: String) -> Result<()> { let path = self.setup_file_path(path); - let mut file = File::create(&path).map_err(|e| PackageError::io_error_circuit_file(e, Backtrace::new()))?; + let mut file = File::create(&path).map_err(|e| PackageError::io_error_circuit_file(e, new_backtrace()))?; file.write_all(circuit.as_bytes()) - .map_err(|e| PackageError::io_error_circuit_file(e, Backtrace::new()))?; + .map_err(|e| PackageError::io_error_circuit_file(e, new_backtrace()))?; Ok(()) } @@ -77,7 +76,7 @@ impl CircuitFile { return Ok(false); } - fs::remove_file(&path).map_err(|_| PackageError::failed_to_remove_circuit_file(path, Backtrace::new()))?; + fs::remove_file(&path).map_err(|_| PackageError::failed_to_remove_circuit_file(path, new_backtrace()))?; Ok(true) } diff --git a/package/src/outputs/directory.rs b/package/src/outputs/directory.rs index 3f63d4a654..f370748827 100644 --- a/package/src/outputs/directory.rs +++ b/package/src/outputs/directory.rs @@ -14,9 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use leo_errors::{PackageError, Result}; +use leo_errors::{new_backtrace, PackageError, Result}; -use backtrace::Backtrace; use std::{borrow::Cow, fs, path::Path}; pub static OUTPUTS_DIRECTORY_NAME: &str = "outputs/"; @@ -31,7 +30,7 @@ impl OutputsDirectory { path.to_mut().push(OUTPUTS_DIRECTORY_NAME); } - fs::create_dir_all(&path).map_err(|e| PackageError::failed_to_create_inputs_directory(e, Backtrace::new()))?; + fs::create_dir_all(&path).map_err(|e| PackageError::failed_to_create_inputs_directory(e, new_backtrace()))?; Ok(()) } @@ -44,7 +43,7 @@ impl OutputsDirectory { if path.exists() { fs::remove_dir_all(&path) - .map_err(|e| PackageError::failed_to_create_inputs_directory(e, Backtrace::new()))?; + .map_err(|e| PackageError::failed_to_create_inputs_directory(e, new_backtrace()))?; } Ok(()) diff --git a/package/src/outputs/proof.rs b/package/src/outputs/proof.rs index fc6823440e..94573bec8e 100644 --- a/package/src/outputs/proof.rs +++ b/package/src/outputs/proof.rs @@ -17,9 +17,8 @@ //! The proof file. use crate::outputs::OUTPUTS_DIRECTORY_NAME; -use leo_errors::{PackageError, Result}; +use leo_errors::{new_backtrace, PackageError, Result}; -use backtrace::Backtrace; use serde::Deserialize; use std::{ borrow::Cow, @@ -55,17 +54,17 @@ impl ProofFile { let path = self.setup_file_path(path); let string = fs::read_to_string(&path) - .map_err(|_| PackageError::failed_to_read_proof_file(path.into_owned(), Backtrace::new()))?; + .map_err(|_| PackageError::failed_to_read_proof_file(path.into_owned(), new_backtrace()))?; Ok(string) } /// Writes the given proof to a file. pub fn write_to(&self, path: &Path, proof: &[u8]) -> Result<()> { let path = self.setup_file_path(path); - let mut file = File::create(&path).map_err(|e| PackageError::io_error_proof_file(e, Backtrace::new()))?; + let mut file = File::create(&path).map_err(|e| PackageError::io_error_proof_file(e, new_backtrace()))?; file.write_all(proof) - .map_err(|e| PackageError::io_error_proof_file(e, Backtrace::new()))?; + .map_err(|e| PackageError::io_error_proof_file(e, new_backtrace()))?; tracing::info!("Saving proof... ({:?})", path); Ok(()) @@ -79,7 +78,7 @@ impl ProofFile { return Ok(false); } - fs::remove_file(&path).map_err(|_| PackageError::failed_to_remove_proof_file(path, Backtrace::new()))?; + fs::remove_file(&path).map_err(|_| PackageError::failed_to_remove_proof_file(path, new_backtrace()))?; Ok(true) } diff --git a/package/src/outputs/proving_key.rs b/package/src/outputs/proving_key.rs index 319e839236..99900f8cf9 100644 --- a/package/src/outputs/proving_key.rs +++ b/package/src/outputs/proving_key.rs @@ -17,9 +17,8 @@ //! The proving key file. use crate::outputs::OUTPUTS_DIRECTORY_NAME; -use leo_errors::{PackageError, Result}; +use leo_errors::{new_backtrace, PackageError, Result}; -use backtrace::Backtrace; use serde::Deserialize; use std::{ borrow::Cow, @@ -59,17 +58,17 @@ impl ProvingKeyFile { let path = self.setup_file_path(path); let bytes = - fs::read(&path).map_err(|_| PackageError::failed_to_read_proving_key_file(path, Backtrace::new()))?; + fs::read(&path).map_err(|_| PackageError::failed_to_read_proving_key_file(path, new_backtrace()))?; Ok(bytes) } /// Writes the given proving key to a file. pub fn write_to<'a>(&self, path: &'a Path, proving_key: &[u8]) -> Result> { let path = self.setup_file_path(path); - let mut file = File::create(&path).map_err(|e| PackageError::io_error_proving_key_file(e, Backtrace::new()))?; + let mut file = File::create(&path).map_err(|e| PackageError::io_error_proving_key_file(e, new_backtrace()))?; file.write_all(proving_key) - .map_err(|e| PackageError::io_error_proving_key_file(e, Backtrace::new()))?; + .map_err(|e| PackageError::io_error_proving_key_file(e, new_backtrace()))?; Ok(path) } @@ -81,7 +80,7 @@ impl ProvingKeyFile { return Ok(false); } - fs::remove_file(&path).map_err(|_| PackageError::failed_to_remove_proving_key_file(path, Backtrace::new()))?; + fs::remove_file(&path).map_err(|_| PackageError::failed_to_remove_proving_key_file(path, new_backtrace()))?; Ok(true) } diff --git a/package/src/outputs/verification_key.rs b/package/src/outputs/verification_key.rs index 440ef971d5..fa056c2f4b 100644 --- a/package/src/outputs/verification_key.rs +++ b/package/src/outputs/verification_key.rs @@ -17,9 +17,8 @@ //! The verification key file. use crate::outputs::OUTPUTS_DIRECTORY_NAME; -use leo_errors::{PackageError, Result}; +use leo_errors::{new_backtrace, PackageError, Result}; -use backtrace::Backtrace; use serde::Deserialize; use std::{ borrow::Cow, @@ -59,7 +58,7 @@ impl VerificationKeyFile { let path = self.setup_file_path(path); let bytes = fs::read(&path) - .map_err(|_| PackageError::failed_to_read_verification_key_file(path.into_owned(), Backtrace::new()))?; + .map_err(|_| PackageError::failed_to_read_verification_key_file(path.into_owned(), new_backtrace()))?; Ok(bytes) } @@ -67,10 +66,10 @@ impl VerificationKeyFile { pub fn write_to<'a>(&self, path: &'a Path, verification_key: &[u8]) -> Result> { let path = self.setup_file_path(path); let mut file = - File::create(&path).map_err(|e| PackageError::io_error_verification_key_file(e, Backtrace::new()))?; + File::create(&path).map_err(|e| PackageError::io_error_verification_key_file(e, new_backtrace()))?; file.write_all(verification_key) - .map_err(|e| PackageError::io_error_verification_key_file(e, Backtrace::new()))?; + .map_err(|e| PackageError::io_error_verification_key_file(e, new_backtrace()))?; Ok(path) } @@ -83,7 +82,7 @@ impl VerificationKeyFile { } fs::remove_file(&path) - .map_err(|_| PackageError::failed_to_remove_verification_key_file(path, Backtrace::new()))?; + .map_err(|_| PackageError::failed_to_remove_verification_key_file(path, new_backtrace()))?; Ok(true) } diff --git a/package/src/package.rs b/package/src/package.rs index a05b2e32da..1e78a7ffa2 100644 --- a/package/src/package.rs +++ b/package/src/package.rs @@ -21,9 +21,8 @@ use crate::{ source::{MainFile, SourceDirectory}, }; -use leo_errors::{PackageError, Result}; +use leo_errors::{new_backtrace, PackageError, Result}; -use backtrace::Backtrace; use serde::Deserialize; use std::path::Path; @@ -39,7 +38,7 @@ impl Package { pub fn new(package_name: &str) -> Result { // Check that the package name is valid. if !Self::is_package_name_valid(package_name) { - return Err(PackageError::invalid_package_name(package_name, Backtrace::new()).into()); + return Err(PackageError::invalid_package_name(package_name, new_backtrace()).into()); } Ok(Self { @@ -191,7 +190,7 @@ impl Package { return Err(PackageError::failed_to_initialize_package( package_name, path.as_os_str(), - Backtrace::new(), + new_backtrace(), ) .into()); } @@ -234,7 +233,7 @@ impl Package { return Err(PackageError::failed_to_initialize_package( package_name, path.as_os_str(), - Backtrace::new(), + new_backtrace(), ) .into()); } diff --git a/package/src/root/gitignore.rs b/package/src/root/gitignore.rs index 80347361e4..f01b4d9f24 100644 --- a/package/src/root/gitignore.rs +++ b/package/src/root/gitignore.rs @@ -16,9 +16,8 @@ //! The `.gitignore` file. -use leo_errors::{PackageError, Result}; +use leo_errors::{new_backtrace, PackageError, Result}; -use backtrace::Backtrace; use serde::Deserialize; use std::{borrow::Cow, fs::File, io::Write, path::Path}; @@ -46,9 +45,9 @@ impl Gitignore { path.to_mut().push(GITIGNORE_FILENAME); } - let mut file = File::create(&path).map_err(|e| PackageError::io_error_gitignore_file(e, Backtrace::new()))?; + let mut file = File::create(&path).map_err(|e| PackageError::io_error_gitignore_file(e, new_backtrace()))?; file.write_all(self.template().as_bytes()) - .map_err(|e| PackageError::io_error_gitignore_file(e, Backtrace::new()))?; + .map_err(|e| PackageError::io_error_gitignore_file(e, new_backtrace()))?; Ok(()) } diff --git a/package/src/root/manifest.rs b/package/src/root/manifest.rs index 605c93c438..02e4a560f0 100644 --- a/package/src/root/manifest.rs +++ b/package/src/root/manifest.rs @@ -15,9 +15,8 @@ // along with the Leo library. If not, see . use crate::package::Package; -use leo_errors::{PackageError, Result}; +use leo_errors::{new_backtrace, PackageError, Result}; -use backtrace::Backtrace; use serde::Deserialize; use std::{ borrow::Cow, @@ -88,10 +87,10 @@ impl Manifest { } let mut file = File::create(&path) - .map_err(|e| PackageError::failed_to_create_manifest_file(MANIFEST_FILENAME, e, Backtrace::new()))?; + .map_err(|e| PackageError::failed_to_create_manifest_file(MANIFEST_FILENAME, e, new_backtrace()))?; file.write_all(self.template().as_bytes()) - .map_err(|e| PackageError::io_error_manifest_file(e, Backtrace::new()))?; + .map_err(|e| PackageError::io_error_manifest_file(e, new_backtrace()))?; Ok(()) } @@ -127,17 +126,17 @@ impl TryFrom<&Path> for Manifest { } let mut file = File::open(path.clone()) - .map_err(|e| PackageError::failed_to_open_manifest_file(MANIFEST_FILENAME, e, Backtrace::new()))?; + .map_err(|e| PackageError::failed_to_open_manifest_file(MANIFEST_FILENAME, e, new_backtrace()))?; let size = file .metadata() - .map_err(|e| PackageError::failed_to_get_manifest_metadata_file(MANIFEST_FILENAME, e, Backtrace::new()))? + .map_err(|e| PackageError::failed_to_get_manifest_metadata_file(MANIFEST_FILENAME, e, new_backtrace()))? .len() as usize; let mut buffer = String::with_capacity(size); file.read_to_string(&mut buffer) - .map_err(|e| PackageError::failed_to_read_manifest_file(MANIFEST_FILENAME, e, Backtrace::new()))?; + .map_err(|e| PackageError::failed_to_read_manifest_file(MANIFEST_FILENAME, e, new_backtrace()))?; // Determine if the old remote format is being used, and update to new convention @@ -224,14 +223,14 @@ author = "{author}" // Rewrite the toml file if it has been updated if buffer != refactored_toml { let mut file = File::create(&path) - .map_err(|e| PackageError::failed_to_create_manifest_file(MANIFEST_FILENAME, e, Backtrace::new()))?; + .map_err(|e| PackageError::failed_to_create_manifest_file(MANIFEST_FILENAME, e, new_backtrace()))?; file.write_all(refactored_toml.as_bytes()) - .map_err(|e| PackageError::failed_to_write_manifest_file(MANIFEST_FILENAME, e, Backtrace::new()))?; + .map_err(|e| PackageError::failed_to_write_manifest_file(MANIFEST_FILENAME, e, new_backtrace()))?; } // Read the toml file toml::from_str(&final_toml) - .map_err(|e| PackageError::failed_to_parse_manifest_file(MANIFEST_FILENAME, e, Backtrace::new())) + .map_err(|e| PackageError::failed_to_parse_manifest_file(MANIFEST_FILENAME, e, new_backtrace())) } } diff --git a/package/src/root/readme.rs b/package/src/root/readme.rs index c6b1a5a699..69bd002cdb 100644 --- a/package/src/root/readme.rs +++ b/package/src/root/readme.rs @@ -17,9 +17,8 @@ //! The `README.md` file. -use leo_errors::{PackageError, Result}; +use leo_errors::{new_backtrace, PackageError, Result}; -use backtrace::Backtrace; use serde::Deserialize; use std::{borrow::Cow, fs::File, io::Write, path::Path}; @@ -55,10 +54,10 @@ impl README { path.to_mut().push(README_FILENAME); } - let mut file = File::create(&path).map_err(|e| PackageError::io_error_readme_file(e, Backtrace::new()))?; + let mut file = File::create(&path).map_err(|e| PackageError::io_error_readme_file(e, new_backtrace()))?; file.write_all(self.template().as_bytes()) - .map_err(|e| PackageError::io_error_readme_file(e, Backtrace::new()))?; + .map_err(|e| PackageError::io_error_readme_file(e, new_backtrace()))?; Ok(()) } diff --git a/package/src/root/zip.rs b/package/src/root/zip.rs index 0779d0abda..0878501318 100644 --- a/package/src/root/zip.rs +++ b/package/src/root/zip.rs @@ -30,9 +30,7 @@ use crate::{ root::{MANIFEST_FILENAME, README_FILENAME}, source::{SOURCE_DIRECTORY_NAME, SOURCE_FILE_EXTENSION}, }; -use leo_errors::{PackageError, Result}; - -use backtrace::Backtrace; +use leo_errors::{new_backtrace, PackageError, Result}; use serde::Deserialize; use std::{ @@ -85,7 +83,7 @@ impl ZipFile { // Create zip file let path = self.setup_file_path(src_dir); - let file = File::create(&path).map_err(|e| PackageError::failed_to_create_zip_file(e, Backtrace::new()))?; + let file = File::create(&path).map_err(|e| PackageError::failed_to_create_zip_file(e, new_backtrace()))?; let mut zip = ZipWriter::new(file); let options = FileOptions::default() .compression_method(zip::CompressionMethod::Stored) @@ -110,13 +108,13 @@ impl ZipFile { tracing::info!("Adding file {:?} as {:?}", path, name); #[allow(deprecated)] zip.start_file_from_path(name, options) - .map_err(|e| PackageError::io_error_zip_file(e, Backtrace::new()))?; + .map_err(|e| PackageError::io_error_zip_file(e, new_backtrace()))?; - let mut f = File::open(path).map_err(|e| PackageError::failed_to_open_zip_file(e, Backtrace::new()))?; + let mut f = File::open(path).map_err(|e| PackageError::failed_to_open_zip_file(e, new_backtrace()))?; f.read_to_end(&mut buffer) - .map_err(|e| PackageError::failed_to_read_zip_file(e, Backtrace::new()))?; + .map_err(|e| PackageError::failed_to_read_zip_file(e, new_backtrace()))?; zip.write_all(&*buffer) - .map_err(|e| PackageError::failed_to_write_zip_file(e, Backtrace::new()))?; + .map_err(|e| PackageError::failed_to_write_zip_file(e, new_backtrace()))?; buffer.clear(); } else if !name.as_os_str().is_empty() { @@ -125,12 +123,12 @@ impl ZipFile { tracing::info!("Adding directory {:?} as {:?}", path, name); #[allow(deprecated)] zip.add_directory_from_path(name, options) - .map_err(|e| PackageError::io_error_zip_file(e, Backtrace::new()))?; + .map_err(|e| PackageError::io_error_zip_file(e, new_backtrace()))?; } } zip.finish() - .map_err(|e| PackageError::io_error_zip_file(e, Backtrace::new()))?; + .map_err(|e| PackageError::io_error_zip_file(e, new_backtrace()))?; tracing::info!("Package zip file created successfully {:?}", path); @@ -145,7 +143,7 @@ impl ZipFile { return Ok(false); } - fs::remove_file(&path).map_err(|_| PackageError::failed_to_remove_zip_file(path, Backtrace::new()))?; + fs::remove_file(&path).map_err(|_| PackageError::failed_to_remove_zip_file(path, new_backtrace()))?; Ok(true) } diff --git a/package/src/source/directory.rs b/package/src/source/directory.rs index 534974eec0..f11d086acf 100644 --- a/package/src/source/directory.rs +++ b/package/src/source/directory.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use leo_errors::{PackageError, Result}; +use leo_errors::{new_backtrace, PackageError, Result}; use std::{ borrow::Cow, @@ -22,8 +22,6 @@ use std::{ path::{Path, PathBuf}, }; -use backtrace::Backtrace; - pub static SOURCE_DIRECTORY_NAME: &str = "src/"; pub static SOURCE_FILE_EXTENSION: &str = ".leo"; @@ -38,7 +36,7 @@ impl SourceDirectory { path.to_mut().push(SOURCE_DIRECTORY_NAME); } - fs::create_dir_all(&path).map_err(|e| PackageError::failed_to_create_source_directory(e, Backtrace::new()))?; + fs::create_dir_all(&path).map_err(|e| PackageError::failed_to_create_source_directory(e, new_backtrace()))?; Ok(()) } @@ -48,36 +46,36 @@ impl SourceDirectory { path.to_mut().push(SOURCE_DIRECTORY_NAME); let directory = - fs::read_dir(&path).map_err(|e| PackageError::failed_to_read_inputs_directory(e, Backtrace::new()))?; + fs::read_dir(&path).map_err(|e| PackageError::failed_to_read_inputs_directory(e, new_backtrace()))?; let mut file_paths = Vec::new(); for file_entry in directory.into_iter() { let file_entry = - file_entry.map_err(|e| PackageError::failed_to_get_source_file_entry(e, Backtrace::new()))?; + file_entry.map_err(|e| PackageError::failed_to_get_source_file_entry(e, new_backtrace()))?; let file_path = file_entry.path(); // Verify that the entry is structured as a valid file let file_type = file_entry.file_type().map_err(|e| { - PackageError::failed_to_get_source_file_type(file_path.as_os_str().to_owned(), e, Backtrace::new()) + PackageError::failed_to_get_source_file_type(file_path.as_os_str().to_owned(), e, new_backtrace()) })?; if !file_type.is_file() { return Err(PackageError::invalid_source_file_type( file_path.as_os_str().to_owned(), file_type, - Backtrace::new(), + new_backtrace(), ) .into()); } // Verify that the file has the default file extension let file_extension = file_path.extension().ok_or_else(|| { - PackageError::failed_to_get_source_file_extension(file_path.as_os_str().to_owned(), Backtrace::new()) + PackageError::failed_to_get_source_file_extension(file_path.as_os_str().to_owned(), new_backtrace()) })?; if file_extension != SOURCE_FILE_EXTENSION.trim_start_matches('.') { return Err(PackageError::invalid_source_file_extension( file_path.as_os_str().to_owned(), file_extension.to_owned(), - Backtrace::new(), + new_backtrace(), ) .into()); } diff --git a/package/src/source/main.rs b/package/src/source/main.rs index 65b301f50c..7c7ec52ffc 100644 --- a/package/src/source/main.rs +++ b/package/src/source/main.rs @@ -17,9 +17,8 @@ //! The `main.leo` file. use crate::source::directory::SOURCE_DIRECTORY_NAME; -use leo_errors::{PackageError, Result}; +use leo_errors::{new_backtrace, PackageError, Result}; -use backtrace::Backtrace; use serde::Deserialize; use std::{borrow::Cow, fs::File, io::Write, path::Path}; @@ -61,10 +60,10 @@ impl MainFile { path.to_mut().push(MAIN_FILENAME); } - let mut file = File::create(&path).map_err(|e| PackageError::io_error_main_file(e, Backtrace::new()))?; + let mut file = File::create(&path).map_err(|e| PackageError::io_error_main_file(e, new_backtrace()))?; Ok(file .write_all(self.template().as_bytes()) - .map_err(|e| PackageError::io_error_main_file(e, Backtrace::new()))?) + .map_err(|e| PackageError::io_error_main_file(e, new_backtrace()))?) } fn template(&self) -> String { diff --git a/parser/Cargo.toml b/parser/Cargo.toml index 63f9430ab9..f32cab30ec 100644 --- a/parser/Cargo.toml +++ b/parser/Cargo.toml @@ -37,9 +37,6 @@ version = "1.3.0" version = "1.0" features = [ "derive" ] -[dependencies.serde_json] -version = "1.0" - [dependencies.tracing] version = "0.1" @@ -52,6 +49,9 @@ version = "0.4" [dev-dependencies.criterion] version = "0.3" +[dev-dependencies.serde_json] +version = "1.0" + [dev-dependencies.serde_yaml] version = "0.8" diff --git a/parser/src/parser/context.rs b/parser/src/parser/context.rs index af64bd9c43..3e7d1375b6 100644 --- a/parser/src/parser/context.rs +++ b/parser/src/parser/context.rs @@ -18,7 +18,7 @@ use std::{borrow::Cow, unimplemented}; use crate::{assert_no_whitespace, tokenizer::*, Token, KEYWORD_TOKENS}; use leo_ast::*; -use leo_errors::{LeoError, ParserError, Result, Span}; +use leo_errors::{new_backtrace, LeoError, ParserError, Result, Span}; use tendril::format_tendril; /// Stores a program in tokenized format plus additional context. @@ -64,7 +64,7 @@ impl ParserContext { /// Returns an unexpected end of function [`SyntaxError`]. /// pub fn eof(&self) -> LeoError { - ParserError::unexpected_eof(&self.end_span).into() + ParserError::unexpected_eof(&self.end_span, new_backtrace()).into() } /// @@ -300,7 +300,7 @@ impl ParserContext { if &token == inner { Ok(self.tokens.pop().unwrap().span) } else { - Err(ParserError::unexpected(inner, token, span).into()) + Err(ParserError::unexpected(inner, token, span, new_backtrace()).into()) } } else { Err(self.eof()) @@ -319,6 +319,7 @@ impl ParserContext { inner, token.iter().map(|x| format!("'{}'", x)).collect::>().join(", "), span, + new_backtrace(), ) .into()); } @@ -361,7 +362,7 @@ impl ParserContext { unimplemented!() } } else { - Err(ParserError::unexpected_str(inner, "ident", span).into()) + Err(ParserError::unexpected_str(inner, "ident", span, new_backtrace()).into()) } } else { Err(self.eof()) diff --git a/parser/src/parser/expression.rs b/parser/src/parser/expression.rs index 6ba5f20da5..1d57d0c3c5 100644 --- a/parser/src/parser/expression.rs +++ b/parser/src/parser/expression.rs @@ -16,7 +16,7 @@ use tendril::format_tendril; -use leo_errors::{ParserError, Result}; +use leo_errors::{new_backtrace, ParserError, Result}; use super::*; @@ -461,7 +461,13 @@ impl ParserContext { }); } else { let next = self.peek()?; - return Err(ParserError::unexpected_str(&next.token, "int or ident", &next.span).into()); + return Err(ParserError::unexpected_str( + &next.token, + "int or ident", + &next.span, + new_backtrace(), + ) + .into()); } } Token::LeftParen => { @@ -608,7 +614,7 @@ impl ParserContext { let first = match first { SpreadOrExpression::Spread(first) => { let span = span + first.span(); - return Err(ParserError::spread_in_array_init(&span).into()); + return Err(ParserError::spread_in_array_init(&span, new_backtrace()).into()); } SpreadOrExpression::Expression(x) => x, }; @@ -725,7 +731,7 @@ impl ParserContext { Expression::Identifier(ident) } token => { - return Err(ParserError::unexpected_str(token, "expression", &span).into()); + return Err(ParserError::unexpected_str(token, "expression", &span, new_backtrace()).into()); } }) } diff --git a/parser/src/parser/file.rs b/parser/src/parser/file.rs index 9de6602f17..2704b8af36 100644 --- a/parser/src/parser/file.rs +++ b/parser/src/parser/file.rs @@ -16,7 +16,7 @@ use tendril::format_tendril; -use leo_errors::{ParserError, Result}; +use leo_errors::{new_backtrace, ParserError, Result}; use crate::KEYWORD_TOKENS; @@ -48,7 +48,7 @@ impl ParserContext { functions.insert(id, function); } Token::Ident(ident) if ident.as_ref() == "test" => { - return Err(ParserError::test_function(&token.span).into()); + return Err(ParserError::test_function(&token.span, new_backtrace()).into()); // self.expect(Token::Test)?; // let (id, function) = self.parse_function_declaration()?; // tests.insert(id, TestFunction { @@ -75,6 +75,7 @@ impl ParserContext { .collect::>() .join(", "), &token.span, + new_backtrace(), ) .into()); } @@ -97,7 +98,7 @@ impl ParserContext { let start = self.expect(Token::At)?; let name = self.expect_ident()?; if name.name.as_ref() == "context" { - return Err(ParserError::context_annotation(&name.span).into()); + return Err(ParserError::context_annotation(&name.span, new_backtrace()).into()); } assert_no_whitespace(&start, &name.span, &name.name, "@")?; @@ -117,6 +118,7 @@ impl ParserContext { .collect::>() .join(", "), &end.span, + new_backtrace(), ) .into()); } @@ -130,7 +132,13 @@ impl ParserContext { args.push(int.value); } else { let token = self.peek()?; - return Err(ParserError::unexpected_str(&token.token, "ident or int", &token.span).into()); + return Err(ParserError::unexpected_str( + &token.token, + "ident or int", + &token.span, + new_backtrace(), + ) + .into()); } if self.eat(Token::Comma).is_none() && !comma { end_span = self.expect(Token::RightParen)?; @@ -167,7 +175,7 @@ impl ParserContext { } if out.is_empty() { - return Err(ParserError::invalid_import_list(span).into()); + return Err(ParserError::invalid_import_list(span, new_backtrace()).into()); } Ok(out) @@ -246,7 +254,7 @@ impl ParserContext { // Return an error if the package name contains a keyword. if let Some(token) = KEYWORD_TOKENS.iter().find(|x| x.to_string() == base.name.as_ref()) { - return Err(ParserError::unexpected_str(token, "package name", &base.span).into()); + return Err(ParserError::unexpected_str(token, "package name", &base.span, new_backtrace()).into()); } // Return an error if the package name contains invalid characters. @@ -255,7 +263,7 @@ impl ParserContext { .chars() .all(|x| x.is_ascii_lowercase() || x.is_ascii_digit() || x == '-' || x == '_') { - return Err(ParserError::invalid_package_name(&base.span).into()); + return Err(ParserError::invalid_package_name(&base.span, new_backtrace()).into()); } // Return the package name. @@ -317,14 +325,14 @@ impl ParserContext { let peeked = &self.peek()?; if peeked.token == Token::Semicolon { if commas { - return Err(ParserError::mixed_commas_and_semicolons(&peeked.span).into()); + return Err(ParserError::mixed_commas_and_semicolons(&peeked.span, new_backtrace()).into()); } semi_colons = true; self.expect(Token::Semicolon)?; } else { if semi_colons { - return Err(ParserError::mixed_commas_and_semicolons(&peeked.span).into()); + return Err(ParserError::mixed_commas_and_semicolons(&peeked.span, new_backtrace()).into()); } commas = true; @@ -381,6 +389,7 @@ impl ParserContext { .collect::>() .join(", "), &peeked.span, + new_backtrace(), ) .into()); } @@ -435,7 +444,7 @@ impl ParserContext { } if let Some(mutable) = &mutable { - return Err(ParserError::mut_function_input(&(&mutable.span + &name.span)).into()); + return Err(ParserError::mut_function_input(&(&mutable.span + &name.span), new_backtrace()).into()); } self.expect(Token::Colon)?; diff --git a/parser/src/parser/mod.rs b/parser/src/parser/mod.rs index cf6ae0e5fc..a7d16a4b54 100644 --- a/parser/src/parser/mod.rs +++ b/parser/src/parser/mod.rs @@ -32,14 +32,14 @@ use std::unimplemented; use crate::{tokenizer::*, Token}; use indexmap::IndexMap; use leo_ast::*; -use leo_errors::{ParserError, Result, Span}; +use leo_errors::{new_backtrace, ParserError, Result, Span}; pub(crate) fn assert_no_whitespace(left_span: &Span, right_span: &Span, left: &str, right: &str) -> Result<()> { if left_span.col_stop != right_span.col_start { let mut error_span = left_span + right_span; error_span.col_start = left_span.col_stop - 1; error_span.col_stop = right_span.col_start - 1; - return Err(ParserError::unexpected_whitespace(left, right, &error_span).into()); + return Err(ParserError::unexpected_whitespace(left, right, &error_span, new_backtrace()).into()); } Ok(()) diff --git a/parser/src/parser/statement.rs b/parser/src/parser/statement.rs index c452549e62..0f5b404dfa 100644 --- a/parser/src/parser/statement.rs +++ b/parser/src/parser/statement.rs @@ -16,7 +16,7 @@ use super::*; -use leo_errors::{ParserError, Result}; +use leo_errors::{new_backtrace, ParserError, Result}; const ASSIGN_TOKENS: &[Token] = &[ Token::Assign, @@ -64,7 +64,7 @@ impl ParserContext { accesses.push(AssigneeAccess::ArrayIndex(*expr.index)); } Expression::Identifier(id) => identifier = id, - _ => return Err(ParserError::invalid_assignment_target(expr.span()).into()), + _ => return Err(ParserError::invalid_assignment_target(expr.span(), new_backtrace()).into()), } Ok(identifier) } @@ -191,7 +191,13 @@ impl ParserContext { match s { Statement::Block(_) | Statement::Conditional(_) => Some(Box::new(s)), s => { - return Err(ParserError::unexpected_statement(&s, "Block or Conditional", s.span()).into()); + return Err(ParserError::unexpected_statement( + &s, + "Block or Conditional", + s.span(), + new_backtrace(), + ) + .into()); } } } else { @@ -245,7 +251,7 @@ impl ParserContext { chars } SpannedToken { token, span } => { - return Err(ParserError::unexpected_str(token, "formatted string", &span).into()); + return Err(ParserError::unexpected_str(token, "formatted string", &span, new_backtrace()).into()); } }; @@ -280,7 +286,13 @@ impl ParserContext { "error" => ConsoleFunction::Error(self.parse_console_args()?), "log" => ConsoleFunction::Log(self.parse_console_args()?), x => { - return Err(ParserError::unexpected_ident(x, &["assert", "error", "log"], &function.span).into()); + return Err(ParserError::unexpected_ident( + x, + &["assert", "error", "log"], + &function.span, + new_backtrace(), + ) + .into()); } }; self.expect(Token::RightParen)?; @@ -299,7 +311,7 @@ impl ParserContext { pub fn parse_variable_name(&mut self, span: &SpannedToken) -> Result { let mutable = self.eat(Token::Mut); if let Some(mutable) = &mutable { - return Err(ParserError::let_mut_statement(&(&mutable.span + &span.span)).into()); + return Err(ParserError::let_mut_statement(&(&mutable.span + &span.span), new_backtrace()).into()); } let name = self.expect_ident()?; diff --git a/parser/src/parser/type_.rs b/parser/src/parser/type_.rs index e79cb494f4..3cdb1bfcbc 100644 --- a/parser/src/parser/type_.rs +++ b/parser/src/parser/type_.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use super::*; -use leo_errors::{ParserError, Result}; +use leo_errors::{new_backtrace, ParserError, Result}; const TYPE_TOKENS: &[Token] = &[ Token::I8, @@ -69,7 +69,7 @@ impl ParserContext { dimensions.push(int); } else { let token = self.peek()?; - return Err(ParserError::unexpected_str(&token.token, "int", &token.span).into()); + return Err(ParserError::unexpected_str(&token.token, "int", &token.span, new_backtrace()).into()); } if self.eat(Token::Comma).is_none() { break; diff --git a/parser/src/tokenizer/mod.rs b/parser/src/tokenizer/mod.rs index 022ed57173..dc072919fc 100644 --- a/parser/src/tokenizer/mod.rs +++ b/parser/src/tokenizer/mod.rs @@ -28,7 +28,7 @@ pub(crate) use self::token::*; pub(crate) mod lexer; pub(crate) use self::lexer::*; -use leo_errors::{LeoError, ParserError, Span}; +use leo_errors::{new_backtrace, LeoError, ParserError, Span}; use tendril::StrTendril; @@ -70,7 +70,7 @@ pub(crate) fn tokenize(path: &str, input: StrTendril) -> Result { if !check_address(address) { - return Err(ParserError::invalid_address_lit(address, &span).into()); + return Err(ParserError::invalid_address_lit(address, &span, new_backtrace()).into()); } } _ => (), @@ -96,6 +96,7 @@ pub(crate) fn tokenize(path: &str, input: StrTendril) -> Result compiler-test:7:24\n |\n 7 | const z: [u8; 2] = y[..1u32][..x];\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370021]: array index out of bounds: '0'\n --> compiler-test:7:24\n |\n 7 | const z: [u8; 2] = y[..1u32][..x];\n | ^^^^^^^^^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/array/array_size_zero_fail.leo.out b/tests/expectations/compiler/compiler/array/array_size_zero_fail.leo.out index 111f7f6b12..1c072d27ea 100644 --- a/tests/expectations/compiler/compiler/array/array_size_zero_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/array_size_zero_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[ET0371001]: received dimension size of 0, expected it to be 1 or larger.\n--> compiler-test:4:13\n |\n 4 | let a = [true; (0)];\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EAST0371006]: received dimension size of 0, expected it to be 1 or larger.\n --> compiler-test:4:13\n |\n 4 | let a = [true; (0)];\n | ^^^^^^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/array/input_nested_3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/input_nested_3x2_fail.leo.out index d6bd0c041f..a4cc3e013d 100644 --- a/tests/expectations/compiler/compiler/array/input_nested_3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/input_nested_3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EP0375005]: expected ] -- got ')'\n--> compiler-test:4:29\n |\n 4 | return a == [[0u8; 2]; 3)]; // This should be written the right way as this test is for the input file.\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EPAR0375005]: expected ] -- got ')'\n --> compiler-test:4:29\n |\n 4 | return a == [[0u8; 2]; 3)]; // This should be written the right way as this test is for the input file.\n | ^\n |\n" diff --git a/tests/expectations/compiler/compiler/array/multi_fail_initializer.leo.out b/tests/expectations/compiler/compiler/array/multi_fail_initializer.leo.out index ca6d92b8de..f1eeb3e55d 100644 --- a/tests/expectations/compiler/compiler/array/multi_fail_initializer.leo.out +++ b/tests/expectations/compiler/compiler/array/multi_fail_initializer.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370027]: unexpected type, expected: 'array of length 2', received: 'array of length 1'\n--> compiler-test:4:31\n |\n 4 | const arr: [u8; (2, 2)] = [[1u8; 2]; 1]; // incorrect dimensions\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370027]: unexpected type, expected: 'array of length 2', received: 'array of length 1'\n --> compiler-test:4:31\n |\n 4 | const arr: [u8; (2, 2)] = [[1u8; 2]; 1]; // incorrect dimensions\n | ^^^^^^^^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/array/multi_fail_inline.leo.out b/tests/expectations/compiler/compiler/array/multi_fail_inline.leo.out index f3734cfa9f..e6c1238642 100644 --- a/tests/expectations/compiler/compiler/array/multi_fail_inline.leo.out +++ b/tests/expectations/compiler/compiler/array/multi_fail_inline.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370027]: unexpected type, expected: 'array of length 2', received: 'array of length 1'\n--> compiler-test:5:35\n |\n 5 | [1u8]]; // incorrect dimensions\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370027]: unexpected type, expected: 'array of length 2', received: 'array of length 1'\n --> compiler-test:5:35\n |\n 5 | [1u8]]; // incorrect dimensions\n | ^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/array/multi_initializer_fail.leo.out b/tests/expectations/compiler/compiler/array/multi_initializer_fail.leo.out index 6fc1bc3925..157f6279d1 100644 --- a/tests/expectations/compiler/compiler/array/multi_initializer_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/multi_initializer_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370027]: unexpected type, expected: 'array of length 2', received: 'array of length 1'\n--> compiler-test:4:31\n |\n 4 | const arr: [u8; (2, 2)] = [1u8; (2, 1)]; // incorrect dimensions\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370027]: unexpected type, expected: 'array of length 2', received: 'array of length 1'\n --> compiler-test:4:31\n |\n 4 | const arr: [u8; (2, 2)] = [1u8; (2, 1)]; // incorrect dimensions\n | ^^^^^^^^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/array/nested_3x2_value_fail.leo.out b/tests/expectations/compiler/compiler/array/nested_3x2_value_fail.leo.out index 7a656d8dbb..c54c9a1c89 100644 --- a/tests/expectations/compiler/compiler/array/nested_3x2_value_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/nested_3x2_value_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370027]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n--> compiler-test:6:30\n |\n 6 | const a: [u32; (3, 2)] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering)\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370027]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:6:30\n |\n 6 | const a: [u32; (3, 2)] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/array/tuple_3x2_value_fail.leo.out b/tests/expectations/compiler/compiler/array/tuple_3x2_value_fail.leo.out index 9aea1c38b6..2ce29f1907 100644 --- a/tests/expectations/compiler/compiler/array/tuple_3x2_value_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/tuple_3x2_value_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370027]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n--> compiler-test:5:30\n |\n 5 | const a: [u32; (3, 2)] = [0; (2, 3)]; // initializer (incorrectly reversed ordering)\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370027]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:5:30\n |\n 5 | const a: [u32; (3, 2)] = [0; (2, 3)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/array/type_fail.leo.out b/tests/expectations/compiler/compiler/array/type_fail.leo.out index a0d318ff81..a50e651d51 100644 --- a/tests/expectations/compiler/compiler/array/type_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EP0375005]: expected ( -- got '-'\n--> compiler-test:4:19\n |\n 4 | const a: [u8; -2] = [0u32; 2];\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EPAR0375005]: expected ( -- got '-'\n --> compiler-test:4:19\n |\n 4 | const a: [u8; -2] = [0u32; 2];\n | ^\n |\n" diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2_fail.leo.out index 43a12bcde7..14ac3cd014 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370027]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n--> compiler-test:4:29\n |\n 4 | const b: [[u8; 2]; 3] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering)\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370027]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:4:29\n |\n 4 | const b: [[u8; 2]; 3] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2_fail.leo.out index 9a34b581f9..46e8b9c01e 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370027]: unexpected type, expected: 'array of length 4', received: 'array of length 2'\n--> compiler-test:4:34\n |\n 4 | const b: [[[u8; 2]; 3]; 4] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering)\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370027]: unexpected type, expected: 'array of length 4', received: 'array of length 2'\n --> compiler-test:4:34\n |\n 4 | const b: [[[u8; 2]; 3]; 4] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2_fail.leo.out index 323480f909..601b2ea5e3 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370027]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n--> compiler-test:4:29\n |\n 4 | const b: [[u8; 2]; 3] = [0; (2, 3)]; // initializer (incorrectly reversed ordering)\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370027]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:4:29\n |\n 4 | const b: [[u8; 2]; 3] = [0; (2, 3)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2_fail.leo.out index ca579c845a..e41f5b0012 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370027]: unexpected type, expected: 'array of length 4', received: 'array of length 2'\n--> compiler-test:4:34\n |\n 4 | const b: [[[u8; 2]; 3]; 4] = [0; (2, 3, 4)]; // initializer (incorrectly reversed ordering)\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370027]: unexpected type, expected: 'array of length 4', received: 'array of length 2'\n --> compiler-test:4:34\n |\n 4 | const b: [[[u8; 2]; 3]; 4] = [0; (2, 3, 4)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2_fail.leo.out index 73f32accb4..f7cc212b87 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370027]: unexpected type, expected: 'array of length 2', received: 'array of length 3'\n--> compiler-test:4:29\n |\n 4 | const b: [u8; (2, 3)] = [[0; 2]; 3]; // initializer (incorrectly reversed ordering)\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370027]: unexpected type, expected: 'array of length 2', received: 'array of length 3'\n --> compiler-test:4:29\n |\n 4 | const b: [u8; (2, 3)] = [[0; 2]; 3]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2_fail.leo.out index 40ea58b4f2..bd9bd03466 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370027]: unexpected type, expected: 'array of length 4', received: 'array of length 2'\n--> compiler-test:4:32\n |\n 4 | const b: [u8; (4, 3, 2)] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering)\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370027]: unexpected type, expected: 'array of length 4', received: 'array of length 2'\n --> compiler-test:4:32\n |\n 4 | const b: [u8; (4, 3, 2)] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2_fail.leo.out index df5f6c6451..0a6a7b6af8 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370027]: unexpected type, expected: 'array of length 2', received: 'array of length 3'\n--> compiler-test:4:29\n |\n 4 | const b: [u8; (2, 3)] = [0; (3, 2)]; // initializer (incorrectly reversed ordering)\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370027]: unexpected type, expected: 'array of length 2', received: 'array of length 3'\n --> compiler-test:4:29\n |\n 4 | const b: [u8; (2, 3)] = [0; (3, 2)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2_fail.leo.out index 36d6f7eb47..865ad7a1ee 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370027]: unexpected type, expected: 'array of length 4', received: 'array of length 2'\n--> compiler-test:4:32\n |\n 4 | const b: [u8; (4, 3, 2)] = [0; (2, 3, 4)]; // initializer (incorrectly reversed order)\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370027]: unexpected type, expected: 'array of length 4', received: 'array of length 2'\n --> compiler-test:4:32\n |\n 4 | const b: [u8; (4, 3, 2)] = [0; (2, 3, 4)]; // initializer (incorrectly reversed order)\n | ^^^^^^^^^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/array/variable_slice_fail.leo.out b/tests/expectations/compiler/compiler/array/variable_slice_fail.leo.out index 46678a84f7..da66178465 100644 --- a/tests/expectations/compiler/compiler/array/variable_slice_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/variable_slice_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EP0375007]: unexpected identifier: expected 'assert', 'error', 'log' -- got 'debug'\n--> compiler-test:7:17\n |\n 7 | console.debug(\"{}\", x);\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EPAR0375007]: unexpected identifier: expected 'assert', 'error', 'log' -- got 'debug'\n --> compiler-test:7:17\n |\n 7 | console.debug(\"{}\", x);\n | ^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/char/invalid_char.leo.out b/tests/expectations/compiler/compiler/char/invalid_char.leo.out index 6f760386c5..961c24c719 100644 --- a/tests/expectations/compiler/compiler/char/invalid_char.leo.out +++ b/tests/expectations/compiler/compiler/char/invalid_char.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EP0375000]: '\n--> compiler-test:4:23\n |\n 4 | const not_valid = '';\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:88\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EPAR0375000]: '\n --> compiler-test:4:23\n |\n 4 | const not_valid = '';\n | ^\n |\n = HELP TODO" diff --git a/tests/expectations/compiler/compiler/circuits/big_self_outside_circuit_fail.leo.out b/tests/expectations/compiler/compiler/circuits/big_self_outside_circuit_fail.leo.out index 5495dd7ca7..e2c5bc279f 100644 --- a/tests/expectations/compiler/compiler/circuits/big_self_outside_circuit_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/big_self_outside_circuit_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[ET0371000]: cannot call keyword `Self` outside of a circuit function\n--> compiler-test:16:3\n |\n 16 | let foo: Self = Foo::new();\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EAST0371005]: cannot call keyword `Self` outside of a circuit function\n --> compiler-test:16:3\n |\n 16 | let foo: Self = Foo::new();\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/circuits/const_self_variable_fail.leo.out b/tests/expectations/compiler/compiler/circuits/const_self_variable_fail.leo.out index 1d0273cc78..778b959c14 100644 --- a/tests/expectations/compiler/compiler/circuits/const_self_variable_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/const_self_variable_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370034]: illegal assignment to immutable variable 'self'\n--> compiler-test:7:9\n |\n 7 | self.a = new;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370034]: illegal assignment to immutable variable 'self'\n --> compiler-test:7:9\n |\n 7 | self.a = new;\n | ^^^^^^^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/circuits/inline_fail.leo.out b/tests/expectations/compiler/compiler/circuits/inline_fail.leo.out index 58996f5dcb..b6ca5e71f3 100644 --- a/tests/expectations/compiler/compiler/circuits/inline_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/inline_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370003]: missing circuit member 'x' for initialization of circuit 'Foo'\n--> compiler-test:9:15\n |\n 9 | const a = Foo { y: 0u32 };\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370003]: missing circuit member 'x' for initialization of circuit 'Foo'\n --> compiler-test:9:15\n |\n 9 | const a = Foo { y: 0u32 };\n | ^^^^^^^^^^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/circuits/inline_member_fail.leo.out b/tests/expectations/compiler/compiler/circuits/inline_member_fail.leo.out index 3017368c40..54f190ceb4 100644 --- a/tests/expectations/compiler/compiler/circuits/inline_member_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/inline_member_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370003]: missing circuit member 'x' for initialization of circuit 'Foo'\n--> compiler-test:9:15\n |\n 9 | const a = Foo { y };\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370003]: missing circuit member 'x' for initialization of circuit 'Foo'\n --> compiler-test:9:15\n |\n 9 | const a = Foo { y };\n | ^^^^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/circuits/inline_undefined.leo.out b/tests/expectations/compiler/compiler/circuits/inline_undefined.leo.out index 8395501938..32088345dd 100644 --- a/tests/expectations/compiler/compiler/circuits/inline_undefined.leo.out +++ b/tests/expectations/compiler/compiler/circuits/inline_undefined.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370000]: failed to resolve circuit: 'Foo'\n--> compiler-test:4:15\n |\n 4 | const a = Foo { };\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370000]: failed to resolve circuit: 'Foo'\n --> compiler-test:4:15\n |\n 4 | const a = Foo { };\n | ^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/circuits/member_function_fail.leo.out b/tests/expectations/compiler/compiler/circuits/member_function_fail.leo.out index 5c7bcc81af..30cde4955f 100644 --- a/tests/expectations/compiler/compiler/circuits/member_function_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_function_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370002]: illegal reference to non-existant member 'echoed' of circuit 'Foo'\n--> compiler-test:11:17\n |\n 11 | const err = a.echoed(1u32);\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370002]: illegal reference to non-existant member 'echoed' of circuit 'Foo'\n --> compiler-test:11:17\n |\n 11 | const err = a.echoed(1u32);\n | ^^^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/circuits/member_function_invalid.leo.out b/tests/expectations/compiler/compiler/circuits/member_function_invalid.leo.out index cd5b7ee0ef..49d835949a 100644 --- a/tests/expectations/compiler/compiler/circuits/member_function_invalid.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_function_invalid.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370009]: cannot call static function 'echo' of circuit 'Foo' from target\n--> compiler-test:11:17\n |\n 11 | const err = a.echo(1u32); // echo is a static function and must be accessed using `::`\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370009]: cannot call static function 'echo' of circuit 'Foo' from target\n --> compiler-test:11:17\n |\n 11 | const err = a.echo(1u32); // echo is a static function and must be accessed using `::`\n | ^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/circuits/member_static_function_invalid.leo.out b/tests/expectations/compiler/compiler/circuits/member_static_function_invalid.leo.out index 146329845d..f7c6b49b46 100644 --- a/tests/expectations/compiler/compiler/circuits/member_static_function_invalid.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_static_function_invalid.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370029]: failed to resolve variable reference 'Foo'\n--> compiler-test:10:17\n |\n 10 | const err = Foo.echo(1u32); // Invalid, echo is a static function and must be accessed using `::`\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370029]: failed to resolve variable reference 'Foo'\n --> compiler-test:10:17\n |\n 10 | const err = Foo.echo(1u32); // Invalid, echo is a static function and must be accessed using `::`\n | ^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/circuits/member_static_function_undefined.leo.out b/tests/expectations/compiler/compiler/circuits/member_static_function_undefined.leo.out index 1a990a8ee1..826e54b9d2 100644 --- a/tests/expectations/compiler/compiler/circuits/member_static_function_undefined.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_static_function_undefined.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370002]: illegal reference to non-existant member 'echoed' of circuit 'Foo'\n--> compiler-test:10:17\n |\n 10 | const err = Foo::echoed(1u32);\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370002]: illegal reference to non-existant member 'echoed' of circuit 'Foo'\n --> compiler-test:10:17\n |\n 10 | const err = Foo::echoed(1u32);\n | ^^^^^^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/circuits/member_variable_fail.leo.out b/tests/expectations/compiler/compiler/circuits/member_variable_fail.leo.out index c4f351a57a..725bbd0d85 100644 --- a/tests/expectations/compiler/compiler/circuits/member_variable_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_variable_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370002]: illegal reference to non-existant member 'y' of circuit 'Foo'\n--> compiler-test:9:17\n |\n 9 | const err = a.y;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370002]: illegal reference to non-existant member 'y' of circuit 'Foo'\n --> compiler-test:9:17\n |\n 9 | const err = a.y;\n | ^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/circuits/mut_function_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_function_fail.leo.out index a0db34475c..0176469603 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_function_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_function_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370007]: attempt to assign to function 'bar'\n--> compiler-test:12:5\n |\n 12 | f.bar = 1u8;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370007]: attempt to assign to function 'bar'\n --> compiler-test:12:5\n |\n 12 | f.bar = 1u8;\n | ^^^^^^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_function_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_function_fail.leo.out index 3552eec3d2..6ceec18fd7 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_self_function_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_self_function_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370007]: attempt to assign to function 'bar'\n--> compiler-test:9:9\n |\n 9 | self.bar = new;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370007]: attempt to assign to function 'bar'\n --> compiler-test:9:9\n |\n 9 | self.bar = new;\n | ^^^^^^^^^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_static_function_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_static_function_fail.leo.out index 3552eec3d2..6ceec18fd7 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_self_static_function_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_self_static_function_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370007]: attempt to assign to function 'bar'\n--> compiler-test:9:9\n |\n 9 | self.bar = new;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370007]: attempt to assign to function 'bar'\n --> compiler-test:9:9\n |\n 9 | self.bar = new;\n | ^^^^^^^^^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_variable_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_variable_fail.leo.out index 1d0273cc78..778b959c14 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_self_variable_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_self_variable_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370034]: illegal assignment to immutable variable 'self'\n--> compiler-test:7:9\n |\n 7 | self.a = new;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370034]: illegal assignment to immutable variable 'self'\n --> compiler-test:7:9\n |\n 7 | self.a = new;\n | ^^^^^^^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/circuits/mut_static_function_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_static_function_fail.leo.out index f27f252b82..8f6a9d491d 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_static_function_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_static_function_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370006]: extra circuit member 'a' for initialization of circuit 'Foo' is not allowed\n--> compiler-test:8:19\n |\n 8 | let f = Foo { a: 0u8 };\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370006]: extra circuit member 'a' for initialization of circuit 'Foo' is not allowed\n --> compiler-test:8:19\n |\n 8 | let f = Foo { a: 0u8 };\n | ^\n |\n" diff --git a/tests/expectations/compiler/compiler/circuits/mut_variable_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_variable_fail.leo.out index eba788f645..3a03e5bcc3 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_variable_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_variable_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370034]: illegal assignment to immutable variable 'f'\n--> compiler-test:10:5\n |\n 10 | f.a = 1u8;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370034]: illegal assignment to immutable variable 'f'\n --> compiler-test:10:5\n |\n 10 | f.a = 1u8;\n | ^^^^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/circuits/self_circuit.leo.out b/tests/expectations/compiler/compiler/circuits/self_circuit.leo.out index 200079122d..6f33019bc8 100644 --- a/tests/expectations/compiler/compiler/circuits/self_circuit.leo.out +++ b/tests/expectations/compiler/compiler/circuits/self_circuit.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EP0375009]: unexpected string: expected 'ident', got 'static'\n--> compiler-test:5:5\n |\n 5 | static function new() -> Self {\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EPAR0375009]: unexpected string: expected 'ident', got 'static'\n --> compiler-test:5:5\n |\n 5 | static function new() -> Self {\n | ^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/circuits/self_fail.leo.out b/tests/expectations/compiler/compiler/circuits/self_fail.leo.out index ec095b577c..ac29c46aa3 100644 --- a/tests/expectations/compiler/compiler/circuits/self_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/self_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370000]: failed to resolve circuit: 'Self'\n--> compiler-test:4:5\n |\n 4 | Self::main();\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370000]: failed to resolve circuit: 'Self'\n --> compiler-test:4:5\n |\n 4 | Self::main();\n | ^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/circuits/self_member_invalid.leo.out b/tests/expectations/compiler/compiler/circuits/self_member_invalid.leo.out index a023a76258..55b5fddc0b 100644 --- a/tests/expectations/compiler/compiler/circuits/self_member_invalid.leo.out +++ b/tests/expectations/compiler/compiler/circuits/self_member_invalid.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370009]: cannot call static function 'bar' of circuit 'Foo' from target\n--> compiler-test:13:17\n |\n 13 | const err = foo.bar();\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370009]: cannot call static function 'bar' of circuit 'Foo' from target\n --> compiler-test:13:17\n |\n 13 | const err = foo.bar();\n | ^^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/circuits/self_member_undefined.leo.out b/tests/expectations/compiler/compiler/circuits/self_member_undefined.leo.out index 67e3433049..9622608bd4 100644 --- a/tests/expectations/compiler/compiler/circuits/self_member_undefined.leo.out +++ b/tests/expectations/compiler/compiler/circuits/self_member_undefined.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370009]: cannot call static function 'bar' of circuit 'Foo' from target\n--> compiler-test:11:17\n |\n 11 | const err = foo.bar();\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370009]: cannot call static function 'bar' of circuit 'Foo' from target\n --> compiler-test:11:17\n |\n 11 | const err = foo.bar();\n | ^^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/console/log_fail.leo.out b/tests/expectations/compiler/compiler/console/log_fail.leo.out index 43606de39e..0c8fb9379a 100644 --- a/tests/expectations/compiler/compiler/console/log_fail.leo.out +++ b/tests/expectations/compiler/compiler/console/log_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EP0375009]: unexpected string: expected 'formatted string', got 'hello'\n--> compiler-test:4:18\n |\n 4 | console.log( hello );\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EPAR0375009]: unexpected string: expected 'formatted string', got 'hello'\n --> compiler-test:4:18\n |\n 4 | console.log( hello );\n | ^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/console/log_parameter_fail_empty.leo.out b/tests/expectations/compiler/compiler/console/log_parameter_fail_empty.leo.out index 0e63c76c25..8ac23ecc1c 100644 --- a/tests/expectations/compiler/compiler/console/log_parameter_fail_empty.leo.out +++ b/tests/expectations/compiler/compiler/console/log_parameter_fail_empty.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EC0372006]: Formatter given 1 containers and found 0 parameters\n--> compiler-test:4:17\n |\n 4 | console.log(\"{}\");\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[ECMP0372006]: Formatter given 1 containers and found 0 parameters\n --> compiler-test:4:17\n |\n 4 | console.log(\"{}\");\n | ^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/console/log_parameter_fail_none.leo.out b/tests/expectations/compiler/compiler/console/log_parameter_fail_none.leo.out index 4ccb1cbea8..ee603776ca 100644 --- a/tests/expectations/compiler/compiler/console/log_parameter_fail_none.leo.out +++ b/tests/expectations/compiler/compiler/console/log_parameter_fail_none.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EC0372006]: Formatter given 0 containers and found 1 parameters\n--> compiler-test:4:17\n |\n 4 | console.log(\"\", 1u32);\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[ECMP0372006]: Formatter given 0 containers and found 1 parameters\n --> compiler-test:4:17\n |\n 4 | console.log(\"\", 1u32);\n | ^^^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/console/log_parameter_fail_unknown.leo.out b/tests/expectations/compiler/compiler/console/log_parameter_fail_unknown.leo.out index 1d18c8ad90..50b40a3ad4 100644 --- a/tests/expectations/compiler/compiler/console/log_parameter_fail_unknown.leo.out +++ b/tests/expectations/compiler/compiler/console/log_parameter_fail_unknown.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370029]: failed to resolve variable reference 'a'\n--> compiler-test:4:23\n |\n 4 | console.log(\"{}\", a);\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370029]: failed to resolve variable reference 'a'\n --> compiler-test:4:23\n |\n 4 | console.log(\"{}\", a);\n | ^\n |\n" diff --git a/tests/expectations/compiler/compiler/core/core_circuit_invalid.leo.out b/tests/expectations/compiler/compiler/core/core_circuit_invalid.leo.out index 02c207717d..1e5971ee53 100644 --- a/tests/expectations/compiler/compiler/core/core_circuit_invalid.leo.out +++ b/tests/expectations/compiler/compiler/core/core_circuit_invalid.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370001]: failed to resolve import: 'core.unstable.blake2s.BadCircuit'\n--> compiler-test:3:30\n |\n 3 | import core.unstable.blake2s.BadCircuit; // `BadCircuit` is not included in the blake2s package\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370001]: failed to resolve import: 'core.unstable.blake2s.BadCircuit'\n --> compiler-test:3:30\n |\n 3 | import core.unstable.blake2s.BadCircuit; // `BadCircuit` is not included in the blake2s package\n | ^^^^^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/core/core_circuit_star_fail.leo.out b/tests/expectations/compiler/compiler/core/core_circuit_star_fail.leo.out index cdb58f435d..23c999faf5 100644 --- a/tests/expectations/compiler/compiler/core/core_circuit_star_fail.leo.out +++ b/tests/expectations/compiler/compiler/core/core_circuit_star_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370001]: failed to resolve import: 'core'\n--> :0:0\n |\n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: backtrace::capture::{{impl}}::default\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:410\n 5: leo_errors::common::span::{{impl}}::default\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:25\n 6: leo_asg::program::Program::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\asg\\src\\program\\mod.rs:169\n 7: leo_asg::Asg::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\asg\\src\\lib.rs:98\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370001]: failed to resolve import: 'core'\n --> :0:0\n |\n |\n" diff --git a/tests/expectations/compiler/compiler/core/core_package_invalid.leo.out b/tests/expectations/compiler/compiler/core/core_package_invalid.leo.out index cdb58f435d..23c999faf5 100644 --- a/tests/expectations/compiler/compiler/core/core_package_invalid.leo.out +++ b/tests/expectations/compiler/compiler/core/core_package_invalid.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370001]: failed to resolve import: 'core'\n--> :0:0\n |\n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: backtrace::capture::{{impl}}::default\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:410\n 5: leo_errors::common::span::{{impl}}::default\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:25\n 6: leo_asg::program::Program::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\asg\\src\\program\\mod.rs:169\n 7: leo_asg::Asg::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\asg\\src\\lib.rs:98\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370001]: failed to resolve import: 'core'\n --> :0:0\n |\n |\n" diff --git a/tests/expectations/compiler/compiler/core/core_unstable_package_invalid.leo.out b/tests/expectations/compiler/compiler/core/core_unstable_package_invalid.leo.out index 1ab97685b9..3c94548f8a 100644 --- a/tests/expectations/compiler/compiler/core/core_unstable_package_invalid.leo.out +++ b/tests/expectations/compiler/compiler/core/core_unstable_package_invalid.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370001]: failed to resolve import: 'core.unstable'\n--> :0:0\n |\n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: backtrace::capture::{{impl}}::default\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:410\n 5: leo_errors::common::span::{{impl}}::default\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:25\n 6: leo_asg::program::Program::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\asg\\src\\program\\mod.rs:169\n 7: leo_asg::Asg::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\asg\\src\\lib.rs:98\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370001]: failed to resolve import: 'core.unstable'\n --> :0:0\n |\n |\n" diff --git a/tests/expectations/compiler/compiler/field/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/field/no_space_between_literal.leo.out index cbf770d9aa..27946e7915 100644 --- a/tests/expectations/compiler/compiler/field/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/field/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EP0375004]: Unexpected white space between terms 1 and field\n--> compiler-test:4:13\n |\n 4 | const f = 1 field;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EPAR0375004]: Unexpected white space between terms 1 and field\n --> compiler-test:4:13\n |\n 4 | const f = 1 field;\n | ^\n |\n" diff --git a/tests/expectations/compiler/compiler/function/duplicate_definition_fail.leo.out b/tests/expectations/compiler/compiler/function/duplicate_definition_fail.leo.out index 9c5a333a63..77b4fbedd8 100644 --- a/tests/expectations/compiler/compiler/function/duplicate_definition_fail.leo.out +++ b/tests/expectations/compiler/compiler/function/duplicate_definition_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370017]: a function named \"main\" already exists in this scope\n--> compiler-test:8:1\n |\n 8 | function main() {\n|\n 9 | ...\n|\n 10 | }\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370017]: a function named \"main\" already exists in this scope\n --> compiler-test:8:1\n |\n 8 | function main() {\n|\n 9 | ...\n|\n 10 | }\n | ^\n |\n" diff --git a/tests/expectations/compiler/compiler/function/multiple_returns_fail.leo.out b/tests/expectations/compiler/compiler/function/multiple_returns_fail.leo.out index f414fca87b..6692138937 100644 --- a/tests/expectations/compiler/compiler/function/multiple_returns_fail.leo.out +++ b/tests/expectations/compiler/compiler/function/multiple_returns_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370036]: function 'main' failed to validate return path: 'cannot have asymmetrical return in if statement'\n--> compiler-test:4:5\n |\n 4 | if true {\n|\n 5 | ...\n|\n 6 | }\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370036]: function 'main' failed to validate return path: 'cannot have asymmetrical return in if statement'\n --> compiler-test:4:5\n |\n 4 | if true {\n|\n 5 | ...\n|\n 6 | }\n | ^\n |\n" diff --git a/tests/expectations/compiler/compiler/function/multiple_returns_fail_conditional.leo.out b/tests/expectations/compiler/compiler/function/multiple_returns_fail_conditional.leo.out index 4c58918fa8..8a68c1a2fd 100644 --- a/tests/expectations/compiler/compiler/function/multiple_returns_fail_conditional.leo.out +++ b/tests/expectations/compiler/compiler/function/multiple_returns_fail_conditional.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370035]: function 'main' missing return for all paths\n--> compiler-test:3:1\n |\n 3 | function main() -> bool {\n|\n 4 | ...\n|\n 5 | }\n|\n 6 | \n|\n 7 | \n|\n 8 | \n|\n 9 | \n|\n 10 | \n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370035]: function 'main' missing return for all paths\n --> compiler-test:3:1\n |\n 3 | function main() -> bool {\n|\n 4 | ...\n|\n 5 | }\n|\n 6 | \n|\n 7 | \n|\n 8 | \n|\n 9 | \n|\n 10 | \n | ^\n |\n" diff --git a/tests/expectations/compiler/compiler/function/return_array_nested_fail.leo.out b/tests/expectations/compiler/compiler/function/return_array_nested_fail.leo.out index 854dd7cbd1..b51b7ac507 100644 --- a/tests/expectations/compiler/compiler/function/return_array_nested_fail.leo.out +++ b/tests/expectations/compiler/compiler/function/return_array_nested_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370027]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n--> compiler-test:4:12\n |\n 4 | return [0u8; (2, 3)]; // The correct 3x2 array tuple is `[0u8; (3, 2)]`\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370027]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:4:12\n |\n 4 | return [0u8; (2, 3)]; // The correct 3x2 array tuple is `[0u8; (3, 2)]`\n | ^^^^^^^^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/function/return_array_tuple_fail.leo.out b/tests/expectations/compiler/compiler/function/return_array_tuple_fail.leo.out index c40801cdac..3994d51d90 100644 --- a/tests/expectations/compiler/compiler/function/return_array_tuple_fail.leo.out +++ b/tests/expectations/compiler/compiler/function/return_array_tuple_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370027]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n--> compiler-test:4:12\n |\n 4 | return [[0u8; 3]; 2]; // The correct 3x2 nested array is `[0u8; 2]; 3]`\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370027]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:4:12\n |\n 4 | return [[0u8; 3]; 2]; // The correct 3x2 nested array is `[0u8; 2]; 3]`\n | ^^^^^^^^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/function/scope_fail.leo.out b/tests/expectations/compiler/compiler/function/scope_fail.leo.out index ae12d6d16d..69c0f3a984 100644 --- a/tests/expectations/compiler/compiler/function/scope_fail.leo.out +++ b/tests/expectations/compiler/compiler/function/scope_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370029]: failed to resolve variable reference 'myGlobal'\n--> compiler-test:5:12\n |\n 5 | return myGlobal;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370029]: failed to resolve variable reference 'myGlobal'\n --> compiler-test:5:12\n |\n 5 | return myGlobal;\n | ^^^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/function/undefined.leo.out b/tests/expectations/compiler/compiler/function/undefined.leo.out index fc31d3a7a4..825824c60d 100644 --- a/tests/expectations/compiler/compiler/function/undefined.leo.out +++ b/tests/expectations/compiler/compiler/function/undefined.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370025]: failed to resolve function: 'my_function'\n--> compiler-test:5:5\n |\n 5 | my_function();\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370025]: failed to resolve function: 'my_function'\n --> compiler-test:5:5\n |\n 5 | my_function();\n | ^^^^^^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/global_consts/modify_global_const.leo.out b/tests/expectations/compiler/compiler/global_consts/modify_global_const.leo.out index 6889d4e293..2d273fce66 100644 --- a/tests/expectations/compiler/compiler/global_consts/modify_global_const.leo.out +++ b/tests/expectations/compiler/compiler/global_consts/modify_global_const.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370034]: illegal assignment to immutable variable 'basic'\n--> compiler-test:7:5\n |\n 7 | basic = 2u32;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370034]: illegal assignment to immutable variable 'basic'\n --> compiler-test:7:5\n |\n 7 | basic = 2u32;\n | ^^^^^^^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/const_input_non_const.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/const_input_non_const.leo.out index 8c36e50267..ac6119b006 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/const_input_non_const.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/const_input_non_const.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EC0372029]: Expected input variable `a` to be non-constant. Move input variable `a` to [main] section of input file\n--> compiler-test:3:15\n |\n 3 | function main(a: u32) {\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[ECMP0372029]: Expected input variable `a` to be non-constant. Move input variable `a` to [main] section of input file\n --> compiler-test:3:15\n |\n 3 | function main(a: u32) {\n | ^\n |\n" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/const_var_in_both_sections_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/const_var_in_both_sections_fail.leo.out index 78d8ee5ae1..363383036f 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/const_var_in_both_sections_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/const_var_in_both_sections_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EC0372035]: Input variable a declared twice\n--> compiler-test:3:21\n |\n 3 | function main(const a: u32) {\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[ECMP0372035]: Input variable a declared twice\n --> compiler-test:3:21\n |\n 3 | function main(const a: u32) {\n | ^\n |\n" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_array_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_array_fail.leo.out index 4d88b55ef4..fe63044a6f 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_array_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_array_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EC0372031]: Input array dimensions mismatch expected 1, found array dimensions 2\n--> compiler-test:3:15\n |\n 3 | function main(x: [i16; 2]) {\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[ECMP0372031]: Input array dimensions mismatch expected 1, found array dimensions 2\n --> compiler-test:3:15\n |\n 3 | function main(x: [i16; 2]) {\n | ^\n |\n" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_tuple_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_tuple_fail.leo.out index 8115fcf8b5..e48aa7c880 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_tuple_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_tuple_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EC0372032]: Input tuple size mismatch expected 3, found tuple with length 2\n--> compiler-test:3:15\n |\n 3 | function main(x: (u8, bool, u8)) {\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[ECMP0372032]: Input tuple size mismatch expected 3, found tuple with length 2\n --> compiler-test:3:15\n |\n 3 | function main(x: (u8, bool, u8)) {\n | ^\n |\n" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/non_const_input_const.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/non_const_input_const.leo.out index 38f1193c17..13ca402021 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/non_const_input_const.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/non_const_input_const.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370026]: failed to resolve type for variable definition 'unknown'\n--> compiler-test:4:17\n |\n 4 | let b = a * 2;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370026]: failed to resolve type for variable definition 'unknown'\n --> compiler-test:4:17\n |\n 4 | let b = a * 2;\n | ^\n |\n" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/var_in_both_sections_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/var_in_both_sections_fail.leo.out index d0e082ede3..d1883828ab 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/var_in_both_sections_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/var_in_both_sections_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EC0372035]: Input variable a declared twice\n--> compiler-test:3:15\n |\n 3 | function main(a: u32) {\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[ECMP0372035]: Input variable a declared twice\n --> compiler-test:3:15\n |\n 3 | function main(a: u32) {\n | ^\n |\n" diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array_fail.leo.out index 2bd5928a38..55f797f152 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EC0372031]: Input array dimensions mismatch expected 2, found array dimensions 1\n--> compiler-test:3:21\n |\n 3 | function main(const x: [i16; 2]) {\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[ECMP0372031]: Input array dimensions mismatch expected 2, found array dimensions 1\n --> compiler-test:3:21\n |\n 3 | function main(const x: [i16; 2]) {\n | ^\n |\n" diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple_fail.leo.out index 4cbd0ec64a..f160e71d49 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EC0372032]: Input tuple size mismatch expected 3, found tuple with length 2\n--> compiler-test:3:21\n |\n 3 | function main(const x: (u8, bool, u8)) {\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[ECMP0372032]: Input tuple size mismatch expected 3, found tuple with length 2\n --> compiler-test:3:21\n |\n 3 | function main(const x: (u8, bool, u8)) {\n | ^\n |\n" diff --git a/tests/expectations/compiler/compiler/input_files/program_registers/registers_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_registers/registers_fail.leo.out index 9fa7853395..b18b8067e6 100644 --- a/tests/expectations/compiler/compiler/input_files/program_registers/registers_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_registers/registers_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EC0372037]: Mismatched types. Expected register output type `u8`, found type `bool`.\n--> compiler-test:3:1\n |\n 3 | function main() -> bool {\n|\n 4 | ...\n|\n 5 | }\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[ECMP0372037]: Mismatched types. Expected register output type `u8`, found type `bool`.\n --> compiler-test:3:1\n |\n 3 | function main() -> bool {\n|\n 4 | ...\n|\n 5 | }\n | ^\n |\n" diff --git a/tests/expectations/compiler/compiler/integers/i128/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/i128/max_fail.leo.out index 76f9a4641f..51e7a76aef 100644 --- a/tests/expectations/compiler/compiler/integers/i128/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370032]: failed to parse int value '170141183460469231731687303715884105728'\n--> compiler-test:4:21\n |\n 4 | const a: i128 = 170141183460469231731687303715884105728;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370032]: failed to parse int value '170141183460469231731687303715884105728'\n --> compiler-test:4:21\n |\n 4 | const a: i128 = 170141183460469231731687303715884105728;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/integers/i128/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/i128/min_fail.leo.out index e832bcb8ee..ff7a5401da 100644 --- a/tests/expectations/compiler/compiler/integers/i128/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370032]: failed to parse int value '-170141183460469231731687303715884105729'\n--> compiler-test:4:21\n |\n 4 | const a: i128 = -170141183460469231731687303715884105729;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370032]: failed to parse int value '-170141183460469231731687303715884105729'\n --> compiler-test:4:21\n |\n 4 | const a: i128 = -170141183460469231731687303715884105729;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/integers/i128/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/i128/no_space_between_literal.leo.out index 4604fafad6..f03038e19e 100644 --- a/tests/expectations/compiler/compiler/integers/i128/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EP0375004]: Unexpected white space between terms 1 and i128\n--> compiler-test:4:15\n |\n 4 | const i = 1 i128;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EPAR0375004]: Unexpected white space between terms 1 and i128\n --> compiler-test:4:15\n |\n 4 | const i = 1 i128;\n | ^\n |\n" diff --git a/tests/expectations/compiler/compiler/integers/i16/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/i16/max_fail.leo.out index b5172ad948..71199a6ad8 100644 --- a/tests/expectations/compiler/compiler/integers/i16/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370032]: failed to parse int value '32768'\n--> compiler-test:4:20\n |\n 4 | const a: i16 = 32768;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370032]: failed to parse int value '32768'\n --> compiler-test:4:20\n |\n 4 | const a: i16 = 32768;\n | ^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/integers/i16/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/i16/min_fail.leo.out index 3ebb425832..6549ad6afa 100644 --- a/tests/expectations/compiler/compiler/integers/i16/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370032]: failed to parse int value '-32769'\n--> compiler-test:4:20\n |\n 4 | const a: i16 = -32769;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370032]: failed to parse int value '-32769'\n --> compiler-test:4:20\n |\n 4 | const a: i16 = -32769;\n | ^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/integers/i16/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/i16/no_space_between_literal.leo.out index 5e6c6a64e5..ca5f64f024 100644 --- a/tests/expectations/compiler/compiler/integers/i16/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EP0375004]: Unexpected white space between terms 1 and i16\n--> compiler-test:4:15\n |\n 4 | const i = 1 i16;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EPAR0375004]: Unexpected white space between terms 1 and i16\n --> compiler-test:4:15\n |\n 4 | const i = 1 i16;\n | ^\n |\n" diff --git a/tests/expectations/compiler/compiler/integers/i32/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/i32/max_fail.leo.out index cc6a0c2eb3..0ceaa41ed3 100644 --- a/tests/expectations/compiler/compiler/integers/i32/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370032]: failed to parse int value '2147483648'\n--> compiler-test:4:20\n |\n 4 | const a: i32 = 2147483648;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370032]: failed to parse int value '2147483648'\n --> compiler-test:4:20\n |\n 4 | const a: i32 = 2147483648;\n | ^^^^^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/integers/i32/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/i32/min_fail.leo.out index f542d52182..1fa2004b4b 100644 --- a/tests/expectations/compiler/compiler/integers/i32/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370032]: failed to parse int value '-2147483649'\n--> compiler-test:4:20\n |\n 4 | const a: i32 = -2147483649;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370032]: failed to parse int value '-2147483649'\n --> compiler-test:4:20\n |\n 4 | const a: i32 = -2147483649;\n | ^^^^^^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/integers/i32/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/i32/no_space_between_literal.leo.out index 7bb6482417..b08793ae84 100644 --- a/tests/expectations/compiler/compiler/integers/i32/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EP0375004]: Unexpected white space between terms 1 and i32\n--> compiler-test:4:15\n |\n 4 | const i = 1 i32;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EPAR0375004]: Unexpected white space between terms 1 and i32\n --> compiler-test:4:15\n |\n 4 | const i = 1 i32;\n | ^\n |\n" diff --git a/tests/expectations/compiler/compiler/integers/i64/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/i64/max_fail.leo.out index a210347a96..df91e3e1ee 100644 --- a/tests/expectations/compiler/compiler/integers/i64/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370032]: failed to parse int value '9223372036854775808'\n--> compiler-test:4:20\n |\n 4 | const a: i64 = 9223372036854775808;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370032]: failed to parse int value '9223372036854775808'\n --> compiler-test:4:20\n |\n 4 | const a: i64 = 9223372036854775808;\n | ^^^^^^^^^^^^^^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/integers/i64/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/i64/min_fail.leo.out index 8a02d6d2a9..b8233afbaf 100644 --- a/tests/expectations/compiler/compiler/integers/i64/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370032]: failed to parse int value '-9223372036854775809'\n--> compiler-test:4:20\n |\n 4 | const a: i64 = -9223372036854775809;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370032]: failed to parse int value '-9223372036854775809'\n --> compiler-test:4:20\n |\n 4 | const a: i64 = -9223372036854775809;\n | ^^^^^^^^^^^^^^^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/integers/i64/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/i64/no_space_between_literal.leo.out index e40437348b..fc03677fec 100644 --- a/tests/expectations/compiler/compiler/integers/i64/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EP0375004]: Unexpected white space between terms 1 and i64\n--> compiler-test:4:15\n |\n 4 | const i = 1 i64;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EPAR0375004]: Unexpected white space between terms 1 and i64\n --> compiler-test:4:15\n |\n 4 | const i = 1 i64;\n | ^\n |\n" diff --git a/tests/expectations/compiler/compiler/integers/i8/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/i8/max_fail.leo.out index a29df73f16..7514c5ed15 100644 --- a/tests/expectations/compiler/compiler/integers/i8/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370032]: failed to parse int value '128'\n--> compiler-test:4:19\n |\n 4 | const a: i8 = 128;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370032]: failed to parse int value '128'\n --> compiler-test:4:19\n |\n 4 | const a: i8 = 128;\n | ^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/integers/i8/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/i8/min_fail.leo.out index 9499b51580..16f0d6a1d4 100644 --- a/tests/expectations/compiler/compiler/integers/i8/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370032]: failed to parse int value '-129'\n--> compiler-test:4:19\n |\n 4 | const a: i8 = -129;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370032]: failed to parse int value '-129'\n --> compiler-test:4:19\n |\n 4 | const a: i8 = -129;\n | ^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/integers/i8/negate_min.leo.out b/tests/expectations/compiler/compiler/integers/i8/negate_min.leo.out index e0cf3bd98f..ee247aba3a 100644 --- a/tests/expectations/compiler/compiler/integers/i8/negate_min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/negate_min.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EC0372085]: integer operation failed due to the signed integer error `Integer overflow`\n--> compiler-test:5:15\n |\n 5 | const b = -a;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[ECMP0372085]: integer operation failed due to the signed integer error `Integer overflow`\n --> compiler-test:5:15\n |\n 5 | const b = -a;\n | ^^\n |\n" diff --git a/tests/expectations/compiler/compiler/integers/i8/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/i8/no_space_between_literal.leo.out index 60bba3bb40..68e994b64d 100644 --- a/tests/expectations/compiler/compiler/integers/i8/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EP0375004]: Unexpected white space between terms 1 and i8\n--> compiler-test:4:15\n |\n 4 | const i = 1 i8;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EPAR0375004]: Unexpected white space between terms 1 and i8\n --> compiler-test:4:15\n |\n 4 | const i = 1 i8;\n | ^\n |\n" diff --git a/tests/expectations/compiler/compiler/integers/u128/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/u128/max_fail.leo.out index 9e0b42b670..8edba7e958 100644 --- a/tests/expectations/compiler/compiler/integers/u128/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370032]: failed to parse int value '340282366920938463463374607431768211456'\n--> compiler-test:4:21\n |\n 4 | const a: u128 = 340282366920938463463374607431768211456;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370032]: failed to parse int value '340282366920938463463374607431768211456'\n --> compiler-test:4:21\n |\n 4 | const a: u128 = 340282366920938463463374607431768211456;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/integers/u128/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/u128/min_fail.leo.out index 293c64784e..b98759cfc5 100644 --- a/tests/expectations/compiler/compiler/integers/u128/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370032]: failed to parse int value '-1'\n--> compiler-test:4:21\n |\n 4 | const a: u128 = -1;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370032]: failed to parse int value '-1'\n --> compiler-test:4:21\n |\n 4 | const a: u128 = -1;\n | ^^\n |\n" diff --git a/tests/expectations/compiler/compiler/integers/u128/negative_input_fail.leo.out b/tests/expectations/compiler/compiler/integers/u128/negative_input_fail.leo.out index 96d2d2bd91..02fc9d5a62 100644 --- a/tests/expectations/compiler/compiler/integers/u128/negative_input_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/negative_input_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EC0372091]: failed to parse `-2` as expected integer type\n--> compiler-test:3:15\n |\n 3 | function main(a: u128) {}\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[ECMP0372091]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u128) {}\n | ^\n |\n" diff --git a/tests/expectations/compiler/compiler/integers/u128/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/u128/no_space_between_literal.leo.out index 03de9f5243..6d7eb04daa 100644 --- a/tests/expectations/compiler/compiler/integers/u128/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EP0375004]: Unexpected white space between terms 1 and u128\n--> compiler-test:4:15\n |\n 4 | const i = 1 u128;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EPAR0375004]: Unexpected white space between terms 1 and u128\n --> compiler-test:4:15\n |\n 4 | const i = 1 u128;\n | ^\n |\n" diff --git a/tests/expectations/compiler/compiler/integers/u16/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/u16/max_fail.leo.out index a05fda5072..27dd8dc843 100644 --- a/tests/expectations/compiler/compiler/integers/u16/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370032]: failed to parse int value '65536'\n--> compiler-test:4:20\n |\n 4 | const a: u16 = 65536;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370032]: failed to parse int value '65536'\n --> compiler-test:4:20\n |\n 4 | const a: u16 = 65536;\n | ^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/integers/u16/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/u16/min_fail.leo.out index fd4a0145ae..5c5ef81d6f 100644 --- a/tests/expectations/compiler/compiler/integers/u16/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370032]: failed to parse int value '-1'\n--> compiler-test:4:20\n |\n 4 | const a: u16 = -1;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370032]: failed to parse int value '-1'\n --> compiler-test:4:20\n |\n 4 | const a: u16 = -1;\n | ^^\n |\n" diff --git a/tests/expectations/compiler/compiler/integers/u16/negative_input_fail.leo.out b/tests/expectations/compiler/compiler/integers/u16/negative_input_fail.leo.out index 50ce2e5e3b..cd8a3a133e 100644 --- a/tests/expectations/compiler/compiler/integers/u16/negative_input_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/negative_input_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EC0372091]: failed to parse `-2` as expected integer type\n--> compiler-test:3:15\n |\n 3 | function main(a: u16) {}\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[ECMP0372091]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u16) {}\n | ^\n |\n" diff --git a/tests/expectations/compiler/compiler/integers/u16/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/u16/no_space_between_literal.leo.out index 06821b00b9..72324b9454 100644 --- a/tests/expectations/compiler/compiler/integers/u16/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EP0375004]: Unexpected white space between terms 1 and u16\n--> compiler-test:4:15\n |\n 4 | const i = 1 u16;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EPAR0375004]: Unexpected white space between terms 1 and u16\n --> compiler-test:4:15\n |\n 4 | const i = 1 u16;\n | ^\n |\n" diff --git a/tests/expectations/compiler/compiler/integers/u32/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/u32/max_fail.leo.out index 9d978b5ed8..3e2074c0a6 100644 --- a/tests/expectations/compiler/compiler/integers/u32/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370032]: failed to parse int value '4294967296'\n--> compiler-test:4:20\n |\n 4 | const a: u32 = 4294967296;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370032]: failed to parse int value '4294967296'\n --> compiler-test:4:20\n |\n 4 | const a: u32 = 4294967296;\n | ^^^^^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/integers/u32/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/u32/min_fail.leo.out index 42ebd6043e..45a815bc91 100644 --- a/tests/expectations/compiler/compiler/integers/u32/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370032]: failed to parse int value '-1'\n--> compiler-test:4:20\n |\n 4 | const a: u32 = -1;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370032]: failed to parse int value '-1'\n --> compiler-test:4:20\n |\n 4 | const a: u32 = -1;\n | ^^\n |\n" diff --git a/tests/expectations/compiler/compiler/integers/u32/negative_input_fail.leo.out b/tests/expectations/compiler/compiler/integers/u32/negative_input_fail.leo.out index 1ae5f015cc..3cd188e123 100644 --- a/tests/expectations/compiler/compiler/integers/u32/negative_input_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/negative_input_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EC0372091]: failed to parse `-2` as expected integer type\n--> compiler-test:3:15\n |\n 3 | function main(a: u32) {}\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[ECMP0372091]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u32) {}\n | ^\n |\n" diff --git a/tests/expectations/compiler/compiler/integers/u32/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/u32/no_space_between_literal.leo.out index 2cecade5c2..98b4b81f82 100644 --- a/tests/expectations/compiler/compiler/integers/u32/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EP0375004]: Unexpected white space between terms 1 and u32\n--> compiler-test:4:15\n |\n 4 | const i = 1 u32;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EPAR0375004]: Unexpected white space between terms 1 and u32\n --> compiler-test:4:15\n |\n 4 | const i = 1 u32;\n | ^\n |\n" diff --git a/tests/expectations/compiler/compiler/integers/u64/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/u64/max_fail.leo.out index 8fafe6e389..2e04c8e998 100644 --- a/tests/expectations/compiler/compiler/integers/u64/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370032]: failed to parse int value '18446744073709551616'\n--> compiler-test:4:20\n |\n 4 | const a: u64 = 18446744073709551616;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370032]: failed to parse int value '18446744073709551616'\n --> compiler-test:4:20\n |\n 4 | const a: u64 = 18446744073709551616;\n | ^^^^^^^^^^^^^^^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/integers/u64/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/u64/min_fail.leo.out index 0966802430..7b3a6be662 100644 --- a/tests/expectations/compiler/compiler/integers/u64/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370032]: failed to parse int value '-1'\n--> compiler-test:4:20\n |\n 4 | const a: u64 = -1;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370032]: failed to parse int value '-1'\n --> compiler-test:4:20\n |\n 4 | const a: u64 = -1;\n | ^^\n |\n" diff --git a/tests/expectations/compiler/compiler/integers/u64/negative_input_fail.leo.out b/tests/expectations/compiler/compiler/integers/u64/negative_input_fail.leo.out index 37e529b137..1bc057ff1f 100644 --- a/tests/expectations/compiler/compiler/integers/u64/negative_input_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/negative_input_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EC0372091]: failed to parse `-2` as expected integer type\n--> compiler-test:3:15\n |\n 3 | function main(a: u64) {}\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[ECMP0372091]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u64) {}\n | ^\n |\n" diff --git a/tests/expectations/compiler/compiler/integers/u64/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/u64/no_space_between_literal.leo.out index 30921de251..631103d644 100644 --- a/tests/expectations/compiler/compiler/integers/u64/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EP0375004]: Unexpected white space between terms 1 and u64\n--> compiler-test:4:15\n |\n 4 | const i = 1 u64;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EPAR0375004]: Unexpected white space between terms 1 and u64\n --> compiler-test:4:15\n |\n 4 | const i = 1 u64;\n | ^\n |\n" diff --git a/tests/expectations/compiler/compiler/integers/u8/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/u8/max_fail.leo.out index 9dcc32d939..6b3f43f610 100644 --- a/tests/expectations/compiler/compiler/integers/u8/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370032]: failed to parse int value '256'\n--> compiler-test:4:19\n |\n 4 | const a: u8 = 256;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370032]: failed to parse int value '256'\n --> compiler-test:4:19\n |\n 4 | const a: u8 = 256;\n | ^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/integers/u8/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/u8/min_fail.leo.out index 77ef052100..f718c61a8c 100644 --- a/tests/expectations/compiler/compiler/integers/u8/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370032]: failed to parse int value '-1'\n--> compiler-test:4:19\n |\n 4 | const a: u8 = -1;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370032]: failed to parse int value '-1'\n --> compiler-test:4:19\n |\n 4 | const a: u8 = -1;\n | ^^\n |\n" diff --git a/tests/expectations/compiler/compiler/integers/u8/negative_input_fail.leo.out b/tests/expectations/compiler/compiler/integers/u8/negative_input_fail.leo.out index 8a4cafcce9..7986564994 100644 --- a/tests/expectations/compiler/compiler/integers/u8/negative_input_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/negative_input_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EC0372091]: failed to parse `-2` as expected integer type\n--> compiler-test:3:15\n |\n 3 | function main(a: u8) {}\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[ECMP0372091]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u8) {}\n | ^\n |\n" diff --git a/tests/expectations/compiler/compiler/integers/u8/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/u8/no_space_between_literal.leo.out index cdf7c0ecdc..90e59ffc47 100644 --- a/tests/expectations/compiler/compiler/integers/u8/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EP0375004]: Unexpected white space between terms 1 and u8\n--> compiler-test:4:15\n |\n 4 | const i = 1 u8;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EPAR0375004]: Unexpected white space between terms 1 and u8\n --> compiler-test:4:15\n |\n 4 | const i = 1 u8;\n | ^\n |\n" diff --git a/tests/expectations/compiler/compiler/mutability/array_fail.leo.out b/tests/expectations/compiler/compiler/mutability/array_fail.leo.out index f3ba6435f9..437785bfd5 100644 --- a/tests/expectations/compiler/compiler/mutability/array_fail.leo.out +++ b/tests/expectations/compiler/compiler/mutability/array_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370034]: illegal assignment to immutable variable 'a'\n--> compiler-test:5:5\n |\n 5 | a[0] = 0;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370034]: illegal assignment to immutable variable 'a'\n --> compiler-test:5:5\n |\n 5 | a[0] = 0;\n | ^^^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/mutability/circuit_fail.leo.out b/tests/expectations/compiler/compiler/mutability/circuit_fail.leo.out index dcc819aba0..afb4d9c9eb 100644 --- a/tests/expectations/compiler/compiler/mutability/circuit_fail.leo.out +++ b/tests/expectations/compiler/compiler/mutability/circuit_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370034]: illegal assignment to immutable variable 'a'\n--> compiler-test:10:5\n |\n 10 | a.x = 0;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370034]: illegal assignment to immutable variable 'a'\n --> compiler-test:10:5\n |\n 10 | a.x = 0;\n | ^^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/mutability/circuit_function_const.leo.out b/tests/expectations/compiler/compiler/mutability/circuit_function_const.leo.out index 4162ab538a..1fef874ed5 100644 --- a/tests/expectations/compiler/compiler/mutability/circuit_function_const.leo.out +++ b/tests/expectations/compiler/compiler/mutability/circuit_function_const.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370010]: cannot call mutable member function 'foo' of circuit 'Foo' from immutable context\n--> compiler-test:15:5\n |\n 15 | a.foo();\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370010]: cannot call mutable member function 'foo' of circuit 'Foo' from immutable context\n --> compiler-test:15:5\n |\n 15 | a.foo();\n | ^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/mutability/circuit_static_function_mut_fail.leo.out b/tests/expectations/compiler/compiler/mutability/circuit_static_function_mut_fail.leo.out index a442cd2df0..1c2af74302 100644 --- a/tests/expectations/compiler/compiler/mutability/circuit_static_function_mut_fail.leo.out +++ b/tests/expectations/compiler/compiler/mutability/circuit_static_function_mut_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370006]: extra circuit member 'x' for initialization of circuit 'Foo' is not allowed\n--> compiler-test:8:19\n |\n 8 | let a = Foo { x: 1 };\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370006]: extra circuit member 'x' for initialization of circuit 'Foo' is not allowed\n --> compiler-test:8:19\n |\n 8 | let a = Foo { x: 1 };\n | ^\n |\n" diff --git a/tests/expectations/compiler/compiler/mutability/const.leo.out b/tests/expectations/compiler/compiler/mutability/const.leo.out index 834a167f30..2f7739198e 100644 --- a/tests/expectations/compiler/compiler/mutability/const.leo.out +++ b/tests/expectations/compiler/compiler/mutability/const.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370034]: illegal assignment to immutable variable 'a'\n--> compiler-test:6:5\n |\n 6 | a = 0;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370034]: illegal assignment to immutable variable 'a'\n --> compiler-test:6:5\n |\n 6 | a = 0;\n | ^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/mutability/function_input.leo.out b/tests/expectations/compiler/compiler/mutability/function_input.leo.out index 646b2eade6..8437f9e979 100644 --- a/tests/expectations/compiler/compiler/mutability/function_input.leo.out +++ b/tests/expectations/compiler/compiler/mutability/function_input.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370029]: failed to resolve variable reference 'a'\n--> compiler-test:5:5\n |\n 5 | a = false;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370029]: failed to resolve variable reference 'a'\n --> compiler-test:5:5\n |\n 5 | a = false;\n | ^\n |\n" diff --git a/tests/expectations/compiler/compiler/mutability/let_fail.leo.out b/tests/expectations/compiler/compiler/mutability/let_fail.leo.out index 834a167f30..2f7739198e 100644 --- a/tests/expectations/compiler/compiler/mutability/let_fail.leo.out +++ b/tests/expectations/compiler/compiler/mutability/let_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370034]: illegal assignment to immutable variable 'a'\n--> compiler-test:6:5\n |\n 6 | a = 0;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370034]: illegal assignment to immutable variable 'a'\n --> compiler-test:6:5\n |\n 6 | a = 0;\n | ^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/statements/assign_ternary.leo.out b/tests/expectations/compiler/compiler/statements/assign_ternary.leo.out index a1cc4fc1cc..95fade021d 100644 --- a/tests/expectations/compiler/compiler/statements/assign_ternary.leo.out +++ b/tests/expectations/compiler/compiler/statements/assign_ternary.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370022]: ternary sides had different types: left u32, right bool\n--> compiler-test:4:13\n |\n 4 | let x = true ? x: true;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370022]: ternary sides had different types: left u32, right bool\n --> compiler-test:4:13\n |\n 4 | let x = true ? x: true;\n | ^^^^^^^^^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/statements/duplicate_variable.leo.out b/tests/expectations/compiler/compiler/statements/duplicate_variable.leo.out index 7f9f709224..efc970ca55 100644 --- a/tests/expectations/compiler/compiler/statements/duplicate_variable.leo.out +++ b/tests/expectations/compiler/compiler/statements/duplicate_variable.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370018]: a variable named \"x\" already exists in this scope\n--> compiler-test:5:3\n |\n 5 | let x = true;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370018]: a variable named \"x\" already exists in this scope\n --> compiler-test:5:3\n |\n 5 | let x = true;\n | ^^^^^^^^^^^^\n |\n" diff --git a/tests/expectations/compiler/compiler/statements/ternary_non_const_fail.leo.out b/tests/expectations/compiler/compiler/statements/ternary_non_const_fail.leo.out index f3f036ee12..ca0e60e7cd 100644 --- a/tests/expectations/compiler/compiler/statements/ternary_non_const_fail.leo.out +++ b/tests/expectations/compiler/compiler/statements/ternary_non_const_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EG0370016]: failed to create const variable(s) 'y' with non constant values.\n--> compiler-test:5:5\n |\n 5 | const y = x > 2u8? 1u8 : 2u8;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\tokenizer\\mod.rs:45\n 6: leo_parser::parser::parse\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\parser\\mod.rs:56\n 7: leo_parser::parse_ast\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\parser\\src\\lib.rs:38\n 8: leo_compiler::compiler::Compiler, enum$>::parse_program_from_string\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 12: leo_compiler::test::compiler_tests\n at src\\test.rs:258\n 13: leo_compiler::test::compiler_tests::{{closure}}\n at src\\test.rs:257\n 14: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 15: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 16: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 17: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 18: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 19: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 20: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 21: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 22: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 23: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 24: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 25: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 26: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 27: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 28: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 29: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 30: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 31: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 32: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 33: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 34: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 35: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 36: BaseThreadInitThunk\n 37: RtlUserThreadStart\n" + - "[EASG0370016]: failed to create const variable(s) 'y' with non constant values.\n --> compiler-test:5:5\n |\n 5 | const y = x > 2u8? 1u8 : 2u8;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n" diff --git a/tests/expectations/parser/parser/circuits/fields_fail.leo.out b/tests/expectations/parser/parser/circuits/fields_fail.leo.out index d371f382e6..6ed112fbcc 100644 --- a/tests/expectations/parser/parser/circuits/fields_fail.leo.out +++ b/tests/expectations/parser/parser/circuits/fields_fail.leo.out @@ -2,4 +2,4 @@ namespace: Parse expectation: Fail outputs: - - "[EP0375006]: Cannot mix use of commas and semi-colons for circuit member variable declarations.\n--> test:10:11\n |\n 10 | y: u32;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:127\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EPAR0375006]: Cannot mix use of commas and semi-colons for circuit member variable declarations.\n --> test:10:11\n |\n 10 | y: u32;\n | ^\n |\n" diff --git a/tests/expectations/parser/parser/expression/array_init_fail.leo.out b/tests/expectations/parser/parser/expression/array_init_fail.leo.out index fbc3ca82a8..ec72c2ef27 100644 --- a/tests/expectations/parser/parser/expression/array_init_fail.leo.out +++ b/tests/expectations/parser/parser/expression/array_init_fail.leo.out @@ -2,5 +2,5 @@ namespace: ParseExpression expectation: Fail outputs: - - "[EP0375010]: illegal spread in array initializer\n--> test:1:1\n |\n 1 | [...0u8; 1]\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:71\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375010]: illegal spread in array initializer\n--> test:1:1\n |\n 1 | [...0; 1]\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:71\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EPAR0375010]: illegal spread in array initializer\n --> test:1:1\n |\n 1 | [...0u8; 1]\n | ^^^^^^^\n |\n" + - "[EPAR0375010]: illegal spread in array initializer\n --> test:1:1\n |\n 1 | [...0; 1]\n | ^^^^^\n |\n" diff --git a/tests/expectations/parser/parser/expression/array_inline_fail.leo.out b/tests/expectations/parser/parser/expression/array_inline_fail.leo.out index da63124d2f..80065f1a45 100644 --- a/tests/expectations/parser/parser/expression/array_inline_fail.leo.out +++ b/tests/expectations/parser/parser/expression/array_inline_fail.leo.out @@ -2,8 +2,8 @@ namespace: ParseExpression expectation: Fail outputs: - - "[EP0375009]: unexpected string: expected 'expression', got ','\n--> test:1:2\n |\n 1 | [,]\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:71\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375009]: unexpected string: expected 'expression', got ','\n--> test:1:2\n |\n 1 | [,,]\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:71\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375009]: unexpected string: expected 'expression', got ','\n--> test:1:4\n |\n 1 | [0,,]\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:71\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375009]: unexpected string: expected 'expression', got ','\n--> test:1:2\n |\n 1 | [,0]\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:71\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375009]: unexpected string: expected 'expression', got ','\n--> test:1:2\n |\n 1 | [,0,]\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:71\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EPAR0375009]: unexpected string: expected 'expression', got ','\n --> test:1:2\n |\n 1 | [,]\n | ^\n |\n" + - "[EPAR0375009]: unexpected string: expected 'expression', got ','\n --> test:1:2\n |\n 1 | [,,]\n | ^\n |\n" + - "[EPAR0375009]: unexpected string: expected 'expression', got ','\n --> test:1:4\n |\n 1 | [0,,]\n | ^\n |\n" + - "[EPAR0375009]: unexpected string: expected 'expression', got ','\n --> test:1:2\n |\n 1 | [,0]\n | ^\n |\n" + - "[EPAR0375009]: unexpected string: expected 'expression', got ','\n --> test:1:2\n |\n 1 | [,0,]\n | ^\n |\n" diff --git a/tests/expectations/parser/parser/expression/circuit_init_fail.leo.out b/tests/expectations/parser/parser/expression/circuit_init_fail.leo.out index 6e5b7a391f..e3e8bdae7c 100644 --- a/tests/expectations/parser/parser/expression/circuit_init_fail.leo.out +++ b/tests/expectations/parser/parser/expression/circuit_init_fail.leo.out @@ -2,15 +2,15 @@ namespace: ParseExpression expectation: Fail outputs: - - "[EP0375003]: unexpected EOF\n--> test:1:3\n |\n 1 | x {\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:71\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EPAR0375003]: unexpected EOF\n --> test:1:3\n |\n 1 | x {\n | ^\n |\n" - "did not consume all input: '}' @ 1:3-4\n" - - "[EP0375009]: unexpected string: expected 'ident', got ','\n--> test:1:4\n |\n 1 | x {,}\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:71\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375009]: unexpected string: expected 'ident', got ','\n--> test:1:5\n |\n 1 | x { , }\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:71\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375009]: unexpected string: expected 'ident', got ','\n--> test:1:4\n |\n 1 | x {,,,}\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:71\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375009]: unexpected string: expected 'ident', got ','\n--> test:1:6\n |\n 1 | x {x,,}\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:71\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375009]: unexpected string: expected 'ident', got ','\n--> test:1:4\n |\n 1 | x {,,x}\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:71\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375009]: unexpected string: expected 'ident', got ','\n--> test:1:4\n |\n 1 | x {,x}\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:71\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375009]: unexpected string: expected 'ident', got ','\n--> test:1:8\n |\n 1 | x {x:y,,}\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:71\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375009]: unexpected string: expected 'ident', got ','\n--> test:1:4\n |\n 1 | x {,,x:y}\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:71\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375009]: unexpected string: expected 'ident', got ','\n--> test:1:4\n |\n 1 | x {,x:y}\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:71\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375009]: unexpected string: expected 'expression', got '}'\n--> test:1:6\n |\n 1 | x {x:}\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:71\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:4\n |\n 1 | x {,}\n | ^\n |\n" + - "[EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:5\n |\n 1 | x { , }\n | ^\n |\n" + - "[EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:4\n |\n 1 | x {,,,}\n | ^\n |\n" + - "[EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:6\n |\n 1 | x {x,,}\n | ^\n |\n" + - "[EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:4\n |\n 1 | x {,,x}\n | ^\n |\n" + - "[EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:4\n |\n 1 | x {,x}\n | ^\n |\n" + - "[EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:8\n |\n 1 | x {x:y,,}\n | ^\n |\n" + - "[EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:4\n |\n 1 | x {,,x:y}\n | ^\n |\n" + - "[EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:4\n |\n 1 | x {,x:y}\n | ^\n |\n" + - "[EPAR0375009]: unexpected string: expected 'expression', got '}'\n --> test:1:6\n |\n 1 | x {x:}\n | ^\n |\n" diff --git a/tests/expectations/parser/parser/expression/literal/address_fail.leo.out b/tests/expectations/parser/parser/expression/literal/address_fail.leo.out index d6b3a4abf5..dd51e3f232 100644 --- a/tests/expectations/parser/parser/expression/literal/address_fail.leo.out +++ b/tests/expectations/parser/parser/expression/literal/address_fail.leo.out @@ -2,12 +2,12 @@ namespace: Token expectation: Fail outputs: - - "[EP0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1'\n--> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6Z2eu975wnpz2925ntjccd5cfqxtyu8sta57J9'\n--> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6Z2eu975wnpz2925ntjccd5cfqxtyu8sta57J9\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d'\n--> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375001]: invalid address literal: 'aleo1'\n--> test:1:1\n |\n 1 | aleo1\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st'\n--> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375001]: invalid address literal: 'aleo1'\n--> test:1:1\n |\n 1 | aleo1\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1'\n--> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d11'\n--> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d11\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1x'\n--> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1x\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EPAR0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n" + - "[EPAR0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6Z2eu975wnpz2925ntjccd5cfqxtyu8sta57J9'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6Z2eu975wnpz2925ntjccd5cfqxtyu8sta57J9\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n" + - "[EPAR0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n" + - "[EPAR0375001]: invalid address literal: 'aleo1'\n --> test:1:1\n |\n 1 | aleo1\n | ^^^^^\n |\n" + - "[EPAR0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n" + - "[EPAR0375001]: invalid address literal: 'aleo1'\n --> test:1:1\n |\n 1 | aleo1\n | ^^^^^\n |\n" + - "[EPAR0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n" + - "[EPAR0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d11'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d11\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n" + - "[EPAR0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1x'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1x\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n" diff --git a/tests/expectations/parser/parser/expression/literal/char_fail.leo.out b/tests/expectations/parser/parser/expression/literal/char_fail.leo.out index acd3972314..86149f8440 100644 --- a/tests/expectations/parser/parser/expression/literal/char_fail.leo.out +++ b/tests/expectations/parser/parser/expression/literal/char_fail.leo.out @@ -2,38 +2,38 @@ namespace: Token expectation: Fail outputs: - - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375000]: '\n--> test:1:1\n |\n 1 | 'a\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375000]: '\n--> test:1:1\n |\n 1 | ''\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\x9A'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\x7'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\x7g'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\xz'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\x80'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\xc1'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\xc2'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\xDF'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\xC0'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\xe0'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\x9f'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375000]: '\n--> test:1:1\n |\n 1 | 'abcdefg'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\t\\t'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\a'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\z'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\A'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\Z'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\1'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\9'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\*'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\x'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\u'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\u{bbbbb}\\u{aaaa}'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\uz'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\u1'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\u123'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\u{2764z'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\u{276g}'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\u00000000'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\u01000000'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '\\u9999999'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375000]: '\n--> test:1:1\n |\n 1 | '😭😂😘'\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | 'a\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | ''\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\x9A'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\x7'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\x7g'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\xz'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\x80'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\xc1'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\xc2'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\xDF'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\xC0'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\xe0'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\x9f'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | 'abcdefg'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\t\\t'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\a'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\z'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\A'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\Z'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\1'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\9'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\*'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\x'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u{bbbbb}\\u{aaaa}'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\uz'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u1'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u123'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u{2764z'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u{276g}'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u00000000'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u01000000'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u9999999'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '😭😂😘'\n | ^\n |\n = HELP TODO" diff --git a/tests/expectations/parser/parser/expression/literal/group_fail.leo.out b/tests/expectations/parser/parser/expression/literal/group_fail.leo.out index 8e195b8408..52fed9d204 100644 --- a/tests/expectations/parser/parser/expression/literal/group_fail.leo.out +++ b/tests/expectations/parser/parser/expression/literal/group_fail.leo.out @@ -2,12 +2,12 @@ namespace: ParseExpression expectation: Fail outputs: - - "[EP0375009]: unexpected string: expected 'expression', got 'group'\n--> test:1:1\n |\n 1 | group\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:71\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EPAR0375009]: unexpected string: expected 'expression', got 'group'\n --> test:1:1\n |\n 1 | group\n | ^^^^^\n |\n" - "did not consume all input: 'group' @ 1:3-8\n" - "did not consume all input: 'group' @ 1:6-11\n" - - "[EP0375009]: unexpected string: expected 'expression', got ','\n--> test:1:2\n |\n 1 | (,)group\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:71\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375009]: unexpected string: expected 'expression', got '+'\n--> test:1:2\n |\n 1 | (+, -,)group\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:71\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375009]: unexpected string: expected 'expression', got ','\n--> test:1:2\n |\n 1 | (,+, -)group\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:71\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EPAR0375009]: unexpected string: expected 'expression', got ','\n --> test:1:2\n |\n 1 | (,)group\n | ^\n |\n" + - "[EPAR0375009]: unexpected string: expected 'expression', got '+'\n --> test:1:2\n |\n 1 | (+, -,)group\n | ^\n |\n" + - "[EPAR0375009]: unexpected string: expected 'expression', got ','\n --> test:1:2\n |\n 1 | (,+, -)group\n | ^\n |\n" - "did not consume all input: 'group' @ 1:6-11\n" - "did not consume all input: 'group' @ 1:12-17\n" - "did not consume all input: 'group' @ 1:15-20\n" diff --git a/tests/expectations/parser/parser/expression/literal/string_fail.leo.out b/tests/expectations/parser/parser/expression/literal/string_fail.leo.out index 851b5eeda8..bd516b65ee 100644 --- a/tests/expectations/parser/parser/expression/literal/string_fail.leo.out +++ b/tests/expectations/parser/parser/expression/literal/string_fail.leo.out @@ -2,10 +2,10 @@ namespace: Token expectation: Fail outputs: - - "[EP0375000]: \"\n--> test:1:1\n |\n 1 | \"Hello world!\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375000]: \"\n--> test:1:1\n |\n 1 | \"\\\"\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375000]: \"\n--> test:1:1\n |\n 1 | \"\\l\"\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375000]: \"\n--> test:1:1\n |\n 1 | \"\\uaaa\"\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375000]: \"\n--> test:1:1\n |\n 1 | \"\\u\"\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375000]: \"\n--> test:1:1\n |\n 1 | \"\\xFF\"\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375000]: \"\n--> test:1:1\n |\n 1 | \"\\x\"\n | \n |\n = HELP TODOstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:88\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:36\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EPAR0375000]: \"\n --> test:1:1\n |\n 1 | \"Hello world!\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: \"\n --> test:1:1\n |\n 1 | \"\\\"\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: \"\n --> test:1:1\n |\n 1 | \"\\l\"\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: \"\n --> test:1:1\n |\n 1 | \"\\uaaa\"\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: \"\n --> test:1:1\n |\n 1 | \"\\u\"\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: \"\n --> test:1:1\n |\n 1 | \"\\xFF\"\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: \"\n --> test:1:1\n |\n 1 | \"\\x\"\n | ^\n |\n = HELP TODO" diff --git a/tests/expectations/parser/parser/functions/annotated_fail.leo.out b/tests/expectations/parser/parser/functions/annotated_fail.leo.out index 9cc7daff3a..7cb5df0e2d 100644 --- a/tests/expectations/parser/parser/functions/annotated_fail.leo.out +++ b/tests/expectations/parser/parser/functions/annotated_fail.leo.out @@ -2,4 +2,4 @@ namespace: Parse expectation: Fail outputs: - - "[EP0375005]: expected 'identifier', 'number' -- got ')'\n--> test:3:12\n |\n 3 | @test(test,)\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:127\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EPAR0375005]: expected 'identifier', 'number' -- got ')'\n --> test:3:12\n |\n 3 | @test(test,)\n | ^\n |\n" diff --git a/tests/expectations/parser/parser/functions/const_input_fail.leo.out b/tests/expectations/parser/parser/functions/const_input_fail.leo.out index 800a71cad2..2d40fcbd53 100644 --- a/tests/expectations/parser/parser/functions/const_input_fail.leo.out +++ b/tests/expectations/parser/parser/functions/const_input_fail.leo.out @@ -2,4 +2,4 @@ namespace: Parse expectation: Fail outputs: - - "[EP0375009]: unexpected string: expected 'ident', got 'input'\n--> test:3:18\n |\n 3 | function x(const input) {\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:127\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EPAR0375009]: unexpected string: expected 'ident', got 'input'\n --> test:3:18\n |\n 3 | function x(const input) {\n | ^^^^^\n |\n" diff --git a/tests/expectations/parser/parser/import/import_empty_list_fail.leo.out b/tests/expectations/parser/parser/import/import_empty_list_fail.leo.out index 580e624263..1ee031881f 100644 --- a/tests/expectations/parser/parser/import/import_empty_list_fail.leo.out +++ b/tests/expectations/parser/parser/import/import_empty_list_fail.leo.out @@ -2,4 +2,4 @@ namespace: Parse expectation: Fail outputs: - - "[EP0375002]: Cannot import empty list\n--> test:3:8\n |\n 3 | import a.();\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:127\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EPAR0375002]: Cannot import empty list\n --> test:3:8\n |\n 3 | import a.();\n | ^\n |\n" diff --git a/tests/expectations/parser/parser/import/invalid.leo.out b/tests/expectations/parser/parser/import/invalid.leo.out index b10b73d41d..bcd90f3474 100644 --- a/tests/expectations/parser/parser/import/invalid.leo.out +++ b/tests/expectations/parser/parser/import/invalid.leo.out @@ -2,4 +2,4 @@ namespace: Parse expectation: Fail outputs: - - "[EP0375005]: expected . -- got ';'\n--> test:3:18\n |\n 3 | import foo as bar;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:127\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EPAR0375005]: expected . -- got ';'\n --> test:3:18\n |\n 3 | import foo as bar;\n | ^\n |\n" diff --git a/tests/expectations/parser/parser/statement/conditional_fail.leo.out b/tests/expectations/parser/parser/statement/conditional_fail.leo.out index 836886a52a..e3b90f2821 100644 --- a/tests/expectations/parser/parser/statement/conditional_fail.leo.out +++ b/tests/expectations/parser/parser/statement/conditional_fail.leo.out @@ -2,4 +2,4 @@ namespace: ParseStatement expectation: Fail outputs: - - "[EP0375008]: unexpected statement: expected 'Block or Conditional', got 'let mut x = 2;'\n--> test:1:17\n |\n 1 | if true {} else let x = 2;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EPAR0375008]: unexpected statement: expected 'Block or Conditional', got 'let mut x = 2;'\n --> test:1:17\n |\n 1 | if true {} else let x = 2;\n | ^^^^^^^^^\n |\n" diff --git a/tests/expectations/parser/parser/statement/definition_fail.leo.out b/tests/expectations/parser/parser/statement/definition_fail.leo.out index c7f4ef3bef..0e0d87112c 100644 --- a/tests/expectations/parser/parser/statement/definition_fail.leo.out +++ b/tests/expectations/parser/parser/statement/definition_fail.leo.out @@ -2,26 +2,26 @@ namespace: ParseStatement expectation: Fail outputs: - - "[EP0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n--> test:1:1\n |\n 1 | let mut x = expr;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n--> test:1:1\n |\n 1 | let mut x = ();\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n--> test:1:1\n |\n 1 | let mut x = x+y;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n--> test:1:1\n |\n 1 | let mut x = (x,y);\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n--> test:1:1\n |\n 1 | let mut x = x();\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n--> test:1:1\n |\n 1 | const mut x = expr;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n--> test:1:1\n |\n 1 | const mut x = ();\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n--> test:1:1\n |\n 1 | const mut x = x+y;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n--> test:1:1\n |\n 1 | const mut x = (x,y);\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n--> test:1:1\n |\n 1 | const mut x = x();\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n--> test:1:1\n |\n 1 | let mut x: u32 = expr;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n--> test:1:1\n |\n 1 | let mut x: u32 = ();\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n--> test:1:1\n |\n 1 | let mut x: u32 = x+y;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n--> test:1:1\n |\n 1 | let mut x: u32 = (x,y);\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n--> test:1:1\n |\n 1 | let mut x: u32 = x();\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n--> test:1:1\n |\n 1 | const mut x: u32 = expr;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n--> test:1:1\n |\n 1 | const mut x: u32 = ();\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n--> test:1:1\n |\n 1 | const mut x: u32 = x+y;\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n--> test:1:1\n |\n 1 | const mut x: u32 = (x,y);\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n--> test:1:1\n |\n 1 | const mut x: u32 = x();\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375009]: unexpected string: expected 'ident', got ','\n--> test:1:10\n |\n 1 | let (x,y,,) = ();\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375009]: unexpected string: expected 'ident', got ','\n--> test:1:6\n |\n 1 | let (,x,y) = ();\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375009]: unexpected string: expected 'ident', got ','\n--> test:1:8\n |\n 1 | let (x,,y) = ();\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x = expr;\n | ^^^^^^^\n |\n" + - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x = ();\n | ^^^^^^^\n |\n" + - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x = x+y;\n | ^^^^^^^\n |\n" + - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x = (x,y);\n | ^^^^^^^\n |\n" + - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x = x();\n | ^^^^^^^\n |\n" + - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x = expr;\n | ^^^^^^^^^\n |\n" + - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x = ();\n | ^^^^^^^^^\n |\n" + - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x = x+y;\n | ^^^^^^^^^\n |\n" + - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x = (x,y);\n | ^^^^^^^^^\n |\n" + - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x = x();\n | ^^^^^^^^^\n |\n" + - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x: u32 = expr;\n | ^^^^^^^\n |\n" + - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x: u32 = ();\n | ^^^^^^^\n |\n" + - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x: u32 = x+y;\n | ^^^^^^^\n |\n" + - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x: u32 = (x,y);\n | ^^^^^^^\n |\n" + - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x: u32 = x();\n | ^^^^^^^\n |\n" + - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x: u32 = expr;\n | ^^^^^^^^^\n |\n" + - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x: u32 = ();\n | ^^^^^^^^^\n |\n" + - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x: u32 = x+y;\n | ^^^^^^^^^\n |\n" + - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x: u32 = (x,y);\n | ^^^^^^^^^\n |\n" + - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x: u32 = x();\n | ^^^^^^^^^\n |\n" + - "[EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:10\n |\n 1 | let (x,y,,) = ();\n | ^\n |\n" + - "[EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:6\n |\n 1 | let (,x,y) = ();\n | ^\n |\n" + - "[EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:8\n |\n 1 | let (x,,y) = ();\n | ^\n |\n" diff --git a/tests/expectations/parser/parser/statement/return_fail.leo.out b/tests/expectations/parser/parser/statement/return_fail.leo.out index ab2cb23b98..5577d4150b 100644 --- a/tests/expectations/parser/parser/statement/return_fail.leo.out +++ b/tests/expectations/parser/parser/statement/return_fail.leo.out @@ -2,6 +2,6 @@ namespace: ParseStatement expectation: Fail outputs: - - "[EP0375003]: unexpected EOF\n--> test:1:1\n |\n 1 | return\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375003]: unexpected EOF\n--> test:1:8\n |\n 1 | return 5\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" - - "[EP0375009]: unexpected string: expected 'expression', got 'if'\n--> test:2:1\n |\n 2 | if x {}\n | \n |\nstack backtrace:\n 0: backtrace::backtrace::trace_unsynchronized\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:66\n 1: backtrace::backtrace::trace\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\backtrace\\mod.rs:53\n 2: backtrace::capture::Backtrace::create\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:176\n 3: backtrace::capture::Backtrace::new\n at C:\\Users\\jonat\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\backtrace-0.3.61\\src\\capture.rs:140\n 4: leo_errors::common::span::Span::new\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\errors\\src\\common\\span.rs:57\n 5: leo_parser::tokenizer::tokenize\n at src\\tokenizer\\mod.rs:45\n 6: leo_parser::test::{{impl}}::run_test\n at src\\test.rs:99\n 7: leo_test_framework::runner::run_tests\n at c:\\Users\\jonat\\AppData\\Roaming\\work\\leo\\test-framework\\src\\runner.rs:150\n 8: leo_parser::test::parser_tests\n at src\\test.rs:153\n 9: leo_parser::test::parser_tests::{{closure}}\n at src\\test.rs:152\n 10: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 11: core::ops::function::FnOnce::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 12: test::__rust_begin_short_backtrace\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:577\n 13: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 14: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 15: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 16: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 17: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 18: test::run_test_in_process\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:600\n 19: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:492\n 20: test::run_test::run_test_inner::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\test\\src\\lib.rs:519\n 21: std::sys_common::backtrace::__rust_begin_short_backtrace>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\sys_common\\backtrace.rs:125\n 22: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:481\n 23: std::panic::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:347\n 24: std::panicking::try::do_call\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:401\n 25: std::panicking::try\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panicking.rs:365\n 26: std::panic::catch_unwind\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\panic.rs:434\n 27: std::thread::{{impl}}::spawn_unchecked::{{closure}}\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\std\\src\\thread\\mod.rs:480\n 28: core::ops::function::FnOnce::call_once>\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\core\\src\\ops\\function.rs:227\n 29: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 30: alloc::boxed::{{impl}}::call_once\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\library\\alloc\\src\\boxed.rs:1575\n 31: std::sys::windows::thread::{{impl}}::new::thread_start\n at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\\/library\\std\\src\\sys\\windows\\thread.rs:56\n 32: BaseThreadInitThunk\n 33: RtlUserThreadStart\n" + - "[EPAR0375003]: unexpected EOF\n --> test:1:1\n |\n 1 | return\n | ^^^^^^\n |\n" + - "[EPAR0375003]: unexpected EOF\n --> test:1:8\n |\n 1 | return 5\n | ^\n |\n" + - "[EPAR0375009]: unexpected string: expected 'expression', got 'if'\n --> test:2:1\n |\n 2 | if x {}\n | ^^\n |\n" From 2a99a87da7e0c241368bb42d3eef501e1bceabbf Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Wed, 4 Aug 2021 14:19:19 -0700 Subject: [PATCH 11/58] colored backtrace reports, full and 1 for leo backtrace --- Cargo.lock | 22 ++++ Cargo.toml | 3 + asg/src/const_value.rs | 62 ++------- asg/src/expression/array_access.rs | 12 +- asg/src/expression/array_init.rs | 12 +- asg/src/expression/array_inline.rs | 6 +- asg/src/expression/array_range_access.rs | 27 ++-- asg/src/expression/binary.rs | 17 +-- asg/src/expression/call.rs | 67 ++++------ asg/src/expression/cast.rs | 4 +- asg/src/expression/circuit_access.rs | 25 ++-- asg/src/expression/circuit_init.rs | 42 ++---- asg/src/expression/constant.rs | 32 ++--- asg/src/expression/ternary.rs | 4 +- asg/src/expression/tuple_access.rs | 5 +- asg/src/expression/tuple_init.rs | 4 +- asg/src/expression/unary.rs | 16 +-- asg/src/expression/variable_ref.rs | 9 +- asg/src/program/circuit.rs | 15 +-- asg/src/program/function.rs | 12 +- asg/src/program/mod.rs | 20 +-- asg/src/scope.rs | 10 +- asg/src/statement/assign.rs | 46 ++----- asg/src/statement/definition.rs | 12 +- asg/src/statement/iteration.rs | 12 +- ast/src/lib.rs | 16 +-- ast/src/reducer/canonicalization.rs | 12 +- ast/src/reducer/reconstructing_director.rs | 4 +- compiler/src/compiler.rs | 6 +- compiler/src/console/assert.rs | 9 +- compiler/src/console/format.rs | 16 +-- compiler/src/constraints/constraints.rs | 8 +- compiler/src/expression/arithmetic/add.rs | 6 +- compiler/src/expression/arithmetic/bit_not.rs | 4 +- compiler/src/expression/arithmetic/div.rs | 6 +- compiler/src/expression/arithmetic/mul.rs | 6 +- compiler/src/expression/arithmetic/negate.rs | 4 +- compiler/src/expression/arithmetic/pow.rs | 6 +- compiler/src/expression/arithmetic/sub.rs | 6 +- compiler/src/expression/array/access.rs | 40 +++--- compiler/src/expression/array/array.rs | 6 +- compiler/src/expression/array/index.rs | 4 +- compiler/src/expression/circuit/access.rs | 19 +-- compiler/src/expression/circuit/circuit.rs | 4 +- .../src/expression/conditional/conditional.rs | 11 +- compiler/src/expression/logical/and.rs | 6 +- compiler/src/expression/logical/not.rs | 4 +- compiler/src/expression/logical/or.rs | 6 +- compiler/src/expression/relational/eq.rs | 9 +- compiler/src/expression/relational/ge.rs | 9 +- compiler/src/expression/relational/gt.rs | 9 +- compiler/src/expression/relational/le.rs | 9 +- compiler/src/expression/relational/lt.rs | 9 +- compiler/src/expression/tuple/access.rs | 6 +- .../expression/variable_ref/variable_ref.rs | 11 +- compiler/src/function/function.rs | 3 +- compiler/src/function/input/array.rs | 14 +- compiler/src/function/input/input_section.rs | 6 +- .../src/function/input/main_function_input.rs | 35 ++--- compiler/src/function/input/tuple.rs | 14 +- compiler/src/function/main_function.rs | 28 ++-- compiler/src/function/result/result.rs | 10 +- compiler/src/output/mod.rs | 12 +- compiler/src/output/output_bytes.rs | 12 +- compiler/src/output/output_file.rs | 8 +- compiler/src/phases/reducing_director.rs | 10 +- compiler/src/prelude/blake2s.rs | 10 +- compiler/src/statement/assign/assign.rs | 4 +- .../statement/assign/assignee/array_index.rs | 50 +++---- .../assign/assignee/array_range_index.rs | 8 +- .../src/statement/assign/assignee/member.rs | 11 +- compiler/src/statement/assign/assignee/mod.rs | 11 +- .../src/statement/assign/assignee/tuple.rs | 14 +- .../src/statement/conditional/conditional.rs | 7 +- .../src/statement/definition/definition.rs | 5 +- compiler/src/statement/iteration/iteration.rs | 6 +- compiler/src/statement/statement.rs | 10 +- compiler/src/value/address/address.rs | 10 +- compiler/src/value/boolean/input.rs | 6 +- compiler/src/value/char/char.rs | 4 +- compiler/src/value/field/field_type.rs | 24 ++-- compiler/src/value/field/input.rs | 16 +-- compiler/src/value/group/input.rs | 6 +- .../src/value/group/targets/edwards_bls12.rs | 70 +++++----- compiler/src/value/integer/integer.rs | 26 ++-- compiler/src/value/integer/macros.rs | 123 +++++++----------- errors/Cargo.toml | 3 + errors/src/asg/asg_errors.rs | 2 +- errors/src/ast/ast_errors.rs | 2 +- errors/src/cli/cli_errors.rs | 10 +- errors/src/common/backtraced.rs | 48 +++++-- errors/src/common/formatted.rs | 34 ++++- errors/src/common/macros.rs | 67 +++++----- errors/src/common/traits.rs | 18 +-- errors/src/compiler/compiler_errors.rs | 2 +- errors/src/import/import_errors.rs | 2 +- errors/src/lib.rs | 9 +- errors/src/package/package_errors.rs | 2 +- errors/src/parser/parser_errors.rs | 2 +- errors/src/state/state_errors.rs | 4 +- imports/src/parser/import_parser.rs | 4 +- imports/src/parser/parse_package.rs | 16 +-- imports/src/parser/parse_symbol.rs | 12 +- leo/api.rs | 42 +++--- leo/commands/build.rs | 4 +- leo/commands/init.rs | 8 +- leo/commands/new.rs | 8 +- leo/commands/package/add.rs | 30 ++--- leo/commands/package/clone.rs | 24 ++-- leo/commands/package/login.rs | 14 +- leo/commands/package/publish.rs | 12 +- leo/commands/prove.rs | 4 +- leo/commands/setup.rs | 14 +- leo/commands/test.rs | 4 +- leo/commands/update.rs | 5 +- leo/commands/watch.rs | 4 +- leo/config.rs | 55 ++++---- leo/context.rs | 4 +- leo/logger.rs | 4 +- leo/main.rs | 4 +- leo/updater.rs | 20 ++- package/src/imports/directory.rs | 8 +- package/src/inputs/directory.rs | 25 ++-- package/src/inputs/input.rs | 8 +- package/src/inputs/pairs.rs | 8 +- package/src/inputs/state.rs | 8 +- package/src/outputs/checksum.rs | 13 +- package/src/outputs/circuit.rs | 12 +- package/src/outputs/directory.rs | 7 +- package/src/outputs/proof.rs | 12 +- package/src/outputs/proving_key.rs | 11 +- package/src/outputs/verification_key.rs | 14 +- package/src/package.rs | 18 +-- package/src/root/gitignore.rs | 6 +- package/src/root/manifest.rs | 25 ++-- package/src/root/readme.rs | 6 +- package/src/root/zip.rs | 19 ++- package/src/source/directory.rs | 30 ++--- package/src/source/main.rs | 6 +- parser/src/parser/context.rs | 9 +- parser/src/parser/expression.rs | 14 +- parser/src/parser/file.rs | 29 ++--- parser/src/parser/mod.rs | 4 +- parser/src/parser/statement.rs | 24 +--- parser/src/parser/type_.rs | 4 +- parser/src/tokenizer/mod.rs | 7 +- 146 files changed, 875 insertions(+), 1289 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e4827c7909..0df69a59ff 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -340,6 +340,17 @@ dependencies = [ "vec_map", ] +[[package]] +name = "color-backtrace" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd6c04463c99389fff045d2b90ce84f5131332712c7ffbede020f5e9ad1ed685" +dependencies = [ + "atty", + "backtrace", + "termcolor", +] + [[package]] name = "colored" version = "2.0.0" @@ -1263,6 +1274,7 @@ name = "leo-errors" version = "1.5.3" dependencies = [ "backtrace", + "color-backtrace", "derivative", "eyre", "leo-input", @@ -1304,6 +1316,7 @@ dependencies = [ "ansi_term 0.12.1", "assert_cmd", "clap", + "color-backtrace", "colored", "console", "dirs", @@ -2802,6 +2815,15 @@ dependencies = [ "utf-8", ] +[[package]] +name = "termcolor" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" +dependencies = [ + "winapi-util", +] + [[package]] name = "terminal_size" version = "0.1.17" diff --git a/Cargo.toml b/Cargo.toml index b8dad67f1e..d534cd27c3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -102,6 +102,9 @@ version = "0.3" [dependencies.clap] version = "2.33.3" +[dependencies] +color-backtrace = "0.5.1" + [dependencies.colored] version = "2.0" diff --git a/asg/src/const_value.rs b/asg/src/const_value.rs index bb83469e95..5ed2f9b40d 100644 --- a/asg/src/const_value.rs +++ b/asg/src/const_value.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use crate::{Circuit, Identifier, IntegerType, Type}; -use leo_errors::{new_backtrace, AsgError, Result, Span}; +use leo_errors::{AsgError, Result, Span}; use indexmap::IndexMap; use num_bigint::BigInt; @@ -316,56 +316,16 @@ impl ConstInt { pub fn parse(int_type: &IntegerType, value: &str, span: &Span) -> Result { Ok(match int_type { - IntegerType::I8 => ConstInt::I8( - value - .parse() - .map_err(|_| AsgError::invalid_int(value, span, new_backtrace()))?, - ), - IntegerType::I16 => ConstInt::I16( - value - .parse() - .map_err(|_| AsgError::invalid_int(value, span, new_backtrace()))?, - ), - IntegerType::I32 => ConstInt::I32( - value - .parse() - .map_err(|_| AsgError::invalid_int(value, span, new_backtrace()))?, - ), - IntegerType::I64 => ConstInt::I64( - value - .parse() - .map_err(|_| AsgError::invalid_int(value, span, new_backtrace()))?, - ), - IntegerType::I128 => ConstInt::I128( - value - .parse() - .map_err(|_| AsgError::invalid_int(value, span, new_backtrace()))?, - ), - IntegerType::U8 => ConstInt::U8( - value - .parse() - .map_err(|_| AsgError::invalid_int(value, span, new_backtrace()))?, - ), - IntegerType::U16 => ConstInt::U16( - value - .parse() - .map_err(|_| AsgError::invalid_int(value, span, new_backtrace()))?, - ), - IntegerType::U32 => ConstInt::U32( - value - .parse() - .map_err(|_| AsgError::invalid_int(value, span, new_backtrace()))?, - ), - IntegerType::U64 => ConstInt::U64( - value - .parse() - .map_err(|_| AsgError::invalid_int(value, span, new_backtrace()))?, - ), - IntegerType::U128 => ConstInt::U128( - value - .parse() - .map_err(|_| AsgError::invalid_int(value, span, new_backtrace()))?, - ), + IntegerType::I8 => ConstInt::I8(value.parse().map_err(|_| AsgError::invalid_int(value, span))?), + IntegerType::I16 => ConstInt::I16(value.parse().map_err(|_| AsgError::invalid_int(value, span))?), + IntegerType::I32 => ConstInt::I32(value.parse().map_err(|_| AsgError::invalid_int(value, span))?), + IntegerType::I64 => ConstInt::I64(value.parse().map_err(|_| AsgError::invalid_int(value, span))?), + IntegerType::I128 => ConstInt::I128(value.parse().map_err(|_| AsgError::invalid_int(value, span))?), + IntegerType::U8 => ConstInt::U8(value.parse().map_err(|_| AsgError::invalid_int(value, span))?), + IntegerType::U16 => ConstInt::U16(value.parse().map_err(|_| AsgError::invalid_int(value, span))?), + IntegerType::U32 => ConstInt::U32(value.parse().map_err(|_| AsgError::invalid_int(value, span))?), + IntegerType::U64 => ConstInt::U64(value.parse().map_err(|_| AsgError::invalid_int(value, span))?), + IntegerType::U128 => ConstInt::U128(value.parse().map_err(|_| AsgError::invalid_int(value, span))?), }) } } diff --git a/asg/src/expression/array_access.rs b/asg/src/expression/array_access.rs index 903a3af83c..5987a48fd9 100644 --- a/asg/src/expression/array_access.rs +++ b/asg/src/expression/array_access.rs @@ -16,7 +16,7 @@ use crate::{ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Type}; use leo_ast::IntegerType; -use leo_errors::{new_backtrace, AsgError, Result, Span}; +use leo_errors::{AsgError, Result, Span}; use std::cell::Cell; @@ -97,7 +97,6 @@ impl<'a> FromAst<'a, leo_ast::ArrayAccessExpression> for ArrayAccessExpression<' "array", type_.map(|x| x.to_string()).unwrap_or_else(|| "unknown".to_string()), &value.span, - new_backtrace(), ) .into()); } @@ -115,12 +114,9 @@ impl<'a> FromAst<'a, leo_ast::ArrayAccessExpression> for ArrayAccessExpression<' .flatten() { if index >= array_len { - return Err(AsgError::array_index_out_of_bounds( - index, - &array.span().cloned().unwrap_or_default(), - new_backtrace(), - ) - .into()); + return Err( + AsgError::array_index_out_of_bounds(index, &array.span().cloned().unwrap_or_default()).into(), + ); } } diff --git a/asg/src/expression/array_init.rs b/asg/src/expression/array_init.rs index b3482fc8bb..23ea049271 100644 --- a/asg/src/expression/array_init.rs +++ b/asg/src/expression/array_init.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use crate::{ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Type}; -use leo_errors::{new_backtrace, AsgError, Result, Span}; +use leo_errors::{AsgError, Result, Span}; use std::cell::Cell; @@ -74,7 +74,7 @@ impl<'a> FromAst<'a, leo_ast::ArrayInitExpression> for ArrayInitExpression<'a> { Some(PartialType::Array(item, dims)) => (item.map(|x| *x), dims), None => (None, None), Some(type_) => { - return Err(AsgError::unexpected_type(type_, "array", &value.span, new_backtrace()).into()); + return Err(AsgError::unexpected_type(type_, "array", &value.span).into()); } }; let dimensions = value @@ -84,20 +84,19 @@ impl<'a> FromAst<'a, leo_ast::ArrayInitExpression> for ArrayInitExpression<'a> { .map(|x| { Ok(x.value .parse::() - .map_err(|_| AsgError::parse_dimension_error(&value.span, new_backtrace()))?) + .map_err(|_| AsgError::parse_dimension_error(&value.span))?) }) .collect::>>()?; let len = *dimensions .get(0) - .ok_or_else(|| AsgError::parse_dimension_error(&value.span, new_backtrace()))?; + .ok_or_else(|| AsgError::parse_dimension_error(&value.span))?; if let Some(expected_len) = expected_len { if expected_len != len { return Err(AsgError::unexpected_type( format!("array of length {}", expected_len), format!("array of length {}", len), &value.span, - new_backtrace(), ) .into()); } @@ -112,7 +111,6 @@ impl<'a> FromAst<'a, leo_ast::ArrayInitExpression> for ArrayInitExpression<'a> { format!("array of length {}", dimension), format!("array of length {}", len), &value.span, - new_backtrace(), ) .into()); } @@ -122,7 +120,7 @@ impl<'a> FromAst<'a, leo_ast::ArrayInitExpression> for ArrayInitExpression<'a> { } None => None, Some(type_) => { - return Err(AsgError::unexpected_type("array", type_, &value.span, new_backtrace()).into()); + return Err(AsgError::unexpected_type("array", type_, &value.span).into()); } } } diff --git a/asg/src/expression/array_inline.rs b/asg/src/expression/array_inline.rs index a16b6b3515..56bd7d8987 100644 --- a/asg/src/expression/array_inline.rs +++ b/asg/src/expression/array_inline.rs @@ -16,7 +16,7 @@ use crate::{ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Type}; use leo_ast::SpreadOrExpression; -use leo_errors::{new_backtrace, AsgError, Result, Span}; +use leo_errors::{AsgError, Result, Span}; use std::cell::Cell; @@ -109,7 +109,7 @@ impl<'a> FromAst<'a, leo_ast::ArrayInlineExpression> for ArrayInlineExpression<' Some(PartialType::Array(item, dims)) => (item.map(|x| *x), dims), None => (None, None), Some(type_) => { - return Err(AsgError::unexpected_type(type_, "array", &value.span, new_backtrace()).into()); + return Err(AsgError::unexpected_type(type_, "array", &value.span).into()); } }; @@ -174,7 +174,6 @@ impl<'a> FromAst<'a, leo_ast::ArrayInlineExpression> for ArrayInlineExpression<' .unwrap_or("unknown"), type_.map(|x| x.to_string()).unwrap_or_else(|| "unknown".to_string()), &value.span, - new_backtrace(), ) .into()); } @@ -190,7 +189,6 @@ impl<'a> FromAst<'a, leo_ast::ArrayInlineExpression> for ArrayInlineExpression<' format!("array of length {}", expected_len), format!("array of length {}", len), &value.span, - new_backtrace(), ) .into()); } diff --git a/asg/src/expression/array_range_access.rs b/asg/src/expression/array_range_access.rs index 469d1ec87a..0d32f3933f 100644 --- a/asg/src/expression/array_range_access.rs +++ b/asg/src/expression/array_range_access.rs @@ -16,7 +16,7 @@ use crate::{ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Type}; use leo_ast::IntegerType; -use leo_errors::{new_backtrace, AsgError, Result, Span}; +use leo_errors::{AsgError, Result, Span}; use std::cell::Cell; @@ -108,7 +108,7 @@ impl<'a> FromAst<'a, leo_ast::ArrayRangeAccessExpression> for ArrayRangeAccessEx Some(PartialType::Array(element, len)) => (Some(PartialType::Array(element, None)), len), None => (None, None), Some(x) => { - return Err(AsgError::unexpected_type(x, "array", &value.span, new_backtrace()).into()); + return Err(AsgError::unexpected_type(x, "array", &value.span).into()); } }; let array = <&Expression<'a>>::from_ast(scope, &*value.array, expected_array)?; @@ -120,7 +120,6 @@ impl<'a> FromAst<'a, leo_ast::ArrayRangeAccessExpression> for ArrayRangeAccessEx "array", type_.map(|x| x.to_string()).unwrap_or_else(|| "unknown".to_string()), &value.span, - new_backtrace(), ) .into()); } @@ -156,9 +155,7 @@ impl<'a> FromAst<'a, leo_ast::ArrayRangeAccessExpression> for ArrayRangeAccessEx } else { value.span.clone() }; - return Err( - AsgError::array_index_out_of_bounds(inner_value, &error_span, new_backtrace()).into(), - ); + return Err(AsgError::array_index_out_of_bounds(inner_value, &error_span).into()); } else if let Some(left) = const_left { if left > inner_value { let error_span = if let Some(right) = right { @@ -166,9 +163,7 @@ impl<'a> FromAst<'a, leo_ast::ArrayRangeAccessExpression> for ArrayRangeAccessEx } else { value.span.clone() }; - return Err( - AsgError::array_index_out_of_bounds(inner_value, &error_span, new_backtrace()).into(), - ); + return Err(AsgError::array_index_out_of_bounds(inner_value, &error_span).into()); } } } @@ -188,13 +183,9 @@ impl<'a> FromAst<'a, leo_ast::ArrayRangeAccessExpression> for ArrayRangeAccessEx if let Some(length) = length { if length != expected_len { let concrete_type = Type::Array(parent_element, length); - return Err(AsgError::unexpected_type( - expected_type.as_ref().unwrap(), - concrete_type, - &value.span, - new_backtrace(), - ) - .into()); + return Err( + AsgError::unexpected_type(expected_type.as_ref().unwrap(), concrete_type, &value.span).into(), + ); } } if let Some(left_value) = const_left { @@ -204,13 +195,13 @@ impl<'a> FromAst<'a, leo_ast::ArrayRangeAccessExpression> for ArrayRangeAccessEx } else { value.span.clone() }; - return Err(AsgError::array_index_out_of_bounds(left_value, &error_span, new_backtrace()).into()); + return Err(AsgError::array_index_out_of_bounds(left_value, &error_span).into()); } } length = Some(expected_len); } if length.is_none() { - return Err(AsgError::unknown_array_size(&value.span, new_backtrace()).into()); + return Err(AsgError::unknown_array_size(&value.span).into()); } Ok(ArrayRangeAccessExpression { diff --git a/asg/src/expression/binary.rs b/asg/src/expression/binary.rs index cda0e82e65..3029e2b98c 100644 --- a/asg/src/expression/binary.rs +++ b/asg/src/expression/binary.rs @@ -16,7 +16,7 @@ use crate::{ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Type}; pub use leo_ast::{BinaryOperation, BinaryOperationClass}; -use leo_errors::{new_backtrace, AsgError, Result, Span}; +use leo_errors::{AsgError, Result, Span}; use std::cell::Cell; @@ -123,7 +123,7 @@ impl<'a> FromAst<'a, leo_ast::BinaryExpression> for BinaryExpression<'a> { BinaryOperationClass::Boolean => match expected_type { Some(PartialType::Type(Type::Boolean)) | None => None, Some(x) => { - return Err(AsgError::unexpected_type(x, Type::Boolean, &value.span, new_backtrace()).into()); + return Err(AsgError::unexpected_type(x, Type::Boolean, &value.span).into()); } }, BinaryOperationClass::Numeric => match expected_type { @@ -131,9 +131,7 @@ impl<'a> FromAst<'a, leo_ast::BinaryExpression> for BinaryExpression<'a> { Some(x @ PartialType::Type(Type::Field)) => Some(x), Some(x @ PartialType::Type(Type::Group)) => Some(x), Some(x) => { - return Err( - AsgError::unexpected_type(x, "integer, field, or group", &value.span, new_backtrace()).into(), - ); + return Err(AsgError::unexpected_type(x, "integer, field, or group", &value.span).into()); } None => None, }, @@ -186,7 +184,6 @@ impl<'a> FromAst<'a, leo_ast::BinaryExpression> for BinaryExpression<'a> { "integer", type_.map(|x| x.to_string()).unwrap_or_else(|| "unknown".to_string()), &value.span, - new_backtrace(), ) .into()); } @@ -195,14 +192,14 @@ impl<'a> FromAst<'a, leo_ast::BinaryExpression> for BinaryExpression<'a> { BinaryOperation::And | BinaryOperation::Or => match left_type { Some(Type::Boolean) | None => (), Some(x) => { - return Err(AsgError::unexpected_type(x, Type::Boolean, &value.span, new_backtrace()).into()); + return Err(AsgError::unexpected_type(x, Type::Boolean, &value.span).into()); } }, BinaryOperation::Eq | BinaryOperation::Ne => (), // all types allowed _ => match left_type { Some(Type::Integer(_)) | None => (), Some(x) => { - return Err(AsgError::unexpected_type(x, "integer", &value.span, new_backtrace()).into()); + return Err(AsgError::unexpected_type(x, "integer", &value.span).into()); } }, }, @@ -213,11 +210,11 @@ impl<'a> FromAst<'a, leo_ast::BinaryExpression> for BinaryExpression<'a> { match (left_type, right_type) { (Some(left_type), Some(right_type)) => { if !left_type.is_assignable_from(&right_type) { - return Err(AsgError::unexpected_type(left_type, right_type, &value.span, new_backtrace()).into()); + return Err(AsgError::unexpected_type(left_type, right_type, &value.span).into()); } } (None, None) => { - return Err(AsgError::unexpected_type("any type", "unknown type", &value.span, new_backtrace()).into()); + return Err(AsgError::unexpected_type("any type", "unknown type", &value.span).into()); } (_, _) => (), } diff --git a/asg/src/expression/call.rs b/asg/src/expression/call.rs index d444d38fbb..2748ea9f6b 100644 --- a/asg/src/expression/call.rs +++ b/asg/src/expression/call.rs @@ -28,7 +28,7 @@ use crate::{ Type, }; pub use leo_ast::{BinaryOperation, Node as AstNode}; -use leo_errors::{new_backtrace, AsgError, Result, Span}; +use leo_errors::{AsgError, Result, Span}; use std::cell::Cell; @@ -94,7 +94,7 @@ impl<'a> FromAst<'a, leo_ast::CallExpression> for CallExpression<'a> { None, scope .resolve_function(&name.name) - .ok_or_else(|| AsgError::unresolved_function(&name.name, &name.span, new_backtrace()))?, + .ok_or_else(|| AsgError::unresolved_function(&name.name, &name.span))?, ), leo_ast::Expression::CircuitMemberAccess(leo_ast::CircuitMemberAccessExpression { circuit: ast_circuit, @@ -109,41 +109,28 @@ impl<'a> FromAst<'a, leo_ast::CallExpression> for CallExpression<'a> { "circuit", type_.map(|x| x.to_string()).unwrap_or_else(|| "unknown".to_string()), span, - new_backtrace(), ) .into()); } }; let circuit_name = circuit.name.borrow().name.clone(); let member = circuit.members.borrow(); - let member = member.get(name.name.as_ref()).ok_or_else(|| { - AsgError::unresolved_circuit_member(&circuit_name, &name.name, span, new_backtrace()) - })?; + let member = member + .get(name.name.as_ref()) + .ok_or_else(|| AsgError::unresolved_circuit_member(&circuit_name, &name.name, span))?; match member { CircuitMember::Function(body) => { if body.qualifier == FunctionQualifier::Static { - return Err(AsgError::circuit_static_call_invalid( - &circuit_name, - &name.name, - span, - new_backtrace(), - ) - .into()); + return Err(AsgError::circuit_static_call_invalid(&circuit_name, &name.name, span).into()); } else if body.qualifier == FunctionQualifier::MutSelfRef && !target.is_mut_ref() { - return Err(AsgError::circuit_member_mut_call_invalid( - circuit_name, - &name.name, - span, - new_backtrace(), - ) - .into()); + return Err( + AsgError::circuit_member_mut_call_invalid(circuit_name, &name.name, span).into(), + ); } (Some(target), *body) } CircuitMember::Variable(_) => { - return Err( - AsgError::circuit_variable_call(circuit_name, &name.name, span, new_backtrace()).into(), - ); + return Err(AsgError::circuit_variable_call(circuit_name, &name.name, span).into()); } } } @@ -153,35 +140,27 @@ impl<'a> FromAst<'a, leo_ast::CallExpression> for CallExpression<'a> { span, }) => { let circuit = if let leo_ast::Expression::Identifier(circuit_name) = &**ast_circuit { - scope.resolve_circuit(&circuit_name.name).ok_or_else(|| { - AsgError::unresolved_circuit(&circuit_name.name, &circuit_name.span, new_backtrace()) - })? + scope + .resolve_circuit(&circuit_name.name) + .ok_or_else(|| AsgError::unresolved_circuit(&circuit_name.name, &circuit_name.span))? } else { - return Err(AsgError::unexpected_type("circuit", "unknown", span, new_backtrace()).into()); + return Err(AsgError::unexpected_type("circuit", "unknown", span).into()); }; let circuit_name = circuit.name.borrow().name.clone(); let member = circuit.members.borrow(); - let member = member.get(name.name.as_ref()).ok_or_else(|| { - AsgError::unresolved_circuit_member(&circuit_name, &name.name, span, new_backtrace()) - })?; + let member = member + .get(name.name.as_ref()) + .ok_or_else(|| AsgError::unresolved_circuit_member(&circuit_name, &name.name, span))?; match member { CircuitMember::Function(body) => { if body.qualifier != FunctionQualifier::Static { - return Err(AsgError::circuit_member_call_invalid( - circuit_name, - &name.name, - span, - new_backtrace(), - ) - .into()); + return Err(AsgError::circuit_member_call_invalid(circuit_name, &name.name, span).into()); } (None, *body) } CircuitMember::Variable(_) => { - return Err( - AsgError::circuit_variable_call(circuit_name, &name.name, span, new_backtrace()).into(), - ); + return Err(AsgError::circuit_variable_call(circuit_name, &name.name, span).into()); } } } @@ -189,7 +168,6 @@ impl<'a> FromAst<'a, leo_ast::CallExpression> for CallExpression<'a> { return Err(AsgError::illegal_ast_structure( "non Identifier/CircuitMemberAccess/CircuitStaticFunctionAccess as call target", &value.span, - new_backtrace(), ) .into()); } @@ -197,7 +175,7 @@ impl<'a> FromAst<'a, leo_ast::CallExpression> for CallExpression<'a> { if let Some(expected) = expected_type { let output: Type = function.output.clone(); if !expected.matches(&output) { - return Err(AsgError::unexpected_type(expected, output, &value.span, new_backtrace()).into()); + return Err(AsgError::unexpected_type(expected, output, &value.span).into()); } } if value.arguments.len() != function.arguments.len() { @@ -205,7 +183,6 @@ impl<'a> FromAst<'a, leo_ast::CallExpression> for CallExpression<'a> { function.arguments.len(), value.arguments.len(), &value.span, - new_backtrace(), ) .into()); } @@ -218,14 +195,14 @@ impl<'a> FromAst<'a, leo_ast::CallExpression> for CallExpression<'a> { let argument = argument.get().borrow(); let converted = <&Expression<'a>>::from_ast(scope, expr, Some(argument.type_.clone().partial()))?; if argument.const_ && !converted.is_consty() { - return Err(AsgError::unexpected_nonconst(expr.span(), new_backtrace()).into()); + return Err(AsgError::unexpected_nonconst(expr.span()).into()); } Ok(Cell::new(converted)) }) .collect::>>()?; if function.is_test() { - return Err(AsgError::call_test_function(&value.span, new_backtrace()).into()); + return Err(AsgError::call_test_function(&value.span).into()); } Ok(CallExpression { parent: Cell::new(None), diff --git a/asg/src/expression/cast.rs b/asg/src/expression/cast.rs index d7ac7b5e4d..3f2765ba5a 100644 --- a/asg/src/expression/cast.rs +++ b/asg/src/expression/cast.rs @@ -16,7 +16,7 @@ use crate::{ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Type}; pub use leo_ast::UnaryOperation; -use leo_errors::{new_backtrace, AsgError, Result, Span}; +use leo_errors::{AsgError, Result, Span}; use std::cell::Cell; @@ -80,7 +80,7 @@ impl<'a> FromAst<'a, leo_ast::CastExpression> for CastExpression<'a> { let target_type = scope.resolve_ast_type(&value.target_type, &value.span)?; if let Some(expected_type) = &expected_type { if !expected_type.matches(&target_type) { - return Err(AsgError::unexpected_type(expected_type, target_type, &value.span, new_backtrace()).into()); + return Err(AsgError::unexpected_type(expected_type, target_type, &value.span).into()); } } diff --git a/asg/src/expression/circuit_access.rs b/asg/src/expression/circuit_access.rs index 5efbfed9e3..2d3d75a267 100644 --- a/asg/src/expression/circuit_access.rs +++ b/asg/src/expression/circuit_access.rs @@ -28,7 +28,7 @@ use crate::{ Type, }; -use leo_errors::{new_backtrace, AsgError, Result, Span}; +use leo_errors::{AsgError, Result, Span}; use std::cell::Cell; #[derive(Clone)] @@ -111,7 +111,6 @@ impl<'a> FromAst<'a, leo_ast::CircuitMemberAccessExpression> for CircuitAccessEx "circuit", x.map(|x| x.to_string()).unwrap_or_else(|| "unknown".to_string()), &value.span, - new_backtrace(), ) .into()); } @@ -124,9 +123,7 @@ impl<'a> FromAst<'a, leo_ast::CircuitMemberAccessExpression> for CircuitAccessEx if let CircuitMember::Variable(type_) = &member { let type_: Type = type_.clone(); if !expected_type.matches(&type_) { - return Err( - AsgError::unexpected_type(expected_type, type_, &value.span, new_backtrace()).into(), - ); + return Err(AsgError::unexpected_type(expected_type, type_, &value.span).into()); } } // used by call expression } @@ -146,20 +143,15 @@ impl<'a> FromAst<'a, leo_ast::CircuitMemberAccessExpression> for CircuitAccessEx CircuitMember::Variable(expected_type.clone()), ); } else { - return Err(AsgError::input_ref_needs_type( - &circuit.name.borrow().name, - &value.name.name, - &value.span, - new_backtrace(), - ) - .into()); + return Err( + AsgError::input_ref_needs_type(&circuit.name.borrow().name, &value.name.name, &value.span).into(), + ); } } else { return Err(AsgError::unresolved_circuit_member( &circuit.name.borrow().name, &value.name.name, &value.span, - new_backtrace(), ) .into()); } @@ -183,14 +175,14 @@ impl<'a> FromAst<'a, leo_ast::CircuitStaticFunctionAccessExpression> for Circuit let circuit = match &*value.circuit { leo_ast::Expression::Identifier(name) => scope .resolve_circuit(&name.name) - .ok_or_else(|| AsgError::unresolved_circuit(&name.name, &name.span, new_backtrace()))?, + .ok_or_else(|| AsgError::unresolved_circuit(&name.name, &name.span))?, _ => { - return Err(AsgError::unexpected_type("circuit", "unknown", &value.span, new_backtrace()).into()); + return Err(AsgError::unexpected_type("circuit", "unknown", &value.span).into()); } }; if let Some(expected_type) = expected_type { - return Err(AsgError::unexpected_type(expected_type, "none", &value.span, new_backtrace()).into()); + return Err(AsgError::unexpected_type(expected_type, "none", &value.span).into()); } if let Some(CircuitMember::Function(_)) = circuit.members.borrow().get(value.name.name.as_ref()) { @@ -200,7 +192,6 @@ impl<'a> FromAst<'a, leo_ast::CircuitStaticFunctionAccessExpression> for Circuit &circuit.name.borrow().name, &value.name.name, &value.span, - new_backtrace(), ) .into()); } diff --git a/asg/src/expression/circuit_init.rs b/asg/src/expression/circuit_init.rs index 26f53754d3..2636c068fa 100644 --- a/asg/src/expression/circuit_init.rs +++ b/asg/src/expression/circuit_init.rs @@ -28,7 +28,7 @@ use crate::{ Type, }; -use leo_errors::{new_backtrace, AsgError, Result, Span}; +use leo_errors::{AsgError, Result, Span}; use indexmap::{IndexMap, IndexSet}; use std::cell::Cell; @@ -96,18 +96,12 @@ impl<'a> FromAst<'a, leo_ast::CircuitInitExpression> for CircuitInitExpression<' ) -> Result> { let circuit = scope .resolve_circuit(&value.name.name) - .ok_or_else(|| AsgError::unresolved_circuit(&value.name.name, &value.name.span, new_backtrace()))?; + .ok_or_else(|| AsgError::unresolved_circuit(&value.name.name, &value.name.span))?; match expected_type { Some(PartialType::Type(Type::Circuit(expected_circuit))) if expected_circuit == circuit => (), None => (), Some(x) => { - return Err(AsgError::unexpected_type( - x, - circuit.name.borrow().name.to_string(), - &value.span, - new_backtrace(), - ) - .into()); + return Err(AsgError::unexpected_type(x, circuit.name.borrow().name.to_string(), &value.span).into()); } } let members: IndexMap<&str, (&Identifier, Option<&leo_ast::Expression>)> = value @@ -123,13 +117,9 @@ impl<'a> FromAst<'a, leo_ast::CircuitInitExpression> for CircuitInitExpression<' let circuit_members = circuit.members.borrow(); for (name, member) in circuit_members.iter() { if defined_variables.contains(name) { - return Err(AsgError::overridden_circuit_member( - &circuit.name.borrow().name, - name, - &value.span, - new_backtrace(), - ) - .into()); + return Err( + AsgError::overridden_circuit_member(&circuit.name.borrow().name, name, &value.span).into(), + ); } defined_variables.insert(name.clone()); let type_: Type = if let CircuitMember::Variable(type_) = &member { @@ -149,25 +139,17 @@ impl<'a> FromAst<'a, leo_ast::CircuitInitExpression> for CircuitInitExpression<' }; values.push(((*identifier).clone(), Cell::new(received))); } else { - return Err(AsgError::missing_circuit_member( - &circuit.name.borrow().name, - name, - &value.span, - new_backtrace(), - ) - .into()); + return Err( + AsgError::missing_circuit_member(&circuit.name.borrow().name, name, &value.span).into(), + ); } } for (name, (identifier, _expression)) in members.iter() { if circuit_members.get(*name).is_none() { - return Err(AsgError::extra_circuit_member( - &circuit.name.borrow().name, - name, - &identifier.span, - new_backtrace(), - ) - .into()); + return Err( + AsgError::extra_circuit_member(&circuit.name.borrow().name, name, &identifier.span).into(), + ); } } } diff --git a/asg/src/expression/constant.rs b/asg/src/expression/constant.rs index b79e1b4183..81834d95c2 100644 --- a/asg/src/expression/constant.rs +++ b/asg/src/expression/constant.rs @@ -28,7 +28,7 @@ use crate::{ Type, }; -use leo_errors::{new_backtrace, AsgError, Result, Span}; +use leo_errors::{AsgError, Result, Span}; use std::cell::Cell; @@ -85,7 +85,7 @@ impl<'a> FromAst<'a, leo_ast::ValueExpression> for Constant<'a> { match expected_type.map(PartialType::full).flatten() { Some(Type::Address) | None => (), Some(x) => { - return Err(AsgError::unexpected_type(x, Type::Address, span, new_backtrace()).into()); + return Err(AsgError::unexpected_type(x, Type::Address, span).into()); } } Constant { @@ -98,7 +98,7 @@ impl<'a> FromAst<'a, leo_ast::ValueExpression> for Constant<'a> { match expected_type.map(PartialType::full).flatten() { Some(Type::Boolean) | None => (), Some(x) => { - return Err(AsgError::unexpected_type(x, Type::Boolean, span, new_backtrace()).into()); + return Err(AsgError::unexpected_type(x, Type::Boolean, span).into()); } } Constant { @@ -107,7 +107,7 @@ impl<'a> FromAst<'a, leo_ast::ValueExpression> for Constant<'a> { value: ConstValue::Boolean( value .parse::() - .map_err(|_| AsgError::invalid_boolean(value, span, new_backtrace()))?, + .map_err(|_| AsgError::invalid_boolean(value, span))?, ), } } @@ -115,7 +115,7 @@ impl<'a> FromAst<'a, leo_ast::ValueExpression> for Constant<'a> { match expected_type.map(PartialType::full).flatten() { Some(Type::Char) | None => (), Some(x) => { - return Err(AsgError::unexpected_type(x, Type::Char, value.span(), new_backtrace()).into()); + return Err(AsgError::unexpected_type(x, Type::Char, value.span()).into()); } } @@ -129,24 +129,20 @@ impl<'a> FromAst<'a, leo_ast::ValueExpression> for Constant<'a> { match expected_type.map(PartialType::full).flatten() { Some(Type::Field) | None => (), Some(x) => { - return Err(AsgError::unexpected_type(x, Type::Field, span, new_backtrace()).into()); + return Err(AsgError::unexpected_type(x, Type::Field, span).into()); } } Constant { parent: Cell::new(None), span: Some(span.clone()), - value: ConstValue::Field( - value - .parse() - .map_err(|_| AsgError::invalid_int(value, span, new_backtrace()))?, - ), + value: ConstValue::Field(value.parse().map_err(|_| AsgError::invalid_int(value, span))?), } } Group(value) => { match expected_type.map(PartialType::full).flatten() { Some(Type::Group) | None => (), Some(x) => { - return Err(AsgError::unexpected_type(x, Type::Group, value.span(), new_backtrace()).into()); + return Err(AsgError::unexpected_type(x, Type::Group, value.span()).into()); } } Constant { @@ -163,7 +159,7 @@ impl<'a> FromAst<'a, leo_ast::ValueExpression> for Constant<'a> { } } Implicit(value, span) => match expected_type { - None => return Err(AsgError::unresolved_type("unknown", span, new_backtrace()).into()), + None => return Err(AsgError::unresolved_type("unknown", span).into()), Some(PartialType::Integer(Some(sub_type), _)) | Some(PartialType::Integer(None, Some(sub_type))) => { Constant { parent: Cell::new(None), @@ -174,11 +170,7 @@ impl<'a> FromAst<'a, leo_ast::ValueExpression> for Constant<'a> { Some(PartialType::Type(Type::Field)) => Constant { parent: Cell::new(None), span: Some(span.clone()), - value: ConstValue::Field( - value - .parse() - .map_err(|_| AsgError::invalid_int(value, span, new_backtrace()))?, - ), + value: ConstValue::Field(value.parse().map_err(|_| AsgError::invalid_int(value, span))?), }, Some(PartialType::Type(Type::Group)) => Constant { parent: Cell::new(None), @@ -191,7 +183,7 @@ impl<'a> FromAst<'a, leo_ast::ValueExpression> for Constant<'a> { value: ConstValue::Address(value.clone()), }, Some(x) => { - return Err(AsgError::unexpected_type(x, "unknown", span, new_backtrace()).into()); + return Err(AsgError::unexpected_type(x, "unknown", span).into()); } }, Integer(int_type, value, span) => { @@ -200,7 +192,7 @@ impl<'a> FromAst<'a, leo_ast::ValueExpression> for Constant<'a> { Some(PartialType::Integer(None, Some(_))) => (), None => (), Some(x) => { - return Err(AsgError::unexpected_type(x, int_type, span, new_backtrace()).into()); + return Err(AsgError::unexpected_type(x, int_type, span).into()); } } Constant { diff --git a/asg/src/expression/ternary.rs b/asg/src/expression/ternary.rs index 7c0f9527af..8f286d4559 100644 --- a/asg/src/expression/ternary.rs +++ b/asg/src/expression/ternary.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use crate::{ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Type}; -use leo_errors::{new_backtrace, AsgError, Result, Span}; +use leo_errors::{AsgError, Result, Span}; use std::cell::Cell; @@ -91,7 +91,7 @@ impl<'a> FromAst<'a, leo_ast::TernaryExpression> for TernaryExpression<'a> { let right = if_false.get().get_type().unwrap().into(); if left != right { - return Err(AsgError::ternary_different_types(left, right, &value.span, new_backtrace()).into()); + return Err(AsgError::ternary_different_types(left, right, &value.span).into()); } Ok(TernaryExpression { diff --git a/asg/src/expression/tuple_access.rs b/asg/src/expression/tuple_access.rs index 44619936e5..327ed51548 100644 --- a/asg/src/expression/tuple_access.rs +++ b/asg/src/expression/tuple_access.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use crate::{ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Type}; -use leo_errors::{new_backtrace, AsgError, Result, Span}; +use leo_errors::{AsgError, Result, Span}; use std::cell::Cell; @@ -80,7 +80,7 @@ impl<'a> FromAst<'a, leo_ast::TupleAccessExpression> for TupleAccessExpression<' .index .value .parse::() - .map_err(|_| AsgError::parse_index_error(&value.span, new_backtrace()))?; + .map_err(|_| AsgError::parse_index_error(&value.span))?; let mut expected_tuple = vec![None; index + 1]; expected_tuple[index] = expected_type; @@ -95,7 +95,6 @@ impl<'a> FromAst<'a, leo_ast::TupleAccessExpression> for TupleAccessExpression<' .map(|x| x.to_string()) .unwrap_or_else(|| "unknown".to_string()), &value.span, - new_backtrace(), ) .into()); } diff --git a/asg/src/expression/tuple_init.rs b/asg/src/expression/tuple_init.rs index b0a6791206..317020f80a 100644 --- a/asg/src/expression/tuple_init.rs +++ b/asg/src/expression/tuple_init.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use crate::{ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Type}; -use leo_errors::{new_backtrace, AsgError, Result, Span}; +use leo_errors::{AsgError, Result, Span}; use std::cell::Cell; @@ -90,7 +90,6 @@ impl<'a> FromAst<'a, leo_ast::TupleInitExpression> for TupleInitExpression<'a> { "tuple", x.map(|x| x.to_string()).unwrap_or_else(|| "unknown".to_string()), &value.span, - new_backtrace(), ) .into()); } @@ -104,7 +103,6 @@ impl<'a> FromAst<'a, leo_ast::TupleInitExpression> for TupleInitExpression<'a> { format!("tuple of length {}", tuple_types.len()), format!("tuple of length {}", value.elements.len()), &value.span, - new_backtrace(), ) .into()); } diff --git a/asg/src/expression/unary.rs b/asg/src/expression/unary.rs index 612a3c59e8..a9da91eec6 100644 --- a/asg/src/expression/unary.rs +++ b/asg/src/expression/unary.rs @@ -16,7 +16,7 @@ use crate::{ConstValue, Expression, ExpressionNode, FromAst, Node, PartialType, Scope, Type}; pub use leo_ast::UnaryOperation; -use leo_errors::{new_backtrace, AsgError, Result, Span}; +use leo_errors::{AsgError, Result, Span}; use std::cell::Cell; @@ -95,7 +95,7 @@ impl<'a> FromAst<'a, leo_ast::UnaryExpression> for UnaryExpression<'a> { UnaryOperation::Not => match expected_type.map(|x| x.full()).flatten() { Some(Type::Boolean) | None => Some(Type::Boolean), Some(type_) => { - return Err(AsgError::unexpected_type(type_, Type::Boolean, &value.span, new_backtrace()).into()); + return Err(AsgError::unexpected_type(type_, Type::Boolean, &value.span).into()); } }, UnaryOperation::Negate => match expected_type.map(|x| x.full()).flatten() { @@ -104,20 +104,14 @@ impl<'a> FromAst<'a, leo_ast::UnaryExpression> for UnaryExpression<'a> { Some(Type::Field) => Some(Type::Field), None => None, Some(type_) => { - return Err(AsgError::unexpected_type( - type_, - "integer, group, field", - &value.span, - new_backtrace(), - ) - .into()); + return Err(AsgError::unexpected_type(type_, "integer, group, field", &value.span).into()); } }, UnaryOperation::BitNot => match expected_type.map(|x| x.full()).flatten() { Some(type_ @ Type::Integer(_)) => Some(type_), None => None, Some(type_) => { - return Err(AsgError::unexpected_type(type_, "integer", &value.span, new_backtrace()).into()); + return Err(AsgError::unexpected_type(type_, "integer", &value.span).into()); } }, }; @@ -132,7 +126,7 @@ impl<'a> FromAst<'a, leo_ast::UnaryExpression> for UnaryExpression<'a> { }) .unwrap_or(false); if is_expr_unsigned { - return Err(AsgError::unsigned_negation(&value.span, new_backtrace()).into()); + return Err(AsgError::unsigned_negation(&value.span).into()); } } Ok(UnaryExpression { diff --git a/asg/src/expression/variable_ref.rs b/asg/src/expression/variable_ref.rs index 46af2ab766..4df4849a35 100644 --- a/asg/src/expression/variable_ref.rs +++ b/asg/src/expression/variable_ref.rs @@ -29,7 +29,7 @@ use crate::{ Variable, }; -use leo_errors::{new_backtrace, AsgError, Result, Span}; +use leo_errors::{AsgError, Result, Span}; use std::cell::Cell; @@ -143,7 +143,6 @@ impl<'a> FromAst<'a, leo_ast::Identifier> for &'a Expression<'a> { return Err(AsgError::illegal_input_variable_reference( "attempted to reference input when none is in scope", &value.span, - new_backtrace(), ) .into()); } @@ -158,7 +157,7 @@ impl<'a> FromAst<'a, leo_ast::Identifier> for &'a Expression<'a> { value: ConstValue::Address(value.name.clone()), }))); } - return Err(AsgError::unresolved_reference(&value.name, &value.span, new_backtrace()).into()); + return Err(AsgError::unresolved_reference(&value.name, &value.span).into()); } } }; @@ -173,9 +172,9 @@ impl<'a> FromAst<'a, leo_ast::Identifier> for &'a Expression<'a> { if let Some(expected_type) = expected_type { let type_ = expression .get_type() - .ok_or_else(|| AsgError::unresolved_reference(&value.name, &value.span, new_backtrace()))?; + .ok_or_else(|| AsgError::unresolved_reference(&value.name, &value.span))?; if !expected_type.matches(&type_) { - return Err(AsgError::unexpected_type(expected_type, type_, &value.span, new_backtrace()).into()); + return Err(AsgError::unexpected_type(expected_type, type_, &value.span).into()); } } diff --git a/asg/src/program/circuit.rs b/asg/src/program/circuit.rs index cdc29f7981..36fa24902e 100644 --- a/asg/src/program/circuit.rs +++ b/asg/src/program/circuit.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use crate::{Function, Identifier, Node, Scope, Type}; -use leo_errors::{new_backtrace, AsgError, Result, Span}; +use leo_errors::{AsgError, Result, Span}; use indexmap::IndexMap; use std::cell::RefCell; @@ -71,13 +71,9 @@ impl<'a> Circuit<'a> { for member in value.members.iter() { if let leo_ast::CircuitMember::CircuitVariable(name, type_) = member { if members.contains_key(name.name.as_ref()) { - return Err(AsgError::redefined_circuit_member( - &value.circuit_name.name, - &name.name, - &name.span, - new_backtrace(), - ) - .into()); + return Err( + AsgError::redefined_circuit_member(&value.circuit_name.name, &name.name, &name.span).into(), + ); } members.insert( name.name.to_string(), @@ -104,14 +100,13 @@ impl<'a> Circuit<'a> { &value.circuit_name.name, &function.identifier.name, &function.identifier.span, - new_backtrace(), ) .into()); } let asg_function = Function::init(new_scope, function)?; asg_function.circuit.replace(Some(circuit)); if asg_function.is_test() { - return Err(AsgError::circuit_test_function(&function.identifier.span, new_backtrace()).into()); + return Err(AsgError::circuit_test_function(&function.identifier.span).into()); } members.insert( function.identifier.name.to_string(), diff --git a/asg/src/program/function.rs b/asg/src/program/function.rs index c7215fd1c0..3297f5be8c 100644 --- a/asg/src/program/function.rs +++ b/asg/src/program/function.rs @@ -29,7 +29,7 @@ use crate::{ use indexmap::IndexMap; pub use leo_ast::Annotation; use leo_ast::FunctionInput; -use leo_errors::{new_backtrace, AsgError, Result, Span}; +use leo_errors::{AsgError, Result, Span}; use std::cell::{Cell, RefCell}; @@ -107,7 +107,7 @@ impl<'a> Function<'a> { } } if qualifier != FunctionQualifier::Static && scope.circuit_self.get().is_none() { - return Err(AsgError::invalid_self_in_global(&value.span, new_backtrace()).into()); + return Err(AsgError::invalid_self_in_global(&value.span).into()); } let function = scope.context.alloc_function(Function { id: scope.context.get_id(), @@ -151,16 +151,12 @@ impl<'a> Function<'a> { let main_block = BlockStatement::from_ast(self.scope, &value.block, None)?; let mut director = MonoidalDirector::new(ReturnPathReducer::new()); if !director.reduce_block(&main_block).0 && !self.output.is_unit() { - return Err( - AsgError::function_missing_return(&self.name.borrow().name, &value.span, new_backtrace()).into(), - ); + return Err(AsgError::function_missing_return(&self.name.borrow().name, &value.span).into()); } #[allow(clippy::never_loop)] // TODO @Protryon: How should we return multiple errors? for (span, error) in director.reducer().errors { - return Err( - AsgError::function_return_validation(&self.name.borrow().name, error, &span, new_backtrace()).into(), - ); + return Err(AsgError::function_return_validation(&self.name.borrow().name, error, &span).into()); } self.body diff --git a/asg/src/program/mod.rs b/asg/src/program/mod.rs index 8f118ba117..76a01fe028 100644 --- a/asg/src/program/mod.rs +++ b/asg/src/program/mod.rs @@ -26,7 +26,7 @@ pub use function::*; use crate::{node::FromAst, ArenaNode, AsgContext, DefinitionStatement, ImportResolver, Input, Scope, Statement}; use leo_ast::{Identifier, PackageAccess, PackageOrPackages}; -use leo_errors::{new_backtrace, AsgError, Result, Span}; +use leo_errors::{AsgError, Result, Span}; use indexmap::IndexMap; use std::cell::{Cell, RefCell}; @@ -164,7 +164,7 @@ impl<'a> Program<'a> { )? { Some(x) => x, None => { - return Err(AsgError::unresolved_import(pretty_package, &Span::default(), new_backtrace()).into()); + return Err(AsgError::unresolved_import(pretty_package, &Span::default()).into()); } }; @@ -196,12 +196,7 @@ impl<'a> Program<'a> { } else if let Some(global_const) = resolved_package.global_consts.get(&name) { imported_global_consts.insert(name.clone(), *global_const); } else { - return Err(AsgError::unresolved_import( - format!("{}.{}", pretty_package, name), - &span, - new_backtrace(), - ) - .into()); + return Err(AsgError::unresolved_import(format!("{}.{}", pretty_package, name), &span).into()); } } ImportSymbol::Alias(name, alias) => { @@ -212,12 +207,7 @@ impl<'a> Program<'a> { } else if let Some(global_const) = resolved_package.global_consts.get(&name) { imported_global_consts.insert(alias.clone(), *global_const); } else { - return Err(AsgError::unresolved_import( - format!("{}.{}", pretty_package, name), - &span, - new_backtrace(), - ) - .into()); + return Err(AsgError::unresolved_import(format!("{}.{}", pretty_package, name), &span).into()); } } } @@ -308,7 +298,7 @@ impl<'a> Program<'a> { let name = name.name.to_string(); if functions.contains_key(&name) { - return Err(AsgError::duplicate_function_definition(name, &function.span, new_backtrace()).into()); + return Err(AsgError::duplicate_function_definition(name, &function.span).into()); } functions.insert(name, asg_function); diff --git a/asg/src/scope.rs b/asg/src/scope.rs index ec1bc3b9bc..ea83b3c019 100644 --- a/asg/src/scope.rs +++ b/asg/src/scope.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use crate::{AsgContext, Circuit, DefinitionStatement, Function, Input, Type, Variable}; -use leo_errors::{new_backtrace, AsgError, Result, Span}; +use leo_errors::{AsgError, Result, Span}; use indexmap::IndexMap; use std::cell::{Cell, RefCell}; @@ -189,7 +189,7 @@ impl<'a> Scope<'a> { let dimension = dimension .value .parse::() - .map_err(|_| AsgError::parse_index_error(span, new_backtrace()))?; + .map_err(|_| AsgError::parse_index_error(span))?; item = Box::new(Type::Array(item, dimension)); } *item @@ -202,15 +202,15 @@ impl<'a> Scope<'a> { ), Circuit(name) if name.name.as_ref() == "Self" => Type::Circuit( self.resolve_circuit_self() - .ok_or_else(|| AsgError::unresolved_circuit(&name.name, &name.span, new_backtrace()))?, + .ok_or_else(|| AsgError::unresolved_circuit(&name.name, &name.span))?, ), SelfType => Type::Circuit( self.resolve_circuit_self() - .ok_or_else(|| AsgError::reference_self_outside_circuit(span, new_backtrace()))?, + .ok_or_else(|| AsgError::reference_self_outside_circuit(span))?, ), Circuit(name) => Type::Circuit( self.resolve_circuit(&name.name) - .ok_or_else(|| AsgError::unresolved_circuit(&name.name, &name.span, new_backtrace()))?, + .ok_or_else(|| AsgError::unresolved_circuit(&name.name, &name.span))?, ), }) } diff --git a/asg/src/statement/assign.rs b/asg/src/statement/assign.rs index 7a25c93ceb..76e76df82b 100644 --- a/asg/src/statement/assign.rs +++ b/asg/src/statement/assign.rs @@ -32,7 +32,7 @@ use crate::{ }; pub use leo_ast::AssignOperation; use leo_ast::AssigneeAccess as AstAssigneeAccess; -use leo_errors::{new_backtrace, AsgError, Result, Span}; +use leo_errors::{AsgError, Result, Span}; use std::cell::Cell; @@ -78,18 +78,17 @@ impl<'a> FromAst<'a, leo_ast::AssignStatement> for &'a Statement<'a> { return Err(AsgError::illegal_input_variable_reference( "attempted to reference input when none is in scope", &statement.span, - new_backtrace(), ) .into()); } } else { scope .resolve_variable(name) - .ok_or_else(|| AsgError::unresolved_reference(name, span, new_backtrace()))? + .ok_or_else(|| AsgError::unresolved_reference(name, span))? }; if !variable.borrow().mutable { - return Err(AsgError::immutable_assignment(name, &statement.span, new_backtrace()).into()); + return Err(AsgError::immutable_assignment(name, &statement.span).into()); } let mut target_type: Option = Some(variable.borrow().type_.clone().into()); @@ -124,23 +123,13 @@ impl<'a> FromAst<'a, leo_ast::AssignStatement> for &'a Statement<'a> { ) { let left = match left { ConstValue::Int(x) => x.to_usize().ok_or_else(|| { - AsgError::invalid_assign_index( - name, - x.to_string(), - &statement.span, - new_backtrace(), - ) + AsgError::invalid_assign_index(name, x.to_string(), &statement.span) })?, _ => unimplemented!(), }; let right = match right { ConstValue::Int(x) => x.to_usize().ok_or_else(|| { - AsgError::invalid_assign_index( - name, - x.to_string(), - &statement.span, - new_backtrace(), - ) + AsgError::invalid_assign_index(name, x.to_string(), &statement.span) })?, _ => unimplemented!(), }; @@ -152,13 +141,12 @@ impl<'a> FromAst<'a, leo_ast::AssignStatement> for &'a Statement<'a> { left, right, &statement.span, - new_backtrace(), ) .into()); } } } - _ => return Err(AsgError::index_into_non_array(name, &statement.span, new_backtrace()).into()), + _ => return Err(AsgError::index_into_non_array(name, &statement.span).into()), } AssignAccess::ArrayRange(Cell::new(left), Cell::new(right)) @@ -166,7 +154,7 @@ impl<'a> FromAst<'a, leo_ast::AssignStatement> for &'a Statement<'a> { AstAssigneeAccess::ArrayIndex(index) => { target_type = match target_type.clone() { Some(PartialType::Array(item, _)) => item.map(|x| *x), - _ => return Err(AsgError::index_into_non_array(name, &statement.span, new_backtrace()).into()), + _ => return Err(AsgError::index_into_non_array(name, &statement.span).into()), }; AssignAccess::ArrayIndex(Cell::new(<&Expression<'a>>::from_ast( scope, @@ -178,12 +166,13 @@ impl<'a> FromAst<'a, leo_ast::AssignStatement> for &'a Statement<'a> { let index = index .value .parse::() - .map_err(|_| AsgError::parse_index_error(span, new_backtrace()))?; + .map_err(|_| AsgError::parse_index_error(span))?; target_type = match target_type { - Some(PartialType::Tuple(types)) => types.get(index).cloned().ok_or_else(|| { - AsgError::tuple_index_out_of_bounds(index, &statement.span, new_backtrace()) - })?, - _ => return Err(AsgError::index_into_non_tuple(name, &statement.span, new_backtrace()).into()), + Some(PartialType::Tuple(types)) => types + .get(index) + .cloned() + .ok_or_else(|| AsgError::tuple_index_out_of_bounds(index, &statement.span))?, + _ => return Err(AsgError::index_into_non_tuple(name, &statement.span).into()), }; AssignAccess::Tuple(index) } @@ -198,19 +187,13 @@ impl<'a> FromAst<'a, leo_ast::AssignStatement> for &'a Statement<'a> { &circuit.name.borrow().name, &name.name, &statement.span, - new_backtrace(), ) })?; let x = match &member { CircuitMember::Variable(type_) => type_.clone(), CircuitMember::Function(_) => { - return Err(AsgError::illegal_function_assign( - &name.name, - &statement.span, - new_backtrace(), - ) - .into()); + return Err(AsgError::illegal_function_assign(&name.name, &statement.span).into()); } }; Some(x.partial()) @@ -219,7 +202,6 @@ impl<'a> FromAst<'a, leo_ast::AssignStatement> for &'a Statement<'a> { return Err(AsgError::index_into_non_tuple( &statement.assignee.identifier.name, &statement.span, - new_backtrace(), ) .into()); } diff --git a/asg/src/statement/definition.rs b/asg/src/statement/definition.rs index b32db5816c..6a5f222ed3 100644 --- a/asg/src/statement/definition.rs +++ b/asg/src/statement/definition.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use crate::{Expression, ExpressionNode, FromAst, InnerVariable, Node, PartialType, Scope, Statement, Type, Variable}; -use leo_errors::{new_backtrace, AsgError, Result, Span}; +use leo_errors::{AsgError, Result, Span}; use std::cell::{Cell, RefCell}; @@ -71,7 +71,7 @@ impl<'a> FromAst<'a, leo_ast::DefinitionStatement> for &'a Statement<'a> { .collect::>() .join(" ,"); - return Err(AsgError::invalid_const_assign(var_names, &statement.span, new_backtrace()).into()); + return Err(AsgError::invalid_const_assign(var_names, &statement.span).into()); } let type_ = type_.or_else(|| value.get_type()); @@ -83,7 +83,6 @@ impl<'a> FromAst<'a, leo_ast::DefinitionStatement> for &'a Statement<'a> { return Err(AsgError::illegal_ast_structure( "cannot have 0 variable names in destructuring tuple", &statement.span, - new_backtrace(), ) .into()); } @@ -101,7 +100,6 @@ impl<'a> FromAst<'a, leo_ast::DefinitionStatement> for &'a Statement<'a> { format!("{}-ary tuple", statement.variable_names.len()), type_.map(|x| x.to_string()).unwrap_or_else(|| "unknown".to_string()), &statement.span, - new_backtrace(), ) .into()); } @@ -112,9 +110,7 @@ impl<'a> FromAst<'a, leo_ast::DefinitionStatement> for &'a Statement<'a> { variables.push(&*scope.context.alloc_variable(RefCell::new(InnerVariable { id: scope.context.get_id(), name: variable.identifier.clone(), - type_: type_.ok_or_else(|| { - AsgError::unresolved_type(&variable.identifier.name, &statement.span, new_backtrace()) - })?, + type_: type_.ok_or_else(|| AsgError::unresolved_type(&variable.identifier.name, &statement.span))?, mutable: variable.mutable, const_: false, declaration: crate::VariableDeclaration::Definition, @@ -127,7 +123,7 @@ impl<'a> FromAst<'a, leo_ast::DefinitionStatement> for &'a Statement<'a> { let mut variables = scope.variables.borrow_mut(); let var_name = variable.borrow().name.name.to_string(); if variables.contains_key(&var_name) { - return Err(AsgError::duplicate_variable_definition(var_name, &statement.span, new_backtrace()).into()); + return Err(AsgError::duplicate_variable_definition(var_name, &statement.span).into()); } variables.insert(var_name, *variable); diff --git a/asg/src/statement/iteration.rs b/asg/src/statement/iteration.rs index 2177943a5d..27de5b4deb 100644 --- a/asg/src/statement/iteration.rs +++ b/asg/src/statement/iteration.rs @@ -17,7 +17,7 @@ use leo_ast::IntegerType; use crate::{Expression, ExpressionNode, FromAst, InnerVariable, Node, PartialType, Scope, Statement, Variable}; -use leo_errors::{new_backtrace, AsgError, Result, Span}; +use leo_errors::{AsgError, Result, Span}; use std::cell::{Cell, RefCell}; @@ -50,14 +50,10 @@ impl<'a> FromAst<'a, leo_ast::IterationStatement> for &'a Statement<'a> { // Return an error if start or stop is not constant. if !start.is_consty() { - return Err( - AsgError::unexpected_nonconst(&start.span().cloned().unwrap_or_default(), new_backtrace()).into(), - ); + return Err(AsgError::unexpected_nonconst(&start.span().cloned().unwrap_or_default()).into()); } if !stop.is_consty() { - return Err( - AsgError::unexpected_nonconst(&stop.span().cloned().unwrap_or_default(), new_backtrace()).into(), - ); + return Err(AsgError::unexpected_nonconst(&stop.span().cloned().unwrap_or_default()).into()); } let variable = scope.context.alloc_variable(RefCell::new(InnerVariable { @@ -65,7 +61,7 @@ impl<'a> FromAst<'a, leo_ast::IterationStatement> for &'a Statement<'a> { name: statement.variable.clone(), type_: start .get_type() - .ok_or_else(|| AsgError::unresolved_type(&statement.variable.name, &statement.span, new_backtrace()))?, + .ok_or_else(|| AsgError::unresolved_type(&statement.variable.name, &statement.span))?, mutable: false, const_: true, declaration: crate::VariableDeclaration::IterationDefinition, diff --git a/ast/src/lib.rs b/ast/src/lib.rs index b7272eed87..eceb10e614 100644 --- a/ast/src/lib.rs +++ b/ast/src/lib.rs @@ -62,7 +62,7 @@ pub use self::types::*; mod node; pub use node::*; -use leo_errors::{new_backtrace, AstError, Result}; +use leo_errors::{AstError, Result}; /// The abstract syntax tree (AST) for a Leo program. /// @@ -98,31 +98,27 @@ impl Ast { /// Serializes the ast into a JSON string. pub fn to_json_string(&self) -> Result { - Ok(serde_json::to_string_pretty(&self.ast) - .map_err(|e| AstError::failed_to_convert_ast_to_json_string(&e, new_backtrace()))?) + Ok(serde_json::to_string_pretty(&self.ast).map_err(|e| AstError::failed_to_convert_ast_to_json_string(&e))?) } /// Serializes the ast into a JSON file. pub fn to_json_file(&self, mut path: std::path::PathBuf, file_name: &str) -> Result<()> { path.push(file_name); - let file = std::fs::File::create(&path) - .map_err(|e| AstError::failed_to_create_ast_json_file(&path, &e, new_backtrace()))?; + let file = std::fs::File::create(&path).map_err(|e| AstError::failed_to_create_ast_json_file(&path, &e))?; let writer = std::io::BufWriter::new(file); Ok(serde_json::to_writer_pretty(writer, &self.ast) - .map_err(|e| AstError::failed_to_write_ast_to_json_file(&path, &e, new_backtrace()))?) + .map_err(|e| AstError::failed_to_write_ast_to_json_file(&path, &e))?) } /// Deserializes the JSON string into a ast. pub fn from_json_string(json: &str) -> Result { - let ast: Program = - serde_json::from_str(json).map_err(|e| AstError::failed_to_read_json_string_to_ast(&e, new_backtrace()))?; + let ast: Program = serde_json::from_str(json).map_err(|e| AstError::failed_to_read_json_string_to_ast(&e))?; Ok(Self { ast }) } /// Deserializes the JSON string into a ast from a file. pub fn from_json_file(path: std::path::PathBuf) -> Result { - let data = std::fs::read_to_string(&path) - .map_err(|e| AstError::failed_to_read_json_file(&path, &e, new_backtrace()))?; + let data = std::fs::read_to_string(&path).map_err(|e| AstError::failed_to_read_json_file(&path, &e))?; Self::from_json_string(&data) } } diff --git a/ast/src/reducer/canonicalization.rs b/ast/src/reducer/canonicalization.rs index 459020cb31..b958cc4b72 100644 --- a/ast/src/reducer/canonicalization.rs +++ b/ast/src/reducer/canonicalization.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use crate::*; -use leo_errors::{new_backtrace, AstError, Result, Span}; +use leo_errors::{AstError, Result, Span}; /// Replace Self when it is in a enclosing circuit type. /// Error when Self is outside an enclosing circuit type. @@ -469,7 +469,7 @@ impl ReconstructingReducer for Canonicalizer { match new { Type::Array(type_, mut dimensions) => { if dimensions.is_zero() { - return Err(AstError::invalid_array_dimension_size(span, new_backtrace()).into()); + return Err(AstError::invalid_array_dimension_size(span).into()); } let mut next = Type::Array(type_, ArrayDimensions(vec![dimensions.remove_last().unwrap()])); @@ -486,16 +486,14 @@ impl ReconstructingReducer for Canonicalizer { Ok(array) } - Type::SelfType if !self.in_circuit => { - Err(AstError::big_self_outside_of_circuit(span, new_backtrace()).into()) - } + Type::SelfType if !self.in_circuit => Err(AstError::big_self_outside_of_circuit(span).into()), _ => Ok(new.clone()), } } fn reduce_string(&mut self, string: &[Char], span: &Span) -> Result { if string.is_empty() { - return Err(AstError::empty_string(span, new_backtrace()).into()); + return Err(AstError::empty_string(span).into()); } let mut elements = Vec::new(); @@ -554,7 +552,7 @@ impl ReconstructingReducer for Canonicalizer { element: Expression, ) -> Result { if array_init.dimensions.is_zero() { - return Err(AstError::invalid_array_dimension_size(&array_init.span, new_backtrace()).into()); + return Err(AstError::invalid_array_dimension_size(&array_init.span).into()); } let element = Box::new(element); diff --git a/ast/src/reducer/reconstructing_director.rs b/ast/src/reducer/reconstructing_director.rs index 6d44194915..15601cddb5 100644 --- a/ast/src/reducer/reconstructing_director.rs +++ b/ast/src/reducer/reconstructing_director.rs @@ -19,7 +19,7 @@ use crate::*; use indexmap::IndexMap; -use leo_errors::{new_backtrace, AstError, Result, Span}; +use leo_errors::{AstError, Result, Span}; pub struct ReconstructingDirector { reducer: R, @@ -386,7 +386,7 @@ impl ReconstructingDirector { match &console_function_call.function { ConsoleFunction::Error(_) => ConsoleFunction::Error(formatted), ConsoleFunction::Log(_) => ConsoleFunction::Log(formatted), - _ => return Err(AstError::impossible_console_assert_call(&args.span, new_backtrace()).into()), + _ => return Err(AstError::impossible_console_assert_call(&args.span).into()), } } }; diff --git a/compiler/src/compiler.rs b/compiler/src/compiler.rs index f3767c8fe0..ccbcd87ecf 100644 --- a/compiler/src/compiler.rs +++ b/compiler/src/compiler.rs @@ -27,7 +27,7 @@ use crate::{ pub use leo_asg::{new_context, AsgContext as Context, AsgContext}; use leo_asg::{Asg, AsgPass, Program as AsgProgram}; use leo_ast::{Input, MainInput, Program as AstProgram}; -use leo_errors::{new_backtrace, CompilerError, Result}; +use leo_errors::{CompilerError, Result}; use leo_input::LeoInputParser; use leo_package::inputs::InputPairs; use leo_parser::parse_ast; @@ -226,7 +226,7 @@ impl<'a, F: PrimeField, G: GroupType> Compiler<'a, F, G> { pub fn parse_program(&mut self) -> Result<()> { // Load the program file. let content = fs::read_to_string(&self.main_file_path) - .map_err(|e| CompilerError::file_read_error(self.main_file_path.clone(), e, new_backtrace()))?; + .map_err(|e| CompilerError::file_read_error(self.main_file_path.clone(), e))?; self.parse_program_from_string(&content) } @@ -324,7 +324,7 @@ impl<'a, F: PrimeField, G: GroupType> Compiler<'a, F, G> { pub fn checksum(&self) -> Result { // Read in the main file as string let unparsed_file = fs::read_to_string(&self.main_file_path) - .map_err(|e| CompilerError::file_read_error(self.main_file_path.clone(), e, new_backtrace()))?; + .map_err(|e| CompilerError::file_read_error(self.main_file_path.clone(), e))?; // Hash the file contents let mut hasher = Sha256::new(); diff --git a/compiler/src/console/assert.rs b/compiler/src/console/assert.rs index f17f1e0398..5ec8b5d001 100644 --- a/compiler/src/console/assert.rs +++ b/compiler/src/console/assert.rs @@ -18,7 +18,7 @@ use crate::{get_indicator_value, program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::Expression; -use leo_errors::{new_backtrace, CompilerError, Result, Span}; +use leo_errors::{CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::boolean::Boolean; @@ -45,14 +45,13 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let result_option = match assert_expression { ConstrainedValue::Boolean(boolean) => boolean.get_value(), _ => { - return Err(CompilerError::console_assertion_must_be_boolean(span, new_backtrace()).into()); + return Err(CompilerError::console_assertion_must_be_boolean(span).into()); } }; - let result_bool = - result_option.ok_or_else(|| CompilerError::console_assertion_depends_on_input(span, new_backtrace()))?; + let result_bool = result_option.ok_or_else(|| CompilerError::console_assertion_depends_on_input(span))?; if !result_bool { - return Err(CompilerError::console_assertion_failed(span, new_backtrace()).into()); + return Err(CompilerError::console_assertion_failed(span).into()); } Ok(()) diff --git a/compiler/src/console/format.rs b/compiler/src/console/format.rs index a3ee97b32a..560bb4444f 100644 --- a/compiler/src/console/format.rs +++ b/compiler/src/console/format.rs @@ -18,7 +18,7 @@ use crate::{program::ConstrainedProgram, GroupType}; use leo_asg::{CharValue, ConsoleArgs}; -use leo_errors::{new_backtrace, CompilerError, Result}; +use leo_errors::{CompilerError, Result}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -55,7 +55,6 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { arg_index + 1, args.parameters.len(), &args.span, - new_backtrace(), ) .into()); } @@ -69,20 +68,12 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { substring.push('}'); escape_right_bracket = true; } else { - return Err(CompilerError::console_fmt_expected_escaped_right_brace( - &args.span, - new_backtrace(), - ) - .into()); + return Err(CompilerError::console_fmt_expected_escaped_right_brace(&args.span).into()); } } } _ if in_container => { - return Err(CompilerError::console_fmt_expected_left_or_right_brace( - &args.span, - new_backtrace(), - ) - .into()); + return Err(CompilerError::console_fmt_expected_left_or_right_brace(&args.span).into()); } _ => substring.push(*scalar), }, @@ -100,7 +91,6 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { arg_index, args.parameters.len(), &args.span, - new_backtrace(), ) .into()); } diff --git a/compiler/src/constraints/constraints.rs b/compiler/src/constraints/constraints.rs index 35aef9401d..b81ad10a69 100644 --- a/compiler/src/constraints/constraints.rs +++ b/compiler/src/constraints/constraints.rs @@ -19,7 +19,7 @@ use crate::{ConstrainedProgram, GroupType, Output, OutputFile}; use leo_asg::Program; use leo_ast::Input; -use leo_errors::{new_backtrace, CompilerError, Result}; +use leo_errors::{CompilerError, Result}; use leo_input::LeoInputParser; use leo_package::inputs::InputPairs; @@ -48,7 +48,7 @@ pub fn generate_constraints<'a, F: PrimeField, G: GroupType, CS: ConstraintSy let result = resolved_program.enforce_main_function(cs, function, input)?; Ok(result) } - _ => Err(CompilerError::no_main_function(new_backtrace()).into()), + _ => Err(CompilerError::no_main_function().into()), } } @@ -103,11 +103,11 @@ pub fn generate_test_constraints<'a, F: PrimeField, G: GroupType>( { Some(pair) => pair.to_owned(), None => { - return Err(CompilerError::invalid_test_context(file_name, new_backtrace()).into()); + return Err(CompilerError::invalid_test_context(file_name).into()); } } } - None => default.ok_or_else(|| CompilerError::no_test_input(new_backtrace()))?, + None => default.ok_or_else(|| CompilerError::no_test_input())?, }; // parse input files to abstract syntax trees diff --git a/compiler/src/expression/arithmetic/add.rs b/compiler/src/expression/arithmetic/add.rs index 79807b2019..187a6377f8 100644 --- a/compiler/src/expression/arithmetic/add.rs +++ b/compiler/src/expression/arithmetic/add.rs @@ -17,7 +17,7 @@ //! Enforces an arithmetic `+` operator in a resolved Leo program. use crate::{value::ConstrainedValue, GroupType}; -use leo_errors::{new_backtrace, CompilerError, Result, Span}; +use leo_errors::{CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -39,9 +39,7 @@ pub fn enforce_add<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( Ok(ConstrainedValue::Group(point_1.add(cs, &point_2, span)?)) } (val_1, val_2) => { - return Err( - CompilerError::incompatible_types(format!("{} + {}", val_1, val_2), span, new_backtrace()).into(), - ); + return Err(CompilerError::incompatible_types(format!("{} + {}", val_1, val_2), span).into()); } } } diff --git a/compiler/src/expression/arithmetic/bit_not.rs b/compiler/src/expression/arithmetic/bit_not.rs index 8e97afdb88..639fb5aac1 100644 --- a/compiler/src/expression/arithmetic/bit_not.rs +++ b/compiler/src/expression/arithmetic/bit_not.rs @@ -17,7 +17,7 @@ //! Enforces a logical `!` operator in a resolved Leo program. use crate::{value::ConstrainedValue, GroupType}; -use leo_errors::{new_backtrace, CompilerError, Result, Span}; +use leo_errors::{CompilerError, Result, Span}; use snarkvm_fields::PrimeField; @@ -25,5 +25,5 @@ pub fn evaluate_bit_not<'a, F: PrimeField, G: GroupType>( value: ConstrainedValue<'a, F, G>, span: &Span, ) -> Result> { - return Err(CompilerError::cannot_evaluate_expression(format!("!{}", value), span, new_backtrace()).into()); + return Err(CompilerError::cannot_evaluate_expression(format!("!{}", value), span).into()); } diff --git a/compiler/src/expression/arithmetic/div.rs b/compiler/src/expression/arithmetic/div.rs index 9e2a6be9a6..b7020fa73a 100644 --- a/compiler/src/expression/arithmetic/div.rs +++ b/compiler/src/expression/arithmetic/div.rs @@ -17,7 +17,7 @@ //! Enforces an arithmetic `/` operator in a resolved Leo program. use crate::{value::ConstrainedValue, GroupType}; -use leo_errors::{new_backtrace, CompilerError, Result, Span}; +use leo_errors::{CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -36,9 +36,7 @@ pub fn enforce_div<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( Ok(ConstrainedValue::Field(field_1.div(cs, &field_2, span)?)) } (val_1, val_2) => { - return Err( - CompilerError::incompatible_types(format!("{} / {}", val_1, val_2,), span, new_backtrace()).into(), - ); + return Err(CompilerError::incompatible_types(format!("{} / {}", val_1, val_2,), span).into()); } } } diff --git a/compiler/src/expression/arithmetic/mul.rs b/compiler/src/expression/arithmetic/mul.rs index 1a6921c6aa..3ccb38dda6 100644 --- a/compiler/src/expression/arithmetic/mul.rs +++ b/compiler/src/expression/arithmetic/mul.rs @@ -17,7 +17,7 @@ //! Enforces an arithmetic `*` operator in a resolved Leo program. use crate::{value::ConstrainedValue, GroupType}; -use leo_errors::{new_backtrace, CompilerError, Result, Span}; +use leo_errors::{CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -36,9 +36,7 @@ pub fn enforce_mul<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( Ok(ConstrainedValue::Field(field_1.mul(cs, &field_2, span)?)) } (val_1, val_2) => { - return Err( - CompilerError::incompatible_types(format!("{} * {}", val_1, val_2), span, new_backtrace()).into(), - ); + return Err(CompilerError::incompatible_types(format!("{} * {}", val_1, val_2), span).into()); } } } diff --git a/compiler/src/expression/arithmetic/negate.rs b/compiler/src/expression/arithmetic/negate.rs index db99bbb06d..165f99ec73 100644 --- a/compiler/src/expression/arithmetic/negate.rs +++ b/compiler/src/expression/arithmetic/negate.rs @@ -17,7 +17,7 @@ //! Enforces a unary negate `-` operator in a resolved Leo program. use crate::{value::ConstrainedValue, GroupType}; -use leo_errors::{new_backtrace, CompilerError, Result, Span}; +use leo_errors::{CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -31,6 +31,6 @@ pub fn enforce_negate<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem Ok(ConstrainedValue::Integer(integer.negate(cs, span)?)), ConstrainedValue::Field(field) => Ok(ConstrainedValue::Field(field.negate(cs, span)?)), ConstrainedValue::Group(group) => Ok(ConstrainedValue::Group(group.negate(cs, span)?)), - value => return Err(CompilerError::incompatible_types(format!("-{}", value), span, new_backtrace()).into()), + value => return Err(CompilerError::incompatible_types(format!("-{}", value), span).into()), } } diff --git a/compiler/src/expression/arithmetic/pow.rs b/compiler/src/expression/arithmetic/pow.rs index b7c1a77a45..6202b98277 100644 --- a/compiler/src/expression/arithmetic/pow.rs +++ b/compiler/src/expression/arithmetic/pow.rs @@ -17,7 +17,7 @@ //! Enforces an arithmetic `**` operator in a resolved Leo program. use crate::{value::ConstrainedValue, GroupType}; -use leo_errors::{new_backtrace, CompilerError, Result, Span}; +use leo_errors::{CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -33,9 +33,7 @@ pub fn enforce_pow<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( Ok(ConstrainedValue::Integer(num_1.pow(cs, num_2, span)?)) } (val_1, val_2) => { - return Err( - CompilerError::incompatible_types(format!("{} ** {}", val_1, val_2,), span, new_backtrace()).into(), - ); + return Err(CompilerError::incompatible_types(format!("{} ** {}", val_1, val_2,), span).into()); } } } diff --git a/compiler/src/expression/arithmetic/sub.rs b/compiler/src/expression/arithmetic/sub.rs index 4b96642c06..5c2a4b3b8a 100644 --- a/compiler/src/expression/arithmetic/sub.rs +++ b/compiler/src/expression/arithmetic/sub.rs @@ -17,7 +17,7 @@ //! Enforces an arithmetic `-` operator in a resolved Leo program. use crate::{value::ConstrainedValue, GroupType}; -use leo_errors::{new_backtrace, CompilerError, Result, Span}; +use leo_errors::{CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -39,9 +39,7 @@ pub fn enforce_sub<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( Ok(ConstrainedValue::Group(point_1.sub(cs, &point_2, span)?)) } (val_1, val_2) => { - return Err( - CompilerError::incompatible_types(format!("{} - {}", val_1, val_2), span, new_backtrace()).into(), - ); + return Err(CompilerError::incompatible_types(format!("{} - {}", val_1, val_2), span).into()); } } } diff --git a/compiler/src/expression/array/access.rs b/compiler/src/expression/array/access.rs index 05845fb5e6..340d412561 100644 --- a/compiler/src/expression/array/access.rs +++ b/compiler/src/expression/array/access.rs @@ -26,7 +26,7 @@ use crate::{ GroupType, }; use leo_asg::{ConstInt, Expression}; -use leo_errors::{new_backtrace, CompilerError, Result, Span}; +use leo_errors::{CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::{ @@ -62,7 +62,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let mut unique_namespace = cs.ns(|| namespace_string); bounds_check .enforce_equal(&mut unique_namespace, &Boolean::Constant(true)) - .map_err(|e| CompilerError::cannot_enforce_expression("array bounds check", e, span, new_backtrace()))?; + .map_err(|e| CompilerError::cannot_enforce_expression("array bounds check", e, span))?; Ok(()) } @@ -76,25 +76,25 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { ) -> Result> { let mut array = match self.enforce_expression(cs, array)? { ConstrainedValue::Array(array) => array, - value => return Err(CompilerError::undefined_array(value.to_string(), span, new_backtrace()).into()), + value => return Err(CompilerError::undefined_array(value.to_string(), span).into()), }; let index_resolved = self.enforce_index(cs, index, span)?; if let Some(resolved) = index_resolved.to_usize() { if resolved >= array.len() { - return Err(CompilerError::array_index_out_of_bounds(resolved, span, new_backtrace()).into()); + return Err(CompilerError::array_index_out_of_bounds(resolved, span).into()); } Ok(array[resolved].to_owned()) } else { if array.is_empty() { - return Err(CompilerError::array_index_out_of_bounds(0, span, new_backtrace()).into()); + return Err(CompilerError::array_index_out_of_bounds(0, span).into()); } { let array_len: u32 = array .len() .try_into() - .map_err(|_| CompilerError::array_length_out_of_bounds(span, new_backtrace()))?; + .map_err(|_| CompilerError::array_length_out_of_bounds(span))?; self.array_bounds_check(cs, &index_resolved, array_len, span)?; } @@ -105,19 +105,17 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let index_bounded = i .try_into() - .map_err(|_| CompilerError::array_index_out_of_legal_bounds(span, new_backtrace()))?; + .map_err(|_| CompilerError::array_index_out_of_legal_bounds(span))?; let const_index = ConstInt::U32(index_bounded).cast_to(&index_resolved.get_type()); let index_comparison = index_resolved .evaluate_equal(eq_namespace, &Integer::new(&const_index)) - .map_err(|_| CompilerError::cannot_evaluate_expression("==", span, new_backtrace()))?; + .map_err(|_| CompilerError::cannot_evaluate_expression("==", span))?; let unique_namespace = cs.ns(|| format!("select array access {} {}:{}", i, span.line_start, span.col_start)); let value = ConstrainedValue::conditionally_select(unique_namespace, &index_comparison, &item, ¤t_value) - .map_err(|e| { - CompilerError::cannot_enforce_expression("conditional select", e, span, new_backtrace()) - })?; + .map_err(|e| CompilerError::cannot_enforce_expression("conditional select", e, span))?; current_value = value; } Ok(current_value) @@ -136,7 +134,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { ) -> Result> { let array = match self.enforce_expression(cs, array)? { ConstrainedValue::Array(array) => array, - value => return Err(CompilerError::undefined_array(value, span, new_backtrace()).into()), + value => return Err(CompilerError::undefined_array(value, span).into()), }; let from_resolved = match left { @@ -149,7 +147,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let index_bounded: u32 = array .len() .try_into() - .map_err(|_| CompilerError::array_length_out_of_bounds(span, new_backtrace()))?; + .map_err(|_| CompilerError::array_length_out_of_bounds(span))?; Integer::new(&ConstInt::U32(index_bounded)) } // Array slice ends at array length }; @@ -161,10 +159,10 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { }; Ok(if let Some((left, right)) = const_dimensions { if right - left != length { - return Err(CompilerError::array_invalid_slice_length(span, new_backtrace()).into()); + return Err(CompilerError::array_invalid_slice_length(span).into()); } if right > array.len() { - return Err(CompilerError::array_index_out_of_bounds(right, span, new_backtrace()).into()); + return Err(CompilerError::array_index_out_of_bounds(right, span).into()); } ConstrainedValue::Array(array[left..right].to_owned()) } else { @@ -186,9 +184,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let mut unique_namespace = cs.ns(|| namespace_string); calc_len .enforce_equal(&mut unique_namespace, &Integer::new(&ConstInt::U32(length as u32))) - .map_err(|e| { - CompilerError::cannot_enforce_expression("array length check", e, span, new_backtrace()) - })?; + .map_err(|e| CompilerError::cannot_enforce_expression("array length check", e, span))?; } { let bounds_check = evaluate_le::( @@ -208,9 +204,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let mut unique_namespace = cs.ns(|| namespace_string); bounds_check .enforce_equal(&mut unique_namespace, &Boolean::Constant(true)) - .map_err(|e| { - CompilerError::cannot_enforce_expression("array bounds check", e, span, new_backtrace()) - })?; + .map_err(|e| CompilerError::cannot_enforce_expression("array bounds check", e, span))?; } let mut windows = array.windows(length); let mut result = ConstrainedValue::Array(vec![]); @@ -239,9 +233,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let unique_namespace = unique_namespace.ns(|| format!("array index {} {}:{}", i, span.line_start, span.col_start)); result = ConstrainedValue::conditionally_select(unique_namespace, &equality, &array_value, &result) - .map_err(|e| { - CompilerError::cannot_enforce_expression("conditional select", e, span, new_backtrace()) - })?; + .map_err(|e| CompilerError::cannot_enforce_expression("conditional select", e, span))?; } result }) diff --git a/compiler/src/expression/array/array.rs b/compiler/src/expression/array/array.rs index 32ff507471..e8c3979c39 100644 --- a/compiler/src/expression/array/array.rs +++ b/compiler/src/expression/array/array.rs @@ -20,7 +20,7 @@ use std::cell::Cell; use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::Expression; -use leo_errors::{new_backtrace, CompilerError, Result, Span}; +use leo_errors::{CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -52,9 +52,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { if let Some(dimension) = expected_dimension { // Return an error if the expected dimension != the actual dimension. if dimension != result.len() { - return Err( - CompilerError::unexpected_array_length(dimension, result.len(), span, new_backtrace()).into(), - ); + return Err(CompilerError::unexpected_array_length(dimension, result.len(), span).into()); } } diff --git a/compiler/src/expression/array/index.rs b/compiler/src/expression/array/index.rs index dce7c376b4..8873325eb8 100644 --- a/compiler/src/expression/array/index.rs +++ b/compiler/src/expression/array/index.rs @@ -18,7 +18,7 @@ use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType, Integer}; use leo_asg::Expression; -use leo_errors::{new_backtrace, CompilerError, Result, Span}; +use leo_errors::{CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -32,7 +32,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { ) -> Result { match self.enforce_expression(cs, index)? { ConstrainedValue::Integer(number) => Ok(number), - value => Err(CompilerError::invalid_index_expression(value, span, new_backtrace()).into()), + value => Err(CompilerError::invalid_index_expression(value, span).into()), } } } diff --git a/compiler/src/expression/circuit/access.rs b/compiler/src/expression/circuit/access.rs index e5fb0bf066..58c0aa9a08 100644 --- a/compiler/src/expression/circuit/access.rs +++ b/compiler/src/expression/circuit/access.rs @@ -18,7 +18,7 @@ use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::{CircuitAccessExpression, Node}; -use leo_errors::{new_backtrace, CompilerError, Result}; +use leo_errors::{CompilerError, Result}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -43,27 +43,18 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { expr.circuit.get().name.borrow(), &expr.member.name, &expr.member.span, - new_backtrace(), ) .into()); } } value => { - return Err(CompilerError::undefined_circuit( - value, - &target.span().cloned().unwrap_or_default(), - new_backtrace(), - ) - .into()); + return Err( + CompilerError::undefined_circuit(value, &target.span().cloned().unwrap_or_default()).into(), + ); } } } else { - Err(CompilerError::invalid_circuit_static_member_access( - &expr.member.name, - &expr.member.span, - new_backtrace(), - ) - .into()) + Err(CompilerError::invalid_circuit_static_member_access(&expr.member.name, &expr.member.span).into()) } } } diff --git a/compiler/src/expression/circuit/circuit.rs b/compiler/src/expression/circuit/circuit.rs index e02b72cb49..7732d9b938 100644 --- a/compiler/src/expression/circuit/circuit.rs +++ b/compiler/src/expression/circuit/circuit.rs @@ -22,7 +22,7 @@ use crate::{ GroupType, }; use leo_asg::{CircuitInitExpression, CircuitMember}; -use leo_errors::{new_backtrace, CompilerError, Result, Span}; +use leo_errors::{CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -50,7 +50,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { resolved_members.push(ConstrainedCircuitMember(name.clone(), variable_value)); } _ => { - return Err(CompilerError::expected_circuit_member(name, span, new_backtrace()).into()); + return Err(CompilerError::expected_circuit_member(name, span).into()); } } } diff --git a/compiler/src/expression/conditional/conditional.rs b/compiler/src/expression/conditional/conditional.rs index c1fe131fef..661aef7335 100644 --- a/compiler/src/expression/conditional/conditional.rs +++ b/compiler/src/expression/conditional/conditional.rs @@ -18,7 +18,7 @@ use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::Expression; -use leo_errors::{new_backtrace, CompilerError, Result, Span}; +use leo_errors::{CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::traits::select::CondSelectGadget; @@ -38,12 +38,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let conditional_value = match self.enforce_expression(cs, conditional)? { ConstrainedValue::Boolean(resolved) => resolved, value => { - return Err(CompilerError::conditional_boolean_expression_fails_to_resolve_to_bool( - value, - span, - new_backtrace(), - ) - .into()); + return Err(CompilerError::conditional_boolean_expression_fails_to_resolve_to_bool(value, span).into()); } }; @@ -60,7 +55,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { Ok( ConstrainedValue::conditionally_select(unique_namespace, &conditional_value, &first_value, &second_value) - .map_err(|e| CompilerError::cannot_enforce_expression("conditional select", e, span, new_backtrace()))?, + .map_err(|e| CompilerError::cannot_enforce_expression("conditional select", e, span))?, ) } } diff --git a/compiler/src/expression/logical/and.rs b/compiler/src/expression/logical/and.rs index e7acefb64d..50c1526eff 100644 --- a/compiler/src/expression/logical/and.rs +++ b/compiler/src/expression/logical/and.rs @@ -17,7 +17,7 @@ //! Enforces a logical `&&` operator in a resolved Leo program. use crate::{value::ConstrainedValue, GroupType}; -use leo_errors::{new_backtrace, CompilerError, Result, Span}; +use leo_errors::{CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::boolean::Boolean; @@ -37,10 +37,10 @@ pub fn enforce_and<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( &left_bool, &right_bool, ) - .map_err(|e| CompilerError::cannot_enforce_expression("&&", e, span, new_backtrace()))?; + .map_err(|e| CompilerError::cannot_enforce_expression("&&", e, span))?; return Ok(ConstrainedValue::Boolean(result)); } - Err(CompilerError::cannot_evaluate_expression(name, span, new_backtrace()).into()) + Err(CompilerError::cannot_evaluate_expression(name, span).into()) } diff --git a/compiler/src/expression/logical/not.rs b/compiler/src/expression/logical/not.rs index c2b55a9e23..8ebc132037 100644 --- a/compiler/src/expression/logical/not.rs +++ b/compiler/src/expression/logical/not.rs @@ -17,7 +17,7 @@ //! Enforces a logical `!` operator in a resolved Leo program. use crate::{value::ConstrainedValue, GroupType}; -use leo_errors::{new_backtrace, CompilerError, Result, Span}; +use leo_errors::{CompilerError, Result, Span}; use snarkvm_fields::PrimeField; @@ -28,7 +28,7 @@ pub fn evaluate_not<'a, F: PrimeField, G: GroupType>( match value { ConstrainedValue::Boolean(boolean) => Ok(ConstrainedValue::Boolean(boolean.not())), value => { - return Err(CompilerError::cannot_evaluate_expression(format!("!{}", value), span, new_backtrace()).into()); + return Err(CompilerError::cannot_evaluate_expression(format!("!{}", value), span).into()); } } } diff --git a/compiler/src/expression/logical/or.rs b/compiler/src/expression/logical/or.rs index b8385b4139..f8ab3a9f84 100644 --- a/compiler/src/expression/logical/or.rs +++ b/compiler/src/expression/logical/or.rs @@ -17,7 +17,7 @@ //! Enforces a logical `||` operator in a resolved Leo program. use crate::{value::ConstrainedValue, GroupType}; -use leo_errors::{new_backtrace, CompilerError, Result, Span}; +use leo_errors::{CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::boolean::Boolean; @@ -37,10 +37,10 @@ pub fn enforce_or<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( &left_bool, &right_bool, ) - .map_err(|e| CompilerError::cannot_enforce_expression("||", e, span, new_backtrace()))?; + .map_err(|e| CompilerError::cannot_enforce_expression("||", e, span))?; return Ok(ConstrainedValue::Boolean(result)); } - Err(CompilerError::cannot_evaluate_expression(name, span, new_backtrace()).into()) + Err(CompilerError::cannot_evaluate_expression(name, span).into()) } diff --git a/compiler/src/expression/relational/eq.rs b/compiler/src/expression/relational/eq.rs index e9793126a4..3fea711e53 100644 --- a/compiler/src/expression/relational/eq.rs +++ b/compiler/src/expression/relational/eq.rs @@ -17,7 +17,7 @@ //! Enforces a relational `==` operator in a resolved Leo program. use crate::{enforce_and, value::ConstrainedValue, GroupType}; -use leo_errors::{new_backtrace, CompilerError, Result, Span}; +use leo_errors::{CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::{boolean::Boolean, traits::eq::EvaluateEqGadget}; @@ -75,14 +75,11 @@ pub fn evaluate_eq<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( return Ok(current); } (val_1, val_2) => { - return Err( - CompilerError::incompatible_types(format!("{} == {}", val_1, val_2,), span, new_backtrace()).into(), - ); + return Err(CompilerError::incompatible_types(format!("{} == {}", val_1, val_2,), span).into()); } }; - let boolean = - constraint_result.map_err(|_| CompilerError::cannot_evaluate_expression("==", span, new_backtrace()))?; + let boolean = constraint_result.map_err(|_| CompilerError::cannot_evaluate_expression("==", span))?; Ok(ConstrainedValue::Boolean(boolean)) } diff --git a/compiler/src/expression/relational/ge.rs b/compiler/src/expression/relational/ge.rs index 08bb351893..958588dce9 100644 --- a/compiler/src/expression/relational/ge.rs +++ b/compiler/src/expression/relational/ge.rs @@ -17,7 +17,7 @@ //! Enforces a relational `>=` operator in a resolved Leo program. use crate::{value::ConstrainedValue, GroupType}; -use leo_errors::{new_backtrace, CompilerError, Result, Span}; +use leo_errors::{CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::traits::bits::ComparatorGadget; @@ -35,14 +35,11 @@ pub fn evaluate_ge<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( num_1.greater_than_or_equal(unique_namespace, &num_2) } (val_1, val_2) => { - return Err( - CompilerError::incompatible_types(format!("{} >= {}", val_1, val_2), span, new_backtrace()).into(), - ); + return Err(CompilerError::incompatible_types(format!("{} >= {}", val_1, val_2), span).into()); } }; - let boolean = - constraint_result.map_err(|_| CompilerError::cannot_evaluate_expression(">=", span, new_backtrace()))?; + let boolean = constraint_result.map_err(|_| CompilerError::cannot_evaluate_expression(">=", span))?; Ok(ConstrainedValue::Boolean(boolean)) } diff --git a/compiler/src/expression/relational/gt.rs b/compiler/src/expression/relational/gt.rs index fff3aed20a..ab3f06868c 100644 --- a/compiler/src/expression/relational/gt.rs +++ b/compiler/src/expression/relational/gt.rs @@ -17,7 +17,7 @@ //! Enforces a relational `>` operator in a resolved Leo program. use crate::{value::ConstrainedValue, GroupType}; -use leo_errors::{new_backtrace, CompilerError, Result, Span}; +use leo_errors::{CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::traits::bits::ComparatorGadget; @@ -35,14 +35,11 @@ pub fn evaluate_gt<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( num_1.greater_than(unique_namespace, &num_2) } (val_1, val_2) => { - return Err( - CompilerError::incompatible_types(format!("{} > {}", val_1, val_2), span, new_backtrace()).into(), - ); + return Err(CompilerError::incompatible_types(format!("{} > {}", val_1, val_2), span).into()); } }; - let boolean = - constraint_result.map_err(|_| CompilerError::cannot_evaluate_expression(">", span, new_backtrace()))?; + let boolean = constraint_result.map_err(|_| CompilerError::cannot_evaluate_expression(">", span))?; Ok(ConstrainedValue::Boolean(boolean)) } diff --git a/compiler/src/expression/relational/le.rs b/compiler/src/expression/relational/le.rs index 31afe1bea6..e1f1e57131 100644 --- a/compiler/src/expression/relational/le.rs +++ b/compiler/src/expression/relational/le.rs @@ -17,7 +17,7 @@ //! Enforces a relational `<=` operator in a resolved Leo program. use crate::{value::ConstrainedValue, GroupType}; -use leo_errors::{new_backtrace, CompilerError, Result, Span}; +use leo_errors::{CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::traits::bits::ComparatorGadget; @@ -35,14 +35,11 @@ pub fn evaluate_le<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( num_1.less_than_or_equal(unique_namespace, &num_2) } (val_1, val_2) => { - return Err( - CompilerError::incompatible_types(format!("{} <= {}", val_1, val_2), span, new_backtrace()).into(), - ); + return Err(CompilerError::incompatible_types(format!("{} <= {}", val_1, val_2), span).into()); } }; - let boolean = - constraint_result.map_err(|_| CompilerError::cannot_evaluate_expression("<=", span, new_backtrace()))?; + let boolean = constraint_result.map_err(|_| CompilerError::cannot_evaluate_expression("<=", span))?; Ok(ConstrainedValue::Boolean(boolean)) } diff --git a/compiler/src/expression/relational/lt.rs b/compiler/src/expression/relational/lt.rs index 4c6fa1d654..839ea7fb7a 100644 --- a/compiler/src/expression/relational/lt.rs +++ b/compiler/src/expression/relational/lt.rs @@ -17,7 +17,7 @@ //! Enforces a relational `<` operator in a resolved Leo program. use crate::{value::ConstrainedValue, GroupType}; -use leo_errors::{new_backtrace, CompilerError, Result, Span}; +use leo_errors::{CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::traits::bits::EvaluateLtGadget; @@ -35,14 +35,11 @@ pub fn evaluate_lt<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( num_1.less_than(unique_namespace, &num_2) } (val_1, val_2) => { - return Err( - CompilerError::incompatible_types(format!("{} < {}", val_1, val_2), span, new_backtrace()).into(), - ); + return Err(CompilerError::incompatible_types(format!("{} < {}", val_1, val_2), span).into()); } }; - let boolean = - constraint_result.map_err(|_| CompilerError::cannot_evaluate_expression("<", span, new_backtrace()))?; + let boolean = constraint_result.map_err(|_| CompilerError::cannot_evaluate_expression("<", span))?; Ok(ConstrainedValue::Boolean(boolean)) } diff --git a/compiler/src/expression/tuple/access.rs b/compiler/src/expression/tuple/access.rs index 0a7bd262e4..59a823ae3b 100644 --- a/compiler/src/expression/tuple/access.rs +++ b/compiler/src/expression/tuple/access.rs @@ -18,7 +18,7 @@ use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::Expression; -use leo_errors::{new_backtrace, CompilerError, Result, Span}; +use leo_errors::{CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -35,13 +35,13 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { // Get the tuple values. let tuple = match self.enforce_expression(cs, tuple)? { ConstrainedValue::Tuple(tuple) => tuple, - value => return Err(CompilerError::undefined_array(value, span, new_backtrace()).into()), + value => return Err(CompilerError::undefined_array(value, span).into()), }; // Check for out of bounds access. if index > tuple.len() - 1 { // probably safe to be a panic here - return Err(CompilerError::tuple_index_out_of_bounds(index, span, new_backtrace()).into()); + return Err(CompilerError::tuple_index_out_of_bounds(index, span).into()); } Ok(tuple[index].to_owned()) diff --git a/compiler/src/expression/variable_ref/variable_ref.rs b/compiler/src/expression/variable_ref/variable_ref.rs index 721b8fc1f2..a27f3d13e6 100644 --- a/compiler/src/expression/variable_ref/variable_ref.rs +++ b/compiler/src/expression/variable_ref/variable_ref.rs @@ -18,7 +18,7 @@ use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::VariableRef; -use leo_errors::{new_backtrace, CompilerError, Result}; +use leo_errors::{CompilerError, Result}; use snarkvm_fields::PrimeField; @@ -32,12 +32,9 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let result_value = if let Some(value) = self.get(variable.id) { value.clone() } else { - return Err(CompilerError::undefined_identifier( - &variable.name.clone().name, - &span.unwrap_or_default(), - new_backtrace(), - ) - .into()); + return Err( + CompilerError::undefined_identifier(&variable.name.clone().name, &span.unwrap_or_default()).into(), + ); // todo: probably can be a panic here instead }; diff --git a/compiler/src/function/function.rs b/compiler/src/function/function.rs index 9f16619976..4bbf4fa87f 100644 --- a/compiler/src/function/function.rs +++ b/compiler/src/function/function.rs @@ -19,7 +19,7 @@ use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::{Expression, Function, FunctionQualifier}; -use leo_errors::{new_backtrace, CompilerError, Result}; +use leo_errors::{CompilerError, Result}; use std::cell::Cell; use snarkvm_fields::PrimeField; @@ -52,7 +52,6 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { &function.name.borrow().name.to_string(), "arguments length invalid", &function.span.clone().unwrap_or_default(), - new_backtrace(), ) .into()); } diff --git a/compiler/src/function/input/array.rs b/compiler/src/function/input/array.rs index b79e3c295a..47da5b93f8 100644 --- a/compiler/src/function/input/array.rs +++ b/compiler/src/function/input/array.rs @@ -20,7 +20,7 @@ use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::Type; use leo_ast::InputValue; -use leo_errors::{new_backtrace, CompilerError, Result, Span}; +use leo_errors::{CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -41,13 +41,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { match input_value { Some(InputValue::Array(arr)) => { if array_len != arr.len() { - return Err(CompilerError::invalid_input_array_dimensions( - arr.len(), - array_len, - span, - new_backtrace(), - ) - .into()); + return Err(CompilerError::invalid_input_array_dimensions(arr.len(), array_len, span).into()); } // Allocate each value in the current row @@ -72,9 +66,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { } } _ => { - return Err( - CompilerError::invalid_function_input_array(input_value.unwrap(), span, new_backtrace()).into(), - ); + return Err(CompilerError::invalid_function_input_array(input_value.unwrap(), span).into()); } } diff --git a/compiler/src/function/input/input_section.rs b/compiler/src/function/input/input_section.rs index 2641f885f5..72b1d7856a 100644 --- a/compiler/src/function/input/input_section.rs +++ b/compiler/src/function/input/input_section.rs @@ -17,7 +17,7 @@ use crate::{ConstrainedCircuitMember, ConstrainedProgram, ConstrainedValue, GroupType}; use leo_asg::{Circuit, CircuitMember}; use leo_ast::{Identifier, InputValue, Parameter}; -use leo_errors::{new_backtrace, AsgError, Result}; +use leo_errors::{AsgError, Result}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -43,9 +43,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { }; let declared_type = self.asg.scope.resolve_ast_type(¶meter.type_, ¶meter.span)?; if !expected_type.is_assignable_from(&declared_type) { - return Err( - AsgError::unexpected_type(expected_type, declared_type, &identifier.span, new_backtrace()).into(), - ); + return Err(AsgError::unexpected_type(expected_type, declared_type, &identifier.span).into()); } let member_name = parameter.variable.clone(); let member_value = self.allocate_main_function_input( diff --git a/compiler/src/function/input/main_function_input.rs b/compiler/src/function/input/main_function_input.rs index d77e7eb148..72050fb856 100644 --- a/compiler/src/function/input/main_function_input.rs +++ b/compiler/src/function/input/main_function_input.rs @@ -33,7 +33,7 @@ use crate::{ }; use leo_asg::{ConstInt, Type}; use leo_ast::{Char, InputValue}; -use leo_errors::{new_backtrace, CompilerError, Result, Span}; +use leo_errors::{CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::boolean::Boolean; @@ -78,8 +78,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { input_option: Option, span: &Span, ) -> Result> { - let input = - input_option.ok_or_else(|| CompilerError::function_input_not_found("main", name, span, new_backtrace()))?; + let input = input_option.ok_or_else(|| CompilerError::function_input_not_found("main", name, span))?; match (type_, input) { (Type::Address, InputValue::Address(addr)) => Ok(ConstrainedValue::Address(Address::constant(addr, span)?)), @@ -109,25 +108,15 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let parsed_type = parsed.get_int_type(); let input_type = input_type.into(); if std::mem::discriminant(&parsed_type) != std::mem::discriminant(&input_type) { - return Err(CompilerError::integer_value_integer_type_mismatch( - input_type, - parsed_type, - span, - new_backtrace(), - ) - .into()); + return Err( + CompilerError::integer_value_integer_type_mismatch(input_type, parsed_type, span).into(), + ); } Ok(ConstrainedValue::Integer(Integer::new(&parsed))) } (Type::Array(type_, arr_len), InputValue::Array(values)) => { if *arr_len != values.len() { - return Err(CompilerError::invalid_input_array_dimensions( - *arr_len, - values.len(), - span, - new_backtrace(), - ) - .into()); + return Err(CompilerError::invalid_input_array_dimensions(*arr_len, values.len(), span).into()); } Ok(ConstrainedValue::Array( @@ -139,13 +128,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { } (Type::Tuple(types), InputValue::Tuple(values)) => { if values.len() != types.len() { - return Err(CompilerError::input_tuple_size_mismatch( - types.len(), - values.len(), - span, - new_backtrace(), - ) - .into()); + return Err(CompilerError::input_tuple_size_mismatch(types.len(), values.len(), span).into()); } Ok(ConstrainedValue::Tuple( @@ -161,9 +144,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { (Type::Circuit(_), _) => unimplemented!("main function input not implemented for type {}", type_), // Should not happen. // Return an error if the input type and input value do not match. - (_, input) => { - Err(CompilerError::input_variable_type_mismatch(type_, input, name, span, new_backtrace()).into()) - } + (_, input) => Err(CompilerError::input_variable_type_mismatch(type_, input, name, span).into()), } } } diff --git a/compiler/src/function/input/tuple.rs b/compiler/src/function/input/tuple.rs index 7fcaabdd21..8bd4b8e220 100644 --- a/compiler/src/function/input/tuple.rs +++ b/compiler/src/function/input/tuple.rs @@ -20,7 +20,7 @@ use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::Type; use leo_ast::InputValue; -use leo_errors::{new_backtrace, CompilerError, Result, Span}; +use leo_errors::{CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -39,13 +39,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { match input_value { Some(InputValue::Tuple(values)) => { if values.len() != types.len() { - return Err(CompilerError::input_tuple_size_mismatch( - types.len(), - values.len(), - span, - new_backtrace(), - ) - .into()); + return Err(CompilerError::input_tuple_size_mismatch(types.len(), values.len(), span).into()); } // Allocate each value in the tuple. @@ -64,9 +58,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { } } _ => { - return Err( - CompilerError::invalid_function_input_tuple(input_value.unwrap(), span, new_backtrace()).into(), - ); + return Err(CompilerError::invalid_function_input_tuple(input_value.unwrap(), span).into()); } } diff --git a/compiler/src/function/main_function.rs b/compiler/src/function/main_function.rs index 3792754f94..7aefd335ff 100644 --- a/compiler/src/function/main_function.rs +++ b/compiler/src/function/main_function.rs @@ -20,7 +20,7 @@ use crate::{program::ConstrainedProgram, GroupType, Output}; use leo_asg::{Expression, Function, FunctionQualifier}; use leo_ast::Input; -use leo_errors::{new_backtrace, CompilerError, Result}; +use leo_errors::{CompilerError, Result}; use std::cell::Cell; use snarkvm_fields::PrimeField; @@ -66,12 +66,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { ) { // If variable is in both [main] and [constants] sections - error. (_, Some(_), Some(_)) => { - return Err(CompilerError::double_input_declaration( - name, - &input_variable.name.span, - new_backtrace(), - ) - .into()); + return Err(CompilerError::double_input_declaration(name, &input_variable.name.span).into()); } // If input option is found in [main] section and input is not const. (false, Some(input_option), _) => self.allocate_main_function_input( @@ -91,21 +86,15 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { )?, // Function argument is const, input is not. (true, Some(_), None) => { - return Err(CompilerError::expected_const_input_variable( - name, - &input_variable.name.span, - new_backtrace(), - ) - .into()); + return Err( + CompilerError::expected_const_input_variable(name, &input_variable.name.span).into(), + ); } // Input is const, function argument is not. (false, None, Some(_)) => { - return Err(CompilerError::expected_non_const_input_variable( - name, - &input_variable.name.span, - new_backtrace(), - ) - .into()); + return Err( + CompilerError::expected_non_const_input_variable(name, &input_variable.name.span).into(), + ); } // When not found - Error out. (_, _, _) => { @@ -113,7 +102,6 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { function.name.borrow().name.to_string(), name, &input_variable.name.span, - new_backtrace(), ) .into()); } diff --git a/compiler/src/function/result/result.rs b/compiler/src/function/result/result.rs index 8779684ba1..6bd779fa95 100644 --- a/compiler/src/function/result/result.rs +++ b/compiler/src/function/result/result.rs @@ -19,7 +19,7 @@ use crate::{get_indicator_value, program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::Type; -use leo_errors::{new_backtrace, CompilerError, Result, Span}; +use leo_errors::{CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::{boolean::Boolean, traits::select::CondSelectGadget}; @@ -55,7 +55,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { if get_indicator_value(&indicator) { // Error if we already have a return value. if return_value.is_some() { - return Err(CompilerError::statement_multiple_returns(span, new_backtrace()).into()); + return Err(CompilerError::statement_multiple_returns(span).into()); } else { // Set the function return value. return_value = Some(result); @@ -79,7 +79,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { &result, value, ) - .map_err(|_| CompilerError::statement_select_fail(result, value, span, new_backtrace()))?, + .map_err(|_| CompilerError::statement_select_fail(result, value, span))?, ); } else { return_value = Some(result); // we ignore indicator for default -- questionable @@ -89,9 +89,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { if expected_return.is_unit() { Ok(ConstrainedValue::Tuple(vec![])) } else { - Ok(return_value.ok_or_else(|| { - CompilerError::statement_no_returns(expected_return.to_string(), span, new_backtrace()) - })?) + Ok(return_value.ok_or_else(|| CompilerError::statement_no_returns(expected_return.to_string(), span))?) } } } diff --git a/compiler/src/output/mod.rs b/compiler/src/output/mod.rs index 60871c5955..e56173a8a2 100644 --- a/compiler/src/output/mod.rs +++ b/compiler/src/output/mod.rs @@ -25,7 +25,7 @@ pub use self::output_bytes::*; use crate::{Char, CharType, ConstrainedValue, GroupType, REGISTERS_VARIABLE_NAME}; use leo_asg::Program; use leo_ast::{Parameter, Registers}; -use leo_errors::{new_backtrace, CompilerError, Result, Span}; +use leo_errors::{CompilerError, Result, Span}; use snarkvm_fields::PrimeField; @@ -106,7 +106,7 @@ impl Output { // Return an error if we do not have enough return registers if register_values.len() < return_values.len() { - return Err(CompilerError::output_not_enough_registers(span, new_backtrace()).into()); + return Err(CompilerError::output_not_enough_registers(span).into()); } let mut registers = BTreeMap::new(); @@ -119,13 +119,7 @@ impl Output { let return_value_type = value.to_type(span)?; if !register_type.is_assignable_from(&return_value_type) { - return Err(CompilerError::output_mismatched_types( - register_type, - return_value_type, - span, - new_backtrace(), - ) - .into()); + return Err(CompilerError::output_mismatched_types(register_type, return_value_type, span).into()); } let value = match value { diff --git a/compiler/src/output/output_bytes.rs b/compiler/src/output/output_bytes.rs index 452eece86e..7ca118a3f3 100644 --- a/compiler/src/output/output_bytes.rs +++ b/compiler/src/output/output_bytes.rs @@ -17,7 +17,7 @@ use crate::{ConstrainedValue, GroupType, REGISTERS_VARIABLE_NAME}; use leo_asg::Program; use leo_ast::{Parameter, Registers}; -use leo_errors::{new_backtrace, CompilerError, Result, Span}; +use leo_errors::{CompilerError, Result, Span}; use snarkvm_fields::PrimeField; @@ -55,7 +55,7 @@ impl OutputBytes { // Return an error if we do not have enough return registers if register_values.len() < return_values.len() { - return Err(CompilerError::output_not_enough_registers(span, new_backtrace()).into()); + return Err(CompilerError::output_not_enough_registers(span).into()); } // Manually construct result string @@ -73,13 +73,7 @@ impl OutputBytes { let return_value_type = value.to_type(span)?; if !register_type.is_assignable_from(&return_value_type) { - return Err(CompilerError::output_mismatched_types( - register_type, - return_value_type, - span, - new_backtrace(), - ) - .into()); + return Err(CompilerError::output_mismatched_types(register_type, return_value_type, span).into()); } let value = value.to_string(); diff --git a/compiler/src/output/output_file.rs b/compiler/src/output/output_file.rs index 76cd9f5f20..d0c3229bf4 100644 --- a/compiler/src/output/output_file.rs +++ b/compiler/src/output/output_file.rs @@ -16,7 +16,7 @@ //! The `program.out` file. -use leo_errors::{new_backtrace, CompilerError, Result}; +use leo_errors::{CompilerError, Result}; use std::{ borrow::Cow, @@ -46,11 +46,11 @@ impl OutputFile { pub fn write(&self, path: &Path, bytes: &[u8]) -> Result<()> { // create output file let path = self.setup_file_path(path); - let mut file = File::create(&path).map_err(|e| CompilerError::output_file_io_error(e, new_backtrace()))?; + let mut file = File::create(&path).map_err(|e| CompilerError::output_file_io_error(e))?; Ok(file .write_all(bytes) - .map_err(|e| CompilerError::output_file_io_error(e, new_backtrace()))?) + .map_err(|e| CompilerError::output_file_io_error(e))?) } /// Removes the output file at the given path if it exists. Returns `true` on success, @@ -61,7 +61,7 @@ impl OutputFile { return Ok(false); } - fs::remove_file(&path).map_err(|_| CompilerError::output_file_cannot_remove(path, new_backtrace()))?; + fs::remove_file(&path).map_err(|_| CompilerError::output_file_cannot_remove(path))?; Ok(true) } diff --git a/compiler/src/phases/reducing_director.rs b/compiler/src/phases/reducing_director.rs index faad243de0..c7082c7f72 100644 --- a/compiler/src/phases/reducing_director.rs +++ b/compiler/src/phases/reducing_director.rs @@ -97,7 +97,7 @@ use leo_ast::{ UnaryExpression as AstUnaryExpression, ValueExpression, }; -use leo_errors::{new_backtrace, AstError, Result, Span}; +use leo_errors::{AstError, Result, Span}; use tendril::StrTendril; pub trait CombinerOptions { @@ -542,7 +542,7 @@ impl CombineAstAsgDirector { if let AsgStatement::Block(asg_block) = asg.result.get() { block = self.reduce_block(&ast.block, asg_block)?; } else { - return Err(AstError::asg_statement_not_block(asg.span.as_ref().unwrap(), new_backtrace()).into()); + return Err(AstError::asg_statement_not_block(asg.span.as_ref().unwrap()).into()); } let next = match (ast.next.as_ref(), asg.next.get()) { (Some(ast_next), Some(asg_next)) => Some(self.reduce_statement(ast_next, asg_next)?), @@ -580,9 +580,7 @@ impl CombineAstAsgDirector { AstConsoleFunction::Error(_) => AstConsoleFunction::Error(args), AstConsoleFunction::Log(_) => AstConsoleFunction::Log(args), _ => { - return Err( - AstError::impossible_console_assert_call(&ast_console_args.span, new_backtrace()).into(), - ); + return Err(AstError::impossible_console_assert_call(&ast_console_args.span).into()); } } } @@ -650,7 +648,7 @@ impl CombineAstAsgDirector { if let AsgStatement::Block(asg_block) = asg.body.get() { block = self.reduce_block(&ast.block, asg_block)?; } else { - return Err(AstError::asg_statement_not_block(asg.span.as_ref().unwrap(), new_backtrace()).into()); + return Err(AstError::asg_statement_not_block(asg.span.as_ref().unwrap()).into()); } self.ast_reducer diff --git a/compiler/src/prelude/blake2s.rs b/compiler/src/prelude/blake2s.rs index 378f2a19e2..be2be97514 100644 --- a/compiler/src/prelude/blake2s.rs +++ b/compiler/src/prelude/blake2s.rs @@ -17,7 +17,7 @@ use super::CoreCircuit; use crate::{ConstrainedValue, GroupType, Integer}; use leo_asg::Function; -use leo_errors::{new_backtrace, CompilerError, Result, Span}; +use leo_errors::{CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::{ @@ -62,15 +62,13 @@ impl<'a, F: PrimeField, G: GroupType> CoreCircuit<'a, F, G> for Blake2s { let input = unwrap_argument(arguments.remove(1)); let seed = unwrap_argument(arguments.remove(0)); - let digest = - Blake2sGadget::check_evaluation_gadget(cs.ns(|| "blake2s hash"), &seed[..], &input[..]).map_err(|e| { - CompilerError::cannot_enforce_expression("Blake2s check evaluation gadget", e, span, new_backtrace()) - })?; + let digest = Blake2sGadget::check_evaluation_gadget(cs.ns(|| "blake2s hash"), &seed[..], &input[..]) + .map_err(|e| CompilerError::cannot_enforce_expression("Blake2s check evaluation gadget", e, span))?; Ok(ConstrainedValue::Array( digest .to_bytes(cs) - .map_err(|e| CompilerError::cannot_enforce_expression("Vec ToBytes", e, span, new_backtrace()))? + .map_err(|e| CompilerError::cannot_enforce_expression("Vec ToBytes", e, span))? .into_iter() .map(Integer::U8) .map(ConstrainedValue::Integer) diff --git a/compiler/src/statement/assign/assign.rs b/compiler/src/statement/assign/assign.rs index 5ee60a3ad1..8fbf0af1e8 100644 --- a/compiler/src/statement/assign/assign.rs +++ b/compiler/src/statement/assign/assign.rs @@ -18,7 +18,7 @@ use crate::{arithmetic::*, program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::{AssignOperation, AssignStatement}; -use leo_errors::{new_backtrace, CompilerError, Result, Span}; +use leo_errors::{CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::{boolean::Boolean, traits::select::CondSelectGadget}; @@ -59,7 +59,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { _ => unimplemented!("unimplemented assign operator"), }; let selected_value = ConstrainedValue::conditionally_select(cs.ns(|| scope), condition, &new_value, target) - .map_err(|_| CompilerError::statement_select_fail(new_value, target.clone(), span, new_backtrace()))?; + .map_err(|_| CompilerError::statement_select_fail(new_value, target.clone(), span))?; *target = selected_value; Ok(()) diff --git a/compiler/src/statement/assign/assignee/array_index.rs b/compiler/src/statement/assign/assignee/array_index.rs index c3532dba3a..a08064e7d3 100644 --- a/compiler/src/statement/assign/assignee/array_index.rs +++ b/compiler/src/statement/assign/assignee/array_index.rs @@ -20,7 +20,7 @@ use std::convert::TryInto; use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType, Integer}; use leo_asg::{ConstInt, Expression, Node}; -use leo_errors::{new_backtrace, CompilerError, Result}; +use leo_errors::{CompilerError, Result}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::traits::{eq::EvaluateEqGadget, select::CondSelectGadget}; @@ -43,13 +43,10 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { ConstrainedValue::Array(input) => { if let Some(index) = index_resolved.to_usize() { if index >= input.len() { - Err(CompilerError::statement_array_assign_index_bounds( - index, - input.len(), - &context.span, - new_backtrace(), + Err( + CompilerError::statement_array_assign_index_bounds(index, input.len(), &context.span) + .into(), ) - .into()) } else { let target = input.get_mut(index).unwrap(); if context.remaining_accesses.is_empty() { @@ -65,7 +62,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let array_len: u32 = input .len() .try_into() - .map_err(|_| CompilerError::array_length_out_of_bounds(&span, new_backtrace()))?; + .map_err(|_| CompilerError::array_length_out_of_bounds(&span))?; self.array_bounds_check(cs, &index_resolved, array_len, &span)?; } @@ -78,11 +75,11 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let index_bounded = i .try_into() - .map_err(|_| CompilerError::array_index_out_of_legal_bounds(&span, new_backtrace()))?; + .map_err(|_| CompilerError::array_index_out_of_legal_bounds(&span))?; let const_index = ConstInt::U32(index_bounded).cast_to(&index_resolved.get_type()); let index_comparison = index_resolved .evaluate_equal(eq_namespace, &Integer::new(&const_index)) - .map_err(|_| CompilerError::cannot_evaluate_expression("==", &span, new_backtrace()))?; + .map_err(|_| CompilerError::cannot_evaluate_expression("==", &span))?; let mut unique_namespace = cs.ns(|| { format!( @@ -115,32 +112,21 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { &temp_item, item, ) - .map_err(|e| { - CompilerError::cannot_enforce_expression( - "conditional select", - e, - &span, - new_backtrace(), - ) - })?; + .map_err(|e| CompilerError::cannot_enforce_expression("conditional select", e, &span))?; *item = value; } Ok(()) } } - _ => Err(CompilerError::statement_array_assign_interior_index(&context.span, new_backtrace()).into()), + _ => Err(CompilerError::statement_array_assign_interior_index(&context.span).into()), } } else if context.from_range && input_len != 0 { context.from_range = false; if let Some(index) = index_resolved.to_usize() { if index >= input_len { - return Err(CompilerError::statement_array_assign_index_bounds( - index, - input_len, - &context.span, - new_backtrace(), - ) - .into()); + return Err( + CompilerError::statement_array_assign_index_bounds(index, input_len, &context.span).into(), + ); } let target = context.input.remove(index); @@ -158,7 +144,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { .input .len() .try_into() - .map_err(|_| CompilerError::array_length_out_of_bounds(&span, new_backtrace()))?; + .map_err(|_| CompilerError::array_length_out_of_bounds(&span))?; self.array_bounds_check(cs, &index_resolved, array_len, &span)?; } @@ -171,11 +157,11 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let index_bounded = i .try_into() - .map_err(|_| CompilerError::array_index_out_of_legal_bounds(&span, new_backtrace()))?; + .map_err(|_| CompilerError::array_index_out_of_legal_bounds(&span))?; let const_index = ConstInt::U32(index_bounded).cast_to(&index_resolved.get_type()); let index_comparison = index_resolved .evaluate_equal(eq_namespace, &Integer::new(&const_index)) - .map_err(|_| CompilerError::cannot_evaluate_expression("==", &span, new_backtrace()))?; + .map_err(|_| CompilerError::cannot_evaluate_expression("==", &span))?; let mut unique_namespace = cs.ns(|| { format!( @@ -204,15 +190,13 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { }; let value = ConstrainedValue::conditionally_select(unique_namespace, &index_comparison, &temp_item, item) - .map_err(|e| { - CompilerError::cannot_enforce_expression("conditional select", e, &span, new_backtrace()) - })?; + .map_err(|e| CompilerError::cannot_enforce_expression("conditional select", e, &span))?; **item = value; } Ok(()) } } else { - Err(CompilerError::statement_array_assign_interior_index(&context.span, new_backtrace()).into()) + Err(CompilerError::statement_array_assign_interior_index(&context.span).into()) } } } diff --git a/compiler/src/statement/assign/assignee/array_range_index.rs b/compiler/src/statement/assign/assignee/array_range_index.rs index 66f7c833b4..aa5234d707 100644 --- a/compiler/src/statement/assign/assignee/array_range_index.rs +++ b/compiler/src/statement/assign/assignee/array_range_index.rs @@ -18,7 +18,7 @@ use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::Expression; -use leo_errors::{new_backtrace, CompilerError, Result}; +use leo_errors::{CompilerError, Result}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -38,7 +38,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { .transpose()? .map(|x| { x.to_usize() - .ok_or_else(|| CompilerError::statement_array_assign_index_const(&context.span, new_backtrace())) + .ok_or_else(|| CompilerError::statement_array_assign_index_const(&context.span)) }) .transpose()?; let stop_index = stop @@ -46,7 +46,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { .transpose()? .map(|x| { x.to_usize() - .ok_or_else(|| CompilerError::statement_array_assign_index_const(&context.span, new_backtrace())) + .ok_or_else(|| CompilerError::statement_array_assign_index_const(&context.span)) }) .transpose()?; let start_index = start_index.unwrap_or(0); @@ -75,7 +75,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { } Ok(()) } - _ => Err(CompilerError::statement_array_assign_index(&context.span, new_backtrace()).into()), + _ => Err(CompilerError::statement_array_assign_index(&context.span).into()), } } else { // range of a range diff --git a/compiler/src/statement/assign/assignee/member.rs b/compiler/src/statement/assign/assignee/member.rs index 7f73029a31..ac4fef1bcf 100644 --- a/compiler/src/statement/assign/assignee/member.rs +++ b/compiler/src/statement/assign/assignee/member.rs @@ -16,7 +16,7 @@ use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::Identifier; -use leo_errors::{new_backtrace, CompilerError, Result}; +use leo_errors::{CompilerError, Result}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -31,7 +31,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { name: &Identifier, ) -> Result<()> { if context.input.len() != 1 { - return Err(CompilerError::statement_array_assign_interior_index(&context.span, new_backtrace()).into()); + return Err(CompilerError::statement_array_assign_interior_index(&context.span).into()); } match context.input.remove(0) { ConstrainedValue::CircuitExpression(_variable, members) => { @@ -45,15 +45,12 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { } None => { // Throw an error if the circuit variable does not exist in the circuit - Err( - CompilerError::statement_undefined_circuit_variable(name, &context.span, new_backtrace()) - .into(), - ) + Err(CompilerError::statement_undefined_circuit_variable(name, &context.span).into()) } } } // Throw an error if the circuit definition does not exist in the file - x => Err(CompilerError::undefined_circuit(x, &context.span, new_backtrace()).into()), + x => Err(CompilerError::undefined_circuit(x, &context.span).into()), } } } diff --git a/compiler/src/statement/assign/assignee/mod.rs b/compiler/src/statement/assign/assignee/mod.rs index ade94837d5..d35280892c 100644 --- a/compiler/src/statement/assign/assignee/mod.rs +++ b/compiler/src/statement/assign/assignee/mod.rs @@ -18,7 +18,7 @@ use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::{AssignAccess, AssignOperation, AssignStatement}; -use leo_errors::{new_backtrace, CompilerError, Result, Span}; +use leo_errors::{CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::boolean::Boolean; @@ -111,14 +111,11 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { pub(crate) fn check_range_index(start_index: usize, stop_index: usize, len: usize, span: &Span) -> Result<()> { if stop_index < start_index { - Err( - CompilerError::statement_array_assign_range_order(start_index, stop_index, len, span, new_backtrace()) - .into(), - ) + Err(CompilerError::statement_array_assign_range_order(start_index, stop_index, len, span).into()) } else if start_index > len { - Err(CompilerError::statement_array_assign_index_bounds(start_index, len, span, new_backtrace()).into()) + Err(CompilerError::statement_array_assign_index_bounds(start_index, len, span).into()) } else if stop_index > len { - Err(CompilerError::statement_array_assign_index_bounds(stop_index, len, span, new_backtrace()).into()) + Err(CompilerError::statement_array_assign_index_bounds(stop_index, len, span).into()) } else { Ok(()) } diff --git a/compiler/src/statement/assign/assignee/tuple.rs b/compiler/src/statement/assign/assignee/tuple.rs index 2a56d9122c..7cf32c1edd 100644 --- a/compiler/src/statement/assign/assignee/tuple.rs +++ b/compiler/src/statement/assign/assignee/tuple.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; -use leo_errors::{new_backtrace, CompilerError, Result}; +use leo_errors::{CompilerError, Result}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -30,24 +30,18 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { index: usize, ) -> Result<()> { if context.input.len() != 1 { - return Err(CompilerError::statement_array_assign_interior_index(&context.span, new_backtrace()).into()); + return Err(CompilerError::statement_array_assign_interior_index(&context.span).into()); } match context.input.remove(0) { ConstrainedValue::Tuple(old) => { if index > old.len() { - Err(CompilerError::statement_tuple_assign_index_bounds( - index, - old.len(), - &context.span, - new_backtrace(), - ) - .into()) + Err(CompilerError::statement_tuple_assign_index_bounds(index, old.len(), &context.span).into()) } else { context.input = vec![&mut old[index]]; self.resolve_target_access(cs, context) } } - _ => Err(CompilerError::statement_tuple_assign_index(&context.span, new_backtrace()).into()), + _ => Err(CompilerError::statement_tuple_assign_index(&context.span).into()), } } } diff --git a/compiler/src/statement/conditional/conditional.rs b/compiler/src/statement/conditional/conditional.rs index de04f77092..c37a4a336d 100644 --- a/compiler/src/statement/conditional/conditional.rs +++ b/compiler/src/statement/conditional/conditional.rs @@ -24,7 +24,7 @@ use crate::{ StatementResult, }; use leo_asg::ConditionalStatement; -use leo_errors::{new_backtrace, CompilerError}; +use leo_errors::CompilerError; use snarkvm_fields::PrimeField; use snarkvm_gadgets::boolean::Boolean; @@ -60,7 +60,6 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { return Err(CompilerError::conditional_boolean_expression_fails_to_resolve_to_bool( value.to_string(), &span, - new_backtrace(), ) .into()); } @@ -78,7 +77,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { outer_indicator, &inner_indicator, ) - .map_err(|_| CompilerError::statement_indicator_calculation(branch_1_name, &span, new_backtrace()))?; + .map_err(|_| CompilerError::statement_indicator_calculation(branch_1_name, &span))?; let mut results = vec![]; @@ -99,7 +98,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { outer_indicator, &inner_indicator, ) - .map_err(|_| CompilerError::statement_indicator_calculation(branch_2_name, &span, new_backtrace()))?; + .map_err(|_| CompilerError::statement_indicator_calculation(branch_2_name, &span))?; // Evaluate branch 2 let mut branch_2_result = match statement.next.get() { diff --git a/compiler/src/statement/definition/definition.rs b/compiler/src/statement/definition/definition.rs index 369ed7374d..586ff67e42 100644 --- a/compiler/src/statement/definition/definition.rs +++ b/compiler/src/statement/definition/definition.rs @@ -18,7 +18,7 @@ use crate::{program::ConstrainedProgram, ConstrainedValue, GroupType}; use leo_asg::{DefinitionStatement, Variable}; -use leo_errors::{new_backtrace, CompilerError, Result, Span}; +use leo_errors::{CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::ConstraintSystem; @@ -35,7 +35,6 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { values.len(), variable_names.len(), span, - new_backtrace(), ) .into()); } @@ -67,7 +66,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { // ConstrainedValue::Return(values) => values, ConstrainedValue::Tuple(values) => values, value => { - return Err(CompilerError::statement_multiple_definition(value, &span, new_backtrace()).into()); + return Err(CompilerError::statement_multiple_definition(value, &span).into()); } }; diff --git a/compiler/src/statement/iteration/iteration.rs b/compiler/src/statement/iteration/iteration.rs index 229a2962bc..801811e4be 100644 --- a/compiler/src/statement/iteration/iteration.rs +++ b/compiler/src/statement/iteration/iteration.rs @@ -26,7 +26,7 @@ use crate::{ StatementResult, }; use leo_asg::IterationStatement; -use leo_errors::{new_backtrace, CompilerError}; +use leo_errors::CompilerError; use snarkvm_fields::PrimeField; use snarkvm_gadgets::{boolean::Boolean, integers::uint::UInt32}; @@ -47,11 +47,11 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let from = self .enforce_index(cs, statement.start.get(), &span)? .to_usize() - .ok_or_else(|| CompilerError::statement_loop_index_const(&span, new_backtrace()))?; + .ok_or_else(|| CompilerError::statement_loop_index_const(&span))?; let to = self .enforce_index(cs, statement.stop.get(), &span)? .to_usize() - .ok_or_else(|| CompilerError::statement_loop_index_const(&span, new_backtrace()))?; + .ok_or_else(|| CompilerError::statement_loop_index_const(&span))?; let iter: Box> = match (from < to, statement.inclusive) { (true, true) => Box::new(from..=to), diff --git a/compiler/src/statement/statement.rs b/compiler/src/statement/statement.rs index 970600ad62..81bc267226 100644 --- a/compiler/src/statement/statement.rs +++ b/compiler/src/statement/statement.rs @@ -18,7 +18,7 @@ use crate::{program::ConstrainedProgram, value::ConstrainedValue, GroupType}; use leo_asg::{Node, Statement}; -use leo_errors::{new_backtrace, CompilerError, Result}; +use leo_errors::{CompilerError, Result}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::boolean::Boolean; @@ -82,11 +82,9 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { } } _ => { - return Err(CompilerError::statement_unassigned( - &statement.span.clone().unwrap_or_default(), - new_backtrace(), - ) - .into()); + return Err( + CompilerError::statement_unassigned(&statement.span.clone().unwrap_or_default()).into(), + ); } } } diff --git a/compiler/src/value/address/address.rs b/compiler/src/value/address/address.rs index 9d6bfc1d17..4c59110e40 100644 --- a/compiler/src/value/address/address.rs +++ b/compiler/src/value/address/address.rs @@ -16,7 +16,7 @@ use crate::{ConstrainedValue, GroupType, IntegerTrait}; use leo_ast::InputValue; -use leo_errors::{new_backtrace, CompilerError, Result, Span}; +use leo_errors::{CompilerError, Result, Span}; use snarkvm_dpc::{account::Address as AleoAddress, testnet1::instantiated::Components}; use snarkvm_fields::PrimeField; @@ -42,8 +42,8 @@ pub struct Address { impl Address { pub(crate) fn constant(address: String, span: &Span) -> Result { - let address = AleoAddress::from_str(&address) - .map_err(|e| CompilerError::address_value_account_error(e, span, new_backtrace()))?; + let address = + AleoAddress::from_str(&address).map_err(|e| CompilerError::address_value_account_error(e, span))?; let mut address_bytes = vec![]; address.write_le(&mut address_bytes).unwrap(); @@ -72,7 +72,7 @@ impl Address { if let InputValue::Address(string) = input { Some(string) } else { - return Err(CompilerError::address_value_invalid_address(name, span, new_backtrace()).into()); + return Err(CompilerError::address_value_invalid_address(name, span).into()); } } None => None, @@ -82,7 +82,7 @@ impl Address { cs.ns(|| format!("`{}: address` {}:{}", name, span.line_start, span.col_start)), || address_value.ok_or(SynthesisError::AssignmentMissing), ) - .map_err(|_| CompilerError::address_value_missing_address(span, new_backtrace()))?; + .map_err(|_| CompilerError::address_value_missing_address(span))?; Ok(ConstrainedValue::Address(address)) } diff --git a/compiler/src/value/boolean/input.rs b/compiler/src/value/boolean/input.rs index cc20523092..bcba6e7616 100644 --- a/compiler/src/value/boolean/input.rs +++ b/compiler/src/value/boolean/input.rs @@ -18,7 +18,7 @@ use crate::{value::ConstrainedValue, GroupType}; use leo_ast::InputValue; -use leo_errors::{new_backtrace, CompilerError, Result, Span}; +use leo_errors::{CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::{boolean::Boolean, traits::alloc::AllocGadget}; @@ -34,7 +34,7 @@ pub(crate) fn allocate_bool>( cs.ns(|| format!("`{}: bool` {}:{}", name, span.line_start, span.col_start)), || option.ok_or(SynthesisError::AssignmentMissing), ) - .map_err(|_| CompilerError::boolean_value_missing_boolean(format!("{}: bool", name), span, new_backtrace()))?) + .map_err(|_| CompilerError::boolean_value_missing_boolean(format!("{}: bool", name), span))?) } pub(crate) fn bool_from_input<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( @@ -49,7 +49,7 @@ pub(crate) fn bool_from_input<'a, F: PrimeField, G: GroupType, CS: Constraint if let InputValue::Boolean(bool) = input { Some(bool) } else { - return Err(CompilerError::boolean_value_invalid_boolean(name, span, new_backtrace()).into()); + return Err(CompilerError::boolean_value_invalid_boolean(name, span).into()); } } None => None, diff --git a/compiler/src/value/char/char.rs b/compiler/src/value/char/char.rs index 65bf190ff7..25668bb8f7 100644 --- a/compiler/src/value/char/char.rs +++ b/compiler/src/value/char/char.rs @@ -21,7 +21,7 @@ use crate::{ }; use leo_ast::InputValue; -use leo_errors::{new_backtrace, CompilerError, Result, Span}; +use leo_errors::{CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::{ @@ -155,7 +155,7 @@ pub(crate) fn char_from_input<'a, F: PrimeField, G: GroupType, CS: Constraint } } } else { - return Err(CompilerError::char_value_invalid_char(input, span, new_backtrace()).into()); + return Err(CompilerError::char_value_invalid_char(input, span).into()); } } None => (CharType::Scalar(0 as char), None), diff --git a/compiler/src/value/field/field_type.rs b/compiler/src/value/field/field_type.rs index 6008f1a13f..0dbef30991 100644 --- a/compiler/src/value/field/field_type.rs +++ b/compiler/src/value/field/field_type.rs @@ -17,7 +17,7 @@ //! A data type that represents a field value use crate::number_string_typing; -use leo_errors::{new_backtrace, CompilerError, Result, Span}; +use leo_errors::{CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::{ @@ -50,14 +50,16 @@ impl FieldType { let number_info = number_string_typing(&string); let value = match number_info { - (number, neg) if neg => -F::from_str(&number) - .map_err(|_| CompilerError::field_value_invalid_field(string.clone(), span, new_backtrace()))?, - (number, _) => F::from_str(&number) - .map_err(|_| CompilerError::field_value_invalid_field(string.clone(), span, new_backtrace()))?, + (number, neg) if neg => { + -F::from_str(&number).map_err(|_| CompilerError::field_value_invalid_field(string.clone(), span))? + } + (number, _) => { + F::from_str(&number).map_err(|_| CompilerError::field_value_invalid_field(string.clone(), span))? + } }; let value = FpGadget::alloc_constant(cs, || Ok(value)) - .map_err(|_| CompilerError::field_value_invalid_field(string, span, new_backtrace()))?; + .map_err(|_| CompilerError::field_value_invalid_field(string, span))?; Ok(FieldType(value)) } @@ -67,7 +69,7 @@ impl FieldType { let result = self .0 .negate(cs) - .map_err(|e| CompilerError::field_value_negate_operation(e, span, new_backtrace()))?; + .map_err(|e| CompilerError::field_value_negate_operation(e, span))?; Ok(FieldType(result)) } @@ -77,7 +79,7 @@ impl FieldType { let value = self .0 .add(cs, &other.0) - .map_err(|e| CompilerError::field_value_binary_operation("+", e, span, new_backtrace()))?; + .map_err(|e| CompilerError::field_value_binary_operation("+", e, span))?; Ok(FieldType(value)) } @@ -87,7 +89,7 @@ impl FieldType { let value = self .0 .sub(cs, &other.0) - .map_err(|e| CompilerError::field_value_binary_operation("-", e, span, new_backtrace()))?; + .map_err(|e| CompilerError::field_value_binary_operation("-", e, span))?; Ok(FieldType(value)) } @@ -97,7 +99,7 @@ impl FieldType { let value = self .0 .mul(cs, &other.0) - .map_err(|e| CompilerError::field_value_binary_operation("*", e, span, new_backtrace()))?; + .map_err(|e| CompilerError::field_value_binary_operation("*", e, span))?; Ok(FieldType(value)) } @@ -107,7 +109,7 @@ impl FieldType { let value = self .0 .inverse(cs) - .map_err(|e| CompilerError::field_value_binary_operation("inv", e, span, new_backtrace()))?; + .map_err(|e| CompilerError::field_value_binary_operation("inv", e, span))?; Ok(FieldType(value)) } diff --git a/compiler/src/value/field/input.rs b/compiler/src/value/field/input.rs index eb3dceb5a1..350b659f71 100644 --- a/compiler/src/value/field/input.rs +++ b/compiler/src/value/field/input.rs @@ -18,7 +18,7 @@ use crate::{number_string_typing, value::ConstrainedValue, FieldType, GroupType}; use leo_ast::InputValue; -use leo_errors::{new_backtrace, CompilerError, Result, Span}; +use leo_errors::{CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_gadgets::traits::alloc::AllocGadget; @@ -40,22 +40,16 @@ pub(crate) fn allocate_field>( || Some(number).ok_or(SynthesisError::AssignmentMissing), ) .map(|value| value.negate(cs, span)) - .map_err(|_| { - CompilerError::field_value_missing_field(format!("{}: field", name), span, new_backtrace()) - })?, + .map_err(|_| CompilerError::field_value_missing_field(format!("{}: field", name), span))?, (number, _) => Ok(FieldType::alloc( cs.ns(|| format!("`{}: field` {}:{}", name, span.line_start, span.col_start)), || Some(number).ok_or(SynthesisError::AssignmentMissing), ) - .map_err(|_| { - CompilerError::field_value_missing_field(format!("{}: field", name), span, new_backtrace()) - })?), + .map_err(|_| CompilerError::field_value_missing_field(format!("{}: field", name), span))?), } } None => { - return Err( - CompilerError::field_value_missing_field(format!("{}: field", name), span, new_backtrace()).into(), - ); + return Err(CompilerError::field_value_missing_field(format!("{}: field", name), span).into()); } } } @@ -72,7 +66,7 @@ pub(crate) fn field_from_input<'a, F: PrimeField, G: GroupType, CS: Constrain if let InputValue::Field(string) = input { Some(string) } else { - return Err(CompilerError::field_value_invalid_field(input, span, new_backtrace()).into()); + return Err(CompilerError::field_value_invalid_field(input, span).into()); } } None => None, diff --git a/compiler/src/value/group/input.rs b/compiler/src/value/group/input.rs index 77181ac26e..839db2b52d 100644 --- a/compiler/src/value/group/input.rs +++ b/compiler/src/value/group/input.rs @@ -19,7 +19,7 @@ use crate::{ConstrainedValue, GroupType}; use leo_asg::GroupValue; use leo_ast::InputValue; -use leo_errors::{new_backtrace, CompilerError, Result, Span}; +use leo_errors::{CompilerError, Result, Span}; use snarkvm_fields::PrimeField; use snarkvm_r1cs::{ConstraintSystem, SynthesisError}; @@ -34,7 +34,7 @@ pub(crate) fn allocate_group, CS: ConstraintSyste cs.ns(|| format!("`{}: group` {}:{}", name, span.line_start, span.col_start)), || option.ok_or(SynthesisError::AssignmentMissing), ) - .map_err(|_| CompilerError::group_value_missing_group(format!("{}: group", name), span, new_backtrace()))?) + .map_err(|_| CompilerError::group_value_missing_group(format!("{}: group", name), span))?) } pub(crate) fn group_from_input<'a, F: PrimeField, G: GroupType, CS: ConstraintSystem>( @@ -49,7 +49,7 @@ pub(crate) fn group_from_input<'a, F: PrimeField, G: GroupType, CS: Constrain if let InputValue::Group(string) = input { Some(string) } else { - return Err(CompilerError::group_value_missing_group(input, span, new_backtrace()).into()); + return Err(CompilerError::group_value_missing_group(input, span).into()); } } None => None, diff --git a/compiler/src/value/group/targets/edwards_bls12.rs b/compiler/src/value/group/targets/edwards_bls12.rs index 15107fb394..041332b42b 100644 --- a/compiler/src/value/group/targets/edwards_bls12.rs +++ b/compiler/src/value/group/targets/edwards_bls12.rs @@ -16,7 +16,7 @@ use crate::{number_string_typing, GroupType}; use leo_asg::{GroupCoordinate, GroupValue}; -use leo_errors::{new_backtrace, CompilerError, Result, Span}; +use leo_errors::{CompilerError, Result, Span}; use snarkvm_curves::{ edwards_bls12::{EdwardsAffine, EdwardsParameters, Fq}, @@ -63,7 +63,7 @@ impl GroupType for EdwardsGroupType { Ok(self .allocated(cs.ns(|| format!("allocate affine point {}:{}", span.line_start, span.col_start))) .map(|ebg| EdwardsGroupType::Allocated(Box::new(ebg))) - .map_err(|e| CompilerError::group_value_synthesis_error(e, span, new_backtrace()))?) + .map_err(|e| CompilerError::group_value_synthesis_error(e, span))?) } fn negate>(&self, cs: CS, span: &Span) -> Result { @@ -71,7 +71,7 @@ impl GroupType for EdwardsGroupType { EdwardsGroupType::Constant(group) => Ok(EdwardsGroupType::Constant(group.neg())), EdwardsGroupType::Allocated(group) => { let result = , Fq>>::negate(group, cs) - .map_err(|e| CompilerError::group_value_negate_operation(e, span, new_backtrace()))?; + .map_err(|e| CompilerError::group_value_negate_operation(e, span))?; Ok(EdwardsGroupType::Allocated(Box::new(result))) } @@ -90,7 +90,7 @@ impl GroupType for EdwardsGroupType { cs, other_value, ) - .map_err(|e| CompilerError::group_value_binary_operation("+", e, span, new_backtrace()))?; + .map_err(|e| CompilerError::group_value_binary_operation("+", e, span))?; Ok(EdwardsGroupType::Allocated(Box::new(result))) } @@ -100,7 +100,7 @@ impl GroupType for EdwardsGroupType { Ok(EdwardsGroupType::Allocated(Box::new( allocated_value .add_constant(cs, constant_value) - .map_err(|e| CompilerError::group_value_binary_operation("+", e, span, new_backtrace()))?, + .map_err(|e| CompilerError::group_value_binary_operation("+", e, span))?, ))) } } @@ -118,7 +118,7 @@ impl GroupType for EdwardsGroupType { cs, other_value, ) - .map_err(|e| CompilerError::group_value_binary_operation("-", e, span, new_backtrace()))?; + .map_err(|e| CompilerError::group_value_binary_operation("-", e, span))?; Ok(EdwardsGroupType::Allocated(Box::new(result))) } @@ -128,7 +128,7 @@ impl GroupType for EdwardsGroupType { Ok(EdwardsGroupType::Allocated(Box::new( allocated_value .sub_constant(cs, constant_value) - .map_err(|e| CompilerError::group_value_binary_operation("-", e, span, new_backtrace()))?, + .map_err(|e| CompilerError::group_value_binary_operation("-", e, span))?, ))) } } @@ -151,10 +151,12 @@ impl EdwardsGroupType { } else { let one = edwards_affine_one(); let number_value = match number_info { - (number, neg) if neg => -Fp256::from_str(&number) - .map_err(|_| CompilerError::group_value_n_group(number, span, new_backtrace()))?, - (number, _) => Fp256::from_str(&number) - .map_err(|_| CompilerError::group_value_n_group(number, span, new_backtrace()))?, + (number, neg) if neg => { + -Fp256::from_str(&number).map_err(|_| CompilerError::group_value_n_group(number, span))? + } + (number, _) => { + Fp256::from_str(&number).map_err(|_| CompilerError::group_value_n_group(number, span))? + } }; let result: EdwardsAffine = one.mul(number_value); @@ -202,9 +204,7 @@ impl EdwardsGroupType { } // Invalid (x, y) => { - return Err( - CompilerError::group_value_invalid_group(format!("({}, {})", x, y), span, new_backtrace()).into(), - ); + return Err(CompilerError::group_value_invalid_group(format!("({}, {})", x, y), span).into()); } } } @@ -216,16 +216,16 @@ impl EdwardsGroupType { element_span: &Span, ) -> Result { let x = match x_info { - (x_str, neg) if neg => -Fq::from_str(&x_str) - .map_err(|_| CompilerError::group_value_x_invalid(x_str, x_span, new_backtrace()))?, - (x_str, _) => Fq::from_str(&x_str) - .map_err(|_| CompilerError::group_value_x_invalid(x_str, x_span, new_backtrace()))?, + (x_str, neg) if neg => { + -Fq::from_str(&x_str).map_err(|_| CompilerError::group_value_x_invalid(x_str, x_span))? + } + (x_str, _) => Fq::from_str(&x_str).map_err(|_| CompilerError::group_value_x_invalid(x_str, x_span))?, }; match greatest { // Sign provided Some(greatest) => Ok(EdwardsAffine::from_x_coordinate(x, greatest) - .ok_or_else(|| CompilerError::group_value_x_recover(element_span, new_backtrace()))?), + .ok_or_else(|| CompilerError::group_value_x_recover(element_span))?), // Sign inferred None => { // Attempt to recover with a sign_low bit. @@ -239,7 +239,7 @@ impl EdwardsGroupType { } // Otherwise return error. - Err(CompilerError::group_value_x_recover(element_span, new_backtrace()).into()) + Err(CompilerError::group_value_x_recover(element_span).into()) } } } @@ -251,16 +251,16 @@ impl EdwardsGroupType { element_span: &Span, ) -> Result { let y = match y_info { - (y_str, neg) if neg => -Fq::from_str(&y_str) - .map_err(|_| CompilerError::group_value_y_invalid(y_str, y_span, new_backtrace()))?, - (y_str, _) => Fq::from_str(&y_str) - .map_err(|_| CompilerError::group_value_y_invalid(y_str, y_span, new_backtrace()))?, + (y_str, neg) if neg => { + -Fq::from_str(&y_str).map_err(|_| CompilerError::group_value_y_invalid(y_str, y_span))? + } + (y_str, _) => Fq::from_str(&y_str).map_err(|_| CompilerError::group_value_y_invalid(y_str, y_span))?, }; match greatest { // Sign provided Some(greatest) => Ok(EdwardsAffine::from_y_coordinate(y, greatest) - .ok_or_else(|| CompilerError::group_value_y_recover(element_span, new_backtrace()))?), + .ok_or_else(|| CompilerError::group_value_y_recover(element_span))?), // Sign inferred None => { // Attempt to recover with a sign_low bit. @@ -274,7 +274,7 @@ impl EdwardsGroupType { } // Otherwise return error. - Err(CompilerError::group_value_y_recover(element_span, new_backtrace()).into()) + Err(CompilerError::group_value_y_recover(element_span).into()) } } } @@ -287,17 +287,17 @@ impl EdwardsGroupType { element_span: &Span, ) -> Result { let x = match x_info { - (x_str, neg) if neg => -Fq::from_str(&x_str) - .map_err(|_| CompilerError::group_value_x_invalid(x_str, x_span, new_backtrace()))?, - (x_str, _) => Fq::from_str(&x_str) - .map_err(|_| CompilerError::group_value_x_invalid(x_str, x_span, new_backtrace()))?, + (x_str, neg) if neg => { + -Fq::from_str(&x_str).map_err(|_| CompilerError::group_value_x_invalid(x_str, x_span))? + } + (x_str, _) => Fq::from_str(&x_str).map_err(|_| CompilerError::group_value_x_invalid(x_str, x_span))?, }; let y = match y_info { - (y_str, neg) if neg => -Fq::from_str(&y_str) - .map_err(|_| CompilerError::group_value_y_invalid(y_str, y_span, new_backtrace()))?, - (y_str, _) => Fq::from_str(&y_str) - .map_err(|_| CompilerError::group_value_y_invalid(y_str, y_span, new_backtrace()))?, + (y_str, neg) if neg => { + -Fq::from_str(&y_str).map_err(|_| CompilerError::group_value_y_invalid(y_str, y_span))? + } + (y_str, _) => Fq::from_str(&y_str).map_err(|_| CompilerError::group_value_y_invalid(y_str, y_span))?, }; let element = EdwardsAffine::new(x, y); @@ -305,7 +305,7 @@ impl EdwardsGroupType { if element.is_on_curve() { Ok(element) } else { - Err(CompilerError::group_value_not_on_curve(element, element_span, new_backtrace()).into()) + Err(CompilerError::group_value_not_on_curve(element, element_span).into()) } } diff --git a/compiler/src/value/integer/integer.rs b/compiler/src/value/integer/integer.rs index 5f7c276fa4..e379213e21 100644 --- a/compiler/src/value/integer/integer.rs +++ b/compiler/src/value/integer/integer.rs @@ -18,7 +18,7 @@ use crate::IntegerTrait; use leo_asg::{ConstInt, IntegerType}; use leo_ast::InputValue; -use leo_errors::{new_backtrace, CompilerError, Result, Span}; +use leo_errors::{CompilerError, Result, Span}; use snarkvm_fields::{Field, PrimeField}; use snarkvm_gadgets::{ @@ -161,17 +161,13 @@ impl Integer { if let InputValue::Integer(type_, number) = input { let asg_type = IntegerType::from(type_); if std::mem::discriminant(&asg_type) != std::mem::discriminant(integer_type) { - return Err(CompilerError::integer_value_integer_type_mismatch( - integer_type, - asg_type, - span, - new_backtrace(), - ) - .into()); + return Err( + CompilerError::integer_value_integer_type_mismatch(integer_type, asg_type, span).into(), + ); } Some(number) } else { - return Err(CompilerError::integer_value_invalid_integer(input, span, new_backtrace()).into()); + return Err(CompilerError::integer_value_invalid_integer(input, span).into()); } } None => None, @@ -187,7 +183,7 @@ impl Integer { let result = match_signed_integer!(a, span => a.neg(cs.ns(|| unique_namespace))); - Ok(result.ok_or_else(|| CompilerError::integer_value_negate_operation(span, new_backtrace()))?) + Ok(result.ok_or_else(|| CompilerError::integer_value_negate_operation(span))?) } pub fn add>(self, cs: &mut CS, other: Self, span: &Span) -> Result { @@ -198,7 +194,7 @@ impl Integer { let result = match_integers_span!((a, b), span => a.add(cs.ns(|| unique_namespace), &b)); - Ok(result.ok_or_else(|| CompilerError::integer_value_binary_operation("+", span, new_backtrace()))?) + Ok(result.ok_or_else(|| CompilerError::integer_value_binary_operation("+", span))?) } pub fn sub>(self, cs: &mut CS, other: Self, span: &Span) -> Result { @@ -209,7 +205,7 @@ impl Integer { let result = match_integers_span!((a, b), span => a.sub(cs.ns(|| unique_namespace), &b)); - Ok(result.ok_or_else(|| CompilerError::integer_value_binary_operation("-", span, new_backtrace()))?) + Ok(result.ok_or_else(|| CompilerError::integer_value_binary_operation("-", span))?) } pub fn mul>(self, cs: &mut CS, other: Self, span: &Span) -> Result { @@ -220,7 +216,7 @@ impl Integer { let result = match_integers_span!((a, b), span => a.mul(cs.ns(|| unique_namespace), &b)); - Ok(result.ok_or_else(|| CompilerError::integer_value_binary_operation("*", span, new_backtrace()))?) + Ok(result.ok_or_else(|| CompilerError::integer_value_binary_operation("*", span))?) } pub fn div>(self, cs: &mut CS, other: Self, span: &Span) -> Result { @@ -231,7 +227,7 @@ impl Integer { let result = match_integers_span!((a, b), span => a.div(cs.ns(|| unique_namespace), &b)); - Ok(result.ok_or_else(|| CompilerError::integer_value_binary_operation("÷", span, new_backtrace()))?) + Ok(result.ok_or_else(|| CompilerError::integer_value_binary_operation("÷", span))?) } pub fn pow>(self, cs: &mut CS, other: Self, span: &Span) -> Result { @@ -242,7 +238,7 @@ impl Integer { let result = match_integers_span!((a, b), span => a.pow(cs.ns(|| unique_namespace), &b)); - Ok(result.ok_or_else(|| CompilerError::integer_value_binary_operation("**", span, new_backtrace()))?) + Ok(result.ok_or_else(|| CompilerError::integer_value_binary_operation("**", span))?) } } diff --git a/compiler/src/value/integer/macros.rs b/compiler/src/value/integer/macros.rs index 9ebf29ccd6..67ae416946 100644 --- a/compiler/src/value/integer/macros.rs +++ b/compiler/src/value/integer/macros.rs @@ -55,31 +55,21 @@ macro_rules! match_unsigned_integer { macro_rules! match_signed_integer { ($integer: ident, $span: ident => $expression: expr) => { match $integer { - Integer::I8($integer) => { - Some(Integer::I8($expression.map_err(|e| { - CompilerError::integer_value_signed(e, $span, new_backtrace()) - })?)) - } - Integer::I16($integer) => { - Some(Integer::I16($expression.map_err(|e| { - CompilerError::integer_value_signed(e, $span, new_backtrace()) - })?)) - } - Integer::I32($integer) => { - Some(Integer::I32($expression.map_err(|e| { - CompilerError::integer_value_signed(e, $span, new_backtrace()) - })?)) - } - Integer::I64($integer) => { - Some(Integer::I64($expression.map_err(|e| { - CompilerError::integer_value_signed(e, $span, new_backtrace()) - })?)) - } - Integer::I128($integer) => { - Some(Integer::I128($expression.map_err(|e| { - CompilerError::integer_value_signed(e, $span, new_backtrace()) - })?)) - } + Integer::I8($integer) => Some(Integer::I8( + $expression.map_err(|e| CompilerError::integer_value_signed(e, $span))?, + )), + Integer::I16($integer) => Some(Integer::I16( + $expression.map_err(|e| CompilerError::integer_value_signed(e, $span))?, + )), + Integer::I32($integer) => Some(Integer::I32( + $expression.map_err(|e| CompilerError::integer_value_signed(e, $span))?, + )), + Integer::I64($integer) => Some(Integer::I64( + $expression.map_err(|e| CompilerError::integer_value_signed(e, $span))?, + )), + Integer::I128($integer) => Some(Integer::I128( + $expression.map_err(|e| CompilerError::integer_value_signed(e, $span))?, + )), _ => None, } @@ -110,57 +100,37 @@ macro_rules! match_integers { macro_rules! match_integers_span { (($a: ident, $b: ident), $span: ident => $expression:expr) => { match ($a, $b) { - (Integer::U8($a), Integer::U8($b)) => { - Some(Integer::U8($expression.map_err(|e| { - CompilerError::integer_value_unsigned(e, $span, new_backtrace()) - })?)) - } - (Integer::U16($a), Integer::U16($b)) => { - Some(Integer::U16($expression.map_err(|e| { - CompilerError::integer_value_unsigned(e, $span, new_backtrace()) - })?)) - } - (Integer::U32($a), Integer::U32($b)) => { - Some(Integer::U32($expression.map_err(|e| { - CompilerError::integer_value_unsigned(e, $span, new_backtrace()) - })?)) - } - (Integer::U64($a), Integer::U64($b)) => { - Some(Integer::U64($expression.map_err(|e| { - CompilerError::integer_value_unsigned(e, $span, new_backtrace()) - })?)) - } - (Integer::U128($a), Integer::U128($b)) => { - Some(Integer::U128($expression.map_err(|e| { - CompilerError::integer_value_unsigned(e, $span, new_backtrace()) - })?)) - } + (Integer::U8($a), Integer::U8($b)) => Some(Integer::U8( + $expression.map_err(|e| CompilerError::integer_value_unsigned(e, $span))?, + )), + (Integer::U16($a), Integer::U16($b)) => Some(Integer::U16( + $expression.map_err(|e| CompilerError::integer_value_unsigned(e, $span))?, + )), + (Integer::U32($a), Integer::U32($b)) => Some(Integer::U32( + $expression.map_err(|e| CompilerError::integer_value_unsigned(e, $span))?, + )), + (Integer::U64($a), Integer::U64($b)) => Some(Integer::U64( + $expression.map_err(|e| CompilerError::integer_value_unsigned(e, $span))?, + )), + (Integer::U128($a), Integer::U128($b)) => Some(Integer::U128( + $expression.map_err(|e| CompilerError::integer_value_unsigned(e, $span))?, + )), - (Integer::I8($a), Integer::I8($b)) => { - Some(Integer::I8($expression.map_err(|e| { - CompilerError::integer_value_unsigned(e, $span, new_backtrace()) - })?)) - } - (Integer::I16($a), Integer::I16($b)) => { - Some(Integer::I16($expression.map_err(|e| { - CompilerError::integer_value_unsigned(e, $span, new_backtrace()) - })?)) - } - (Integer::I32($a), Integer::I32($b)) => { - Some(Integer::I32($expression.map_err(|e| { - CompilerError::integer_value_unsigned(e, $span, new_backtrace()) - })?)) - } - (Integer::I64($a), Integer::I64($b)) => { - Some(Integer::I64($expression.map_err(|e| { - CompilerError::integer_value_unsigned(e, $span, new_backtrace()) - })?)) - } - (Integer::I128($a), Integer::I128($b)) => { - Some(Integer::I128($expression.map_err(|e| { - CompilerError::integer_value_unsigned(e, $span, new_backtrace()) - })?)) - } + (Integer::I8($a), Integer::I8($b)) => Some(Integer::I8( + $expression.map_err(|e| CompilerError::integer_value_unsigned(e, $span))?, + )), + (Integer::I16($a), Integer::I16($b)) => Some(Integer::I16( + $expression.map_err(|e| CompilerError::integer_value_unsigned(e, $span))?, + )), + (Integer::I32($a), Integer::I32($b)) => Some(Integer::I32( + $expression.map_err(|e| CompilerError::integer_value_unsigned(e, $span))?, + )), + (Integer::I64($a), Integer::I64($b)) => Some(Integer::I64( + $expression.map_err(|e| CompilerError::integer_value_unsigned(e, $span))?, + )), + (Integer::I128($a), Integer::I128($b)) => Some(Integer::I128( + $expression.map_err(|e| CompilerError::integer_value_unsigned(e, $span))?, + )), (_, _) => None, } }; @@ -171,7 +141,7 @@ macro_rules! allocate_type { let option = $option .map(|s| { s.parse::<$rust_ty>() - .map_err(|_| CompilerError::integer_value_invalid_integer(s, $span, new_backtrace())) + .map_err(|_| CompilerError::integer_value_invalid_integer(s, $span)) }) .transpose()?; @@ -191,7 +161,6 @@ macro_rules! allocate_type { CompilerError::integer_value_missing_integer( format!("{}: {}", $name.to_string(), stringify!($rust_ty)), $span, - new_backtrace(), ) })?; diff --git a/errors/Cargo.toml b/errors/Cargo.toml index c3d2f3a048..2340f9ee2a 100644 --- a/errors/Cargo.toml +++ b/errors/Cargo.toml @@ -17,6 +17,9 @@ include = [ "Cargo.toml", "src", "README.md", "LICENSE.md" ] license = "GPL-3.0" edition = "2018" +[dependencies] +color-backtrace = "0.5.1" + [dependencies.leo-input] path = "../input" version = "1.5.3" diff --git a/errors/src/asg/asg_errors.rs b/errors/src/asg/asg_errors.rs index 2112faafba..ec726a4ce7 100644 --- a/errors/src/asg/asg_errors.rs +++ b/errors/src/asg/asg_errors.rs @@ -20,7 +20,7 @@ use std::fmt::{Debug, Display}; create_errors!( AsgError, - exit_code_mask: 0u32, + exit_code_mask: 0i32, error_code_prefix: "ASG", @formatted diff --git a/errors/src/ast/ast_errors.rs b/errors/src/ast/ast_errors.rs index ede0122169..7da8866b37 100644 --- a/errors/src/ast/ast_errors.rs +++ b/errors/src/ast/ast_errors.rs @@ -19,7 +19,7 @@ use std::{error::Error as ErrorArg, fmt::Debug}; create_errors!( AstError, - exit_code_mask: 1000u32, + exit_code_mask: 1000i32, error_code_prefix: "AST", @backtraced diff --git a/errors/src/cli/cli_errors.rs b/errors/src/cli/cli_errors.rs index e42937e072..87ecee90d1 100644 --- a/errors/src/cli/cli_errors.rs +++ b/errors/src/cli/cli_errors.rs @@ -22,7 +22,7 @@ use std::{ create_errors!( CliError, - exit_code_mask: 7000u32, + exit_code_mask: 7000i32, error_code_prefix: "CLI", @backtraced @@ -321,20 +321,20 @@ create_errors!( ); impl CliError { - pub fn remove_token_and_username(error: std::io::Error, backtrace: Backtrace) -> Self { + pub fn remove_token_and_username(error: std::io::Error) -> Self { use std::io::ErrorKind; match error.kind() { ErrorKind::NotFound => { // tracing::info!("you are not logged in"); - Self::not_logged_in(backtrace) + Self::not_logged_in() } ErrorKind::PermissionDenied => { // tracing::error!("permission denied - check file permission in .leo folder"); - Self::logout_permision_denied(backtrace) + Self::logout_permision_denied() } _ => { // tracing::error!("something went wrong, can't access the file"); - Self::cannot_access_logout_file(backtrace) + Self::cannot_access_logout_file() } } } diff --git a/errors/src/common/backtraced.rs b/errors/src/common/backtraced.rs index 1ab4c7e2f9..f7ab92b1e9 100644 --- a/errors/src/common/backtraced.rs +++ b/errors/src/common/backtraced.rs @@ -17,6 +17,7 @@ use std::fmt; use backtrace::Backtrace; +use color_backtrace::BacktracePrinter; use derivative::Derivative; pub const INDENT: &str = " "; @@ -34,8 +35,8 @@ pub const INDENT: &str = " "; pub struct BacktracedError { pub message: String, pub help: Option, - pub exit_code: u32, - pub code_identifier: u32, + pub exit_code: i32, + pub code_identifier: i8, pub error_type: String, #[derivative(PartialEq = "ignore")] #[derivative(Hash = "ignore")] @@ -46,8 +47,8 @@ impl BacktracedError { pub fn new_from_backtrace( message: S, help: Option, - exit_code: u32, - code_identifier: u32, + exit_code: i32, + code_identifier: i8, error_type: String, backtrace: Backtrace, ) -> Self @@ -64,8 +65,18 @@ impl BacktracedError { } } - pub fn exit_code(&self) -> u32 { - 0 + pub fn exit_code(&self) -> i32 { + let mut code: i32; + if self.code_identifier > 99 { + code = self.code_identifier as i32 * 111_000; + } else if self.code_identifier as i32 > 9 { + code = self.code_identifier as i32 * 11_000; + } else { + code = self.code_identifier as i32 * 1_000; + } + code += self.exit_code; + + code } } @@ -87,8 +98,29 @@ impl fmt::Display for BacktracedError { write!(f, "{indent } = {help}", indent = INDENT, help = help)?; } - if std::env::var("LEO_BACKTRACE").unwrap_or_default().trim() == "1" { - write!(f, "stack backtrace:\n{:?}", self.backtrace)?; + let leo_backtrace = std::env::var("LEO_BACKTRACE").unwrap_or_default().trim().to_owned(); + match leo_backtrace.as_ref() { + "1" => { + dbg!("1"); + let mut printer = BacktracePrinter::default(); + printer = printer.verbosity(Verbosity::Medium); + printer = printer.lib_verbosity(Verbosity::Medium); + let trace = printer + .format_trace_to_string(&self.backtrace.backtrace) + .map_err(|_| fmt::Error)?; + write!(f, "{}", trace)?; + } + "full" => { + dbg!("full"); + let mut printer = BacktracePrinter::default(); + printer = printer.verbosity(Verbosity::Full); + printer = printer.lib_verbosity(Verbosity::Full); + let trace = printer + .format_trace_to_string(&self.backtrace.backtrace) + .map_err(|_| fmt::Error)?; + write!(f, "{}", trace)?; + } + _ => {} } Ok(()) diff --git a/errors/src/common/formatted.rs b/errors/src/common/formatted.rs index 623b668443..252981e1ff 100644 --- a/errors/src/common/formatted.rs +++ b/errors/src/common/formatted.rs @@ -19,6 +19,7 @@ use crate::{BacktracedError, Span}; use std::{fmt, sync::Arc}; use backtrace::Backtrace; +use color_backtrace::{BacktracePrinter, Verbosity}; pub const INDENT: &str = " "; @@ -45,8 +46,8 @@ impl FormattedError { pub fn new_from_span( message: S, help: Option, - exit_code: u32, - code_identifier: u32, + exit_code: i32, + code_identifier: i8, error_type: String, span: &Span, backtrace: Backtrace, @@ -72,8 +73,8 @@ impl FormattedError { } } - pub fn exit_code(&self) -> u32 { - 0 + pub fn exit_code(&self) -> i32 { + self.backtrace.exit_code() } } @@ -138,8 +139,29 @@ impl fmt::Display for FormattedError { write!(f, "{indent } = {help}", indent = INDENT, help = help)?; } - if std::env::var("LEO_BACKTRACE").unwrap_or_default().trim() == "1" { - write!(f, "stack backtrace:\n{:?}", self.backtrace.backtrace)?; + let leo_backtrace = std::env::var("LEO_BACKTRACE").unwrap_or_default().trim().to_owned(); + match leo_backtrace.as_ref() { + "1" => { + dbg!("1"); + let mut printer = BacktracePrinter::default(); + printer = printer.verbosity(Verbosity::Medium); + printer = printer.lib_verbosity(Verbosity::Medium); + let trace = printer + .format_trace_to_string(&self.backtrace.backtrace) + .map_err(|_| fmt::Error)?; + write!(f, "{}", trace)?; + } + "full" => { + dbg!("full"); + let mut printer = BacktracePrinter::default(); + printer = printer.verbosity(Verbosity::Full); + printer = printer.lib_verbosity(Verbosity::Full); + let trace = printer + .format_trace_to_string(&self.backtrace.backtrace) + .map_err(|_| fmt::Error)?; + write!(f, "{}", trace)?; + } + _ => {} } Ok(()) diff --git a/errors/src/common/macros.rs b/errors/src/common/macros.rs index 9c39eb96a5..c9b7affe27 100644 --- a/errors/src/common/macros.rs +++ b/errors/src/common/macros.rs @@ -18,11 +18,11 @@ macro_rules! create_errors { (@step $_code:expr,) => {}; ($error_type:ident, exit_code_mask: $exit_code_mask:expr, error_code_prefix: $error_code_prefix:expr, $(@$formatted_or_backtraced_list:ident $names:ident { args: ($($arg_names:ident: $arg_types:ty$(,)?)*), msg: $messages:expr, help: $helps:expr, })*) => { + #[allow(unused_imports)] use crate::{BacktracedError, ErrorCode, FormattedError, LeoErrorCode, Span}; use backtrace::Backtrace; - #[derive(Debug, Error)] pub enum $error_type { #[error(transparent)] @@ -36,7 +36,7 @@ macro_rules! create_errors { impl ErrorCode for $error_type { #[inline(always)] - fn exit_code(&self) -> u32 { + fn exit_code(&self) -> i32 { match self { Self::FormattedError(formatted) => { formatted.exit_code() @@ -49,7 +49,7 @@ macro_rules! create_errors { } #[inline(always)] - fn exit_code_mask() -> u32 { + fn exit_code_mask() -> i32 { $exit_code_mask } @@ -57,53 +57,44 @@ macro_rules! create_errors { fn error_type() -> String { $error_code_prefix.to_string() } - - fn new_from_backtrace(message: S, help: Option, exit_code: u32, backtrace: Backtrace) -> Self - where - S: ToString { - BacktracedError::new_from_backtrace( - message, - help, - exit_code + Self::exit_code_mask(), - Self::code_identifier(), - Self::error_type(), - backtrace, - ).into() - } - - fn new_from_span(message: S, help: Option, exit_code: u32, span: &Span, backtrace: Backtrace) -> Self - where S: ToString { - FormattedError::new_from_span( - message, - help, - exit_code + Self::exit_code_mask(), - Self::code_identifier(), - Self::error_type(), - span, - backtrace, - ).into() - } } impl $error_type { - create_errors!(@step 0u32, $(($formatted_or_backtraced_list, $names($($arg_names: $arg_types,)*), $messages, $helps),)*); + create_errors!(@step 0i32, $(($formatted_or_backtraced_list, $names($($arg_names: $arg_types,)*), $messages, $helps),)*); } }; (@step $code:expr, (formatted, $error_name:ident($($arg_names:ident: $arg_types:ty,)*), $message:expr, $help:expr), $(($formatted_or_backtraced_tail:ident, $names:ident($($tail_arg_names:ident: $tail_arg_types:ty,)*), $messages:expr, $helps:expr),)*) => { - pub fn $error_name($($arg_names: $arg_types,)* span: &Span, backtrace: Backtrace) -> Self { - - Self::new_from_span($message, $help, $code, span, backtrace) + pub fn $error_name($($arg_names: $arg_types,)* span: &Span) -> Self { + Self::FormattedError( + FormattedError::new_from_span( + $message, + $help, + $code + Self::exit_code_mask(), + Self::code_identifier(), + Self::error_type(), + span, + Backtrace::new(), + ) + ) } - create_errors!(@step $code + 1u32, $(($formatted_or_backtraced_tail, $names($($tail_arg_names: $tail_arg_types,)*), $messages, $helps),)*); + create_errors!(@step $code + 1i32, $(($formatted_or_backtraced_tail, $names($($tail_arg_names: $tail_arg_types,)*), $messages, $helps),)*); }; (@step $code:expr, (backtraced, $error_name:ident($($arg_names:ident: $arg_types:ty,)*), $message:expr, $help:expr), $(($formatted_or_backtraced_tail:ident, $names:ident($($tail_arg_names:ident: $tail_arg_types:ty,)*), $messages:expr, $helps:expr),)*) => { - pub fn $error_name($($arg_names: $arg_types,)* backtrace: Backtrace) -> Self { - - Self::new_from_backtrace($message, $help, $code, backtrace) + pub fn $error_name($($arg_names: $arg_types,)*) -> Self { + Self::BacktracedError( + BacktracedError::new_from_backtrace( + $message, + $help, + $code + Self::exit_code_mask(), + Self::code_identifier(), + Self::error_type(), + Backtrace::new(), + ) + ) } - create_errors!(@step $code + 1u32, $(($formatted_or_backtraced_tail, $names($($tail_arg_names: $tail_arg_types,)*), $messages, $helps),)*); + create_errors!(@step $code + 1i32, $(($formatted_or_backtraced_tail, $names($($tail_arg_names: $tail_arg_types,)*), $messages, $helps),)*); }; } diff --git a/errors/src/common/traits.rs b/errors/src/common/traits.rs index a08d9b11cc..2bd237fa8a 100644 --- a/errors/src/common/traits.rs +++ b/errors/src/common/traits.rs @@ -14,29 +14,17 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::Span; - -use backtrace::Backtrace; - pub trait ErrorCode: Sized { - fn exit_code(&self) -> u32; + fn exit_code(&self) -> i32; - fn exit_code_mask() -> u32; + fn exit_code_mask() -> i32; fn error_type() -> String; - - fn new_from_backtrace(message: S, help: Option, exit_code: u32, backtrace: Backtrace) -> Self - where - S: ToString; - - fn new_from_span(message: S, help: Option, exit_code: u32, span: &Span, backtrace: Backtrace) -> Self - where - S: ToString; } pub trait LeoErrorCode: ErrorCode { #[inline(always)] - fn code_identifier() -> u32 { + fn code_identifier() -> i8 { 37 } } diff --git a/errors/src/compiler/compiler_errors.rs b/errors/src/compiler/compiler_errors.rs index 4c2fab4791..d25a1e1406 100644 --- a/errors/src/compiler/compiler_errors.rs +++ b/errors/src/compiler/compiler_errors.rs @@ -23,7 +23,7 @@ use std::{ create_errors!( CompilerError, - exit_code_mask: 2000u32, + exit_code_mask: 2000i32, error_code_prefix: "CMP", @backtraced diff --git a/errors/src/import/import_errors.rs b/errors/src/import/import_errors.rs index 8ee09bd3a9..5a0bfb0d0b 100644 --- a/errors/src/import/import_errors.rs +++ b/errors/src/import/import_errors.rs @@ -23,7 +23,7 @@ use std::{ create_errors!( ImportError, - exit_code_mask: 3000u32, + exit_code_mask: 3000i32, error_code_prefix: "IMP", // An imported package has the same name as an imported core_package. diff --git a/errors/src/lib.rs b/errors/src/lib.rs index 01859de714..b82a0542b0 100644 --- a/errors/src/lib.rs +++ b/errors/src/lib.rs @@ -50,8 +50,6 @@ extern crate thiserror; use leo_input::InputParserError; -use backtrace::Backtrace; - #[derive(Debug, Error)] pub enum LeoError { #[error(transparent)] @@ -86,7 +84,7 @@ pub enum LeoError { } impl LeoError { - pub fn exit_code(&self) -> u32 { + pub fn exit_code(&self) -> i32 { use LeoError::*; match self { @@ -106,11 +104,6 @@ impl LeoError { pub type Result = core::result::Result; -#[inline(always)] -pub fn new_backtrace() -> Backtrace { - Backtrace::new() -} - // #[test] // fn test_error() { // let err = FormattedError { diff --git a/errors/src/package/package_errors.rs b/errors/src/package/package_errors.rs index 423dc7beda..d4c7caf83c 100644 --- a/errors/src/package/package_errors.rs +++ b/errors/src/package/package_errors.rs @@ -23,7 +23,7 @@ use std::{ create_errors!( PackageError, - exit_code_mask: 4000u32, + exit_code_mask: 4000i32, error_code_prefix: "PAK", @backtraced diff --git a/errors/src/parser/parser_errors.rs b/errors/src/parser/parser_errors.rs index f9d954e27d..bed0482804 100644 --- a/errors/src/parser/parser_errors.rs +++ b/errors/src/parser/parser_errors.rs @@ -20,7 +20,7 @@ use std::fmt::Display; create_errors!( ParserError, - exit_code_mask: 5000u32, + exit_code_mask: 5000i32, error_code_prefix: "PAR", @formatted diff --git a/errors/src/state/state_errors.rs b/errors/src/state/state_errors.rs index a58d6f454e..d5695fb2cc 100644 --- a/errors/src/state/state_errors.rs +++ b/errors/src/state/state_errors.rs @@ -18,6 +18,6 @@ use crate::create_errors; create_errors!( StateError, - exit_code_mask: 6000u32, - error_code_prefix: "S", + exit_code_mask: 6000i32, + error_code_prefix: "STA", ); diff --git a/imports/src/parser/import_parser.rs b/imports/src/parser/import_parser.rs index 0f49b70d5b..022b79e381 100644 --- a/imports/src/parser/import_parser.rs +++ b/imports/src/parser/import_parser.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use leo_asg::{AsgContext, ImportResolver, Program}; -use leo_errors::{new_backtrace, ImportError, LeoError, Result, Span}; +use leo_errors::{ImportError, LeoError, Result, Span}; use indexmap::{IndexMap, IndexSet}; use std::path::PathBuf; @@ -50,7 +50,7 @@ impl<'a> ImportResolver<'a> for ImportParser<'a> { ) -> Result>> { let full_path = package_segments.join("."); if self.partial_imports.contains(&full_path) { - return Err(ImportError::recursive_imports(full_path, span, new_backtrace()).into()); + return Err(ImportError::recursive_imports(full_path, span).into()); } if let Some(program) = self.imports.get(&full_path) { return Ok(Some(program.clone())); diff --git a/imports/src/parser/parse_package.rs b/imports/src/parser/parse_package.rs index f76456c8f7..3f2079598b 100644 --- a/imports/src/parser/parse_package.rs +++ b/imports/src/parser/parse_package.rs @@ -16,7 +16,7 @@ use crate::ImportParser; use leo_asg::{AsgContext, Program}; -use leo_errors::{new_backtrace, ImportError, Result, Span}; +use leo_errors::{ImportError, Result, Span}; use std::{fs, fs::DirEntry, path::PathBuf}; @@ -83,9 +83,9 @@ impl<'a> ImportParser<'a> { // Get a vector of all packages in the source directory. let entries = fs::read_dir(path) - .map_err(|error| ImportError::directory_error(error, &error_path, span, new_backtrace()))? + .map_err(|error| ImportError::directory_error(error, &error_path, span))? .collect::, std::io::Error>>() - .map_err(|error| ImportError::directory_error(error, &error_path, span, new_backtrace()))?; + .map_err(|error| ImportError::directory_error(error, &error_path, span))?; // Check if the imported package name is in the source directory. let matched_source_entry = entries.into_iter().find(|entry| { @@ -100,9 +100,9 @@ impl<'a> ImportParser<'a> { if imports_directory.exists() { // Get a vector of all packages in the imports directory. let entries = fs::read_dir(imports_directory) - .map_err(|error| ImportError::directory_error(error, &error_path, span, new_backtrace()))? + .map_err(|error| ImportError::directory_error(error, &error_path, span))? .collect::, std::io::Error>>() - .map_err(|error| ImportError::directory_error(error, error_path, span, new_backtrace()))?; + .map_err(|error| ImportError::directory_error(error, error_path, span))?; // Check if the imported package name is in the imports directory. let matched_import_entry = entries @@ -111,16 +111,16 @@ impl<'a> ImportParser<'a> { // Check if the package name was found in both the source and imports directory. match (matched_source_entry, matched_import_entry) { - (Some(_), Some(_)) => Err(ImportError::conflicting_imports(package_name, span, new_backtrace()).into()), + (Some(_), Some(_)) => Err(ImportError::conflicting_imports(package_name, span).into()), (Some(source_entry), None) => self.parse_package_access(context, &source_entry, &segments[1..], span), (None, Some(import_entry)) => self.parse_package_access(context, &import_entry, &segments[1..], span), - (None, None) => Err(ImportError::unknown_package(package_name, span, new_backtrace()).into()), + (None, None) => Err(ImportError::unknown_package(package_name, span).into()), } } else { // Enforce local package access with no found imports directory match matched_source_entry { Some(source_entry) => self.parse_package_access(context, &source_entry, &segments[1..], span), - None => Err(ImportError::unknown_package(package_name, span, new_backtrace()).into()), + None => Err(ImportError::unknown_package(package_name, span).into()), } } } diff --git a/imports/src/parser/parse_symbol.rs b/imports/src/parser/parse_symbol.rs index 95e1961e10..aa7f52a9fe 100644 --- a/imports/src/parser/parse_symbol.rs +++ b/imports/src/parser/parse_symbol.rs @@ -16,7 +16,7 @@ use crate::ImportParser; use leo_ast::Program; -use leo_errors::{new_backtrace, ImportError, Result, Span}; +use leo_errors::{ImportError, Result, Span}; use std::fs::DirEntry; @@ -32,26 +32,26 @@ impl<'a> ImportParser<'a> { // Get the package file type. let file_type = package .file_type() - .map_err(|error| ImportError::directory_error(error, package.path(), span, new_backtrace()))?; + .map_err(|error| ImportError::directory_error(error, package.path(), span))?; let file_name = package .file_name() .into_string() - .map_err(|_| ImportError::convert_os_string(span, new_backtrace()))?; + .map_err(|_| ImportError::convert_os_string(span))?; let mut file_path = package.path(); if file_type.is_dir() { file_path.push(MAIN_FILE); if !file_path.exists() { - return Err(ImportError::expected_main_file(file_path.as_path(), span, new_backtrace()).into()); + return Err(ImportError::expected_main_file(file_path.as_path(), span).into()); } } let file_path_str = file_path.to_str().unwrap_or_default(); // Build the package abstract syntax tree. - let program_string = &std::fs::read_to_string(&file_path) - .map_err(|x| ImportError::io_error(file_path_str, x, span, new_backtrace()))?; + let program_string = + &std::fs::read_to_string(&file_path).map_err(|x| ImportError::io_error(file_path_str, x, span))?; let mut program = leo_parser::parse(file_path_str, program_string)?; program.name = file_name; let mut ast = leo_ast::Ast::new(program); diff --git a/leo/api.rs b/leo/api.rs index 58a5f019ee..d90d51427e 100644 --- a/leo/api.rs +++ b/leo/api.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use leo_errors::{new_backtrace, CliError, LeoError, Result}; +use leo_errors::{CliError, LeoError, Result}; use reqwest::{ blocking::{multipart::Form, Client, Response}, @@ -63,7 +63,7 @@ pub trait Route { /// Transform specific status codes into correct errors for this route. /// For example 404 on package fetch should mean that 'Package is not found' fn status_to_err(&self, _status: StatusCode) -> LeoError { - CliError::unidentified_api(new_backtrace()).into() + CliError::unidentified_api().into() } } @@ -131,9 +131,7 @@ impl Api { }; // only one error is possible here - let res = res - .send() - .map_err(|_| CliError::unable_to_connect_aleo_pm(new_backtrace()))?; + let res = res.send().map_err(|_| CliError::unable_to_connect_aleo_pm())?; // where magic begins route.process(res) @@ -173,12 +171,12 @@ impl Route for Fetch { fn status_to_err(&self, status: StatusCode) -> LeoError { match status { - StatusCode::BAD_REQUEST => CliError::package_not_found(new_backtrace()).into(), + StatusCode::BAD_REQUEST => CliError::package_not_found().into(), // TODO: we should return 404 on not found author/package // and return BAD_REQUEST if data format is incorrect or some of the arguments // were not passed - StatusCode::NOT_FOUND => CliError::package_not_found(new_backtrace()).into(), - _ => CliError::unkown_api_error(status, new_backtrace()).into(), + StatusCode::NOT_FOUND => CliError::package_not_found().into(), + _ => CliError::unkown_api_error(status).into(), } } } @@ -209,10 +207,10 @@ impl Route for Login { fn status_to_err(&self, status: StatusCode) -> LeoError { match status { - StatusCode::BAD_REQUEST => CliError::account_not_found(new_backtrace()).into(), + StatusCode::BAD_REQUEST => CliError::account_not_found().into(), // TODO: NOT_FOUND here should be replaced, this error code has no relation to what this route is doing - StatusCode::NOT_FOUND => CliError::incorrect_password(new_backtrace()).into(), - _ => CliError::unkown_api_error(status, new_backtrace()).into(), + StatusCode::NOT_FOUND => CliError::incorrect_password().into(), + _ => CliError::unkown_api_error(status).into(), } } } @@ -251,20 +249,16 @@ impl Route for Publish { let status = res.status(); if status == StatusCode::OK { - let body: PublishResponse = res - .json() - .map_err(|e| CliError::reqwest_json_error(e, new_backtrace()))?; + let body: PublishResponse = res.json().map_err(|e| CliError::reqwest_json_error(e))?; Ok(body.package_id) } else { - let res: HashMap = res - .json() - .map_err(|e| CliError::reqwest_json_error(e, new_backtrace()))?; + let res: HashMap = res.json().map_err(|e| CliError::reqwest_json_error(e))?; Err(match status { - StatusCode::BAD_REQUEST => CliError::bad_request(res.get("message").unwrap(), new_backtrace()).into(), - StatusCode::UNAUTHORIZED => CliError::not_logged_in(new_backtrace()).into(), - StatusCode::FAILED_DEPENDENCY => CliError::already_published(new_backtrace()).into(), - StatusCode::INTERNAL_SERVER_ERROR => CliError::internal_server_error(new_backtrace()).into(), - _ => CliError::unkown_api_error(status, new_backtrace()).into(), + StatusCode::BAD_REQUEST => CliError::bad_request(res.get("message").unwrap()).into(), + StatusCode::UNAUTHORIZED => CliError::not_logged_in().into(), + StatusCode::FAILED_DEPENDENCY => CliError::already_published().into(), + StatusCode::INTERNAL_SERVER_ERROR => CliError::internal_server_error().into(), + _ => CliError::unkown_api_error(status).into(), }) } } @@ -294,9 +288,7 @@ impl Route for Profile { // this may be extended for more precise error handling let status = res.status(); if status == StatusCode::OK { - let body: ProfileResponse = res - .json() - .map_err(|e| CliError::reqwest_json_error(e, new_backtrace()))?; + let body: ProfileResponse = res.json().map_err(|e| CliError::reqwest_json_error(e))?; return Ok(Some(body.username)); } diff --git a/leo/commands/build.rs b/leo/commands/build.rs index b2ab71d5dc..6bde3c74fa 100644 --- a/leo/commands/build.rs +++ b/leo/commands/build.rs @@ -21,7 +21,7 @@ use leo_compiler::{ AstSnapshotOptions, CompilerOptions, }; -use leo_errors::{new_backtrace, CliError, Result}; +use leo_errors::{CliError, Result}; use leo_package::{ inputs::*, outputs::{ChecksumFile, CircuitFile, OutputsDirectory, OUTPUTS_DIRECTORY_NAME}, @@ -145,7 +145,7 @@ impl Command for Build { // Compile the main.leo file along with constraints if !MainFile::exists_at(&package_path) { - return Err(CliError::package_main_file_not_found(new_backtrace()).into()); + return Err(CliError::package_main_file_not_found().into()); } // Create the output directory diff --git a/leo/commands/init.rs b/leo/commands/init.rs index 3b89ae9cb1..c82a4c9bd7 100644 --- a/leo/commands/init.rs +++ b/leo/commands/init.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use crate::{commands::Command, config::*, context::Context}; -use leo_errors::{new_backtrace, CliError, Result}; +use leo_errors::{CliError, Result}; use leo_package::LeoPackage; use structopt::StructOpt; @@ -44,17 +44,17 @@ impl Command for Init { // Check that the current package directory path exists. if !path.exists() { - return Err(CliError::package_directory_does_not_exist(new_backtrace()).into()); + return Err(CliError::package_directory_does_not_exist().into()); } // Check that the given package name is valid. let package_name = path .file_stem() - .ok_or_else(|| CliError::invalid_project_name(new_backtrace()))? + .ok_or_else(|| CliError::invalid_project_name())? .to_string_lossy() .to_string(); if !LeoPackage::is_package_name_valid(&package_name) { - return Err(CliError::invalid_package_name(&package_name, new_backtrace()).into()); + return Err(CliError::invalid_package_name(&package_name).into()); } let username = read_username().ok(); diff --git a/leo/commands/new.rs b/leo/commands/new.rs index 3bdd717654..c08df08375 100644 --- a/leo/commands/new.rs +++ b/leo/commands/new.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use crate::{commands::Command, config::*, context::Context}; -use leo_errors::{new_backtrace, CliError, Result}; +use leo_errors::{CliError, Result}; use leo_package::LeoPackage; use std::fs; @@ -46,7 +46,7 @@ impl Command for New { // Check that the given package name is valid. let package_name = self.name; if !LeoPackage::is_package_name_valid(&package_name) { - return Err(CliError::invalid_project_name(new_backtrace()).into()); + return Err(CliError::invalid_project_name().into()); } let username = read_username().ok(); @@ -57,11 +57,11 @@ impl Command for New { // Verify the package directory path does not exist yet. if path.exists() { - return Err(CliError::package_directory_already_exists(&path, new_backtrace()).into()); + return Err(CliError::package_directory_already_exists(&path).into()); } // Create the package directory - fs::create_dir_all(&path).map_err(|err| CliError::package_could_not_create_directory(err, new_backtrace()))?; + fs::create_dir_all(&path).map_err(|err| CliError::package_could_not_create_directory(err))?; LeoPackage::initialize(&package_name, &path, username)?; diff --git a/leo/commands/package/add.rs b/leo/commands/package/add.rs index 9308859eff..9cdef736b9 100644 --- a/leo/commands/package/add.rs +++ b/leo/commands/package/add.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use crate::{api::Fetch, commands::Command, context::Context}; -use leo_errors::{new_backtrace, CliError, Result}; +use leo_errors::{CliError, Result}; use leo_package::imports::{ImportsDirectory, IMPORTS_DIRECTORY_NAME}; use std::{ @@ -64,12 +64,12 @@ impl Add { if v.len() == 2 { Ok((v[0].to_string(), v[1].to_string())) } else { - Err(CliError::incorrect_command_argument(new_backtrace()).into()) + Err(CliError::incorrect_command_argument().into()) } } else if let (Some(author), Some(package)) = (&self.author, &self.package) { Ok((author.clone(), package.clone())) } else { - Err(CliError::incorrect_command_argument(new_backtrace()).into()) + Err(CliError::incorrect_command_argument().into()) } } } @@ -88,13 +88,11 @@ impl Command for Add { fn apply(self, context: Context, _: Self::Input) -> Result { // Check that a manifest exists for the current package. - context - .manifest() - .map_err(|_| CliError::mainifest_file_not_found(new_backtrace()))?; + context.manifest().map_err(|_| CliError::mainifest_file_not_found())?; let (author, package_name) = self .try_read_arguments() - .map_err(|e| CliError::cli_bytes_conversion_error(e, new_backtrace()))?; + .map_err(|e| CliError::cli_bytes_conversion_error(e))?; // Attempt to fetch the package. let reader = { @@ -107,7 +105,7 @@ impl Command for Add { .api .run_route(fetch)? .bytes() - .map_err(|e| CliError::cli_bytes_conversion_error(e, new_backtrace()))?; + .map_err(|e| CliError::cli_bytes_conversion_error(e))?; std::io::Cursor::new(bytes) }; @@ -117,15 +115,13 @@ impl Command for Add { ImportsDirectory::create(&path)?; path.push(IMPORTS_DIRECTORY_NAME); path.push(package_name); - create_dir_all(&path).map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; + create_dir_all(&path).map_err(|e| CliError::cli_io_error(e))?; }; // Proceed to unzip and parse the fetched bytes. - let mut zip_archive = zip::ZipArchive::new(reader).map_err(|e| CliError::cli_zip_error(e, new_backtrace()))?; + let mut zip_archive = zip::ZipArchive::new(reader).map_err(|e| CliError::cli_zip_error(e))?; for i in 0..zip_archive.len() { - let file = zip_archive - .by_index(i) - .map_err(|e| CliError::cli_zip_error(e, new_backtrace()))?; + let file = zip_archive.by_index(i).map_err(|e| CliError::cli_zip_error(e))?; let file_name = file.name(); @@ -133,16 +129,16 @@ impl Command for Add { file_path.push(file_name); if file_name.ends_with('/') { - create_dir_all(file_path).map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; + create_dir_all(file_path).map_err(|e| CliError::cli_io_error(e))?; } else { if let Some(parent_directory) = path.parent() { - create_dir_all(parent_directory).map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; + create_dir_all(parent_directory).map_err(|e| CliError::cli_io_error(e))?; } - let mut created = File::create(file_path).map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; + let mut created = File::create(file_path).map_err(|e| CliError::cli_io_error(e))?; created .write_all(&file.bytes().map(|e| e.unwrap()).collect::>()) - .map_err(|e| CliError::cli_bytes_conversion_error(e, new_backtrace()))?; + .map_err(|e| CliError::cli_bytes_conversion_error(e))?; } } diff --git a/leo/commands/package/clone.rs b/leo/commands/package/clone.rs index 4f6005b272..a6d71490eb 100644 --- a/leo/commands/package/clone.rs +++ b/leo/commands/package/clone.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use crate::{api::Fetch, commands::Command, context::Context}; -use leo_errors::{new_backtrace, CliError, Result}; +use leo_errors::{CliError, Result}; use std::{ borrow::Cow, @@ -68,12 +68,12 @@ impl Clone { if v.len() == 2 { Ok((v[0].to_string(), v[1].to_string())) } else { - Err(CliError::incorrect_command_argument(new_backtrace()).into()) + Err(CliError::incorrect_command_argument().into()) } } else if let (Some(author), Some(package)) = (&self.author, &self.package) { Ok((author.clone(), package.clone())) } else { - Err(CliError::incorrect_command_argument(new_backtrace()).into()) + Err(CliError::incorrect_command_argument().into()) } } @@ -87,7 +87,7 @@ impl Clone { path.to_mut().push(directory_name); } - Ok(fs::create_dir_all(&path).map_err(|e| CliError::cli_io_error(e, new_backtrace()))?) + Ok(fs::create_dir_all(&path).map_err(|e| CliError::cli_io_error(e))?) } } @@ -117,7 +117,7 @@ impl Command for Clone { .api .run_route(fetch)? .bytes() - .map_err(|e| CliError::cli_bytes_conversion_error(e, new_backtrace()))?; + .map_err(|e| CliError::cli_bytes_conversion_error(e))?; std::io::Cursor::new(bytes) }; @@ -127,12 +127,10 @@ impl Command for Clone { Self::create_directory(&path, &package_name)?; // Proceed to unzip and parse the fetched bytes. - let mut zip_archive = zip::ZipArchive::new(reader).map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; + let mut zip_archive = zip::ZipArchive::new(reader).map_err(|e| CliError::cli_io_error(e))?; for i in 0..zip_archive.len() { - let file = zip_archive - .by_index(i) - .map_err(|e| CliError::cli_zip_error(e, new_backtrace()))?; + let file = zip_archive.by_index(i).map_err(|e| CliError::cli_zip_error(e))?; let file_name = file.name(); @@ -140,16 +138,16 @@ impl Command for Clone { file_path.push(file_name); if file_name.ends_with('/') { - fs::create_dir_all(file_path).map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; + fs::create_dir_all(file_path).map_err(|e| CliError::cli_io_error(e))?; } else { if let Some(parent_directory) = path.parent() { - fs::create_dir_all(parent_directory).map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; + fs::create_dir_all(parent_directory).map_err(|e| CliError::cli_io_error(e))?; } - let mut created = File::create(file_path).map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; + let mut created = File::create(file_path).map_err(|e| CliError::cli_io_error(e))?; created .write_all(&file.bytes().map(|e| e.unwrap()).collect::>()) - .map_err(|e| CliError::cli_bytes_conversion_error(e, new_backtrace()))?; + .map_err(|e| CliError::cli_bytes_conversion_error(e))?; } } diff --git a/leo/commands/package/login.rs b/leo/commands/package/login.rs index 0d674b57d4..7c31fe4f74 100644 --- a/leo/commands/package/login.rs +++ b/leo/commands/package/login.rs @@ -20,7 +20,7 @@ use crate::{ config::*, context::Context, }; -use leo_errors::{new_backtrace, CliError, Result}; +use leo_errors::{CliError, Result}; use std::collections::HashMap; use structopt::StructOpt; @@ -72,13 +72,11 @@ impl Command for Login { }; let res = api.run_route(login)?; - let mut res: HashMap = res - .json() - .map_err(|e| CliError::reqwest_json_error(e, new_backtrace()))?; + let mut res: HashMap = res.json().map_err(|e| CliError::reqwest_json_error(e))?; let tok_opt = res.remove("token"); if tok_opt.is_none() { - return Err(CliError::unable_to_get_token(new_backtrace()).into()); + return Err(CliError::unable_to_get_token().into()); }; (tok_opt.unwrap(), email_username) @@ -92,7 +90,7 @@ impl Command for Login { match api.run_route(ProfileRoute {})? { Some(username) => (token, username), - None => return Err(CliError::supplied_token_is_incorrect(new_backtrace()).into()), + None => return Err(CliError::supplied_token_is_incorrect().into()), } } @@ -109,10 +107,10 @@ impl Command for Login { (token, username) } else { remove_token_and_username()?; - return Err(CliError::stored_credentials_expired(new_backtrace()).into()); + return Err(CliError::stored_credentials_expired().into()); } } - None => return Err(CliError::no_credentials_provided(new_backtrace()).into()), + None => return Err(CliError::no_credentials_provided().into()), } } }; diff --git a/leo/commands/package/publish.rs b/leo/commands/package/publish.rs index 491009fe02..52c9dffab8 100644 --- a/leo/commands/package/publish.rs +++ b/leo/commands/package/publish.rs @@ -16,7 +16,7 @@ use super::build::Build; use crate::{api::Publish as PublishRoute, commands::Command, context::Context}; -use leo_errors::{new_backtrace, CliError, Result}; +use leo_errors::{CliError, Result}; use leo_package::{ outputs::OutputsDirectory, root::{ZipFile, AUTHOR_PLACEHOLDER}, @@ -49,7 +49,7 @@ impl Command for Publish { let package_name = manifest.get_package_name(); if KEYWORD_TOKENS.iter().any(|keyword| keyword.to_string() == package_name) { - return Err(CliError::package_cannot_be_named_after_a_keyword(new_backtrace()).into()); + return Err(CliError::package_cannot_be_named_after_a_keyword().into()); } let package_version = manifest.get_package_version(); @@ -59,9 +59,9 @@ impl Command for Publish { manifest.get_package_license(), manifest.get_package_remote(), ) { - (None, _, _) => return Err(CliError::no_package_description(new_backtrace()).into()), - (_, None, _) => return Err(CliError::missing_package_license(new_backtrace()).into()), - (_, _, None) => return Err(CliError::missing_package_remote(new_backtrace()).into()), + (None, _, _) => return Err(CliError::no_package_description().into()), + (_, None, _) => return Err(CliError::missing_package_license().into()), + (_, _, None) => return Err(CliError::missing_package_remote().into()), (_, _, _) => (), }; @@ -70,7 +70,7 @@ impl Command for Publish { // Prevent most common error before accessing API. if username == AUTHOR_PLACEHOLDER { - return Err(CliError::package_author_is_not_set(new_backtrace()).into()); + return Err(CliError::package_author_is_not_set().into()); } // Create the output directory. diff --git a/leo/commands/prove.rs b/leo/commands/prove.rs index 2a174dedd4..86f85c1450 100644 --- a/leo/commands/prove.rs +++ b/leo/commands/prove.rs @@ -16,7 +16,7 @@ use super::{build::BuildOptions, setup::Setup}; use crate::{commands::Command, context::Context}; -use leo_errors::{new_backtrace, CliError, Result, SnarkVMError}; +use leo_errors::{CliError, Result, SnarkVMError}; use leo_package::outputs::ProofFile; use snarkvm_algorithms::{ snark::groth16::{Groth16, PreparedVerifyingKey, Proof}, @@ -74,7 +74,7 @@ impl Command for Prove { let mut proof = vec![]; program_proof .write_le(&mut proof) - .map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; + .map_err(|e| CliError::cli_io_error(e))?; ProofFile::new(&package_name).write_to(&path, &proof)?; Ok((program_proof, prepared_verifying_key)) diff --git a/leo/commands/setup.rs b/leo/commands/setup.rs index 1265161377..5996bb1f3b 100644 --- a/leo/commands/setup.rs +++ b/leo/commands/setup.rs @@ -17,7 +17,7 @@ use super::build::{Build, BuildOptions}; use crate::{commands::Command, context::Context}; use leo_compiler::{compiler::Compiler, group::targets::edwards_bls12::EdwardsGroupType}; -use leo_errors::{new_backtrace, CliError, Result}; +use leo_errors::{CliError, Result}; use leo_package::outputs::{ProvingKeyFile, VerificationKeyFile}; use snarkvm_algorithms::{ @@ -80,7 +80,7 @@ impl Command for Setup { let rng = &mut thread_rng(); let (proving_key, prepared_verifying_key) = Groth16::, Vec>::setup(&program, rng) - .map_err(|_| CliError::unable_to_setup(new_backtrace()))?; + .map_err(|_| CliError::unable_to_setup())?; // TODO (howardwu): Convert parameters to a 'proving key' struct for serialization. // Write the proving key file to the output directory @@ -89,7 +89,7 @@ impl Command for Setup { let mut proving_key_bytes = vec![]; proving_key .write_le(&mut proving_key_bytes) - .map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; + .map_err(|e| CliError::cli_io_error(e))?; let _ = proving_key_file.write_to(&path, &proving_key_bytes)?; tracing::info!("Complete"); @@ -100,7 +100,7 @@ impl Command for Setup { proving_key .vk .write_le(&mut verification_key) - .map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; + .map_err(|e| CliError::cli_io_error(e))?; let _ = verification_key_file.write_to(&path, &verification_key)?; tracing::info!("Complete"); @@ -116,16 +116,16 @@ impl Command for Setup { } let proving_key_bytes = ProvingKeyFile::new(&package_name).read_from(&path)?; let proving_key = ProvingKey::::read(proving_key_bytes.as_slice(), !self.skip_key_check) - .map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; + .map_err(|e| CliError::cli_io_error(e))?; tracing::info!("Complete"); // Read the verification key file from the output directory tracing::info!("Loading verification key..."); let verifying_key_bytes = VerificationKeyFile::new(&package_name) .read_from(&path) - .map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; + .map_err(|e| CliError::cli_io_error(e))?; let verifying_key = VerifyingKey::::read(verifying_key_bytes.as_slice()) - .map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; + .map_err(|e| CliError::cli_io_error(e))?; // Derive the prepared verifying key file from the verifying key let prepared_verifying_key = PreparedVerifyingKey::::from(verifying_key); diff --git a/leo/commands/test.rs b/leo/commands/test.rs index cef2eda865..773ac53488 100644 --- a/leo/commands/test.rs +++ b/leo/commands/test.rs @@ -20,7 +20,7 @@ use leo_compiler::{ compiler::{thread_leaked_context, Compiler}, group::targets::edwards_bls12::EdwardsGroupType, }; -use leo_errors::{new_backtrace, CliError, Result}; +use leo_errors::{CliError, Result}; use leo_package::{ inputs::*, outputs::{OutputsDirectory, OUTPUTS_DIRECTORY_NAME}, @@ -80,7 +80,7 @@ impl Command for Test { // when no main file and no files marked - error } else { - return Err(CliError::program_file_does_not_exist(package_path.to_string_lossy(), new_backtrace()).into()); + return Err(CliError::program_file_does_not_exist(package_path.to_string_lossy()).into()); } // Construct the path to the output directory; diff --git a/leo/commands/update.rs b/leo/commands/update.rs index e0431512c6..f5a9a2991b 100644 --- a/leo/commands/update.rs +++ b/leo/commands/update.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use crate::{commands::Command, config::Config, context::Context, updater::Updater}; -use leo_errors::{new_backtrace, CliError, Result}; +use leo_errors::{CliError, Result}; use structopt::StructOpt; use tracing::span::Span; @@ -61,8 +61,7 @@ impl Command for Update { fn apply(self, _: Context, _: Self::Input) -> Result { // If --list is passed, list all available versions and return. if self.list { - return Ok(Updater::show_available_releases() - .map_err(|e| CliError::could_not_fetch_versions(e, new_backtrace()))?); + return Ok(Updater::show_available_releases().map_err(|e| CliError::could_not_fetch_versions(e))?); } // Handles enabling and disabling automatic updates in the config file. diff --git a/leo/commands/watch.rs b/leo/commands/watch.rs index ae5756e76a..889ad6d1d0 100644 --- a/leo/commands/watch.rs +++ b/leo/commands/watch.rs @@ -16,7 +16,7 @@ use super::build::{Build, BuildOptions}; use crate::{commands::Command, context::Context}; -use leo_errors::{new_backtrace, CliError, Result}; +use leo_errors::{CliError, Result}; use std::{sync::mpsc::channel, time::Duration}; @@ -56,7 +56,7 @@ impl Command for Watch { watcher .watch(LEO_SOURCE_DIR, RecursiveMode::Recursive) - .map_err(|e| CliError::unable_to_watch(e, new_backtrace()))?; + .map_err(|e| CliError::unable_to_watch(e))?; tracing::info!("Watching Leo source code"); diff --git a/leo/config.rs b/leo/config.rs index 2ea893abf5..940e4977ac 100644 --- a/leo/config.rs +++ b/leo/config.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use leo_errors::{new_backtrace, CliError, Result}; +use leo_errors::{CliError, Result}; use std::{ fs::{ @@ -89,37 +89,34 @@ impl Config { if !Path::exists(&config_path) { // Create a new default `config.toml` file if it doesn't already exist - create_dir_all(&config_dir).map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; + create_dir_all(&config_dir).map_err(|e| CliError::cli_io_error(e))?; - let default_config_string = toml::to_string(&Config::default()) - .map_err(|e| CliError::failed_to_convert_to_toml(e, new_backtrace()))?; + let default_config_string = + toml::to_string(&Config::default()).map_err(|e| CliError::failed_to_convert_to_toml(e))?; - fs::write(&config_path, default_config_string).map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; + fs::write(&config_path, default_config_string).map_err(|e| CliError::cli_io_error(e))?; } let toml_string = match fs::read_to_string(&config_path) { Ok(mut toml) => { // If the config is using an incorrect format, rewrite it. if toml::from_str::(&toml).is_err() { - let default_config_string = toml::to_string(&Config::default()) - .map_err(|e| CliError::failed_to_convert_to_toml(e, new_backtrace()))?; - fs::write(&config_path, default_config_string.clone()) - .map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; + let default_config_string = + toml::to_string(&Config::default()).map_err(|e| CliError::failed_to_convert_to_toml(e))?; + fs::write(&config_path, default_config_string.clone()).map_err(|e| CliError::cli_io_error(e))?; toml = default_config_string; } toml } Err(_) => { - create_dir_all(&config_dir).map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; - toml::to_string(&Config::default()) - .map_err(|e| CliError::failed_to_convert_to_toml(e, new_backtrace()))? + create_dir_all(&config_dir).map_err(|e| CliError::cli_io_error(e))?; + toml::to_string(&Config::default()).map_err(|e| CliError::failed_to_convert_to_toml(e))? } }; // Parse the contents into the `Config` struct - let config: Config = - toml::from_str(&toml_string).map_err(|e| CliError::failed_to_convert_from_toml(e, new_backtrace()))?; + let config: Config = toml::from_str(&toml_string).map_err(|e| CliError::failed_to_convert_from_toml(e))?; Ok(config) } @@ -135,9 +132,9 @@ impl Config { let config_path = LEO_CONFIG_PATH.clone(); fs::write( &config_path, - toml::to_string(&config).map_err(|e| CliError::failed_to_convert_to_toml(e, new_backtrace()))?, + toml::to_string(&config).map_err(|e| CliError::failed_to_convert_to_toml(e))?, ) - .map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; + .map_err(|e| CliError::cli_io_error(e))?; } Ok(()) @@ -149,50 +146,46 @@ pub fn write_token_and_username(token: &str, username: &str) -> Result<()> { // Create Leo config directory if it not exists if !Path::new(&config_dir).exists() { - create_dir_all(&config_dir).map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; + create_dir_all(&config_dir).map_err(|e| CliError::cli_io_error(e))?; } - let mut credentials = - File::create(&LEO_CREDENTIALS_PATH.to_path_buf()).map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; + let mut credentials = File::create(&LEO_CREDENTIALS_PATH.to_path_buf()).map_err(|e| CliError::cli_io_error(e))?; credentials .write_all(token.as_bytes()) - .map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; + .map_err(|e| CliError::cli_io_error(e))?; - let mut username_file = - File::create(&LEO_USERNAME_PATH.to_path_buf()).map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; + let mut username_file = File::create(&LEO_USERNAME_PATH.to_path_buf()).map_err(|e| CliError::cli_io_error(e))?; username_file .write_all(username.as_bytes()) - .map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; + .map_err(|e| CliError::cli_io_error(e))?; Ok(()) } pub fn read_token() -> Result { - let mut credentials = - File::open(&LEO_CREDENTIALS_PATH.to_path_buf()).map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; + let mut credentials = File::open(&LEO_CREDENTIALS_PATH.to_path_buf()).map_err(|e| CliError::cli_io_error(e))?; let mut buf = String::new(); credentials .read_to_string(&mut buf) - .map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; + .map_err(|e| CliError::cli_io_error(e))?; Ok(buf) } pub fn read_username() -> Result { - let mut username = - File::open(&LEO_USERNAME_PATH.to_path_buf()).map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; + let mut username = File::open(&LEO_USERNAME_PATH.to_path_buf()).map_err(|e| CliError::cli_io_error(e))?; let mut buf = String::new(); username .read_to_string(&mut buf) - .map_err(|e| CliError::cli_io_error(e, new_backtrace()))?; + .map_err(|e| CliError::cli_io_error(e))?; Ok(buf) } pub fn remove_token_and_username() -> Result<()> { if let Err(err) = fs::remove_file(&LEO_CREDENTIALS_PATH.to_path_buf()) { - return Err(CliError::remove_token_and_username(err, new_backtrace()).into()); + return Err(CliError::remove_token_and_username(err).into()); } if let Err(err) = fs::remove_file(&LEO_USERNAME_PATH.to_path_buf()) { - return Err(CliError::remove_token_and_username(err, new_backtrace()).into()); + return Err(CliError::remove_token_and_username(err).into()); } Ok(()) } diff --git a/leo/context.rs b/leo/context.rs index 07cb6b47c6..14fba3c141 100644 --- a/leo/context.rs +++ b/leo/context.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use crate::{api::Api, config}; -use leo_errors::{new_backtrace, CliError, Result}; +use leo_errors::{CliError, Result}; use leo_package::root::Manifest; use std::{convert::TryFrom, env::current_dir, path::PathBuf}; @@ -37,7 +37,7 @@ impl Context { pub fn dir(&self) -> Result { match &self.path { Some(path) => Ok(path.clone()), - None => Ok(current_dir().map_err(|e| CliError::cli_io_error(e, new_backtrace()))?), + None => Ok(current_dir().map_err(|e| CliError::cli_io_error(e))?), } } diff --git a/leo/logger.rs b/leo/logger.rs index 91c72ea7f7..0cb89fa3b6 100644 --- a/leo/logger.rs +++ b/leo/logger.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use leo_errors::{new_backtrace, CliError, Result}; +use leo_errors::{CliError, Result}; use std::{fmt, sync::Once}; @@ -214,7 +214,7 @@ where pub fn init_logger(_app_name: &'static str, verbosity: usize) -> Result<()> { // This line enables Windows 10 ANSI coloring API. #[cfg(target_family = "windows")] - ansi_term::enable_ansi_support().map_err(|_| CliError::failed_to_enable_ansi_support(new_backtrace()))?; + ansi_term::enable_ansi_support().map_err(|_| CliError::failed_to_enable_ansi_support())?; use tracing_subscriber::fmt::writer::MakeWriterExt; diff --git a/leo/main.rs b/leo/main.rs index 4de5ef6e20..c0f8e02aed 100644 --- a/leo/main.rs +++ b/leo/main.rs @@ -39,6 +39,7 @@ use commands::{ }; use leo_errors::Result; +use color_backtrace; use colored::Colorize; use std::{path::PathBuf, process::exit}; use structopt::{clap::AppSettings, StructOpt}; @@ -182,6 +183,7 @@ enum CommandOpts { } fn main() { + color_backtrace::install(); handle_error(run_with_args(Opt::from_args())) } @@ -244,7 +246,7 @@ fn handle_error(res: Result) -> T { .collect::>() .join("\n") ); - exit(1); + exit(err.exit_code()); } } } diff --git a/leo/updater.rs b/leo/updater.rs index 02919bb639..ff90e12f8a 100644 --- a/leo/updater.rs +++ b/leo/updater.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use crate::config::Config; -use leo_errors::{new_backtrace, CliError, Result}; +use leo_errors::{CliError, Result}; use colored::Colorize; use self_update::{backends::github, version::bump_is_greater, Status}; @@ -34,9 +34,9 @@ impl Updater { .repo_owner(Self::LEO_REPO_OWNER) .repo_name(Self::LEO_REPO_NAME) .build() - .map_err(|e| CliError::self_update_error(e, new_backtrace()))? + .map_err(|e| CliError::self_update_error(e))? .fetch() - .map_err(|e| CliError::self_update_error(e, new_backtrace()))?; + .map_err(|e| CliError::self_update_error(e))?; let mut output = "\nList of available versions\n".to_string(); for release in releases { @@ -60,9 +60,9 @@ impl Updater { .no_confirm(true) .show_output(show_output) .build() - .map_err(|e| CliError::self_update_error(e, new_backtrace()))? + .map_err(|e| CliError::self_update_error(e))? .update() - .map_err(|e| CliError::self_update_error(e, new_backtrace()))?; + .map_err(|e| CliError::self_update_error(e))?; Ok(status) } @@ -75,19 +75,17 @@ impl Updater { .bin_name(Self::LEO_BIN_NAME) .current_version(env!("CARGO_PKG_VERSION")) .build() - .map_err(|e| CliError::self_update_error(e, new_backtrace()))?; + .map_err(|e| CliError::self_update_error(e))?; let current_version = updater.current_version(); let latest_release = updater .get_latest_release() - .map_err(|e| CliError::self_update_error(e, new_backtrace()))?; + .map_err(|e| CliError::self_update_error(e))?; - if bump_is_greater(¤t_version, &latest_release.version) - .map_err(|e| CliError::self_update_error(e, new_backtrace()))? - { + if bump_is_greater(¤t_version, &latest_release.version).map_err(|e| CliError::self_update_error(e))? { Ok(latest_release.version) } else { - Err(CliError::old_release_version(current_version, latest_release.version, new_backtrace()).into()) + Err(CliError::old_release_version(current_version, latest_release.version).into()) } } diff --git a/package/src/imports/directory.rs b/package/src/imports/directory.rs index 17a98fd41a..abf58e9cdf 100644 --- a/package/src/imports/directory.rs +++ b/package/src/imports/directory.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use leo_errors::{new_backtrace, PackageError, Result}; +use leo_errors::{PackageError, Result}; use std::{borrow::Cow, fs, path::Path}; @@ -30,7 +30,7 @@ impl ImportsDirectory { path.to_mut().push(IMPORTS_DIRECTORY_NAME); } - fs::create_dir_all(&path).map_err(|e| PackageError::failed_to_create_imports_directory(e, new_backtrace()))?; + fs::create_dir_all(&path).map_err(|e| PackageError::failed_to_create_imports_directory(e))?; Ok(()) } @@ -44,10 +44,10 @@ impl ImportsDirectory { path.to_mut().push(package_name); if !path.exists() || !path.is_dir() { - return Err(PackageError::import_does_not_exist(package_name, new_backtrace()).into()); + return Err(PackageError::import_does_not_exist(package_name).into()); } - fs::remove_dir_all(&path).map_err(|e| PackageError::failed_to_remove_imports_directory(e, new_backtrace()))?; + fs::remove_dir_all(&path).map_err(|e| PackageError::failed_to_remove_imports_directory(e))?; Ok(()) } diff --git a/package/src/inputs/directory.rs b/package/src/inputs/directory.rs index 76e748c8a7..1b1e205bd5 100644 --- a/package/src/inputs/directory.rs +++ b/package/src/inputs/directory.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use leo_errors::{new_backtrace, PackageError, Result}; +use leo_errors::{PackageError, Result}; use std::{ borrow::Cow, @@ -35,7 +35,7 @@ impl InputsDirectory { path.to_mut().push(INPUTS_DIRECTORY_NAME); } - fs::create_dir_all(&path).map_err(|e| PackageError::failed_to_create_inputs_directory(e, new_backtrace()))?; + fs::create_dir_all(&path).map_err(|e| PackageError::failed_to_create_inputs_directory(e))?; Ok(()) } @@ -44,8 +44,7 @@ impl InputsDirectory { let mut path = path.to_owned(); path.push(INPUTS_DIRECTORY_NAME); - let directory = - fs::read_dir(&path).map_err(|e| PackageError::failed_to_read_inputs_directory(e, new_backtrace()))?; + let directory = fs::read_dir(&path).map_err(|e| PackageError::failed_to_read_inputs_directory(e))?; let mut file_paths = Vec::new(); parse_file_paths(directory, &mut file_paths)?; @@ -55,26 +54,20 @@ impl InputsDirectory { fn parse_file_paths(directory: ReadDir, file_paths: &mut Vec) -> Result<()> { for file_entry in directory.into_iter() { - let file_entry = file_entry.map_err(|e| PackageError::failed_to_get_input_file_entry(e, new_backtrace()))?; + let file_entry = file_entry.map_err(|e| PackageError::failed_to_get_input_file_entry(e))?; let file_path = file_entry.path(); // Verify that the entry is structured as a valid file or directory - let file_type = file_entry.file_type().map_err(|e| { - PackageError::failed_to_get_input_file_type(file_path.as_os_str().to_owned(), e, new_backtrace()) - })?; + let file_type = file_entry + .file_type() + .map_err(|e| PackageError::failed_to_get_input_file_type(file_path.as_os_str().to_owned(), e))?; if file_type.is_dir() { - let directory = fs::read_dir(&file_path) - .map_err(|e| PackageError::failed_to_read_inputs_directory(e, new_backtrace()))?; + let directory = fs::read_dir(&file_path).map_err(|e| PackageError::failed_to_read_inputs_directory(e))?; parse_file_paths(directory, file_paths)?; continue; } else if !file_type.is_file() { - return Err(PackageError::invalid_input_file_type( - file_path.as_os_str().to_owned(), - file_type, - new_backtrace(), - ) - .into()); + return Err(PackageError::invalid_input_file_type(file_path.as_os_str().to_owned(), file_type).into()); } file_paths.push(file_path); diff --git a/package/src/inputs/input.rs b/package/src/inputs/input.rs index d0bf718950..531cf88975 100644 --- a/package/src/inputs/input.rs +++ b/package/src/inputs/input.rs @@ -18,7 +18,7 @@ use crate::inputs::INPUTS_DIRECTORY_NAME; -use leo_errors::{new_backtrace, PackageError, Result}; +use leo_errors::{PackageError, Result}; use serde::Deserialize; use std::{ @@ -59,17 +59,17 @@ impl InputFile { let path = self.setup_file_path(path); let input = fs::read_to_string(&path) - .map_err(|_| PackageError::failed_to_read_input_file(path.clone().into_owned(), new_backtrace()))?; + .map_err(|_| PackageError::failed_to_read_input_file(path.clone().into_owned()))?; Ok((input, path)) } /// Writes the standard input format to a file. pub fn write_to(self, path: &Path) -> Result<()> { let path = self.setup_file_path(path); - let mut file = File::create(&path).map_err(|e| PackageError::io_error_input_file(e, new_backtrace()))?; + let mut file = File::create(&path).map_err(|e| PackageError::io_error_input_file(e))?; file.write_all(self.template().as_bytes()) - .map_err(|e| PackageError::io_error_input_file(e, new_backtrace()))?; + .map_err(|e| PackageError::io_error_input_file(e))?; Ok(()) } diff --git a/package/src/inputs/pairs.rs b/package/src/inputs/pairs.rs index 7294b5bb28..427349c656 100644 --- a/package/src/inputs/pairs.rs +++ b/package/src/inputs/pairs.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use crate::inputs::{InputFile, InputsDirectory, StateFile, INPUT_FILE_EXTENSION, STATE_FILE_EXTENSION}; -use leo_errors::{new_backtrace, LeoError, PackageError}; +use leo_errors::{LeoError, PackageError}; use std::{collections::HashMap, convert::TryFrom, path::Path}; @@ -58,13 +58,11 @@ impl TryFrom<&Path> for InputPairs { Some(stem) => match stem.to_str() { Some(file_name) => file_name, None => { - return Err( - PackageError::failed_to_get_input_file_name(file.as_os_str(), new_backtrace()).into(), - ); + return Err(PackageError::failed_to_get_input_file_name(file.as_os_str()).into()); } }, None => { - return Err(PackageError::failed_to_get_input_file_name(file.as_os_str(), new_backtrace()).into()); + return Err(PackageError::failed_to_get_input_file_name(file.as_os_str()).into()); } }; diff --git a/package/src/inputs/state.rs b/package/src/inputs/state.rs index 057d72bd0e..d07cf78da0 100644 --- a/package/src/inputs/state.rs +++ b/package/src/inputs/state.rs @@ -17,7 +17,7 @@ //! The `program.state` file. use crate::inputs::INPUTS_DIRECTORY_NAME; -use leo_errors::{new_backtrace, PackageError, Result}; +use leo_errors::{PackageError, Result}; use serde::Deserialize; use std::{ @@ -58,18 +58,18 @@ impl StateFile { let path = self.setup_file_path(path); let input = fs::read_to_string(&path) - .map_err(|_| PackageError::failed_to_read_state_file(path.clone().into_owned(), new_backtrace()))?; + .map_err(|_| PackageError::failed_to_read_state_file(path.clone().into_owned()))?; Ok((input, path)) } /// Writes the standard input format to a file. pub fn write_to(self, path: &Path) -> Result<()> { let path = self.setup_file_path(path); - let mut file = File::create(&path).map_err(|e| PackageError::io_error_state_file(e, new_backtrace()))?; + let mut file = File::create(&path).map_err(|e| PackageError::io_error_state_file(e))?; Ok(file .write_all(self.template().as_bytes()) - .map_err(|e| PackageError::io_error_state_file(e, new_backtrace()))?) + .map_err(|e| PackageError::io_error_state_file(e))?) } fn template(&self) -> String { diff --git a/package/src/outputs/checksum.rs b/package/src/outputs/checksum.rs index e0b3f10b8d..bd557b3f51 100644 --- a/package/src/outputs/checksum.rs +++ b/package/src/outputs/checksum.rs @@ -17,7 +17,7 @@ //! The build checksum file. use crate::outputs::OUTPUTS_DIRECTORY_NAME; -use leo_errors::{new_backtrace, PackageError, Result}; +use leo_errors::{PackageError, Result}; use serde::Deserialize; use std::{ @@ -53,18 +53,18 @@ impl ChecksumFile { pub fn read_from(&self, path: &Path) -> Result { let path = self.setup_file_path(path); - let string = fs::read_to_string(&path) - .map_err(|_| PackageError::failed_to_read_checksum_file(path.into_owned(), new_backtrace()))?; + let string = + fs::read_to_string(&path).map_err(|_| PackageError::failed_to_read_checksum_file(path.into_owned()))?; Ok(string) } /// Writes the given checksum to a file. pub fn write_to(&self, path: &Path, checksum: String) -> Result<()> { let path = self.setup_file_path(path); - let mut file = File::create(&path).map_err(|e| PackageError::io_error_checksum_file(e, new_backtrace()))?; + let mut file = File::create(&path).map_err(|e| PackageError::io_error_checksum_file(e))?; file.write_all(checksum.as_bytes()) - .map_err(|e| PackageError::io_error_checksum_file(e, new_backtrace()))?; + .map_err(|e| PackageError::io_error_checksum_file(e))?; Ok(()) } @@ -76,8 +76,7 @@ impl ChecksumFile { return Ok(false); } - fs::remove_file(&path) - .map_err(|_| PackageError::failed_to_remove_checksum_file(path.into_owned(), new_backtrace()))?; + fs::remove_file(&path).map_err(|_| PackageError::failed_to_remove_checksum_file(path.into_owned()))?; Ok(true) } diff --git a/package/src/outputs/circuit.rs b/package/src/outputs/circuit.rs index eaa2052d4e..9076668aa2 100644 --- a/package/src/outputs/circuit.rs +++ b/package/src/outputs/circuit.rs @@ -17,7 +17,7 @@ //! The serialized circuit output file. use crate::outputs::OUTPUTS_DIRECTORY_NAME; -use leo_errors::{new_backtrace, PackageError, Result}; +use leo_errors::{PackageError, Result}; use serde::Deserialize; use std::{ @@ -53,18 +53,18 @@ impl CircuitFile { pub fn read_from(&self, path: &Path) -> Result { let path = self.setup_file_path(path); - let string = fs::read_to_string(&path) - .map_err(|_| PackageError::failed_to_read_circuit_file(path.into_owned(), new_backtrace()))?; + let string = + fs::read_to_string(&path).map_err(|_| PackageError::failed_to_read_circuit_file(path.into_owned()))?; Ok(string) } /// Writes the given serialized circuit to a file. pub fn write_to(&self, path: &Path, circuit: String) -> Result<()> { let path = self.setup_file_path(path); - let mut file = File::create(&path).map_err(|e| PackageError::io_error_circuit_file(e, new_backtrace()))?; + let mut file = File::create(&path).map_err(|e| PackageError::io_error_circuit_file(e))?; file.write_all(circuit.as_bytes()) - .map_err(|e| PackageError::io_error_circuit_file(e, new_backtrace()))?; + .map_err(|e| PackageError::io_error_circuit_file(e))?; Ok(()) } @@ -76,7 +76,7 @@ impl CircuitFile { return Ok(false); } - fs::remove_file(&path).map_err(|_| PackageError::failed_to_remove_circuit_file(path, new_backtrace()))?; + fs::remove_file(&path).map_err(|_| PackageError::failed_to_remove_circuit_file(path))?; Ok(true) } diff --git a/package/src/outputs/directory.rs b/package/src/outputs/directory.rs index f370748827..ab72c99e92 100644 --- a/package/src/outputs/directory.rs +++ b/package/src/outputs/directory.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use leo_errors::{new_backtrace, PackageError, Result}; +use leo_errors::{PackageError, Result}; use std::{borrow::Cow, fs, path::Path}; @@ -30,7 +30,7 @@ impl OutputsDirectory { path.to_mut().push(OUTPUTS_DIRECTORY_NAME); } - fs::create_dir_all(&path).map_err(|e| PackageError::failed_to_create_inputs_directory(e, new_backtrace()))?; + fs::create_dir_all(&path).map_err(|e| PackageError::failed_to_create_inputs_directory(e))?; Ok(()) } @@ -42,8 +42,7 @@ impl OutputsDirectory { } if path.exists() { - fs::remove_dir_all(&path) - .map_err(|e| PackageError::failed_to_create_inputs_directory(e, new_backtrace()))?; + fs::remove_dir_all(&path).map_err(|e| PackageError::failed_to_create_inputs_directory(e))?; } Ok(()) diff --git a/package/src/outputs/proof.rs b/package/src/outputs/proof.rs index 94573bec8e..e2c0a08b7c 100644 --- a/package/src/outputs/proof.rs +++ b/package/src/outputs/proof.rs @@ -17,7 +17,7 @@ //! The proof file. use crate::outputs::OUTPUTS_DIRECTORY_NAME; -use leo_errors::{new_backtrace, PackageError, Result}; +use leo_errors::{PackageError, Result}; use serde::Deserialize; use std::{ @@ -53,18 +53,18 @@ impl ProofFile { pub fn read_from(&self, path: &Path) -> Result { let path = self.setup_file_path(path); - let string = fs::read_to_string(&path) - .map_err(|_| PackageError::failed_to_read_proof_file(path.into_owned(), new_backtrace()))?; + let string = + fs::read_to_string(&path).map_err(|_| PackageError::failed_to_read_proof_file(path.into_owned()))?; Ok(string) } /// Writes the given proof to a file. pub fn write_to(&self, path: &Path, proof: &[u8]) -> Result<()> { let path = self.setup_file_path(path); - let mut file = File::create(&path).map_err(|e| PackageError::io_error_proof_file(e, new_backtrace()))?; + let mut file = File::create(&path).map_err(|e| PackageError::io_error_proof_file(e))?; file.write_all(proof) - .map_err(|e| PackageError::io_error_proof_file(e, new_backtrace()))?; + .map_err(|e| PackageError::io_error_proof_file(e))?; tracing::info!("Saving proof... ({:?})", path); Ok(()) @@ -78,7 +78,7 @@ impl ProofFile { return Ok(false); } - fs::remove_file(&path).map_err(|_| PackageError::failed_to_remove_proof_file(path, new_backtrace()))?; + fs::remove_file(&path).map_err(|_| PackageError::failed_to_remove_proof_file(path))?; Ok(true) } diff --git a/package/src/outputs/proving_key.rs b/package/src/outputs/proving_key.rs index 99900f8cf9..64b920232e 100644 --- a/package/src/outputs/proving_key.rs +++ b/package/src/outputs/proving_key.rs @@ -17,7 +17,7 @@ //! The proving key file. use crate::outputs::OUTPUTS_DIRECTORY_NAME; -use leo_errors::{new_backtrace, PackageError, Result}; +use leo_errors::{PackageError, Result}; use serde::Deserialize; use std::{ @@ -57,18 +57,17 @@ impl ProvingKeyFile { pub fn read_from(&self, path: &Path) -> Result> { let path = self.setup_file_path(path); - let bytes = - fs::read(&path).map_err(|_| PackageError::failed_to_read_proving_key_file(path, new_backtrace()))?; + let bytes = fs::read(&path).map_err(|_| PackageError::failed_to_read_proving_key_file(path))?; Ok(bytes) } /// Writes the given proving key to a file. pub fn write_to<'a>(&self, path: &'a Path, proving_key: &[u8]) -> Result> { let path = self.setup_file_path(path); - let mut file = File::create(&path).map_err(|e| PackageError::io_error_proving_key_file(e, new_backtrace()))?; + let mut file = File::create(&path).map_err(|e| PackageError::io_error_proving_key_file(e))?; file.write_all(proving_key) - .map_err(|e| PackageError::io_error_proving_key_file(e, new_backtrace()))?; + .map_err(|e| PackageError::io_error_proving_key_file(e))?; Ok(path) } @@ -80,7 +79,7 @@ impl ProvingKeyFile { return Ok(false); } - fs::remove_file(&path).map_err(|_| PackageError::failed_to_remove_proving_key_file(path, new_backtrace()))?; + fs::remove_file(&path).map_err(|_| PackageError::failed_to_remove_proving_key_file(path))?; Ok(true) } diff --git a/package/src/outputs/verification_key.rs b/package/src/outputs/verification_key.rs index fa056c2f4b..5b3ba6f073 100644 --- a/package/src/outputs/verification_key.rs +++ b/package/src/outputs/verification_key.rs @@ -17,7 +17,7 @@ //! The verification key file. use crate::outputs::OUTPUTS_DIRECTORY_NAME; -use leo_errors::{new_backtrace, PackageError, Result}; +use leo_errors::{PackageError, Result}; use serde::Deserialize; use std::{ @@ -57,19 +57,18 @@ impl VerificationKeyFile { pub fn read_from(&self, path: &Path) -> Result> { let path = self.setup_file_path(path); - let bytes = fs::read(&path) - .map_err(|_| PackageError::failed_to_read_verification_key_file(path.into_owned(), new_backtrace()))?; + let bytes = + fs::read(&path).map_err(|_| PackageError::failed_to_read_verification_key_file(path.into_owned()))?; Ok(bytes) } /// Writes the given verification key to a file. pub fn write_to<'a>(&self, path: &'a Path, verification_key: &[u8]) -> Result> { let path = self.setup_file_path(path); - let mut file = - File::create(&path).map_err(|e| PackageError::io_error_verification_key_file(e, new_backtrace()))?; + let mut file = File::create(&path).map_err(|e| PackageError::io_error_verification_key_file(e))?; file.write_all(verification_key) - .map_err(|e| PackageError::io_error_verification_key_file(e, new_backtrace()))?; + .map_err(|e| PackageError::io_error_verification_key_file(e))?; Ok(path) } @@ -81,8 +80,7 @@ impl VerificationKeyFile { return Ok(false); } - fs::remove_file(&path) - .map_err(|_| PackageError::failed_to_remove_verification_key_file(path, new_backtrace()))?; + fs::remove_file(&path).map_err(|_| PackageError::failed_to_remove_verification_key_file(path))?; Ok(true) } diff --git a/package/src/package.rs b/package/src/package.rs index 1e78a7ffa2..9cb628421e 100644 --- a/package/src/package.rs +++ b/package/src/package.rs @@ -21,7 +21,7 @@ use crate::{ source::{MainFile, SourceDirectory}, }; -use leo_errors::{new_backtrace, PackageError, Result}; +use leo_errors::{PackageError, Result}; use serde::Deserialize; use std::path::Path; @@ -38,7 +38,7 @@ impl Package { pub fn new(package_name: &str) -> Result { // Check that the package name is valid. if !Self::is_package_name_valid(package_name) { - return Err(PackageError::invalid_package_name(package_name, new_backtrace()).into()); + return Err(PackageError::invalid_package_name(package_name).into()); } Ok(Self { @@ -187,12 +187,7 @@ impl Package { // First, verify that this directory is not already initialized as a Leo package. { if !Self::can_initialize(package_name, path) { - return Err(PackageError::failed_to_initialize_package( - package_name, - path.as_os_str(), - new_backtrace(), - ) - .into()); + return Err(PackageError::failed_to_initialize_package(package_name, path.as_os_str()).into()); } } // Next, initialize this directory as a Leo package. @@ -230,12 +225,7 @@ impl Package { // Next, verify that a valid Leo package has been initialized in this directory { if !Self::is_initialized(package_name, path) { - return Err(PackageError::failed_to_initialize_package( - package_name, - path.as_os_str(), - new_backtrace(), - ) - .into()); + return Err(PackageError::failed_to_initialize_package(package_name, path.as_os_str()).into()); } } diff --git a/package/src/root/gitignore.rs b/package/src/root/gitignore.rs index f01b4d9f24..b324c56df0 100644 --- a/package/src/root/gitignore.rs +++ b/package/src/root/gitignore.rs @@ -16,7 +16,7 @@ //! The `.gitignore` file. -use leo_errors::{new_backtrace, PackageError, Result}; +use leo_errors::{PackageError, Result}; use serde::Deserialize; use std::{borrow::Cow, fs::File, io::Write, path::Path}; @@ -45,9 +45,9 @@ impl Gitignore { path.to_mut().push(GITIGNORE_FILENAME); } - let mut file = File::create(&path).map_err(|e| PackageError::io_error_gitignore_file(e, new_backtrace()))?; + let mut file = File::create(&path).map_err(|e| PackageError::io_error_gitignore_file(e))?; file.write_all(self.template().as_bytes()) - .map_err(|e| PackageError::io_error_gitignore_file(e, new_backtrace()))?; + .map_err(|e| PackageError::io_error_gitignore_file(e))?; Ok(()) } diff --git a/package/src/root/manifest.rs b/package/src/root/manifest.rs index 02e4a560f0..a18f7ac826 100644 --- a/package/src/root/manifest.rs +++ b/package/src/root/manifest.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use crate::package::Package; -use leo_errors::{new_backtrace, PackageError, Result}; +use leo_errors::{PackageError, Result}; use serde::Deserialize; use std::{ @@ -86,11 +86,11 @@ impl Manifest { path.to_mut().push(MANIFEST_FILENAME); } - let mut file = File::create(&path) - .map_err(|e| PackageError::failed_to_create_manifest_file(MANIFEST_FILENAME, e, new_backtrace()))?; + let mut file = + File::create(&path).map_err(|e| PackageError::failed_to_create_manifest_file(MANIFEST_FILENAME, e))?; file.write_all(self.template().as_bytes()) - .map_err(|e| PackageError::io_error_manifest_file(e, new_backtrace()))?; + .map_err(|e| PackageError::io_error_manifest_file(e))?; Ok(()) } @@ -125,18 +125,18 @@ impl TryFrom<&Path> for Manifest { path.to_mut().push(MANIFEST_FILENAME); } - let mut file = File::open(path.clone()) - .map_err(|e| PackageError::failed_to_open_manifest_file(MANIFEST_FILENAME, e, new_backtrace()))?; + let mut file = + File::open(path.clone()).map_err(|e| PackageError::failed_to_open_manifest_file(MANIFEST_FILENAME, e))?; let size = file .metadata() - .map_err(|e| PackageError::failed_to_get_manifest_metadata_file(MANIFEST_FILENAME, e, new_backtrace()))? + .map_err(|e| PackageError::failed_to_get_manifest_metadata_file(MANIFEST_FILENAME, e))? .len() as usize; let mut buffer = String::with_capacity(size); file.read_to_string(&mut buffer) - .map_err(|e| PackageError::failed_to_read_manifest_file(MANIFEST_FILENAME, e, new_backtrace()))?; + .map_err(|e| PackageError::failed_to_read_manifest_file(MANIFEST_FILENAME, e))?; // Determine if the old remote format is being used, and update to new convention @@ -222,15 +222,14 @@ author = "{author}" // Rewrite the toml file if it has been updated if buffer != refactored_toml { - let mut file = File::create(&path) - .map_err(|e| PackageError::failed_to_create_manifest_file(MANIFEST_FILENAME, e, new_backtrace()))?; + let mut file = + File::create(&path).map_err(|e| PackageError::failed_to_create_manifest_file(MANIFEST_FILENAME, e))?; file.write_all(refactored_toml.as_bytes()) - .map_err(|e| PackageError::failed_to_write_manifest_file(MANIFEST_FILENAME, e, new_backtrace()))?; + .map_err(|e| PackageError::failed_to_write_manifest_file(MANIFEST_FILENAME, e))?; } // Read the toml file - toml::from_str(&final_toml) - .map_err(|e| PackageError::failed_to_parse_manifest_file(MANIFEST_FILENAME, e, new_backtrace())) + toml::from_str(&final_toml).map_err(|e| PackageError::failed_to_parse_manifest_file(MANIFEST_FILENAME, e)) } } diff --git a/package/src/root/readme.rs b/package/src/root/readme.rs index 69bd002cdb..3cea5acf5e 100644 --- a/package/src/root/readme.rs +++ b/package/src/root/readme.rs @@ -17,7 +17,7 @@ //! The `README.md` file. -use leo_errors::{new_backtrace, PackageError, Result}; +use leo_errors::{PackageError, Result}; use serde::Deserialize; use std::{borrow::Cow, fs::File, io::Write, path::Path}; @@ -54,10 +54,10 @@ impl README { path.to_mut().push(README_FILENAME); } - let mut file = File::create(&path).map_err(|e| PackageError::io_error_readme_file(e, new_backtrace()))?; + let mut file = File::create(&path).map_err(|e| PackageError::io_error_readme_file(e))?; file.write_all(self.template().as_bytes()) - .map_err(|e| PackageError::io_error_readme_file(e, new_backtrace()))?; + .map_err(|e| PackageError::io_error_readme_file(e))?; Ok(()) } diff --git a/package/src/root/zip.rs b/package/src/root/zip.rs index 0878501318..c2a131986c 100644 --- a/package/src/root/zip.rs +++ b/package/src/root/zip.rs @@ -30,7 +30,7 @@ use crate::{ root::{MANIFEST_FILENAME, README_FILENAME}, source::{SOURCE_DIRECTORY_NAME, SOURCE_FILE_EXTENSION}, }; -use leo_errors::{new_backtrace, PackageError, Result}; +use leo_errors::{PackageError, Result}; use serde::Deserialize; use std::{ @@ -83,7 +83,7 @@ impl ZipFile { // Create zip file let path = self.setup_file_path(src_dir); - let file = File::create(&path).map_err(|e| PackageError::failed_to_create_zip_file(e, new_backtrace()))?; + let file = File::create(&path).map_err(|e| PackageError::failed_to_create_zip_file(e))?; let mut zip = ZipWriter::new(file); let options = FileOptions::default() .compression_method(zip::CompressionMethod::Stored) @@ -108,13 +108,13 @@ impl ZipFile { tracing::info!("Adding file {:?} as {:?}", path, name); #[allow(deprecated)] zip.start_file_from_path(name, options) - .map_err(|e| PackageError::io_error_zip_file(e, new_backtrace()))?; + .map_err(|e| PackageError::io_error_zip_file(e))?; - let mut f = File::open(path).map_err(|e| PackageError::failed_to_open_zip_file(e, new_backtrace()))?; + let mut f = File::open(path).map_err(|e| PackageError::failed_to_open_zip_file(e))?; f.read_to_end(&mut buffer) - .map_err(|e| PackageError::failed_to_read_zip_file(e, new_backtrace()))?; + .map_err(|e| PackageError::failed_to_read_zip_file(e))?; zip.write_all(&*buffer) - .map_err(|e| PackageError::failed_to_write_zip_file(e, new_backtrace()))?; + .map_err(|e| PackageError::failed_to_write_zip_file(e))?; buffer.clear(); } else if !name.as_os_str().is_empty() { @@ -123,12 +123,11 @@ impl ZipFile { tracing::info!("Adding directory {:?} as {:?}", path, name); #[allow(deprecated)] zip.add_directory_from_path(name, options) - .map_err(|e| PackageError::io_error_zip_file(e, new_backtrace()))?; + .map_err(|e| PackageError::io_error_zip_file(e))?; } } - zip.finish() - .map_err(|e| PackageError::io_error_zip_file(e, new_backtrace()))?; + zip.finish().map_err(|e| PackageError::io_error_zip_file(e))?; tracing::info!("Package zip file created successfully {:?}", path); @@ -143,7 +142,7 @@ impl ZipFile { return Ok(false); } - fs::remove_file(&path).map_err(|_| PackageError::failed_to_remove_zip_file(path, new_backtrace()))?; + fs::remove_file(&path).map_err(|_| PackageError::failed_to_remove_zip_file(path))?; Ok(true) } diff --git a/package/src/source/directory.rs b/package/src/source/directory.rs index f11d086acf..1d906c1b0e 100644 --- a/package/src/source/directory.rs +++ b/package/src/source/directory.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use leo_errors::{new_backtrace, PackageError, Result}; +use leo_errors::{PackageError, Result}; use std::{ borrow::Cow, @@ -36,7 +36,7 @@ impl SourceDirectory { path.to_mut().push(SOURCE_DIRECTORY_NAME); } - fs::create_dir_all(&path).map_err(|e| PackageError::failed_to_create_source_directory(e, new_backtrace()))?; + fs::create_dir_all(&path).map_err(|e| PackageError::failed_to_create_source_directory(e))?; Ok(()) } @@ -45,37 +45,29 @@ impl SourceDirectory { let mut path = Cow::from(path); path.to_mut().push(SOURCE_DIRECTORY_NAME); - let directory = - fs::read_dir(&path).map_err(|e| PackageError::failed_to_read_inputs_directory(e, new_backtrace()))?; + let directory = fs::read_dir(&path).map_err(|e| PackageError::failed_to_read_inputs_directory(e))?; let mut file_paths = Vec::new(); for file_entry in directory.into_iter() { - let file_entry = - file_entry.map_err(|e| PackageError::failed_to_get_source_file_entry(e, new_backtrace()))?; + let file_entry = file_entry.map_err(|e| PackageError::failed_to_get_source_file_entry(e))?; let file_path = file_entry.path(); // Verify that the entry is structured as a valid file - let file_type = file_entry.file_type().map_err(|e| { - PackageError::failed_to_get_source_file_type(file_path.as_os_str().to_owned(), e, new_backtrace()) - })?; + let file_type = file_entry + .file_type() + .map_err(|e| PackageError::failed_to_get_source_file_type(file_path.as_os_str().to_owned(), e))?; if !file_type.is_file() { - return Err(PackageError::invalid_source_file_type( - file_path.as_os_str().to_owned(), - file_type, - new_backtrace(), - ) - .into()); + return Err(PackageError::invalid_source_file_type(file_path.as_os_str().to_owned(), file_type).into()); } // Verify that the file has the default file extension - let file_extension = file_path.extension().ok_or_else(|| { - PackageError::failed_to_get_source_file_extension(file_path.as_os_str().to_owned(), new_backtrace()) - })?; + let file_extension = file_path + .extension() + .ok_or_else(|| PackageError::failed_to_get_source_file_extension(file_path.as_os_str().to_owned()))?; if file_extension != SOURCE_FILE_EXTENSION.trim_start_matches('.') { return Err(PackageError::invalid_source_file_extension( file_path.as_os_str().to_owned(), file_extension.to_owned(), - new_backtrace(), ) .into()); } diff --git a/package/src/source/main.rs b/package/src/source/main.rs index 7c7ec52ffc..5d7f15bbf0 100644 --- a/package/src/source/main.rs +++ b/package/src/source/main.rs @@ -17,7 +17,7 @@ //! The `main.leo` file. use crate::source::directory::SOURCE_DIRECTORY_NAME; -use leo_errors::{new_backtrace, PackageError, Result}; +use leo_errors::{PackageError, Result}; use serde::Deserialize; use std::{borrow::Cow, fs::File, io::Write, path::Path}; @@ -60,10 +60,10 @@ impl MainFile { path.to_mut().push(MAIN_FILENAME); } - let mut file = File::create(&path).map_err(|e| PackageError::io_error_main_file(e, new_backtrace()))?; + let mut file = File::create(&path).map_err(|e| PackageError::io_error_main_file(e))?; Ok(file .write_all(self.template().as_bytes()) - .map_err(|e| PackageError::io_error_main_file(e, new_backtrace()))?) + .map_err(|e| PackageError::io_error_main_file(e))?) } fn template(&self) -> String { diff --git a/parser/src/parser/context.rs b/parser/src/parser/context.rs index 3e7d1375b6..af64bd9c43 100644 --- a/parser/src/parser/context.rs +++ b/parser/src/parser/context.rs @@ -18,7 +18,7 @@ use std::{borrow::Cow, unimplemented}; use crate::{assert_no_whitespace, tokenizer::*, Token, KEYWORD_TOKENS}; use leo_ast::*; -use leo_errors::{new_backtrace, LeoError, ParserError, Result, Span}; +use leo_errors::{LeoError, ParserError, Result, Span}; use tendril::format_tendril; /// Stores a program in tokenized format plus additional context. @@ -64,7 +64,7 @@ impl ParserContext { /// Returns an unexpected end of function [`SyntaxError`]. /// pub fn eof(&self) -> LeoError { - ParserError::unexpected_eof(&self.end_span, new_backtrace()).into() + ParserError::unexpected_eof(&self.end_span).into() } /// @@ -300,7 +300,7 @@ impl ParserContext { if &token == inner { Ok(self.tokens.pop().unwrap().span) } else { - Err(ParserError::unexpected(inner, token, span, new_backtrace()).into()) + Err(ParserError::unexpected(inner, token, span).into()) } } else { Err(self.eof()) @@ -319,7 +319,6 @@ impl ParserContext { inner, token.iter().map(|x| format!("'{}'", x)).collect::>().join(", "), span, - new_backtrace(), ) .into()); } @@ -362,7 +361,7 @@ impl ParserContext { unimplemented!() } } else { - Err(ParserError::unexpected_str(inner, "ident", span, new_backtrace()).into()) + Err(ParserError::unexpected_str(inner, "ident", span).into()) } } else { Err(self.eof()) diff --git a/parser/src/parser/expression.rs b/parser/src/parser/expression.rs index 1d57d0c3c5..6ba5f20da5 100644 --- a/parser/src/parser/expression.rs +++ b/parser/src/parser/expression.rs @@ -16,7 +16,7 @@ use tendril::format_tendril; -use leo_errors::{new_backtrace, ParserError, Result}; +use leo_errors::{ParserError, Result}; use super::*; @@ -461,13 +461,7 @@ impl ParserContext { }); } else { let next = self.peek()?; - return Err(ParserError::unexpected_str( - &next.token, - "int or ident", - &next.span, - new_backtrace(), - ) - .into()); + return Err(ParserError::unexpected_str(&next.token, "int or ident", &next.span).into()); } } Token::LeftParen => { @@ -614,7 +608,7 @@ impl ParserContext { let first = match first { SpreadOrExpression::Spread(first) => { let span = span + first.span(); - return Err(ParserError::spread_in_array_init(&span, new_backtrace()).into()); + return Err(ParserError::spread_in_array_init(&span).into()); } SpreadOrExpression::Expression(x) => x, }; @@ -731,7 +725,7 @@ impl ParserContext { Expression::Identifier(ident) } token => { - return Err(ParserError::unexpected_str(token, "expression", &span, new_backtrace()).into()); + return Err(ParserError::unexpected_str(token, "expression", &span).into()); } }) } diff --git a/parser/src/parser/file.rs b/parser/src/parser/file.rs index 2704b8af36..9de6602f17 100644 --- a/parser/src/parser/file.rs +++ b/parser/src/parser/file.rs @@ -16,7 +16,7 @@ use tendril::format_tendril; -use leo_errors::{new_backtrace, ParserError, Result}; +use leo_errors::{ParserError, Result}; use crate::KEYWORD_TOKENS; @@ -48,7 +48,7 @@ impl ParserContext { functions.insert(id, function); } Token::Ident(ident) if ident.as_ref() == "test" => { - return Err(ParserError::test_function(&token.span, new_backtrace()).into()); + return Err(ParserError::test_function(&token.span).into()); // self.expect(Token::Test)?; // let (id, function) = self.parse_function_declaration()?; // tests.insert(id, TestFunction { @@ -75,7 +75,6 @@ impl ParserContext { .collect::>() .join(", "), &token.span, - new_backtrace(), ) .into()); } @@ -98,7 +97,7 @@ impl ParserContext { let start = self.expect(Token::At)?; let name = self.expect_ident()?; if name.name.as_ref() == "context" { - return Err(ParserError::context_annotation(&name.span, new_backtrace()).into()); + return Err(ParserError::context_annotation(&name.span).into()); } assert_no_whitespace(&start, &name.span, &name.name, "@")?; @@ -118,7 +117,6 @@ impl ParserContext { .collect::>() .join(", "), &end.span, - new_backtrace(), ) .into()); } @@ -132,13 +130,7 @@ impl ParserContext { args.push(int.value); } else { let token = self.peek()?; - return Err(ParserError::unexpected_str( - &token.token, - "ident or int", - &token.span, - new_backtrace(), - ) - .into()); + return Err(ParserError::unexpected_str(&token.token, "ident or int", &token.span).into()); } if self.eat(Token::Comma).is_none() && !comma { end_span = self.expect(Token::RightParen)?; @@ -175,7 +167,7 @@ impl ParserContext { } if out.is_empty() { - return Err(ParserError::invalid_import_list(span, new_backtrace()).into()); + return Err(ParserError::invalid_import_list(span).into()); } Ok(out) @@ -254,7 +246,7 @@ impl ParserContext { // Return an error if the package name contains a keyword. if let Some(token) = KEYWORD_TOKENS.iter().find(|x| x.to_string() == base.name.as_ref()) { - return Err(ParserError::unexpected_str(token, "package name", &base.span, new_backtrace()).into()); + return Err(ParserError::unexpected_str(token, "package name", &base.span).into()); } // Return an error if the package name contains invalid characters. @@ -263,7 +255,7 @@ impl ParserContext { .chars() .all(|x| x.is_ascii_lowercase() || x.is_ascii_digit() || x == '-' || x == '_') { - return Err(ParserError::invalid_package_name(&base.span, new_backtrace()).into()); + return Err(ParserError::invalid_package_name(&base.span).into()); } // Return the package name. @@ -325,14 +317,14 @@ impl ParserContext { let peeked = &self.peek()?; if peeked.token == Token::Semicolon { if commas { - return Err(ParserError::mixed_commas_and_semicolons(&peeked.span, new_backtrace()).into()); + return Err(ParserError::mixed_commas_and_semicolons(&peeked.span).into()); } semi_colons = true; self.expect(Token::Semicolon)?; } else { if semi_colons { - return Err(ParserError::mixed_commas_and_semicolons(&peeked.span, new_backtrace()).into()); + return Err(ParserError::mixed_commas_and_semicolons(&peeked.span).into()); } commas = true; @@ -389,7 +381,6 @@ impl ParserContext { .collect::>() .join(", "), &peeked.span, - new_backtrace(), ) .into()); } @@ -444,7 +435,7 @@ impl ParserContext { } if let Some(mutable) = &mutable { - return Err(ParserError::mut_function_input(&(&mutable.span + &name.span), new_backtrace()).into()); + return Err(ParserError::mut_function_input(&(&mutable.span + &name.span)).into()); } self.expect(Token::Colon)?; diff --git a/parser/src/parser/mod.rs b/parser/src/parser/mod.rs index a7d16a4b54..cf6ae0e5fc 100644 --- a/parser/src/parser/mod.rs +++ b/parser/src/parser/mod.rs @@ -32,14 +32,14 @@ use std::unimplemented; use crate::{tokenizer::*, Token}; use indexmap::IndexMap; use leo_ast::*; -use leo_errors::{new_backtrace, ParserError, Result, Span}; +use leo_errors::{ParserError, Result, Span}; pub(crate) fn assert_no_whitespace(left_span: &Span, right_span: &Span, left: &str, right: &str) -> Result<()> { if left_span.col_stop != right_span.col_start { let mut error_span = left_span + right_span; error_span.col_start = left_span.col_stop - 1; error_span.col_stop = right_span.col_start - 1; - return Err(ParserError::unexpected_whitespace(left, right, &error_span, new_backtrace()).into()); + return Err(ParserError::unexpected_whitespace(left, right, &error_span).into()); } Ok(()) diff --git a/parser/src/parser/statement.rs b/parser/src/parser/statement.rs index 0f5b404dfa..c452549e62 100644 --- a/parser/src/parser/statement.rs +++ b/parser/src/parser/statement.rs @@ -16,7 +16,7 @@ use super::*; -use leo_errors::{new_backtrace, ParserError, Result}; +use leo_errors::{ParserError, Result}; const ASSIGN_TOKENS: &[Token] = &[ Token::Assign, @@ -64,7 +64,7 @@ impl ParserContext { accesses.push(AssigneeAccess::ArrayIndex(*expr.index)); } Expression::Identifier(id) => identifier = id, - _ => return Err(ParserError::invalid_assignment_target(expr.span(), new_backtrace()).into()), + _ => return Err(ParserError::invalid_assignment_target(expr.span()).into()), } Ok(identifier) } @@ -191,13 +191,7 @@ impl ParserContext { match s { Statement::Block(_) | Statement::Conditional(_) => Some(Box::new(s)), s => { - return Err(ParserError::unexpected_statement( - &s, - "Block or Conditional", - s.span(), - new_backtrace(), - ) - .into()); + return Err(ParserError::unexpected_statement(&s, "Block or Conditional", s.span()).into()); } } } else { @@ -251,7 +245,7 @@ impl ParserContext { chars } SpannedToken { token, span } => { - return Err(ParserError::unexpected_str(token, "formatted string", &span, new_backtrace()).into()); + return Err(ParserError::unexpected_str(token, "formatted string", &span).into()); } }; @@ -286,13 +280,7 @@ impl ParserContext { "error" => ConsoleFunction::Error(self.parse_console_args()?), "log" => ConsoleFunction::Log(self.parse_console_args()?), x => { - return Err(ParserError::unexpected_ident( - x, - &["assert", "error", "log"], - &function.span, - new_backtrace(), - ) - .into()); + return Err(ParserError::unexpected_ident(x, &["assert", "error", "log"], &function.span).into()); } }; self.expect(Token::RightParen)?; @@ -311,7 +299,7 @@ impl ParserContext { pub fn parse_variable_name(&mut self, span: &SpannedToken) -> Result { let mutable = self.eat(Token::Mut); if let Some(mutable) = &mutable { - return Err(ParserError::let_mut_statement(&(&mutable.span + &span.span), new_backtrace()).into()); + return Err(ParserError::let_mut_statement(&(&mutable.span + &span.span)).into()); } let name = self.expect_ident()?; diff --git a/parser/src/parser/type_.rs b/parser/src/parser/type_.rs index 3cdb1bfcbc..e79cb494f4 100644 --- a/parser/src/parser/type_.rs +++ b/parser/src/parser/type_.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use super::*; -use leo_errors::{new_backtrace, ParserError, Result}; +use leo_errors::{ParserError, Result}; const TYPE_TOKENS: &[Token] = &[ Token::I8, @@ -69,7 +69,7 @@ impl ParserContext { dimensions.push(int); } else { let token = self.peek()?; - return Err(ParserError::unexpected_str(&token.token, "int", &token.span, new_backtrace()).into()); + return Err(ParserError::unexpected_str(&token.token, "int", &token.span).into()); } if self.eat(Token::Comma).is_none() { break; diff --git a/parser/src/tokenizer/mod.rs b/parser/src/tokenizer/mod.rs index dc072919fc..3ba21cd965 100644 --- a/parser/src/tokenizer/mod.rs +++ b/parser/src/tokenizer/mod.rs @@ -28,7 +28,7 @@ pub(crate) use self::token::*; pub(crate) mod lexer; pub(crate) use self::lexer::*; -use leo_errors::{new_backtrace, LeoError, ParserError, Span}; +use leo_errors::{LeoError, ParserError, Span}; use tendril::StrTendril; @@ -70,7 +70,7 @@ pub(crate) fn tokenize(path: &str, input: StrTendril) -> Result { if !check_address(address) { - return Err(ParserError::invalid_address_lit(address, &span, new_backtrace()).into()); + return Err(ParserError::invalid_address_lit(address, &span).into()); } } _ => (), @@ -96,7 +96,6 @@ pub(crate) fn tokenize(path: &str, input: StrTendril) -> Result From b35375908b6e94804e03d4e46dd7c213d7bf682f Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Wed, 4 Aug 2021 15:22:40 -0700 Subject: [PATCH 12/58] state errors migrated --- Cargo.lock | 1 + compiler/src/constraints/constraints.rs | 2 +- compiler/src/output/output_file.rs | 6 +-- errors/src/common/backtraced.rs | 8 ++-- errors/src/common/formatted.rs | 2 - errors/src/state/state_errors.rs | 47 +++++++++++++++++++ leo/api.rs | 6 +-- leo/commands/init.rs | 2 +- leo/commands/new.rs | 2 +- leo/commands/package/add.rs | 18 +++---- leo/commands/package/clone.rs | 16 +++---- leo/commands/package/login.rs | 2 +- leo/commands/prove.rs | 4 +- leo/commands/setup.rs | 12 ++--- leo/commands/update.rs | 2 +- leo/commands/watch.rs | 2 +- leo/config.rs | 42 ++++++++--------- leo/context.rs | 2 +- leo/main.rs | 1 - leo/updater.rs | 16 +++---- package/src/imports/directory.rs | 4 +- package/src/inputs/directory.rs | 8 ++-- package/src/inputs/input.rs | 4 +- package/src/inputs/state.rs | 4 +- package/src/outputs/checksum.rs | 4 +- package/src/outputs/circuit.rs | 4 +- package/src/outputs/directory.rs | 4 +- package/src/outputs/proof.rs | 5 +- package/src/outputs/proving_key.rs | 4 +- package/src/outputs/verification_key.rs | 4 +- package/src/root/gitignore.rs | 4 +- package/src/root/manifest.rs | 2 +- package/src/root/readme.rs | 4 +- package/src/root/zip.rs | 14 +++--- package/src/source/directory.rs | 6 +-- package/src/source/main.rs | 4 +- state/Cargo.toml | 12 +++-- state/src/errors/dpc_record_values.rs | 36 -------------- state/src/errors/input_value.rs | 32 ------------- state/src/errors/local_data_commitment.rs | 42 ----------------- state/src/errors/mod.rs | 33 ------------- state/src/errors/record_commitment.rs | 36 -------------- state/src/errors/state_leaf_values.rs | 31 ------------ state/src/errors/state_values.rs | 31 ------------ state/src/lib.rs | 6 --- .../local_data_commitment.rs | 37 ++++++++------- .../state_leaf_values.rs | 11 +++-- .../src/local_data_commitment/state_values.rs | 11 +++-- .../record_commitment/dpc_record_values.rs | 18 ++++--- .../record_commitment/record_commitment.rs | 24 +++++----- state/src/utilities/input_value.rs | 25 +++++----- 51 files changed, 232 insertions(+), 425 deletions(-) delete mode 100644 state/src/errors/dpc_record_values.rs delete mode 100644 state/src/errors/input_value.rs delete mode 100644 state/src/errors/local_data_commitment.rs delete mode 100644 state/src/errors/mod.rs delete mode 100644 state/src/errors/record_commitment.rs delete mode 100644 state/src/errors/state_leaf_values.rs delete mode 100644 state/src/errors/state_values.rs diff --git a/Cargo.lock b/Cargo.lock index 0df69a59ff..23d95d353f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1393,6 +1393,7 @@ version = "1.5.3" dependencies = [ "indexmap", "leo-ast", + "leo-errors", "leo-input", "rand 0.8.4", "rand_core 0.6.3", diff --git a/compiler/src/constraints/constraints.rs b/compiler/src/constraints/constraints.rs index b81ad10a69..8f740ae175 100644 --- a/compiler/src/constraints/constraints.rs +++ b/compiler/src/constraints/constraints.rs @@ -107,7 +107,7 @@ pub fn generate_test_constraints<'a, F: PrimeField, G: GroupType>( } } } - None => default.ok_or_else(|| CompilerError::no_test_input())?, + None => default.ok_or_else(CompilerError::no_test_input)?, }; // parse input files to abstract syntax trees diff --git a/compiler/src/output/output_file.rs b/compiler/src/output/output_file.rs index d0c3229bf4..771ce7d058 100644 --- a/compiler/src/output/output_file.rs +++ b/compiler/src/output/output_file.rs @@ -46,11 +46,9 @@ impl OutputFile { pub fn write(&self, path: &Path, bytes: &[u8]) -> Result<()> { // create output file let path = self.setup_file_path(path); - let mut file = File::create(&path).map_err(|e| CompilerError::output_file_io_error(e))?; + let mut file = File::create(&path).map_err(CompilerError::output_file_io_error)?; - Ok(file - .write_all(bytes) - .map_err(|e| CompilerError::output_file_io_error(e))?) + Ok(file.write_all(bytes).map_err(CompilerError::output_file_io_error)?) } /// Removes the output file at the given path if it exists. Returns `true` on success, diff --git a/errors/src/common/backtraced.rs b/errors/src/common/backtraced.rs index f7ab92b1e9..ee4b7256cc 100644 --- a/errors/src/common/backtraced.rs +++ b/errors/src/common/backtraced.rs @@ -17,7 +17,7 @@ use std::fmt; use backtrace::Backtrace; -use color_backtrace::BacktracePrinter; +use color_backtrace::{BacktracePrinter, Verbosity}; use derivative::Derivative; pub const INDENT: &str = " "; @@ -103,20 +103,18 @@ impl fmt::Display for BacktracedError { "1" => { dbg!("1"); let mut printer = BacktracePrinter::default(); - printer = printer.verbosity(Verbosity::Medium); printer = printer.lib_verbosity(Verbosity::Medium); let trace = printer - .format_trace_to_string(&self.backtrace.backtrace) + .format_trace_to_string(&self.backtrace) .map_err(|_| fmt::Error)?; write!(f, "{}", trace)?; } "full" => { dbg!("full"); let mut printer = BacktracePrinter::default(); - printer = printer.verbosity(Verbosity::Full); printer = printer.lib_verbosity(Verbosity::Full); let trace = printer - .format_trace_to_string(&self.backtrace.backtrace) + .format_trace_to_string(&self.backtrace) .map_err(|_| fmt::Error)?; write!(f, "{}", trace)?; } diff --git a/errors/src/common/formatted.rs b/errors/src/common/formatted.rs index 252981e1ff..8cf78ced5b 100644 --- a/errors/src/common/formatted.rs +++ b/errors/src/common/formatted.rs @@ -142,7 +142,6 @@ impl fmt::Display for FormattedError { let leo_backtrace = std::env::var("LEO_BACKTRACE").unwrap_or_default().trim().to_owned(); match leo_backtrace.as_ref() { "1" => { - dbg!("1"); let mut printer = BacktracePrinter::default(); printer = printer.verbosity(Verbosity::Medium); printer = printer.lib_verbosity(Verbosity::Medium); @@ -152,7 +151,6 @@ impl fmt::Display for FormattedError { write!(f, "{}", trace)?; } "full" => { - dbg!("full"); let mut printer = BacktracePrinter::default(); printer = printer.verbosity(Verbosity::Full); printer = printer.lib_verbosity(Verbosity::Full); diff --git a/errors/src/state/state_errors.rs b/errors/src/state/state_errors.rs index d5695fb2cc..9b6c3f6697 100644 --- a/errors/src/state/state_errors.rs +++ b/errors/src/state/state_errors.rs @@ -16,8 +16,55 @@ use crate::create_errors; +use std::{ + error::Error as ErrorArg, + fmt::{Debug, Display}, +}; + create_errors!( StateError, exit_code_mask: 6000i32, error_code_prefix: "STA", + + @backtraced + parse_bool_error { + args: (error: impl ErrorArg), + msg: format!("failed to parse state file bool: {}", error), + help: None, + } + + @backtraced + parse_int_error { + args: (error: impl ErrorArg), + msg: format!("failed to parse state file int: {}", error), + help: None, + } + + @backtraced + expected_bytes { + args: (found: impl Display), + msg: format!("expected parameter array of u8 bytes, found `{}`", found), + help: None, + } + + @backtraced + expected_int { + args: (found: impl Display), + msg: format!("expected integer parameter, found `{}`", found), + help: None, + } + + @backtraced + mising_parameter { + args: (parameter: impl Display), + msg: format!("input parameter `{}` not found in state file", parameter), + help: None, + } + + @backtraced + state_io_error { + args: (error: impl ErrorArg), + msg: format!("io error found {}", error), + help: None, + } ); diff --git a/leo/api.rs b/leo/api.rs index d90d51427e..01e915c16b 100644 --- a/leo/api.rs +++ b/leo/api.rs @@ -249,10 +249,10 @@ impl Route for Publish { let status = res.status(); if status == StatusCode::OK { - let body: PublishResponse = res.json().map_err(|e| CliError::reqwest_json_error(e))?; + let body: PublishResponse = res.json().map_err(CliError::reqwest_json_error)?; Ok(body.package_id) } else { - let res: HashMap = res.json().map_err(|e| CliError::reqwest_json_error(e))?; + let res: HashMap = res.json().map_err(CliError::reqwest_json_error)?; Err(match status { StatusCode::BAD_REQUEST => CliError::bad_request(res.get("message").unwrap()).into(), StatusCode::UNAUTHORIZED => CliError::not_logged_in().into(), @@ -288,7 +288,7 @@ impl Route for Profile { // this may be extended for more precise error handling let status = res.status(); if status == StatusCode::OK { - let body: ProfileResponse = res.json().map_err(|e| CliError::reqwest_json_error(e))?; + let body: ProfileResponse = res.json().map_err(CliError::reqwest_json_error)?; return Ok(Some(body.username)); } diff --git a/leo/commands/init.rs b/leo/commands/init.rs index c82a4c9bd7..e513a31296 100644 --- a/leo/commands/init.rs +++ b/leo/commands/init.rs @@ -50,7 +50,7 @@ impl Command for Init { // Check that the given package name is valid. let package_name = path .file_stem() - .ok_or_else(|| CliError::invalid_project_name())? + .ok_or_else(CliError::invalid_project_name)? .to_string_lossy() .to_string(); if !LeoPackage::is_package_name_valid(&package_name) { diff --git a/leo/commands/new.rs b/leo/commands/new.rs index c08df08375..aa9e462cc1 100644 --- a/leo/commands/new.rs +++ b/leo/commands/new.rs @@ -61,7 +61,7 @@ impl Command for New { } // Create the package directory - fs::create_dir_all(&path).map_err(|err| CliError::package_could_not_create_directory(err))?; + fs::create_dir_all(&path).map_err(CliError::package_could_not_create_directory)?; LeoPackage::initialize(&package_name, &path, username)?; diff --git a/leo/commands/package/add.rs b/leo/commands/package/add.rs index 9cdef736b9..e5e7a4635b 100644 --- a/leo/commands/package/add.rs +++ b/leo/commands/package/add.rs @@ -92,7 +92,7 @@ impl Command for Add { let (author, package_name) = self .try_read_arguments() - .map_err(|e| CliError::cli_bytes_conversion_error(e))?; + .map_err(CliError::cli_bytes_conversion_error)?; // Attempt to fetch the package. let reader = { @@ -105,7 +105,7 @@ impl Command for Add { .api .run_route(fetch)? .bytes() - .map_err(|e| CliError::cli_bytes_conversion_error(e))?; + .map_err(CliError::cli_bytes_conversion_error)?; std::io::Cursor::new(bytes) }; @@ -115,13 +115,13 @@ impl Command for Add { ImportsDirectory::create(&path)?; path.push(IMPORTS_DIRECTORY_NAME); path.push(package_name); - create_dir_all(&path).map_err(|e| CliError::cli_io_error(e))?; + create_dir_all(&path).map_err(CliError::cli_io_error)?; }; // Proceed to unzip and parse the fetched bytes. - let mut zip_archive = zip::ZipArchive::new(reader).map_err(|e| CliError::cli_zip_error(e))?; + let mut zip_archive = zip::ZipArchive::new(reader).map_err(CliError::cli_zip_error)?; for i in 0..zip_archive.len() { - let file = zip_archive.by_index(i).map_err(|e| CliError::cli_zip_error(e))?; + let file = zip_archive.by_index(i).map_err(CliError::cli_zip_error)?; let file_name = file.name(); @@ -129,16 +129,16 @@ impl Command for Add { file_path.push(file_name); if file_name.ends_with('/') { - create_dir_all(file_path).map_err(|e| CliError::cli_io_error(e))?; + create_dir_all(file_path).map_err(CliError::cli_io_error)?; } else { if let Some(parent_directory) = path.parent() { - create_dir_all(parent_directory).map_err(|e| CliError::cli_io_error(e))?; + create_dir_all(parent_directory).map_err(CliError::cli_io_error)?; } - let mut created = File::create(file_path).map_err(|e| CliError::cli_io_error(e))?; + let mut created = File::create(file_path).map_err(CliError::cli_io_error)?; created .write_all(&file.bytes().map(|e| e.unwrap()).collect::>()) - .map_err(|e| CliError::cli_bytes_conversion_error(e))?; + .map_err(CliError::cli_bytes_conversion_error)?; } } diff --git a/leo/commands/package/clone.rs b/leo/commands/package/clone.rs index a6d71490eb..93e1b13db2 100644 --- a/leo/commands/package/clone.rs +++ b/leo/commands/package/clone.rs @@ -87,7 +87,7 @@ impl Clone { path.to_mut().push(directory_name); } - Ok(fs::create_dir_all(&path).map_err(|e| CliError::cli_io_error(e))?) + Ok(fs::create_dir_all(&path).map_err(CliError::cli_io_error)?) } } @@ -117,7 +117,7 @@ impl Command for Clone { .api .run_route(fetch)? .bytes() - .map_err(|e| CliError::cli_bytes_conversion_error(e))?; + .map_err(CliError::cli_bytes_conversion_error)?; std::io::Cursor::new(bytes) }; @@ -127,10 +127,10 @@ impl Command for Clone { Self::create_directory(&path, &package_name)?; // Proceed to unzip and parse the fetched bytes. - let mut zip_archive = zip::ZipArchive::new(reader).map_err(|e| CliError::cli_io_error(e))?; + let mut zip_archive = zip::ZipArchive::new(reader).map_err(CliError::cli_io_error)?; for i in 0..zip_archive.len() { - let file = zip_archive.by_index(i).map_err(|e| CliError::cli_zip_error(e))?; + let file = zip_archive.by_index(i).map_err(CliError::cli_zip_error)?; let file_name = file.name(); @@ -138,16 +138,16 @@ impl Command for Clone { file_path.push(file_name); if file_name.ends_with('/') { - fs::create_dir_all(file_path).map_err(|e| CliError::cli_io_error(e))?; + fs::create_dir_all(file_path).map_err(CliError::cli_io_error)?; } else { if let Some(parent_directory) = path.parent() { - fs::create_dir_all(parent_directory).map_err(|e| CliError::cli_io_error(e))?; + fs::create_dir_all(parent_directory).map_err(CliError::cli_io_error)?; } - let mut created = File::create(file_path).map_err(|e| CliError::cli_io_error(e))?; + let mut created = File::create(file_path).map_err(CliError::cli_io_error)?; created .write_all(&file.bytes().map(|e| e.unwrap()).collect::>()) - .map_err(|e| CliError::cli_bytes_conversion_error(e))?; + .map_err(CliError::cli_bytes_conversion_error)?; } } diff --git a/leo/commands/package/login.rs b/leo/commands/package/login.rs index 7c31fe4f74..652087e9e0 100644 --- a/leo/commands/package/login.rs +++ b/leo/commands/package/login.rs @@ -72,7 +72,7 @@ impl Command for Login { }; let res = api.run_route(login)?; - let mut res: HashMap = res.json().map_err(|e| CliError::reqwest_json_error(e))?; + let mut res: HashMap = res.json().map_err(CliError::reqwest_json_error)?; let tok_opt = res.remove("token"); if tok_opt.is_none() { diff --git a/leo/commands/prove.rs b/leo/commands/prove.rs index 86f85c1450..4447f1631a 100644 --- a/leo/commands/prove.rs +++ b/leo/commands/prove.rs @@ -72,9 +72,7 @@ impl Command for Prove { // Write the proof file to the output directory let mut proof = vec![]; - program_proof - .write_le(&mut proof) - .map_err(|e| CliError::cli_io_error(e))?; + program_proof.write_le(&mut proof).map_err(CliError::cli_io_error)?; ProofFile::new(&package_name).write_to(&path, &proof)?; Ok((program_proof, prepared_verifying_key)) diff --git a/leo/commands/setup.rs b/leo/commands/setup.rs index 5996bb1f3b..cc915730fa 100644 --- a/leo/commands/setup.rs +++ b/leo/commands/setup.rs @@ -89,7 +89,7 @@ impl Command for Setup { let mut proving_key_bytes = vec![]; proving_key .write_le(&mut proving_key_bytes) - .map_err(|e| CliError::cli_io_error(e))?; + .map_err(CliError::cli_io_error)?; let _ = proving_key_file.write_to(&path, &proving_key_bytes)?; tracing::info!("Complete"); @@ -100,7 +100,7 @@ impl Command for Setup { proving_key .vk .write_le(&mut verification_key) - .map_err(|e| CliError::cli_io_error(e))?; + .map_err(CliError::cli_io_error)?; let _ = verification_key_file.write_to(&path, &verification_key)?; tracing::info!("Complete"); @@ -116,16 +116,16 @@ impl Command for Setup { } let proving_key_bytes = ProvingKeyFile::new(&package_name).read_from(&path)?; let proving_key = ProvingKey::::read(proving_key_bytes.as_slice(), !self.skip_key_check) - .map_err(|e| CliError::cli_io_error(e))?; + .map_err(CliError::cli_io_error)?; tracing::info!("Complete"); // Read the verification key file from the output directory tracing::info!("Loading verification key..."); let verifying_key_bytes = VerificationKeyFile::new(&package_name) .read_from(&path) - .map_err(|e| CliError::cli_io_error(e))?; - let verifying_key = VerifyingKey::::read(verifying_key_bytes.as_slice()) - .map_err(|e| CliError::cli_io_error(e))?; + .map_err(CliError::cli_io_error)?; + let verifying_key = + VerifyingKey::::read(verifying_key_bytes.as_slice()).map_err(CliError::cli_io_error)?; // Derive the prepared verifying key file from the verifying key let prepared_verifying_key = PreparedVerifyingKey::::from(verifying_key); diff --git a/leo/commands/update.rs b/leo/commands/update.rs index f5a9a2991b..c434027778 100644 --- a/leo/commands/update.rs +++ b/leo/commands/update.rs @@ -61,7 +61,7 @@ impl Command for Update { fn apply(self, _: Context, _: Self::Input) -> Result { // If --list is passed, list all available versions and return. if self.list { - return Ok(Updater::show_available_releases().map_err(|e| CliError::could_not_fetch_versions(e))?); + return Ok(Updater::show_available_releases().map_err(CliError::could_not_fetch_versions)?); } // Handles enabling and disabling automatic updates in the config file. diff --git a/leo/commands/watch.rs b/leo/commands/watch.rs index 889ad6d1d0..7b612c9479 100644 --- a/leo/commands/watch.rs +++ b/leo/commands/watch.rs @@ -56,7 +56,7 @@ impl Command for Watch { watcher .watch(LEO_SOURCE_DIR, RecursiveMode::Recursive) - .map_err(|e| CliError::unable_to_watch(e))?; + .map_err(CliError::unable_to_watch)?; tracing::info!("Watching Leo source code"); diff --git a/leo/config.rs b/leo/config.rs index 940e4977ac..37aa5a3277 100644 --- a/leo/config.rs +++ b/leo/config.rs @@ -89,12 +89,12 @@ impl Config { if !Path::exists(&config_path) { // Create a new default `config.toml` file if it doesn't already exist - create_dir_all(&config_dir).map_err(|e| CliError::cli_io_error(e))?; + create_dir_all(&config_dir).map_err(CliError::cli_io_error)?; let default_config_string = - toml::to_string(&Config::default()).map_err(|e| CliError::failed_to_convert_to_toml(e))?; + toml::to_string(&Config::default()).map_err(CliError::failed_to_convert_to_toml)?; - fs::write(&config_path, default_config_string).map_err(|e| CliError::cli_io_error(e))?; + fs::write(&config_path, default_config_string).map_err(CliError::cli_io_error)?; } let toml_string = match fs::read_to_string(&config_path) { @@ -102,21 +102,21 @@ impl Config { // If the config is using an incorrect format, rewrite it. if toml::from_str::(&toml).is_err() { let default_config_string = - toml::to_string(&Config::default()).map_err(|e| CliError::failed_to_convert_to_toml(e))?; - fs::write(&config_path, default_config_string.clone()).map_err(|e| CliError::cli_io_error(e))?; + toml::to_string(&Config::default()).map_err(CliError::failed_to_convert_to_toml)?; + fs::write(&config_path, default_config_string.clone()).map_err(CliError::cli_io_error)?; toml = default_config_string; } toml } Err(_) => { - create_dir_all(&config_dir).map_err(|e| CliError::cli_io_error(e))?; - toml::to_string(&Config::default()).map_err(|e| CliError::failed_to_convert_to_toml(e))? + create_dir_all(&config_dir).map_err(CliError::cli_io_error)?; + toml::to_string(&Config::default()).map_err(CliError::failed_to_convert_to_toml)? } }; // Parse the contents into the `Config` struct - let config: Config = toml::from_str(&toml_string).map_err(|e| CliError::failed_to_convert_from_toml(e))?; + let config: Config = toml::from_str(&toml_string).map_err(CliError::failed_to_convert_from_toml)?; Ok(config) } @@ -132,9 +132,9 @@ impl Config { let config_path = LEO_CONFIG_PATH.clone(); fs::write( &config_path, - toml::to_string(&config).map_err(|e| CliError::failed_to_convert_to_toml(e))?, + toml::to_string(&config).map_err(CliError::failed_to_convert_to_toml)?, ) - .map_err(|e| CliError::cli_io_error(e))?; + .map_err(CliError::cli_io_error)?; } Ok(()) @@ -146,37 +146,33 @@ pub fn write_token_and_username(token: &str, username: &str) -> Result<()> { // Create Leo config directory if it not exists if !Path::new(&config_dir).exists() { - create_dir_all(&config_dir).map_err(|e| CliError::cli_io_error(e))?; + create_dir_all(&config_dir).map_err(CliError::cli_io_error)?; } - let mut credentials = File::create(&LEO_CREDENTIALS_PATH.to_path_buf()).map_err(|e| CliError::cli_io_error(e))?; + let mut credentials = File::create(&LEO_CREDENTIALS_PATH.to_path_buf()).map_err(CliError::cli_io_error)?; credentials .write_all(token.as_bytes()) - .map_err(|e| CliError::cli_io_error(e))?; + .map_err(CliError::cli_io_error)?; - let mut username_file = File::create(&LEO_USERNAME_PATH.to_path_buf()).map_err(|e| CliError::cli_io_error(e))?; + let mut username_file = File::create(&LEO_USERNAME_PATH.to_path_buf()).map_err(CliError::cli_io_error)?; username_file .write_all(username.as_bytes()) - .map_err(|e| CliError::cli_io_error(e))?; + .map_err(CliError::cli_io_error)?; Ok(()) } pub fn read_token() -> Result { - let mut credentials = File::open(&LEO_CREDENTIALS_PATH.to_path_buf()).map_err(|e| CliError::cli_io_error(e))?; + let mut credentials = File::open(&LEO_CREDENTIALS_PATH.to_path_buf()).map_err(CliError::cli_io_error)?; let mut buf = String::new(); - credentials - .read_to_string(&mut buf) - .map_err(|e| CliError::cli_io_error(e))?; + credentials.read_to_string(&mut buf).map_err(CliError::cli_io_error)?; Ok(buf) } pub fn read_username() -> Result { - let mut username = File::open(&LEO_USERNAME_PATH.to_path_buf()).map_err(|e| CliError::cli_io_error(e))?; + let mut username = File::open(&LEO_USERNAME_PATH.to_path_buf()).map_err(CliError::cli_io_error)?; let mut buf = String::new(); - username - .read_to_string(&mut buf) - .map_err(|e| CliError::cli_io_error(e))?; + username.read_to_string(&mut buf).map_err(CliError::cli_io_error)?; Ok(buf) } diff --git a/leo/context.rs b/leo/context.rs index 14fba3c141..d7c7beaeed 100644 --- a/leo/context.rs +++ b/leo/context.rs @@ -37,7 +37,7 @@ impl Context { pub fn dir(&self) -> Result { match &self.path { Some(path) => Ok(path.clone()), - None => Ok(current_dir().map_err(|e| CliError::cli_io_error(e))?), + None => Ok(current_dir().map_err(CliError::cli_io_error)?), } } diff --git a/leo/main.rs b/leo/main.rs index c0f8e02aed..979a8fd460 100644 --- a/leo/main.rs +++ b/leo/main.rs @@ -39,7 +39,6 @@ use commands::{ }; use leo_errors::Result; -use color_backtrace; use colored::Colorize; use std::{path::PathBuf, process::exit}; use structopt::{clap::AppSettings, StructOpt}; diff --git a/leo/updater.rs b/leo/updater.rs index ff90e12f8a..b54b3cdfc2 100644 --- a/leo/updater.rs +++ b/leo/updater.rs @@ -34,9 +34,9 @@ impl Updater { .repo_owner(Self::LEO_REPO_OWNER) .repo_name(Self::LEO_REPO_NAME) .build() - .map_err(|e| CliError::self_update_error(e))? + .map_err(CliError::self_update_error)? .fetch() - .map_err(|e| CliError::self_update_error(e))?; + .map_err(CliError::self_update_error)?; let mut output = "\nList of available versions\n".to_string(); for release in releases { @@ -60,9 +60,9 @@ impl Updater { .no_confirm(true) .show_output(show_output) .build() - .map_err(|e| CliError::self_update_error(e))? + .map_err(CliError::self_update_error)? .update() - .map_err(|e| CliError::self_update_error(e))?; + .map_err(CliError::self_update_error)?; Ok(status) } @@ -75,14 +75,12 @@ impl Updater { .bin_name(Self::LEO_BIN_NAME) .current_version(env!("CARGO_PKG_VERSION")) .build() - .map_err(|e| CliError::self_update_error(e))?; + .map_err(CliError::self_update_error)?; let current_version = updater.current_version(); - let latest_release = updater - .get_latest_release() - .map_err(|e| CliError::self_update_error(e))?; + let latest_release = updater.get_latest_release().map_err(CliError::self_update_error)?; - if bump_is_greater(¤t_version, &latest_release.version).map_err(|e| CliError::self_update_error(e))? { + if bump_is_greater(¤t_version, &latest_release.version).map_err(CliError::self_update_error)? { Ok(latest_release.version) } else { Err(CliError::old_release_version(current_version, latest_release.version).into()) diff --git a/package/src/imports/directory.rs b/package/src/imports/directory.rs index abf58e9cdf..beb1439b45 100644 --- a/package/src/imports/directory.rs +++ b/package/src/imports/directory.rs @@ -30,7 +30,7 @@ impl ImportsDirectory { path.to_mut().push(IMPORTS_DIRECTORY_NAME); } - fs::create_dir_all(&path).map_err(|e| PackageError::failed_to_create_imports_directory(e))?; + fs::create_dir_all(&path).map_err(PackageError::failed_to_create_imports_directory)?; Ok(()) } @@ -47,7 +47,7 @@ impl ImportsDirectory { return Err(PackageError::import_does_not_exist(package_name).into()); } - fs::remove_dir_all(&path).map_err(|e| PackageError::failed_to_remove_imports_directory(e))?; + fs::remove_dir_all(&path).map_err(PackageError::failed_to_remove_imports_directory)?; Ok(()) } diff --git a/package/src/inputs/directory.rs b/package/src/inputs/directory.rs index 1b1e205bd5..92718b4f76 100644 --- a/package/src/inputs/directory.rs +++ b/package/src/inputs/directory.rs @@ -35,7 +35,7 @@ impl InputsDirectory { path.to_mut().push(INPUTS_DIRECTORY_NAME); } - fs::create_dir_all(&path).map_err(|e| PackageError::failed_to_create_inputs_directory(e))?; + fs::create_dir_all(&path).map_err(PackageError::failed_to_create_inputs_directory)?; Ok(()) } @@ -44,7 +44,7 @@ impl InputsDirectory { let mut path = path.to_owned(); path.push(INPUTS_DIRECTORY_NAME); - let directory = fs::read_dir(&path).map_err(|e| PackageError::failed_to_read_inputs_directory(e))?; + let directory = fs::read_dir(&path).map_err(PackageError::failed_to_read_inputs_directory)?; let mut file_paths = Vec::new(); parse_file_paths(directory, &mut file_paths)?; @@ -54,7 +54,7 @@ impl InputsDirectory { fn parse_file_paths(directory: ReadDir, file_paths: &mut Vec) -> Result<()> { for file_entry in directory.into_iter() { - let file_entry = file_entry.map_err(|e| PackageError::failed_to_get_input_file_entry(e))?; + let file_entry = file_entry.map_err(PackageError::failed_to_get_input_file_entry)?; let file_path = file_entry.path(); // Verify that the entry is structured as a valid file or directory @@ -62,7 +62,7 @@ fn parse_file_paths(directory: ReadDir, file_paths: &mut Vec) -> Result .file_type() .map_err(|e| PackageError::failed_to_get_input_file_type(file_path.as_os_str().to_owned(), e))?; if file_type.is_dir() { - let directory = fs::read_dir(&file_path).map_err(|e| PackageError::failed_to_read_inputs_directory(e))?; + let directory = fs::read_dir(&file_path).map_err(PackageError::failed_to_read_inputs_directory)?; parse_file_paths(directory, file_paths)?; continue; diff --git a/package/src/inputs/input.rs b/package/src/inputs/input.rs index 531cf88975..1fd4c2c930 100644 --- a/package/src/inputs/input.rs +++ b/package/src/inputs/input.rs @@ -66,10 +66,10 @@ impl InputFile { /// Writes the standard input format to a file. pub fn write_to(self, path: &Path) -> Result<()> { let path = self.setup_file_path(path); - let mut file = File::create(&path).map_err(|e| PackageError::io_error_input_file(e))?; + let mut file = File::create(&path).map_err(PackageError::io_error_input_file)?; file.write_all(self.template().as_bytes()) - .map_err(|e| PackageError::io_error_input_file(e))?; + .map_err(PackageError::io_error_input_file)?; Ok(()) } diff --git a/package/src/inputs/state.rs b/package/src/inputs/state.rs index d07cf78da0..ba371b3c5f 100644 --- a/package/src/inputs/state.rs +++ b/package/src/inputs/state.rs @@ -65,11 +65,11 @@ impl StateFile { /// Writes the standard input format to a file. pub fn write_to(self, path: &Path) -> Result<()> { let path = self.setup_file_path(path); - let mut file = File::create(&path).map_err(|e| PackageError::io_error_state_file(e))?; + let mut file = File::create(&path).map_err(PackageError::io_error_state_file)?; Ok(file .write_all(self.template().as_bytes()) - .map_err(|e| PackageError::io_error_state_file(e))?) + .map_err(PackageError::io_error_state_file)?) } fn template(&self) -> String { diff --git a/package/src/outputs/checksum.rs b/package/src/outputs/checksum.rs index bd557b3f51..973fc75b8d 100644 --- a/package/src/outputs/checksum.rs +++ b/package/src/outputs/checksum.rs @@ -61,10 +61,10 @@ impl ChecksumFile { /// Writes the given checksum to a file. pub fn write_to(&self, path: &Path, checksum: String) -> Result<()> { let path = self.setup_file_path(path); - let mut file = File::create(&path).map_err(|e| PackageError::io_error_checksum_file(e))?; + let mut file = File::create(&path).map_err(PackageError::io_error_checksum_file)?; file.write_all(checksum.as_bytes()) - .map_err(|e| PackageError::io_error_checksum_file(e))?; + .map_err(PackageError::io_error_checksum_file)?; Ok(()) } diff --git a/package/src/outputs/circuit.rs b/package/src/outputs/circuit.rs index 9076668aa2..80cc657fba 100644 --- a/package/src/outputs/circuit.rs +++ b/package/src/outputs/circuit.rs @@ -61,10 +61,10 @@ impl CircuitFile { /// Writes the given serialized circuit to a file. pub fn write_to(&self, path: &Path, circuit: String) -> Result<()> { let path = self.setup_file_path(path); - let mut file = File::create(&path).map_err(|e| PackageError::io_error_circuit_file(e))?; + let mut file = File::create(&path).map_err(PackageError::io_error_circuit_file)?; file.write_all(circuit.as_bytes()) - .map_err(|e| PackageError::io_error_circuit_file(e))?; + .map_err(PackageError::io_error_circuit_file)?; Ok(()) } diff --git a/package/src/outputs/directory.rs b/package/src/outputs/directory.rs index ab72c99e92..e94dd40d2e 100644 --- a/package/src/outputs/directory.rs +++ b/package/src/outputs/directory.rs @@ -30,7 +30,7 @@ impl OutputsDirectory { path.to_mut().push(OUTPUTS_DIRECTORY_NAME); } - fs::create_dir_all(&path).map_err(|e| PackageError::failed_to_create_inputs_directory(e))?; + fs::create_dir_all(&path).map_err(PackageError::failed_to_create_inputs_directory)?; Ok(()) } @@ -42,7 +42,7 @@ impl OutputsDirectory { } if path.exists() { - fs::remove_dir_all(&path).map_err(|e| PackageError::failed_to_create_inputs_directory(e))?; + fs::remove_dir_all(&path).map_err(PackageError::failed_to_create_inputs_directory)?; } Ok(()) diff --git a/package/src/outputs/proof.rs b/package/src/outputs/proof.rs index e2c0a08b7c..8ee058c754 100644 --- a/package/src/outputs/proof.rs +++ b/package/src/outputs/proof.rs @@ -61,10 +61,9 @@ impl ProofFile { /// Writes the given proof to a file. pub fn write_to(&self, path: &Path, proof: &[u8]) -> Result<()> { let path = self.setup_file_path(path); - let mut file = File::create(&path).map_err(|e| PackageError::io_error_proof_file(e))?; + let mut file = File::create(&path).map_err(PackageError::io_error_proof_file)?; - file.write_all(proof) - .map_err(|e| PackageError::io_error_proof_file(e))?; + file.write_all(proof).map_err(PackageError::io_error_proof_file)?; tracing::info!("Saving proof... ({:?})", path); Ok(()) diff --git a/package/src/outputs/proving_key.rs b/package/src/outputs/proving_key.rs index 64b920232e..f7fbda3261 100644 --- a/package/src/outputs/proving_key.rs +++ b/package/src/outputs/proving_key.rs @@ -64,10 +64,10 @@ impl ProvingKeyFile { /// Writes the given proving key to a file. pub fn write_to<'a>(&self, path: &'a Path, proving_key: &[u8]) -> Result> { let path = self.setup_file_path(path); - let mut file = File::create(&path).map_err(|e| PackageError::io_error_proving_key_file(e))?; + let mut file = File::create(&path).map_err(PackageError::io_error_proving_key_file)?; file.write_all(proving_key) - .map_err(|e| PackageError::io_error_proving_key_file(e))?; + .map_err(PackageError::io_error_proving_key_file)?; Ok(path) } diff --git a/package/src/outputs/verification_key.rs b/package/src/outputs/verification_key.rs index 5b3ba6f073..985376f1e0 100644 --- a/package/src/outputs/verification_key.rs +++ b/package/src/outputs/verification_key.rs @@ -65,10 +65,10 @@ impl VerificationKeyFile { /// Writes the given verification key to a file. pub fn write_to<'a>(&self, path: &'a Path, verification_key: &[u8]) -> Result> { let path = self.setup_file_path(path); - let mut file = File::create(&path).map_err(|e| PackageError::io_error_verification_key_file(e))?; + let mut file = File::create(&path).map_err(PackageError::io_error_verification_key_file)?; file.write_all(verification_key) - .map_err(|e| PackageError::io_error_verification_key_file(e))?; + .map_err(PackageError::io_error_verification_key_file)?; Ok(path) } diff --git a/package/src/root/gitignore.rs b/package/src/root/gitignore.rs index b324c56df0..ea16afdd6f 100644 --- a/package/src/root/gitignore.rs +++ b/package/src/root/gitignore.rs @@ -45,9 +45,9 @@ impl Gitignore { path.to_mut().push(GITIGNORE_FILENAME); } - let mut file = File::create(&path).map_err(|e| PackageError::io_error_gitignore_file(e))?; + let mut file = File::create(&path).map_err(PackageError::io_error_gitignore_file)?; file.write_all(self.template().as_bytes()) - .map_err(|e| PackageError::io_error_gitignore_file(e))?; + .map_err(PackageError::io_error_gitignore_file)?; Ok(()) } diff --git a/package/src/root/manifest.rs b/package/src/root/manifest.rs index a18f7ac826..fc08033cff 100644 --- a/package/src/root/manifest.rs +++ b/package/src/root/manifest.rs @@ -90,7 +90,7 @@ impl Manifest { File::create(&path).map_err(|e| PackageError::failed_to_create_manifest_file(MANIFEST_FILENAME, e))?; file.write_all(self.template().as_bytes()) - .map_err(|e| PackageError::io_error_manifest_file(e))?; + .map_err(PackageError::io_error_manifest_file)?; Ok(()) } diff --git a/package/src/root/readme.rs b/package/src/root/readme.rs index 3cea5acf5e..351d3efd51 100644 --- a/package/src/root/readme.rs +++ b/package/src/root/readme.rs @@ -54,10 +54,10 @@ impl README { path.to_mut().push(README_FILENAME); } - let mut file = File::create(&path).map_err(|e| PackageError::io_error_readme_file(e))?; + let mut file = File::create(&path).map_err(PackageError::io_error_readme_file)?; file.write_all(self.template().as_bytes()) - .map_err(|e| PackageError::io_error_readme_file(e))?; + .map_err(PackageError::io_error_readme_file)?; Ok(()) } diff --git a/package/src/root/zip.rs b/package/src/root/zip.rs index c2a131986c..62e4156f2f 100644 --- a/package/src/root/zip.rs +++ b/package/src/root/zip.rs @@ -83,7 +83,7 @@ impl ZipFile { // Create zip file let path = self.setup_file_path(src_dir); - let file = File::create(&path).map_err(|e| PackageError::failed_to_create_zip_file(e))?; + let file = File::create(&path).map_err(PackageError::failed_to_create_zip_file)?; let mut zip = ZipWriter::new(file); let options = FileOptions::default() .compression_method(zip::CompressionMethod::Stored) @@ -108,13 +108,13 @@ impl ZipFile { tracing::info!("Adding file {:?} as {:?}", path, name); #[allow(deprecated)] zip.start_file_from_path(name, options) - .map_err(|e| PackageError::io_error_zip_file(e))?; + .map_err(PackageError::io_error_zip_file)?; - let mut f = File::open(path).map_err(|e| PackageError::failed_to_open_zip_file(e))?; + let mut f = File::open(path).map_err(PackageError::failed_to_open_zip_file)?; f.read_to_end(&mut buffer) - .map_err(|e| PackageError::failed_to_read_zip_file(e))?; + .map_err(PackageError::failed_to_read_zip_file)?; zip.write_all(&*buffer) - .map_err(|e| PackageError::failed_to_write_zip_file(e))?; + .map_err(PackageError::failed_to_write_zip_file)?; buffer.clear(); } else if !name.as_os_str().is_empty() { @@ -123,11 +123,11 @@ impl ZipFile { tracing::info!("Adding directory {:?} as {:?}", path, name); #[allow(deprecated)] zip.add_directory_from_path(name, options) - .map_err(|e| PackageError::io_error_zip_file(e))?; + .map_err(PackageError::io_error_zip_file)?; } } - zip.finish().map_err(|e| PackageError::io_error_zip_file(e))?; + zip.finish().map_err(PackageError::io_error_zip_file)?; tracing::info!("Package zip file created successfully {:?}", path); diff --git a/package/src/source/directory.rs b/package/src/source/directory.rs index 1d906c1b0e..692f0261e4 100644 --- a/package/src/source/directory.rs +++ b/package/src/source/directory.rs @@ -36,7 +36,7 @@ impl SourceDirectory { path.to_mut().push(SOURCE_DIRECTORY_NAME); } - fs::create_dir_all(&path).map_err(|e| PackageError::failed_to_create_source_directory(e))?; + fs::create_dir_all(&path).map_err(PackageError::failed_to_create_source_directory)?; Ok(()) } @@ -45,11 +45,11 @@ impl SourceDirectory { let mut path = Cow::from(path); path.to_mut().push(SOURCE_DIRECTORY_NAME); - let directory = fs::read_dir(&path).map_err(|e| PackageError::failed_to_read_inputs_directory(e))?; + let directory = fs::read_dir(&path).map_err(PackageError::failed_to_read_inputs_directory)?; let mut file_paths = Vec::new(); for file_entry in directory.into_iter() { - let file_entry = file_entry.map_err(|e| PackageError::failed_to_get_source_file_entry(e))?; + let file_entry = file_entry.map_err(PackageError::failed_to_get_source_file_entry)?; let file_path = file_entry.path(); // Verify that the entry is structured as a valid file diff --git a/package/src/source/main.rs b/package/src/source/main.rs index 5d7f15bbf0..479c669e7d 100644 --- a/package/src/source/main.rs +++ b/package/src/source/main.rs @@ -60,10 +60,10 @@ impl MainFile { path.to_mut().push(MAIN_FILENAME); } - let mut file = File::create(&path).map_err(|e| PackageError::io_error_main_file(e))?; + let mut file = File::create(&path).map_err(PackageError::io_error_main_file)?; Ok(file .write_all(self.template().as_bytes()) - .map_err(|e| PackageError::io_error_main_file(e))?) + .map_err(PackageError::io_error_main_file)?) } fn template(&self) -> String { diff --git a/state/Cargo.toml b/state/Cargo.toml index 13a4c99a12..a1f404de72 100644 --- a/state/Cargo.toml +++ b/state/Cargo.toml @@ -17,14 +17,18 @@ include = [ "Cargo.toml", "src", "README.md", "LICENSE.md" ] license = "GPL-3.0" edition = "2018" -[dependencies.leo-input] -path = "../input" -version = "1.5.3" - [dependencies.leo-ast] path = "../ast" version = "1.5.3" +[dependencies.leo-errors] +path = "../errors" +version = "1.5.3" + +[dependencies.leo-input] +path = "../input" +version = "1.5.3" + [dependencies.snarkvm-algorithms] version = "0.7.4" diff --git a/state/src/errors/dpc_record_values.rs b/state/src/errors/dpc_record_values.rs deleted file mode 100644 index 437666bfea..0000000000 --- a/state/src/errors/dpc_record_values.rs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::InputValueError; - -use snarkvm_dpc::AccountError; - -use std::{num::ParseIntError, str::ParseBoolError}; - -#[derive(Debug, Error)] -pub enum DPCRecordValuesError { - #[error("{}", _0)] - AccountError(#[from] AccountError), - - #[error("{}", _0)] - InputValueError(#[from] InputValueError), - - #[error("{}", _0)] - ParseBoolError(#[from] ParseBoolError), - - #[error("{}", _0)] - ParseIntError(#[from] ParseIntError), -} diff --git a/state/src/errors/input_value.rs b/state/src/errors/input_value.rs deleted file mode 100644 index 2463d27d4b..0000000000 --- a/state/src/errors/input_value.rs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use std::num::ParseIntError; - -#[derive(Debug, Error)] -pub enum InputValueError { - #[error("expected parameter array of u8 bytes, found `{}`", _0)] - ExpectedBytes(String), - - #[error("expected integer parameter, found `{}`", _0)] - ExpectedInteger(String), - - #[error("input parameter `{}` not found in state file", _0)] - MissingParameter(String), - - #[error("{}", _0)] - ParseIntError(#[from] ParseIntError), -} diff --git a/state/src/errors/local_data_commitment.rs b/state/src/errors/local_data_commitment.rs deleted file mode 100644 index a0f8465983..0000000000 --- a/state/src/errors/local_data_commitment.rs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{RecordVerificationError, StateLeafValuesError, StateValuesError}; - -use snarkvm_algorithms::{CommitmentError, MerkleError}; - -use std::io::Error as IOError; - -#[derive(Debug, Error)] -pub enum LocalDataVerificationError { - #[error("{}", _0)] - CommitmentError(#[from] CommitmentError), - - #[error("{}", _0)] - MerkleError(#[from] MerkleError), - - #[error("{}", _0)] - IOError(#[from] IOError), - - #[error("{}", _0)] - RecordVerificationError(#[from] RecordVerificationError), - - #[error("{}", _0)] - StateLeafValuesError(#[from] StateLeafValuesError), - - #[error("{}", _0)] - StateValuesError(#[from] StateValuesError), -} diff --git a/state/src/errors/mod.rs b/state/src/errors/mod.rs deleted file mode 100644 index 961b1fad08..0000000000 --- a/state/src/errors/mod.rs +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -pub mod dpc_record_values; -pub use self::dpc_record_values::*; - -pub mod input_value; -pub use self::input_value::*; - -pub mod state_leaf_values; -pub use self::state_leaf_values::*; - -pub mod state_values; -pub use self::state_values::*; - -pub mod local_data_commitment; -pub use self::local_data_commitment::*; - -pub mod record_commitment; -pub use self::record_commitment::*; diff --git a/state/src/errors/record_commitment.rs b/state/src/errors/record_commitment.rs deleted file mode 100644 index 507c5bb48f..0000000000 --- a/state/src/errors/record_commitment.rs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::DPCRecordValuesError; - -use snarkvm_algorithms::CommitmentError; - -use std::io::Error as IOError; - -#[derive(Debug, Error)] -pub enum RecordVerificationError { - #[error("record commitment does not match record data")] - CommitmentsDoNotMatch, - - #[error("{}", _0)] - CommitmentError(#[from] CommitmentError), - - #[error("{}", _0)] - DPCRecordValuesError(#[from] DPCRecordValuesError), - - #[error("{}", _0)] - IOError(#[from] IOError), -} diff --git a/state/src/errors/state_leaf_values.rs b/state/src/errors/state_leaf_values.rs deleted file mode 100644 index 83b377178a..0000000000 --- a/state/src/errors/state_leaf_values.rs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::InputValueError; - -use std::{num::ParseIntError, str::ParseBoolError}; - -#[derive(Debug, Error)] -pub enum StateLeafValuesError { - #[error("{}", _0)] - InputValueError(#[from] InputValueError), - - #[error("{}", _0)] - ParseBoolError(#[from] ParseBoolError), - - #[error("{}", _0)] - ParseIntError(#[from] ParseIntError), -} diff --git a/state/src/errors/state_values.rs b/state/src/errors/state_values.rs deleted file mode 100644 index 94af651517..0000000000 --- a/state/src/errors/state_values.rs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::InputValueError; - -use std::{num::ParseIntError, str::ParseBoolError}; - -#[derive(Debug, Error)] -pub enum StateValuesError { - #[error("{}", _0)] - InputValueError(#[from] InputValueError), - - #[error("{}", _0)] - ParseBoolError(#[from] ParseBoolError), - - #[error("{}", _0)] - ParseIntError(#[from] ParseIntError), -} diff --git a/state/src/lib.rs b/state/src/lib.rs index 65bd11e5d5..70de10048d 100644 --- a/state/src/lib.rs +++ b/state/src/lib.rs @@ -17,12 +17,6 @@ #![allow(clippy::module_inception)] #![allow(clippy::upper_case_acronyms)] -#[macro_use] -extern crate thiserror; - -pub mod errors; -pub use self::errors::*; - pub mod local_data_commitment; pub use self::local_data_commitment::*; diff --git a/state/src/local_data_commitment/local_data_commitment.rs b/state/src/local_data_commitment/local_data_commitment.rs index 19b74c6f22..5a5fa81317 100644 --- a/state/src/local_data_commitment/local_data_commitment.rs +++ b/state/src/local_data_commitment/local_data_commitment.rs @@ -14,8 +14,9 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{verify_record_commitment, LocalDataVerificationError, StateLeafValues, StateValues}; +use crate::{verify_record_commitment, StateLeafValues, StateValues}; use leo_ast::Input as AstInput; +use leo_errors::{Result, SnarkVMError, StateError}; use snarkvm_algorithms::{ commitment_tree::CommitmentMerklePath, @@ -31,10 +32,7 @@ use std::convert::TryFrom; /// Returns `true` if the path to the local data commitment leaf is a valid path in the record /// commitment Merkle tree. -pub fn verify_local_data_commitment( - dpc: &SystemParameters, - ast_input: &AstInput, -) -> Result { +pub fn verify_local_data_commitment(dpc: &SystemParameters, ast_input: &AstInput) -> Result { // Verify record commitment. let typed_record = ast_input.get_record(); let dpc_record_values = verify_record_commitment(dpc, typed_record)?; @@ -58,35 +56,42 @@ pub fn verify_local_data_commitment( // Select local data commitment input bytes. let is_death = leaf_index < (Components::NUM_INPUT_RECORDS as u32); let input_bytes = if is_death { - to_bytes_le![record_serial_number, record_commitment, memo, network_id]? + to_bytes_le![record_serial_number, record_commitment, memo, network_id] + .map_err(StateError::state_io_error)? } else { - to_bytes_le![record_commitment, memo, network_id]? + to_bytes_le![record_commitment, memo, network_id].map_err(StateError::state_io_error)? }; // Construct local data commitment leaf. let local_data_leaf_randomness = <::LocalDataCommitment as CommitmentScheme>::Randomness::read_le( &leaf_randomness[..], - )?; + ) + .map_err(StateError::state_io_error)?; let local_data_commitment_leaf = ::LocalDataCommitment::commit( &dpc.local_data_commitment, &input_bytes, &local_data_leaf_randomness, - )?; + ) + .map_err(|_| SnarkVMError::default())?; // Construct record commitment merkle path. let local_data_merkle_path = CommitmentMerklePath::< ::LocalDataCommitment, ::LocalDataCRH, - >::read_le(&path[..])?; + >::read_le(&path[..]) + .map_err(StateError::state_io_error)?; // Check record commitment merkle path is valid for the given local data commitment root. - let local_data_commitment_root = <::LocalDataCRH as CRH>::Output::read_le(&root[..])?; - let result = local_data_merkle_path.verify( - &dpc.local_data_crh, - &local_data_commitment_root, - &local_data_commitment_leaf, - )?; + let local_data_commitment_root = <::LocalDataCRH as CRH>::Output::read_le(&root[..]) + .map_err(StateError::state_io_error)?; + let result = local_data_merkle_path + .verify( + &dpc.local_data_crh, + &local_data_commitment_root, + &local_data_commitment_leaf, + ) + .map_err(|_| SnarkVMError::default())?; Ok(result) } diff --git a/state/src/local_data_commitment/state_leaf_values.rs b/state/src/local_data_commitment/state_leaf_values.rs index 8c7148741d..b0f60390cd 100644 --- a/state/src/local_data_commitment/state_leaf_values.rs +++ b/state/src/local_data_commitment/state_leaf_values.rs @@ -14,8 +14,9 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{find_input, input_to_bytes, input_to_integer_string, StateLeafValuesError}; +use crate::{find_input, input_to_bytes, input_to_integer_string}; use leo_ast::StateLeaf as AstStateLeaf; +use leo_errors::{LeoError, Result, StateError}; use std::convert::TryFrom; @@ -34,9 +35,9 @@ pub struct StateLeafValues { } impl TryFrom<&AstStateLeaf> for StateLeafValues { - type Error = StateLeafValuesError; + type Error = LeoError; - fn try_from(ast_state_leaf: &AstStateLeaf) -> Result { + fn try_from(ast_state_leaf: &AstStateLeaf) -> Result { let parameters = ast_state_leaf.values(); // Lookup path @@ -49,7 +50,9 @@ impl TryFrom<&AstStateLeaf> for StateLeafValues { // Lookup network id let network_id_value = find_input(NETWORK_ID_PARAMETER_STRING.to_owned(), ¶meters)?; - let network_id = input_to_integer_string(network_id_value)?.parse::()?; + let network_id = input_to_integer_string(network_id_value)? + .parse::() + .map_err(StateError::parse_int_error)?; // Lookup leaf randomness let leaf_randomness_value = find_input(LEAF_RANDOMNESS_PARAMETER_STRING.to_owned(), ¶meters)?; diff --git a/state/src/local_data_commitment/state_values.rs b/state/src/local_data_commitment/state_values.rs index 0ba48af568..323d4ccf46 100644 --- a/state/src/local_data_commitment/state_values.rs +++ b/state/src/local_data_commitment/state_values.rs @@ -14,8 +14,9 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{find_input, input_to_bytes, input_to_integer_string, StateValuesError}; +use crate::{find_input, input_to_bytes, input_to_integer_string}; use leo_ast::State as AstState; +use leo_errors::{LeoError, Result, StateError}; use std::convert::TryFrom; @@ -30,14 +31,16 @@ pub struct StateValues { } impl TryFrom<&AstState> for StateValues { - type Error = StateValuesError; + type Error = LeoError; - fn try_from(ast_state: &AstState) -> Result { + fn try_from(ast_state: &AstState) -> Result { let parameters = ast_state.values(); // Lookup leaf index let leaf_index_value = find_input(LEAF_INDEX_PARAMETER_STRING.to_owned(), ¶meters)?; - let leaf_index = input_to_integer_string(leaf_index_value)?.parse::()?; + let leaf_index = input_to_integer_string(leaf_index_value)? + .parse::() + .map_err(StateError::parse_int_error)?; // Lookup root let root_value = find_input(ROOT_PARAMETER_STRING.to_owned(), ¶meters)?; diff --git a/state/src/record_commitment/dpc_record_values.rs b/state/src/record_commitment/dpc_record_values.rs index 7de85e1cc0..945b541001 100644 --- a/state/src/record_commitment/dpc_record_values.rs +++ b/state/src/record_commitment/dpc_record_values.rs @@ -14,8 +14,9 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{utilities::*, DPCRecordValuesError}; +use crate::utilities::*; use leo_ast::Record as AstRecord; +use leo_errors::{LeoError, Result, SnarkVMError, StateError}; use snarkvm_dpc::{testnet1::instantiated::Components, Address}; @@ -48,9 +49,9 @@ pub struct DPCRecordValues { } impl TryFrom<&AstRecord> for DPCRecordValues { - type Error = DPCRecordValuesError; + type Error = LeoError; - fn try_from(ast_record: &AstRecord) -> Result { + fn try_from(ast_record: &AstRecord) -> Result { let parameters = ast_record.values(); // Lookup serial number @@ -59,15 +60,20 @@ impl TryFrom<&AstRecord> for DPCRecordValues { // Lookup record owner let owner_value = find_input(OWNER_PARAMETER_STRING.to_owned(), ¶meters)?; - let owner = Address::::from_str(&owner_value.to_string())?; + let owner = Address::::from_str(&owner_value.to_string()).map_err(|_| SnarkVMError::default())?; // Lookup record is_dummy let is_dummy_value = find_input(IS_DUMMY_PARAMETER_STRING.to_owned(), ¶meters)?; - let is_dummy = is_dummy_value.to_string().parse::()?; + let is_dummy = is_dummy_value + .to_string() + .parse::() + .map_err(StateError::parse_bool_error)?; // Lookup record value let value_value = find_input(VALUE_PARAMETER_STRING.to_owned(), ¶meters)?; - let value = input_to_integer_string(value_value)?.parse::()?; + let value = input_to_integer_string(value_value)? + .parse::() + .map_err(StateError::parse_int_error)?; // Lookup record payload let payload_value = find_input(PAYLOAD_PARAMETER_STRING.to_owned(), ¶meters)?; diff --git a/state/src/record_commitment/record_commitment.rs b/state/src/record_commitment/record_commitment.rs index c4b7549b1d..fad0ed8241 100644 --- a/state/src/record_commitment/record_commitment.rs +++ b/state/src/record_commitment/record_commitment.rs @@ -14,8 +14,9 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{DPCRecordValues, RecordVerificationError}; +use crate::DPCRecordValues; use leo_ast::Record as AstRecord; +use leo_errors::{Result, SnarkVMError, StateError}; use snarkvm_algorithms::traits::CommitmentScheme; use snarkvm_dpc::{ @@ -28,12 +29,9 @@ use std::convert::TryFrom; /// Returns a serialized [`DPCRecordValues`] type if the record commitment is valid given the /// system parameters. -pub fn verify_record_commitment( - dpc: &SystemParameters, - ast_record: &AstRecord, -) -> Result { +pub fn verify_record_commitment(dpc: &SystemParameters, ast_record: &AstRecord) -> Result { // generate a dpc record from the typed record - let record = DPCRecordValues::try_from(ast_record)?; + let record: DPCRecordValues = DPCRecordValues::try_from(ast_record)?; // verify record commitment let record_commitment_input = to_bytes_le![ @@ -44,24 +42,28 @@ pub fn verify_record_commitment( record.birth_program_id, record.death_program_id, record.serial_number_nonce - ]?; + ] + .map_err(StateError::state_io_error)?; let commitment = - <::RecordCommitment as CommitmentScheme>::Output::read_le(&record.commitment[..])?; + <::RecordCommitment as CommitmentScheme>::Output::read_le(&record.commitment[..]) + .map_err(StateError::state_io_error)?; let commitment_randomness = <::RecordCommitment as CommitmentScheme>::Randomness::read_le( &record.commitment_randomness[..], - )?; + ) + .map_err(StateError::state_io_error)?; let record_commitment = ::RecordCommitment::commit( &dpc.record_commitment, &record_commitment_input, &commitment_randomness, - )?; + ) + .map_err(|_| SnarkVMError::default())?; if record_commitment == commitment { Ok(record) } else { - Err(RecordVerificationError::CommitmentsDoNotMatch) + Err(SnarkVMError::default().into()) } } diff --git a/state/src/utilities/input_value.rs b/state/src/utilities/input_value.rs index a4e463f038..0640d21844 100644 --- a/state/src/utilities/input_value.rs +++ b/state/src/utilities/input_value.rs @@ -14,49 +14,48 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::InputValueError; use leo_ast::{InputValue, Parameter}; +use leo_errors::{Result, StateError}; use indexmap::IndexMap; /// Returns the input parameter with the given name. /// If a parameter with the given name does not exist, then an error is returned. -pub fn find_input( - name: String, - parameters: &IndexMap>, -) -> Result { +pub fn find_input(name: String, parameters: &IndexMap>) -> Result { let matched_parameter = parameters .iter() .find(|(parameter, _value)| parameter.variable.name.as_ref() == name); match matched_parameter { Some((_, Some(value))) => Ok(value.clone()), - _ => Err(InputValueError::MissingParameter(name)), + _ => Err(StateError::mising_parameter(name).into()), } } /// Returns the string of the integer input value. /// If the input value is not an integer, then an error is returned. -pub fn input_to_integer_string(input: InputValue) -> Result { +pub fn input_to_integer_string(input: InputValue) -> Result { match input { InputValue::Integer(_type, string) => Ok(string), - value => Err(InputValueError::ExpectedInteger(value.to_string())), + value => Err(StateError::expected_int(value).into()), } } /// Returns the given input value as u8 bytes. /// If the given input value cannot be serialized into bytes then an error is returned. -pub fn input_to_bytes(input: InputValue) -> Result, InputValueError> { +pub fn input_to_bytes(input: InputValue) -> Result> { let input_array = match input { InputValue::Array(values) => values, - value => return Err(InputValueError::ExpectedBytes(value.to_string())), + value => return Err(StateError::expected_bytes(value).into()), }; let mut result_vec = Vec::with_capacity(input_array.len()); for input in input_array { let integer_string = input_to_integer_string(input)?; - let byte = integer_string.parse::()?; + let byte = integer_string + .parse::() + .map_err(StateError::parse_int_error)?; result_vec.push(byte); } @@ -66,10 +65,10 @@ pub fn input_to_bytes(input: InputValue) -> Result, InputValueError> { /// Returns the given input value as an array of u8 bytes. /// If the given input value cannot be serialized into an array of bytes then an error is returned. -pub fn input_to_nested_bytes(input: InputValue) -> Result>, InputValueError> { +pub fn input_to_nested_bytes(input: InputValue) -> Result>> { let inner_arrays = match input { InputValue::Array(arrays) => arrays, - value => return Err(InputValueError::ExpectedBytes(value.to_string())), + value => return Err(StateError::expected_bytes(value).into()), }; let mut result_vec = Vec::with_capacity(inner_arrays.len()); From c9345bbcc7c953577a193fb634540e15fb29c038 Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Mon, 9 Aug 2021 12:18:51 -0700 Subject: [PATCH 13/58] cleaning up duplicate errors by removing canonicalization from asg --- .rusty-hook.toml | 2 +- asg/src/expression/variable_ref.rs | 6 +-- asg/src/program/function.rs | 3 -- asg/src/scope.rs | 27 +--------- asg/src/statement/assign.rs | 6 +-- errors/ERROR_INDEX.md | 0 errors/README.md | 0 errors/src/asg/asg_errors.rs | 82 ++++++++++++++++++++---------- errors/src/common/macros.rs | 15 +++--- 9 files changed, 69 insertions(+), 72 deletions(-) create mode 100644 errors/ERROR_INDEX.md create mode 100644 errors/README.md diff --git a/.rusty-hook.toml b/.rusty-hook.toml index 624072c35f..82a9ed5d69 100644 --- a/.rusty-hook.toml +++ b/.rusty-hook.toml @@ -1,5 +1,5 @@ [hooks] -# pre-commit = "cargo clippy && cargo +nightly fmt --all -- --check" +pre-commit = "cargo clippy && cargo fmt --all -- --check" [logging] verbose = true diff --git a/asg/src/expression/variable_ref.rs b/asg/src/expression/variable_ref.rs index 46755a39d5..f16598ac44 100644 --- a/asg/src/expression/variable_ref.rs +++ b/asg/src/expression/variable_ref.rs @@ -130,11 +130,7 @@ impl<'a> FromAst<'a, leo_ast::Identifier> for &'a Expression<'a> { if let Some(input) = scope.resolve_input() { input.container } else { - return Err(AsgError::illegal_input_variable_reference( - "attempted to reference input when none is in scope", - &value.span, - ) - .into()); + return Err(AsgError::illegal_input_variable_reference(&value.span).into()); } } else { match scope.resolve_variable(&value.name) { diff --git a/asg/src/program/function.rs b/asg/src/program/function.rs index 1f951c3fe5..f2a4cb105e 100644 --- a/asg/src/program/function.rs +++ b/asg/src/program/function.rs @@ -97,9 +97,6 @@ impl<'a> Function<'a> { } } } - if qualifier != FunctionQualifier::Static && scope.circuit_self.get().is_none() { - return Err(AsgError::invalid_self_in_global(&value.span).into()); - } let function = scope.context.alloc_function(Function { id: scope.context.get_id(), name: RefCell::new(value.identifier.clone()), diff --git a/asg/src/scope.rs b/asg/src/scope.rs index ea83b3c019..4365471a65 100644 --- a/asg/src/scope.rs +++ b/asg/src/scope.rs @@ -128,8 +128,6 @@ impl<'a> Scope<'a> { pub fn resolve_circuit(&self, name: &str) -> Option<&'a Circuit<'a>> { if let Some(resolved) = self.circuits.borrow().get(name) { Some(*resolved) - } else if name == "Self" && self.circuit_self.get().is_some() { - self.circuit_self.get() } else if let Some(resolved) = self.parent_scope.get() { resolved.resolve_circuit(name) } else { @@ -137,22 +135,6 @@ impl<'a> Scope<'a> { } } - /// - /// Returns a reference to the current circuit. - /// - /// If the current scope did not have a circuit self present, then the parent scope is checked. - /// If there is no parent scope, then `None` is returned. - /// - pub fn resolve_circuit_self(&self) -> Option<&'a Circuit<'a>> { - if let Some(resolved) = self.circuit_self.get() { - Some(resolved) - } else if let Some(resolved) = self.parent_scope.get() { - resolved.resolve_circuit_self() - } else { - None - } - } - /// /// Returns a new scope given a parent scope. /// @@ -200,14 +182,7 @@ impl<'a> Scope<'a> { .map(|x| self.resolve_ast_type(x, span)) .collect::>>()?, ), - Circuit(name) if name.name.as_ref() == "Self" => Type::Circuit( - self.resolve_circuit_self() - .ok_or_else(|| AsgError::unresolved_circuit(&name.name, &name.span))?, - ), - SelfType => Type::Circuit( - self.resolve_circuit_self() - .ok_or_else(|| AsgError::reference_self_outside_circuit(span))?, - ), + SelfType => return Err(AsgError::unexpected_big_self(span).into()), Circuit(name) => Type::Circuit( self.resolve_circuit(&name.name) .ok_or_else(|| AsgError::unresolved_circuit(&name.name, &name.span))?, diff --git a/asg/src/statement/assign.rs b/asg/src/statement/assign.rs index 34633390c7..59c7b3a528 100644 --- a/asg/src/statement/assign.rs +++ b/asg/src/statement/assign.rs @@ -63,11 +63,7 @@ impl<'a> FromAst<'a, leo_ast::AssignStatement> for &'a Statement<'a> { if let Some(input) = scope.resolve_input() { input.container } else { - return Err(AsgError::illegal_input_variable_reference( - "attempted to reference input when none is in scope", - &statement.span, - ) - .into()); + return Err(AsgError::illegal_input_variable_reference(&statement.span).into()); } } else { scope diff --git a/errors/ERROR_INDEX.md b/errors/ERROR_INDEX.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/errors/README.md b/errors/README.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/errors/src/asg/asg_errors.rs b/errors/src/asg/asg_errors.rs index ec726a4ce7..e0b3814555 100644 --- a/errors/src/asg/asg_errors.rs +++ b/errors/src/asg/asg_errors.rs @@ -19,10 +19,13 @@ use crate::create_errors; use std::fmt::{Debug, Display}; create_errors!( + /// AsgError enum that represents all the errors for the ASG. AsgError, exit_code_mask: 0i32, error_code_prefix: "ASG", + /// For when a circuit of the specified type is unresolved. + /// Note that the type for a circuit is represented by a name. @formatted unresolved_circuit { args: (name: impl Display), @@ -30,6 +33,7 @@ create_errors!( help: None, } + /// For when a import of the specified name is unresolved. @formatted unresolved_import { args: (name: impl Display), @@ -37,6 +41,7 @@ create_errors!( help: None, } + /// For when a circuit member of the specified name is unresolved. @formatted unresolved_circuit_member { args: (circuit_name: impl Display, name: impl Display), @@ -47,6 +52,7 @@ create_errors!( help: None, } + /// For when a user is initializing a circuit, and it's missing circuit member. @formatted missing_circuit_member { args: (circuit_name: impl Display, name: impl Display), @@ -57,6 +63,7 @@ create_errors!( help: None, } + /// For when a user is initializing a circuit, and they declare a cirucit member twice. @formatted overridden_circuit_member { args: (circuit_name: impl Display, name: impl Display), @@ -67,6 +74,7 @@ create_errors!( help: None, } + /// For when a user is defining a circuit, and they define a circuit member multiple times. @formatted redefined_circuit_member { args: (circuit_name: impl Display, name: impl Display), @@ -77,6 +85,7 @@ create_errors!( help: None, } + /// For when a user is initializing a circuit, and they add an extra circuit member. @formatted extra_circuit_member { args: (circuit_name: impl Display, name: impl Display), @@ -87,6 +96,7 @@ create_errors!( help: None, } + /// For when a user attempts to assign to a function. @formatted illegal_function_assign { args: (name: impl Display), @@ -94,6 +104,7 @@ create_errors!( help: None, } + /// For when a user tries to call a circuit variable as a function. @formatted circuit_variable_call { args: (circuit_name: impl Display, name: impl Display), @@ -101,6 +112,7 @@ create_errors!( help: None, } + /// For when a user tries to call an invalid circuit static function. @formatted circuit_static_call_invalid { args: (circuit_name: impl Display, name: impl Display), @@ -111,6 +123,7 @@ create_errors!( help: None, } + /// For when a user tries to call a mutable circuit member function from immutable context. @formatted circuit_member_mut_call_invalid { args: (circuit_name: impl Display, name: impl Display), @@ -121,6 +134,7 @@ create_errors!( help: None, } + /// For when a user tries to call a circuit member function from static context. @formatted circuit_member_call_invalid { args: (circuit_name: impl Display, name: impl Display), @@ -131,16 +145,7 @@ create_errors!( help: None, } - @formatted - circuit_function_ref { - args: (circuit_name: impl Display, name: impl Display), - msg: format!( - "cannot reference function member '{}' of circuit '{}' as value", - name, circuit_name - ), - help: None, - } - + /// For when a user tries to index into a non-array type. @formatted index_into_non_array { args: (name: impl Display), @@ -148,6 +153,7 @@ create_errors!( help: None, } + /// For when a user tries index with an invalid integer. @formatted invalid_assign_index { args: (name: impl Display, num: impl Display), @@ -155,6 +161,7 @@ create_errors!( help: None, } + /// For when a user tries to index an array range, with a left value greater than right value. @formatted invalid_backwards_assignment { args: (name: impl Display, left: impl Display, right: impl Display), @@ -165,6 +172,7 @@ create_errors!( help: None, } + /// For when a user tries to create a constant varaible from non constant values. @formatted invalid_const_assign { args: (name: impl Display), @@ -175,6 +183,7 @@ create_errors!( help: None, } + /// For when a user defines function with the same name twice. @formatted duplicate_function_definition { args: (name: impl Display), @@ -182,6 +191,7 @@ create_errors!( help: None, } + /// For when a user defines variable with the same name twice. @formatted duplicate_variable_definition { args: (name: impl Display), @@ -189,6 +199,7 @@ create_errors!( help: None, } + /// For when a user tries to index into a non-tuple type. @formatted index_into_non_tuple { args: (name: impl Display), @@ -196,6 +207,7 @@ create_errors!( help: None, } + /// For when a user tries access a tuple index out of bounds. @formatted tuple_index_out_of_bounds { args: (index: impl Display), @@ -203,6 +215,7 @@ create_errors!( help: None, } + /// For when a user tries access a array index out of bounds. @formatted array_index_out_of_bounds { args: (index: impl Display), @@ -210,6 +223,7 @@ create_errors!( help: None, } + /// For when a user tries have either side of a ternary return different variable types. @formatted ternary_different_types { args: (left: impl Display, right: impl Display), @@ -217,6 +231,7 @@ create_errors!( help: None, } + /// For when an array size cannot be inferred. @formatted unknown_array_size { args: (), @@ -224,6 +239,7 @@ create_errors!( help: None, } + /// For when a user passes more arguements to a function than expected. @formatted unexpected_call_argument_count { args: (expected: impl Display, got: impl Display), @@ -231,6 +247,7 @@ create_errors!( help: None, } + /// For whan a function is unresolved. @formatted unresolved_function { args: (name: impl Display), @@ -238,6 +255,7 @@ create_errors!( help: None, } + /// For when a type cannot be resolved. @formatted unresolved_type { args: (name: impl Display), @@ -245,6 +263,7 @@ create_errors!( help: None, } + /// For when a user passes a type, but another was expected. @formatted unexpected_type { args: (expected: impl Display, received: impl Display), @@ -256,6 +275,7 @@ create_errors!( help: None, } + /// For when a constant value was expected, but a non-constant one was received. @formatted unexpected_nonconst { args: (), @@ -263,6 +283,7 @@ create_errors!( help: None, } + /// For whan a variable is unresolved. @formatted unresolved_reference { args: (name: impl Display), @@ -270,6 +291,7 @@ create_errors!( help: None, } + /// For when a boolean value cannot be parsed. @formatted invalid_boolean { args: (value: impl Display), @@ -277,6 +299,7 @@ create_errors!( help: None, } + /// For when a char value cannot be parsed. @formatted invalid_char { args: (value: impl Display), @@ -284,6 +307,7 @@ create_errors!( help: None, } + /// For when an int value cannot be parsed. @formatted invalid_int { args: (value: impl Display), @@ -291,6 +315,7 @@ create_errors!( help: None, } + /// For when a user tries to negate an unsigned integer. @formatted unsigned_negation { args: (), @@ -298,6 +323,7 @@ create_errors!( help: None, } + /// For when a user tries to assign to an immutable variable. @formatted immutable_assignment { args: (name: impl Display), @@ -305,6 +331,7 @@ create_errors!( help: None, } + /// For when a function is missing a return statement. @formatted function_missing_return { args: (name: impl Display), @@ -312,6 +339,7 @@ create_errors!( help: None, } + /// For when a function fails to resolve the correct return. @formatted function_return_validation { args: (name: impl Display, description: impl Display), @@ -319,6 +347,7 @@ create_errors!( help: None, } + /// For when the type for an input variable could not be infered. @formatted input_ref_needs_type { args: (category: impl Display, name: impl Display), @@ -326,13 +355,7 @@ create_errors!( help: None, } - @formatted - invalid_self_in_global { - args: (), - msg: "cannot have `mut self` or `self` arguments in global functions", - help: None, - } - + /// For when a user tries to call a test function. @formatted call_test_function { args: (), @@ -340,6 +363,7 @@ create_errors!( help: None, } + /// For when a user tries to define a circuit function as a test function. @formatted circuit_test_function { args: (), @@ -347,6 +371,7 @@ create_errors!( help: None, } + /// Failed to parse index. @formatted parse_index_error { args: (), @@ -354,6 +379,7 @@ create_errors!( help: None, } + /// Failed to parse array dimensions. @formatted parse_dimension_error { args: (), @@ -361,13 +387,7 @@ create_errors!( help: None, } - @formatted - reference_self_outside_circuit { - args: (), - msg: "referenced self outside of circuit function", - help: None, - } - + /// For when there is an illegal ast structure. @formatted illegal_ast_structure { args: (details: impl Display), @@ -375,10 +395,20 @@ create_errors!( help: None, } + /// For when a user tries to reference an input varaible but none is in scope. @formatted illegal_input_variable_reference { - args: (details: impl Display), - msg: format!("illegal ast structure: {}", details), + args: (), + msg: "attempted to reference input when none is in scope", + help: None, + } + + /// For the ASG receives an big Self, which should never happen + /// as they should be resolved in an earlier compiler phase. + @formatted + unexpected_big_self { + args: (), + msg: "received a Self statement, which should never happen", help: None, } ); diff --git a/errors/src/common/macros.rs b/errors/src/common/macros.rs index c9b7affe27..0542a5340b 100644 --- a/errors/src/common/macros.rs +++ b/errors/src/common/macros.rs @@ -17,13 +17,14 @@ #[macro_export] macro_rules! create_errors { (@step $_code:expr,) => {}; - ($error_type:ident, exit_code_mask: $exit_code_mask:expr, error_code_prefix: $error_code_prefix:expr, $(@$formatted_or_backtraced_list:ident $names:ident { args: ($($arg_names:ident: $arg_types:ty$(,)?)*), msg: $messages:expr, help: $helps:expr, })*) => { + ($(#[$error_type_docs:meta])* $error_type:ident, exit_code_mask: $exit_code_mask:expr, error_code_prefix: $error_code_prefix:expr, $($(#[$docs:meta])* @$formatted_or_backtraced_list:ident $names:ident { args: ($($arg_names:ident: $arg_types:ty$(,)?)*), msg: $messages:expr, help: $helps:expr, })*) => { #[allow(unused_imports)] use crate::{BacktracedError, ErrorCode, FormattedError, LeoErrorCode, Span}; use backtrace::Backtrace; #[derive(Debug, Error)] + $(#[$error_type_docs])* pub enum $error_type { #[error(transparent)] FormattedError(#[from] FormattedError), @@ -60,10 +61,11 @@ macro_rules! create_errors { } impl $error_type { - create_errors!(@step 0i32, $(($formatted_or_backtraced_list, $names($($arg_names: $arg_types,)*), $messages, $helps),)*); + create_errors!(@step 0i32, $(($(#[$docs])* $formatted_or_backtraced_list, $names($($arg_names: $arg_types,)*), $messages, $helps),)*); } }; - (@step $code:expr, (formatted, $error_name:ident($($arg_names:ident: $arg_types:ty,)*), $message:expr, $help:expr), $(($formatted_or_backtraced_tail:ident, $names:ident($($tail_arg_names:ident: $tail_arg_types:ty,)*), $messages:expr, $helps:expr),)*) => { + (@step $code:expr, ($(#[$error_func_docs:meta])* formatted, $error_name:ident($($arg_names:ident: $arg_types:ty,)*), $message:expr, $help:expr), $(($(#[$docs:meta])* $formatted_or_backtraced_tail:ident, $names:ident($($tail_arg_names:ident: $tail_arg_types:ty,)*), $messages:expr, $helps:expr),)*) => { + $(#[$error_func_docs])* pub fn $error_name($($arg_names: $arg_types,)* span: &Span) -> Self { Self::FormattedError( FormattedError::new_from_span( @@ -78,9 +80,10 @@ macro_rules! create_errors { ) } - create_errors!(@step $code + 1i32, $(($formatted_or_backtraced_tail, $names($($tail_arg_names: $tail_arg_types,)*), $messages, $helps),)*); + create_errors!(@step $code + 1i32, $(($(#[$docs])* $formatted_or_backtraced_tail, $names($($tail_arg_names: $tail_arg_types,)*), $messages, $helps),)*); }; - (@step $code:expr, (backtraced, $error_name:ident($($arg_names:ident: $arg_types:ty,)*), $message:expr, $help:expr), $(($formatted_or_backtraced_tail:ident, $names:ident($($tail_arg_names:ident: $tail_arg_types:ty,)*), $messages:expr, $helps:expr),)*) => { + (@step $code:expr, ($(#[$error_func_docs:meta])* backtraced, $error_name:ident($($arg_names:ident: $arg_types:ty,)*), $message:expr, $help:expr), $(($(#[$docs:meta])* $formatted_or_backtraced_tail:ident, $names:ident($($tail_arg_names:ident: $tail_arg_types:ty,)*), $messages:expr, $helps:expr),)*) => { + $(#[$error_func_docs])* pub fn $error_name($($arg_names: $arg_types,)*) -> Self { Self::BacktracedError( BacktracedError::new_from_backtrace( @@ -94,7 +97,7 @@ macro_rules! create_errors { ) } - create_errors!(@step $code + 1i32, $(($formatted_or_backtraced_tail, $names($($tail_arg_names: $tail_arg_types,)*), $messages, $helps),)*); + create_errors!(@step $code + 1i32, $(($(#[$docs])* $formatted_or_backtraced_tail, $names($($tail_arg_names: $tail_arg_types,)*), $messages, $helps),)*); }; } From 402ad7aabb49249d4f4d1248f53010a5417d6b12 Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Tue, 10 Aug 2021 14:10:27 -0700 Subject: [PATCH 14/58] finish in code documentation, deny no doc comments --- asg-passes/README.md | 0 asg-passes/src/lib.rs | 2 + asg/src/lib.rs | 1 + asg/src/program/circuit.rs | 2 - asg/src/program/mod.rs | 2 - asg/src/scope.rs | 4 - ast/src/lib.rs | 2 + compiler/src/phases/reducing_director.rs | 4 +- errors/src/asg/asg_errors.rs | 2 +- errors/src/asg/mod.rs | 1 + errors/src/ast/ast_errors.rs | 15 ++- errors/src/ast/mod.rs | 1 + errors/src/cli/cli_errors.rs | 59 ++++++++++-- errors/src/cli/mod.rs | 1 + errors/src/common/backtraced.rs | 17 ++-- errors/src/common/formatted.rs | 37 +++---- errors/src/common/macros.rs | 18 +++- errors/src/common/mod.rs | 12 ++- errors/src/common/span.rs | 16 ++++ errors/src/common/tendril_json.rs | 2 + errors/src/common/traits.rs | 7 ++ errors/src/compiler/compiler_errors.rs | 117 ++++++++++++++++++++--- errors/src/compiler/mod.rs | 1 + errors/src/import/import_errors.rs | 15 +-- errors/src/import/mod.rs | 1 + errors/src/lib.rs | 29 +++++- errors/src/package/mod.rs | 1 + errors/src/package/package_errors.rs | 61 +++++++++++- errors/src/parser/mod.rs | 1 + errors/src/parser/parser_errors.rs | 19 ++++ errors/src/snarkvm/mod.rs | 1 + errors/src/snarkvm/snarkvm_errors.rs | 5 + errors/src/state/mod.rs | 1 + errors/src/state/state_errors.rs | 9 +- imports/src/lib.rs | 1 + input/src/lib.rs | 3 + leo/commands/package/login.rs | 2 +- package/src/lib.rs | 2 + parser/src/lib.rs | 1 + state/src/lib.rs | 1 + state/src/utilities/input_value.rs | 2 +- synthesizer/src/lib.rs | 2 + test-framework/README.md | 0 test-framework/src/lib.rs | 2 + 44 files changed, 406 insertions(+), 76 deletions(-) create mode 100644 asg-passes/README.md create mode 100644 test-framework/README.md diff --git a/asg-passes/README.md b/asg-passes/README.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/asg-passes/src/lib.rs b/asg-passes/src/lib.rs index 39bd6e309f..1904bf782d 100644 --- a/asg-passes/src/lib.rs +++ b/asg-passes/src/lib.rs @@ -14,6 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . +#![doc = include_str!("../README.md")] + pub mod constant_folding; pub use constant_folding::*; diff --git a/asg/src/lib.rs b/asg/src/lib.rs index 844330208e..ecb5702ab6 100644 --- a/asg/src/lib.rs +++ b/asg/src/lib.rs @@ -24,6 +24,7 @@ #![allow(clippy::from_over_into)] #![allow(clippy::result_unit_err)] +#![doc = include_str!("../README.md")] pub mod checks; pub use checks::*; diff --git a/asg/src/program/circuit.rs b/asg/src/program/circuit.rs index b7fbbbdc10..009ecb2161 100644 --- a/asg/src/program/circuit.rs +++ b/asg/src/program/circuit.rs @@ -65,7 +65,6 @@ impl<'a> Circuit<'a> { span: Some(value.circuit_name.span.clone()), scope: new_scope, }); - new_scope.circuit_self.replace(Some(circuit)); let mut members = circuit.members.borrow_mut(); for member in value.members.iter() { @@ -90,7 +89,6 @@ impl<'a> Circuit<'a> { let circuits = scope.circuits.borrow(); let circuit = circuits.get(value.circuit_name.name.as_ref()).unwrap(); - new_scope.circuit_self.replace(Some(circuit)); let mut members = circuit.members.borrow_mut(); for member in value.members.iter() { diff --git a/asg/src/program/mod.rs b/asg/src/program/mod.rs index 76a01fe028..44b8cad74c 100644 --- a/asg/src/program/mod.rs +++ b/asg/src/program/mod.rs @@ -217,7 +217,6 @@ impl<'a> Program<'a> { context, id: context.get_id(), parent_scope: Cell::new(None), - circuit_self: Cell::new(None), variables: RefCell::new(IndexMap::new()), functions: RefCell::new(imported_functions), global_consts: RefCell::new(imported_global_consts), @@ -234,7 +233,6 @@ impl<'a> Program<'a> { input: Cell::new(Some(Input::new(import_scope))), // we use import_scope to avoid recursive scope ref here id: context.get_id(), parent_scope: Cell::new(Some(import_scope)), - circuit_self: Cell::new(None), variables: RefCell::new(IndexMap::new()), functions: RefCell::new(IndexMap::new()), global_consts: RefCell::new(IndexMap::new()), diff --git a/asg/src/scope.rs b/asg/src/scope.rs index 4365471a65..fb34bb35fe 100644 --- a/asg/src/scope.rs +++ b/asg/src/scope.rs @@ -34,9 +34,6 @@ pub struct Scope<'a> { /// The function definition that this scope occurs in. pub function: Cell>>, - /// The circuit definition that this scope occurs in. - pub circuit_self: Cell>>, - /// Maps variable name => variable. pub variables: RefCell>>, @@ -143,7 +140,6 @@ impl<'a> Scope<'a> { context: self.context, id: self.context.get_id(), parent_scope: Cell::new(Some(self)), - circuit_self: Cell::new(None), variables: RefCell::new(IndexMap::new()), functions: RefCell::new(IndexMap::new()), circuits: RefCell::new(IndexMap::new()), diff --git a/ast/src/lib.rs b/ast/src/lib.rs index eceb10e614..58a45a6677 100644 --- a/ast/src/lib.rs +++ b/ast/src/lib.rs @@ -20,6 +20,8 @@ //! The [`Ast`] type is intended to be parsed and modified by different passes //! of the Leo compiler. The Leo compiler can generate a set of R1CS constraints from any [`Ast`]. +#![doc = include_str!("../README.md")] + pub mod annotation; pub use self::annotation::*; diff --git a/compiler/src/phases/reducing_director.rs b/compiler/src/phases/reducing_director.rs index 3150f9d9df..380f6e577c 100644 --- a/compiler/src/phases/reducing_director.rs +++ b/compiler/src/phases/reducing_director.rs @@ -496,7 +496,7 @@ impl CombineAstAsgDirector { if let AsgStatement::Block(asg_block) = asg.result.get() { block = self.reduce_block(&ast.block, asg_block)?; } else { - return Err(AstError::asg_statement_not_block(asg.span.as_ref().unwrap()).into()); + return Err(AstError::ast_statement_not_block(asg.span.as_ref().unwrap()).into()); } let next = match (ast.next.as_ref(), asg.next.get()) { (Some(ast_next), Some(asg_next)) => Some(self.reduce_statement(ast_next, asg_next)?), @@ -602,7 +602,7 @@ impl CombineAstAsgDirector { if let AsgStatement::Block(asg_block) = asg.body.get() { block = self.reduce_block(&ast.block, asg_block)?; } else { - return Err(AstError::asg_statement_not_block(asg.span.as_ref().unwrap()).into()); + return Err(AstError::ast_statement_not_block(asg.span.as_ref().unwrap()).into()); } self.ast_reducer diff --git a/errors/src/asg/asg_errors.rs b/errors/src/asg/asg_errors.rs index e0b3814555..5875864901 100644 --- a/errors/src/asg/asg_errors.rs +++ b/errors/src/asg/asg_errors.rs @@ -19,7 +19,7 @@ use crate::create_errors; use std::fmt::{Debug, Display}; create_errors!( - /// AsgError enum that represents all the errors for the ASG. + /// AsgError enum that represents all the errors for the `leo-asg` crate. AsgError, exit_code_mask: 0i32, error_code_prefix: "ASG", diff --git a/errors/src/asg/mod.rs b/errors/src/asg/mod.rs index 67acdd1b2b..8e7bb75e7d 100644 --- a/errors/src/asg/mod.rs +++ b/errors/src/asg/mod.rs @@ -14,5 +14,6 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . +/// This module contains the ASG error definitions. pub mod asg_errors; pub use self::asg_errors::*; diff --git a/errors/src/ast/ast_errors.rs b/errors/src/ast/ast_errors.rs index 7da8866b37..5ee5ceb975 100644 --- a/errors/src/ast/ast_errors.rs +++ b/errors/src/ast/ast_errors.rs @@ -18,10 +18,12 @@ use crate::create_errors; use std::{error::Error as ErrorArg, fmt::Debug}; create_errors!( + /// AstError enum that represents all the errors for the `leo-ast` crate. AstError, exit_code_mask: 1000i32, error_code_prefix: "AST", + /// For when the AST fails to be represented as a JSON string. @backtraced failed_to_convert_ast_to_json_string { args: (error: impl ErrorArg), @@ -29,6 +31,7 @@ create_errors!( help: None, } + /// For when the AST fails to create the AST JSON file. @backtraced failed_to_create_ast_json_file { args: (path: impl Debug, error: impl ErrorArg), @@ -36,6 +39,7 @@ create_errors!( help: None, } + /// For when the AST fails to write the AST JSON file. @backtraced failed_to_write_ast_to_json_file { args: (path: impl Debug, error: impl ErrorArg), @@ -43,13 +47,15 @@ create_errors!( help: None, } + /// For when the a JSON string fails to be represented as an AST. @backtraced failed_to_read_json_string_to_ast { args: (error: impl ErrorArg), - msg: format!("failed to convert json stirng to an ast {}", error), + msg: format!("failed to convert json string to an ast {}", error), help: None, } + /// For when the a JSON files fails to be represented as an AST. @backtraced failed_to_read_json_file { args: (path: impl Debug, error: impl ErrorArg), @@ -57,6 +63,7 @@ create_errors!( help: None, } + /// For when a user tries to use the `Self` keyword outside of a cricuit. @formatted big_self_outside_of_circuit { args: (), @@ -64,6 +71,7 @@ create_errors!( help: None, } + /// For when a user tries to define a array dimension of 0. @formatted invalid_array_dimension_size { args: (), @@ -71,13 +79,15 @@ create_errors!( help: None, } + /// For when a user tries to give certain statements a block rather than another statement. @formatted - asg_statement_not_block { + ast_statement_not_block { args: (), msg: "AstStatement should be be a block", help: None, } + /// For when a user tries to construct an empty string, which is a zero size array. @formatted empty_string { args: (), @@ -85,6 +95,7 @@ create_errors!( help: None, } + /// This error should never be reached, but represents trying to expand a console assert. @formatted impossible_console_assert_call { args: (), diff --git a/errors/src/ast/mod.rs b/errors/src/ast/mod.rs index a7bfe9d032..b783e63d57 100644 --- a/errors/src/ast/mod.rs +++ b/errors/src/ast/mod.rs @@ -14,5 +14,6 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . +/// This module contains the AST error definitions. pub mod ast_errors; pub use self::ast_errors::*; diff --git a/errors/src/cli/cli_errors.rs b/errors/src/cli/cli_errors.rs index 82c3ee36d9..7a2d3cf1dd 100644 --- a/errors/src/cli/cli_errors.rs +++ b/errors/src/cli/cli_errors.rs @@ -21,10 +21,12 @@ use std::{ }; create_errors!( + /// CliError enum that represents all the errors for the `leo-lang` crate. CliError, exit_code_mask: 7000i32, error_code_prefix: "CLI", + /// Not actually ever returned anywhere outside a test. @backtraced opt_args_error { args: (error: impl ErrorArg), @@ -32,6 +34,7 @@ create_errors!( help: None, } + /// For when APM returns an unidentifed API error. @backtraced unidentified_api { args: (), @@ -39,6 +42,7 @@ create_errors!( help: None, } + /// For when the CLI is unable to connect to a Leo Package Manager. @backtraced unable_to_connect_aleo_pm { args: (), @@ -46,6 +50,7 @@ create_errors!( help: None, } + /// For when APM is unable to find to a package. @backtraced package_not_found { args: (), @@ -53,6 +58,7 @@ create_errors!( help: None, } + /// For when APM returns an unknown API error. @backtraced unkown_api_error { args: (status: impl Display), @@ -60,6 +66,7 @@ create_errors!( help: None, } + /// For when the APM account username is not registered, or password is incorrect. @backtraced account_not_found { args: (), @@ -67,13 +74,15 @@ create_errors!( help: None, } + /// For when APM account password is incorrect. @backtraced incorrect_password { args: (), - msg: "", + msg: "Incorrect password", help: None, } + /// For when a request to APM fails witha bad request status. @backtraced bad_request { args: (msg: impl Display), @@ -81,6 +90,8 @@ create_errors!( help: None, } + /// For when the user is performing some APM action that + /// requires the user to be logged in first. @backtraced not_logged_in { args: (), @@ -88,6 +99,7 @@ create_errors!( help: None, } + /// For when a package with the same name and author name is already published. @backtraced already_published { args: (), @@ -95,6 +107,7 @@ create_errors!( help: None, } + /// For when APM is experiencing a HTTP Status of 500. @backtraced internal_server_error { args: (), @@ -102,13 +115,15 @@ create_errors!( help: None, } + /// For when the reqwest library fails to get the request JSON. @backtraced reqwest_json_error { args: (error: impl ErrorArg), - msg: format!("request json failed {}", error), + msg: format!("request JSON failed {}", error), help: None, } + /// For when the user provides an incorrect command argument. @backtraced incorrect_command_argument { args: (), @@ -116,6 +131,7 @@ create_errors!( help: None, } + /// For when the CLI experiences an IO error. @backtraced cli_io_error { args: (error: impl ErrorArg), @@ -123,6 +139,7 @@ create_errors!( help: None, } + /// For when the CLI experiences a bytes conversion error. @backtraced cli_bytes_conversion_error { args: (error: impl ErrorArg), @@ -130,6 +147,7 @@ create_errors!( help: None, } + /// For when the CLI experiences a zip error. @backtraced cli_zip_error { args: (error: impl ErrorArg), @@ -137,6 +155,7 @@ create_errors!( help: None, } + /// For when the CLI cannot find the manifest file. @backtraced mainifest_file_not_found { args: (), @@ -144,13 +163,15 @@ create_errors!( help: None, } + /// For when the CLI was unable to get the user token. @backtraced - unable_to_get_token { + unable_to_get_user_token { args: (), msg: "Unable to get token", help: None, } + /// For when the CLI was supplied an incorrect user token. @backtraced supplied_token_is_incorrect { args: (), @@ -158,6 +179,7 @@ create_errors!( help: None, } + /// For when the CLI user's stored credentials expire. @backtraced stored_credentials_expired { args: (), @@ -165,6 +187,7 @@ create_errors!( help: None, } + /// For when the user does not provide credentials to the CLI. @backtraced no_credentials_provided { args: (), @@ -172,6 +195,8 @@ create_errors!( help: None, } + /// For when the CLI does not have persmission to modify the .leo folder + /// and cannot logout the user. @backtraced logout_permision_denied { args: (), @@ -179,6 +204,7 @@ create_errors!( help: None, } + /// For when the CLI cannot access the logout file. @backtraced cannot_access_logout_file { args: (), @@ -186,6 +212,7 @@ create_errors!( help: None, } + /// For when the user tries to name a package after a Leo keyword. @backtraced package_cannot_be_named_after_a_keyword { args: (), @@ -193,6 +220,7 @@ create_errors!( help: None, } + /// For when the user has not provided a package description. @backtraced no_package_description { args: (), @@ -200,6 +228,7 @@ create_errors!( help: None, } + /// For when the user has not provided a package license. @backtraced missing_package_license { args: (), @@ -207,6 +236,7 @@ create_errors!( help: None, } + /// For when the package is missing its remote section in the Leo.toml file. @backtraced missing_package_remote { args: (), @@ -214,6 +244,7 @@ create_errors!( help: None, } + /// For when the user has not provided the package author field in the Leo.toml file. @backtraced package_author_is_not_set { args: (), @@ -221,20 +252,23 @@ create_errors!( help: None, } + /// For when the CLI fails to convert an object to TOML. @backtraced failed_to_convert_to_toml { args: (error: impl ErrorArg), - msg: format!("failed to covnert to toml {}", error), + msg: format!("failed to covnert to TOML {}", error), help: None, } + /// For when the CLI fails to TOML an object. @backtraced failed_to_convert_from_toml { args: (error: impl ErrorArg), - msg: format!("failed to covnert from toml {}", error), + msg: format!("failed to covnert from TOML {}", error), help: None, } + /// For when the current package directory doesn't exist. @backtraced package_directory_does_not_exist { args: (), @@ -242,6 +276,7 @@ create_errors!( help: None, } + /// For when the current project has an invalid name. @backtraced invalid_project_name { args: (), @@ -249,13 +284,15 @@ create_errors!( help: None, } + /// For when the current package has an invalid name. @backtraced invalid_package_name { args: (name: impl Display), - msg: format!("Invalid Leo project name: {}", name), + msg: format!("Invalid Leo package name: {}", name), help: None, } + /// For when the package main.leo file is not found. @backtraced package_main_file_not_found { args: (), @@ -263,6 +300,7 @@ create_errors!( help: None, } + /// For when the package directory already exists. @backtraced package_directory_already_exists { args: (path: impl Debug), @@ -270,6 +308,7 @@ create_errors!( help: None, } + /// For when the CLI could not a directory. @backtraced package_could_not_create_directory { args: (error: impl ErrorArg), @@ -277,6 +316,7 @@ create_errors!( help: None, } + /// For when the CLI could not setup a Leo command. @backtraced unable_to_setup { args: (), @@ -284,6 +324,7 @@ create_errors!( help: None, } + /// For when the program file does not exist. @backtraced program_file_does_not_exist { args: (path: impl Display), @@ -291,6 +332,7 @@ create_errors!( help: None, } + /// For when the CLI could not fetch the versions. @backtraced could_not_fetch_versions { args: (error: impl ErrorArg), @@ -298,6 +340,7 @@ create_errors!( help: None, } + /// For when the CLI failed to watch the Leo package. @backtraced unable_to_watch { args: (error: impl ErrorArg), @@ -305,6 +348,7 @@ create_errors!( help: None, } + /// For when the CLI fails to enable ansi support. @backtraced failed_to_enable_ansi_support { args: (), @@ -312,6 +356,7 @@ create_errors!( help: None, } + /// For when the CLI fails to self update. @backtraced self_update_error { args: (error: impl ErrorArg), @@ -319,6 +364,7 @@ create_errors!( help: None, } + /// For when the CLI has an old release version. @backtraced old_release_version { args: (current: impl Display, latest: impl Display), @@ -328,6 +374,7 @@ create_errors!( ); impl CliError { + /// Possible errors that can be thrown when the CLI is removing the token and username. pub fn remove_token_and_username(error: std::io::Error) -> Self { use std::io::ErrorKind; match error.kind() { diff --git a/errors/src/cli/mod.rs b/errors/src/cli/mod.rs index 85d9ad4089..1ed1b9473f 100644 --- a/errors/src/cli/mod.rs +++ b/errors/src/cli/mod.rs @@ -14,5 +14,6 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . +/// This module contains the CLI error definitions. pub mod cli_errors; pub use self::cli_errors::*; diff --git a/errors/src/common/backtraced.rs b/errors/src/common/backtraced.rs index ca5ae64f55..6e49d7e0ef 100644 --- a/errors/src/common/backtraced.rs +++ b/errors/src/common/backtraced.rs @@ -20,30 +20,34 @@ use backtrace::Backtrace; use color_backtrace::{BacktracePrinter, Verbosity}; use derivative::Derivative; -pub const INDENT: &str = " "; +/// The indent for an error message. +pub(crate) const INDENT: &str = " "; -/// Formatted compiler error type +/// Backtraced compiler error type /// undefined value `x` /// --> file.leo: 2:8 -/// | -/// 2 | let a = x; -/// | ^ -/// | /// = help: Initialize a variable `x` first. #[derive(Derivative)] #[derivative(Clone, Debug, Default, Hash, PartialEq)] pub struct BacktracedError { + /// The error message. pub message: String, + /// The error help message if it exists. pub help: Option, + /// The error exit code. pub exit_code: i32, + /// The error leading digits identifier. pub code_identifier: i8, + /// The characters representing the type of error. pub error_type: String, #[derivative(PartialEq = "ignore")] #[derivative(Hash = "ignore")] + /// The backtrace representing where the error occured in Leo. pub backtrace: Backtrace, } impl BacktracedError { + /// Creates a backtraced error from a backtrace. pub fn new_from_backtrace( message: S, help: Option, @@ -65,6 +69,7 @@ impl BacktracedError { } } + /// Gets the backtraced error error code. pub fn exit_code(&self) -> i32 { let mut code: i32; if self.code_identifier > 99 { diff --git a/errors/src/common/formatted.rs b/errors/src/common/formatted.rs index 8cf78ced5b..418129ad6b 100644 --- a/errors/src/common/formatted.rs +++ b/errors/src/common/formatted.rs @@ -14,15 +14,13 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{BacktracedError, Span}; +use crate::{BacktracedError, Span, INDENT}; -use std::{fmt, sync::Arc}; +use std::fmt; use backtrace::Backtrace; use color_backtrace::{BacktracePrinter, Verbosity}; -pub const INDENT: &str = " "; - /// Formatted compiler error type /// undefined value `x` /// --> file.leo: 2:8 @@ -31,18 +29,17 @@ pub const INDENT: &str = " "; /// | ^ /// | /// = help: Initialize a variable `x` first. +/// Makes use of the same fields as a BacktracedError. #[derive(Clone, Debug, Default, Hash, PartialEq)] pub struct FormattedError { - pub line_start: usize, - pub line_stop: usize, - pub col_start: usize, - pub col_stop: usize, - pub path: Arc, - pub content: String, + /// The formatted error span information. + pub span: Span, + /// The backtrace to track where the Leo error originated. pub backtrace: BacktracedError, } impl FormattedError { + /// Creates a backtraced error from a span and a backtrace. pub fn new_from_span( message: S, help: Option, @@ -56,12 +53,7 @@ impl FormattedError { S: ToString, { Self { - line_start: span.line_start, - line_stop: span.line_stop, - col_start: span.col_start, - col_stop: span.col_stop, - path: span.path.clone(), - content: span.content.to_string(), + span: span.clone(), backtrace: BacktracedError::new_from_backtrace( message.to_string(), help, @@ -73,6 +65,7 @@ impl FormattedError { } } + /// Calls the backtraces error code. pub fn exit_code(&self) -> i32 { self.backtrace.exit_code() } @@ -99,7 +92,7 @@ impl fmt::Display for FormattedError { underline }; - let underlined = underline(self.col_start, self.col_stop); + let underlined = underline(self.span.col_start, self.span.col_stop); let error_message = format!( "[E{error_type}{code_identifier:0>3}{exit_code:0>4}]: {message}\n \ @@ -110,19 +103,19 @@ impl fmt::Display for FormattedError { code_identifier = self.backtrace.code_identifier, exit_code = self.backtrace.exit_code, message = self.backtrace.message, - path = &*self.path, - line_start = self.line_start, - start = self.col_start, + path = &*self.span.path, + line_start = self.span.line_start, + start = self.span.col_start, ); write!(f, "{}", error_message)?; - for (line_no, line) in self.content.lines().enumerate() { + for (line_no, line) in self.span.content.lines().enumerate() { writeln!( f, "|\n{line_no:width$} | {text}", width = INDENT.len(), - line_no = self.line_start + line_no, + line_no = self.span.line_start + line_no, text = line, )?; } diff --git a/errors/src/common/macros.rs b/errors/src/common/macros.rs index 0542a5340b..ed05145009 100644 --- a/errors/src/common/macros.rs +++ b/errors/src/common/macros.rs @@ -14,15 +14,19 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . +/// A macro that given an enum, exit code mask, error code string prefix, +/// and error methods generated through a DSL creates and generates errors +/// with a unique error code. #[macro_export] macro_rules! create_errors { (@step $_code:expr,) => {}; ($(#[$error_type_docs:meta])* $error_type:ident, exit_code_mask: $exit_code_mask:expr, error_code_prefix: $error_code_prefix:expr, $($(#[$docs:meta])* @$formatted_or_backtraced_list:ident $names:ident { args: ($($arg_names:ident: $arg_types:ty$(,)?)*), msg: $messages:expr, help: $helps:expr, })*) => { - #[allow(unused_imports)] + #[allow(unused_imports)] // Allow unused for errors that only use formatted or backtraced errors. use crate::{BacktracedError, ErrorCode, FormattedError, LeoErrorCode, Span}; use backtrace::Backtrace; + // Generates the enum and implements from FormattedError and BacktracedErrors. #[derive(Debug, Error)] $(#[$error_type_docs])* pub enum $error_type { @@ -33,8 +37,10 @@ macro_rules! create_errors { BacktracedError(#[from] BacktracedError), } + /// Implements the trait for LeoError Codes. impl LeoErrorCode for $error_type {} + /// Implements the Error code trait for each error. impl ErrorCode for $error_type { #[inline(always)] fn exit_code(&self) -> i32 { @@ -60,12 +66,16 @@ macro_rules! create_errors { } } + // Steps over the list of functions with an initial error code of 0. impl $error_type { create_errors!(@step 0i32, $(($(#[$docs])* $formatted_or_backtraced_list, $names($($arg_names: $arg_types,)*), $messages, $helps),)*); } }; + // Matches the function if it is a formatted error. (@step $code:expr, ($(#[$error_func_docs:meta])* formatted, $error_name:ident($($arg_names:ident: $arg_types:ty,)*), $message:expr, $help:expr), $(($(#[$docs:meta])* $formatted_or_backtraced_tail:ident, $names:ident($($tail_arg_names:ident: $tail_arg_types:ty,)*), $messages:expr, $helps:expr),)*) => { + // Formatted errors always takes a span. $(#[$error_func_docs])* + // Expands additional arguments for the error defining function. pub fn $error_name($($arg_names: $arg_types,)* span: &Span) -> Self { Self::FormattedError( FormattedError::new_from_span( @@ -75,15 +85,19 @@ macro_rules! create_errors { Self::code_identifier(), Self::error_type(), span, + // Each function always generates its own backtrace for backtrace clarity to originate from the error function. Backtrace::new(), ) ) } + // Steps the error code value by one and calls on the rest of the functions. create_errors!(@step $code + 1i32, $(($(#[$docs])* $formatted_or_backtraced_tail, $names($($tail_arg_names: $tail_arg_types,)*), $messages, $helps),)*); }; + // matches the function if it is a backtraced error. (@step $code:expr, ($(#[$error_func_docs:meta])* backtraced, $error_name:ident($($arg_names:ident: $arg_types:ty,)*), $message:expr, $help:expr), $(($(#[$docs:meta])* $formatted_or_backtraced_tail:ident, $names:ident($($tail_arg_names:ident: $tail_arg_types:ty,)*), $messages:expr, $helps:expr),)*) => { $(#[$error_func_docs])* + // Expands additional arguments for the error defining function. pub fn $error_name($($arg_names: $arg_types,)*) -> Self { Self::BacktracedError( BacktracedError::new_from_backtrace( @@ -92,11 +106,13 @@ macro_rules! create_errors { $code + Self::exit_code_mask(), Self::code_identifier(), Self::error_type(), + // Each function always generates its own backtrace for backtrace clarity to originate from the error function. Backtrace::new(), ) ) } + // Steps the error code value by one and calls on the rest of the functions. create_errors!(@step $code + 1i32, $(($(#[$docs])* $formatted_or_backtraced_tail, $names($($tail_arg_names: $tail_arg_types,)*), $messages, $helps),)*); }; diff --git a/errors/src/common/mod.rs b/errors/src/common/mod.rs index fe9dcb1cf9..581a1c1bc0 100644 --- a/errors/src/common/mod.rs +++ b/errors/src/common/mod.rs @@ -14,26 +14,36 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . +/// This module contains a backtraced error and its methods. pub mod backtraced; pub use self::backtraced::*; +/// This module contains a formatted error and its methods. pub mod formatted; pub use self::formatted::*; +/// This module contains the macros for making errors easily. #[macro_use] pub mod macros; pub use self::macros::*; +/// This module contains the common span object for Leo crates. pub mod span; pub use self::span::*; +/// This module contains information on how to serialize and +/// deserialze StrTendril type. pub mod tendril_json; pub use self::tendril_json::*; +/// This module contains traits for making errors easily. pub mod traits; pub use self::traits::*; -// Can make the args cleaner once https://github.com/rust-lang/rust/issues/41517 or https://github.com/rust-lang/rust/issues/63063 hits stable. +// Right now for cleanliness of calling error functions we say each argument implments one of the follow types rather than giving a specific type. +// This allows us to just pass many types rather doing conversions cleaning up the code. +// The args can be made cleaneronce https://github.com/rust-lang/rust/issues/41517 or https://github.com/rust-lang/rust/issues/63063 hits stable. +// Either of why would allows to generate a type alias for these trait implmenting types. // pub(crate) type DisplayArg = impl std::fmt::Display; // pub(crate) type DebugArg = impl std::fmt::Debug; // pub(crate) type ErrorArg = impl std::error::Error; diff --git a/errors/src/common/span.rs b/errors/src/common/span.rs index edebeb5d21..1264e609a5 100644 --- a/errors/src/common/span.rs +++ b/errors/src/common/span.rs @@ -20,18 +20,33 @@ use pest::Span as PestSpan; use serde::{Deserialize, Serialize}; use tendril::StrTendril; +/// The span type which tracks where formatted errors originate from in a Leo file. +/// This is used in many spots throughout the rest of the Leo crates. #[derive(Clone, Debug, Default, Deserialize, Eq, Hash, PartialEq, Serialize)] pub struct Span { + /// The line number where the error started. pub line_start: usize, + /// The line number where the error stopped. pub line_stop: usize, + /// The column number where the error started. pub col_start: usize, + /// The column number where the error stopped. pub col_stop: usize, + /// The path to the Leo file containing the error. pub path: Arc, #[serde(with = "crate::tendril_json")] + /// The content of the file between the above boundries. pub content: StrTendril, } impl Span { + /// Generate a new span from where: + /// - the Leo line starts. + /// - the Leo line stops. + /// - the Leo column starts. + /// - the Leo column stops. + /// - the path to the Leo file. + /// - the content of those specified bounds. pub fn new( line_start: usize, line_stop: usize, @@ -51,6 +66,7 @@ impl Span { } } +/// Conversion from a pest span where the leo-input library uses these. impl fmt::Display for Span { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { if self.line_start == self.line_stop { diff --git a/errors/src/common/tendril_json.rs b/errors/src/common/tendril_json.rs index 35c9b45759..bbbe571bcd 100644 --- a/errors/src/common/tendril_json.rs +++ b/errors/src/common/tendril_json.rs @@ -17,10 +17,12 @@ use serde::{Deserialize, Deserializer, Serializer}; use tendril::StrTendril; +/// Serialization for the StrTendril type. pub fn serialize(tendril: &StrTendril, serializer: S) -> Result { serializer.serialize_str(&tendril[..]) } +/// Deserialization for the StrTendril type. pub fn deserialize<'de, D: Deserializer<'de>>(deserializer: D) -> Result { Ok(String::deserialize(deserializer)?.into()) } diff --git a/errors/src/common/traits.rs b/errors/src/common/traits.rs index 2bd237fa8a..cc8528507e 100644 --- a/errors/src/common/traits.rs +++ b/errors/src/common/traits.rs @@ -14,15 +14,22 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . +/// ErrorCode trait that all Errors should implement. pub trait ErrorCode: Sized { + /// Returns the error's exit code for the program. fn exit_code(&self) -> i32; + /// Returns the error's exit code mask, as to avoid conflicts. fn exit_code_mask() -> i32; + /// Returns the error's code type for the program. fn error_type() -> String; } +/// The LeoErrorCode which has a code identifier of 037(Leo upsidedown and backwards). +/// This is to make the exit codes unique to Leo itself. pub trait LeoErrorCode: ErrorCode { + /// Inlined function for efficiency. #[inline(always)] fn code_identifier() -> i8 { 37 diff --git a/errors/src/compiler/compiler_errors.rs b/errors/src/compiler/compiler_errors.rs index d25a1e1406..95070ff3c9 100644 --- a/errors/src/compiler/compiler_errors.rs +++ b/errors/src/compiler/compiler_errors.rs @@ -22,10 +22,12 @@ use std::{ }; create_errors!( + /// CompilerError enum that represents all the errors for the `leo-compiler` crate. CompilerError, exit_code_mask: 2000i32, error_code_prefix: "CMP", + /// For when the test function has invalid test context. @backtraced invalid_test_context { args: (name: impl Display), @@ -33,6 +35,7 @@ create_errors!( help: None, } + /// For when the compiler can't read a file from the provided path. @backtraced file_read_error { args: (path: impl Debug, error: impl ErrorArg), @@ -40,6 +43,7 @@ create_errors!( help: None, } + /// For when there is no main function in a Leo program. @backtraced no_main_function { args: (), @@ -47,6 +51,7 @@ create_errors!( help: None, } + /// For when the compiler can't find the test input files with the specified name. @backtraced no_test_input { args: (), @@ -54,6 +59,7 @@ create_errors!( help: None, } + /// For when the console formatter expected a left or right brace after a left brace. @formatted console_fmt_expected_left_or_right_brace { args: (), @@ -61,6 +67,7 @@ create_errors!( help: None, } + /// For when the console formatter expected a right brace after a right brace. @formatted console_fmt_expected_escaped_right_brace { args: (), @@ -68,6 +75,8 @@ create_errors!( help: None, } + /// For when the amount of arguments, and number of containers mismatch + /// in a format statement. @formatted console_container_parameter_length_mismatch { args: (containers: impl Display, parameters: impl Display), @@ -78,6 +87,7 @@ create_errors!( help: None, } + /// For when a user tries to user console assert outside of a test function. @formatted console_assertion_depends_on_input { args: (), @@ -86,6 +96,7 @@ create_errors!( help: None, } + /// For when a console assert fails. @formatted console_assertion_failed { args: (), @@ -93,6 +104,7 @@ create_errors!( help: None, } + /// For when a console assert value is not a boolean. @formatted console_assertion_must_be_boolean { args: (), @@ -100,6 +112,7 @@ create_errors!( help: None, } + /// For when a experssion gadget oepration cannot be enforced due to a SnarkVM syntehsis error. @formatted cannot_enforce_expression { args: (operation: impl Display, error: impl ErrorArg), @@ -110,6 +123,7 @@ create_errors!( help: None, } + /// For when an expression has mismatching types for an operation. @formatted cannot_evaluate_expression { args: (operation: impl Display), @@ -117,6 +131,7 @@ create_errors!( help: None, } + /// For when an array length goes out of the legal bounds of 2^32. @formatted array_length_out_of_bounds { args: (), @@ -124,6 +139,7 @@ create_errors!( help: None, } + /// For when an array index goes out of the legal bounds of 2^32. @formatted array_index_out_of_legal_bounds { args: (), @@ -131,6 +147,7 @@ create_errors!( help: None, } + /// For when a boolean expression does not resolve to a boolean type. @formatted conditional_boolean_expression_fails_to_resolve_to_bool { args: (actual: impl Display), @@ -138,6 +155,7 @@ create_errors!( help: None, } + /// For when the expected circuit member could not be found. @formatted expected_circuit_member { args: (expected: impl Display), @@ -145,6 +163,7 @@ create_errors!( help: None, } + /// For when the operation has no implmentation on the type of variable received. @formatted incompatible_types { args: (operation: impl Display), @@ -152,6 +171,7 @@ create_errors!( help: None, } + /// For when a tuple index goes out of the tuples size bounds. @formatted tuple_index_out_of_bounds { args: (index: impl Display), @@ -159,6 +179,7 @@ create_errors!( help: None, } + /// For when an array index goes out of the arrays size bounds. @formatted array_index_out_of_bounds { args: (index: impl Display), @@ -166,6 +187,7 @@ create_errors!( help: None, } + /// For when a invalid array slice length is requested. @formatted array_invalid_slice_length { args: (), @@ -173,6 +195,7 @@ create_errors!( help: None, } + /// For when an array index does not resolve to an integer type. @formatted invalid_index_expression { args: (actual: impl Display), @@ -180,6 +203,7 @@ create_errors!( help: None, } + /// For when a typed array receives an assignment of an array with a different length. @formatted unexpected_array_length { args: (expected: impl Display, actual: impl Display), @@ -187,6 +211,7 @@ create_errors!( help: None, } + /// For when the circuit static member does not exist. @formatted invalid_circuit_static_member_access { args: (member: impl Display), @@ -194,6 +219,7 @@ create_errors!( help: None, } + /// For when a user is trying to use an array in access expression before it is declared. @formatted undefined_array { args: (actual: impl Display), @@ -201,6 +227,7 @@ create_errors!( help: None, } + /// For when the user is trying to us a circuit that is not yet declared. @formatted undefined_circuit { args: (actual: impl Display), @@ -211,6 +238,7 @@ create_errors!( help: None, } + /// For when the user tries to use an identifier not declared in scope. @formatted undefined_identifier { args: (name: impl Display), @@ -218,6 +246,7 @@ create_errors!( help: None, } + /// For when the user tries to access an undefined circuit member. @formatted undefined_circuit_member_access { args: (circuit: impl Display, member: impl Display), @@ -225,6 +254,7 @@ create_errors!( help: None, } + /// For when the input variable type mismatches the declared function input type. @formatted input_variable_type_mismatch { args: (expected: impl Display, actual: impl Display, variable: impl Display), @@ -235,6 +265,8 @@ create_errors!( help: None, } + /// For when the declared function input variable was expected to be constant + /// but the input file did not have it in the constants section. @formatted expected_const_input_variable { args: (variable: impl Display), @@ -245,6 +277,8 @@ create_errors!( help: None, } + /// For when the declared function input variable was expected to be mutable + /// but the input file did not have it in the main section. @formatted expected_non_const_input_variable { args: (variable: impl Display), @@ -255,6 +289,8 @@ create_errors!( help: None, } + /// For when the declared function input variable was expected to be a valid array + /// in the input file. @formatted invalid_function_input_array { args: (actual: impl Display), @@ -262,6 +298,7 @@ create_errors!( help: None, } + /// For when the declared function input variable was expected to be an array with differing dimensions. @formatted invalid_input_array_dimensions { args: (expected: impl Display, actual: impl Display), @@ -272,6 +309,8 @@ create_errors!( help: None, } + /// For when the declared function input variable was expected to be a tuple + /// with a different number of arguments. @formatted input_tuple_size_mismatch { args: (expected: impl Display, actual: impl Display), @@ -282,6 +321,8 @@ create_errors!( help: None, } + /// For when the declared function input variable was expected to be a valid tuple + /// in the input file. @formatted invalid_function_input_tuple { args: (actual: impl Display), @@ -289,6 +330,8 @@ create_errors!( help: None, } + /// For when the declared function input variable was expected to be a valid tuple + /// in the input file. @formatted function_input_not_found { args: (function: impl Display, expected: impl Display), @@ -296,6 +339,8 @@ create_errors!( help: None, } + /// For when the declared function input variable was defined twice + /// in the input file. @formatted double_input_declaration { args: (input_name: impl Display), @@ -303,6 +348,7 @@ create_errors!( help: None, } + /// For when the input file does not define enough registers. @formatted output_not_enough_registers { args: (), @@ -310,6 +356,7 @@ create_errors!( help: None, } + /// For when the input file register types do not match the output types being generated. @formatted output_mismatched_types { args: (left: impl Display, right: impl Display), @@ -320,13 +367,7 @@ create_errors!( help: None, } - @backtraced - output_file_error { - args: (error: impl ErrorArg), - msg: error, - help: None, - } - + /// For when there's an IO error with the output file. @backtraced output_file_io_error { args: (error: impl ErrorArg), @@ -334,6 +375,7 @@ create_errors!( help: None, } + /// For when the output file cannot be read. @backtraced output_file_cannot_read { args: (path: impl Debug), @@ -341,6 +383,7 @@ create_errors!( help: None, } + /// For when the output file cannot be removed. @backtraced output_file_cannot_remove { args: (path: impl Debug), @@ -348,6 +391,7 @@ create_errors!( help: None, } + /// For when the user tries to index a single array more than once. @formatted statement_array_assign_index { args: (), @@ -355,6 +399,7 @@ create_errors!( help: None, } + /// For when the user tries to use a non const value as an index. @formatted statement_array_assign_index_const { args: (), @@ -362,6 +407,7 @@ create_errors!( help: None, } + /// For when the user tries to assign an index to something not an array of length >= 1; @formatted statement_array_assign_interior_index { args: (), @@ -369,6 +415,7 @@ create_errors!( help: None, } + /// For when the user tries to assign a range of values to something that expected a single value. @formatted statement_array_assign_range { args: (), @@ -376,6 +423,7 @@ create_errors!( help: None, } + /// For when the user tries to index a value from an array that is >= the array length. @formatted statement_array_assign_index_bounds { args: (index: impl Display, length: impl Display), @@ -386,6 +434,7 @@ create_errors!( help: None, } + /// For when the user defines an array range values that is >= the array length. @formatted statement_array_assign_range_order { args: (start: impl Display, stop: impl Display, length: impl Display), @@ -396,6 +445,7 @@ create_errors!( help: None, } + /// For when the statement conditional boolean fails to resolve to a boolean. @formatted statement_conditional_boolean_fails_to_resolve_to_boolean { args: (actual: impl Display), @@ -403,6 +453,7 @@ create_errors!( help: None, } + /// For when there was an error in SnarkVM trying to do a bit and operation. @formatted statement_indicator_calculation { args: (name: impl Display), @@ -413,16 +464,18 @@ create_errors!( help: None, } + /// For when a multi definition statement found a differing number of values and variable names. @formatted statement_invalid_number_of_definitions { args: (expected: impl Display, actual: impl Display), msg: format!( - "Multiple definition statement expected {} return values, found {} values", + "Multiple definition statement expected {} values, found {} variable names", expected, actual ), help: None, } + /// For when the user tries to assign multiple variables to a single value. @formatted statement_multiple_definition { args: (value: impl Display), @@ -430,6 +483,7 @@ create_errors!( help: None, } + /// For when a function returns multiple times. @formatted statement_multiple_returns { args: (), @@ -437,6 +491,7 @@ create_errors!( help: None, } + /// For when a function expects a return type and has no valid return statements. @formatted statement_no_returns { args: (expected: impl Display), @@ -447,6 +502,7 @@ create_errors!( help: None, } + /// For when SnarkVM fails to conditionally select between values for a gadget. @formatted statement_select_fail { args: (first: impl Display, second: impl Display), @@ -457,6 +513,7 @@ create_errors!( help: None, } + /// For when the user tries to index a single tuple more than once. @formatted statement_tuple_assign_index { args: (), @@ -464,6 +521,7 @@ create_errors!( help: None, } + /// For when the user tries to index a value from an tuple that is >= the tuple length. @formatted statement_tuple_assign_index_bounds { args: (index: impl Display, length: impl Display), @@ -474,6 +532,7 @@ create_errors!( help: None, } + /// For when the user doesn't assign or return the expression. @formatted statement_unassigned { args: (), @@ -481,6 +540,7 @@ create_errors!( help: None, } + /// For when a statement tries to use an unknown variable. @formatted statement_undefined_variable { args: (name: impl Display), @@ -488,6 +548,7 @@ create_errors!( help: None, } + /// For when the user defines a statement that tries to access an unknown circuit member variable. @formatted statement_undefined_circuit_variable { args: (name: impl Display), @@ -495,6 +556,7 @@ create_errors!( help: None, } + /// For when the user uses a nont const value for an iteration range. @formatted statement_loop_index_const { args: (), @@ -502,6 +564,7 @@ create_errors!( help: None, } + /// For when there is an issue with an address value account. @formatted address_value_account_error { args: (error: impl ErrorArg), @@ -509,6 +572,7 @@ create_errors!( help: None, } + /// For when there is an invalid address value. @formatted address_value_invalid_address { args: (actual: impl Display), @@ -516,6 +580,7 @@ create_errors!( help: None, } + /// For when an a address value was expected but none was found. @formatted address_value_missing_address { args: (), @@ -523,6 +588,7 @@ create_errors!( help: None, } + /// For when an a boolean operation cannot be enforced due to a SnarkVM synthesis error. @formatted boolean_value_cannot_enforce { args: (operation: impl Display, error: impl ErrorArg), @@ -533,6 +599,7 @@ create_errors!( help: None, } + /// For when an a invalid boolean operation is called. @formatted boolean_value_cannot_evaluate { args: (operation: impl Display), @@ -540,6 +607,7 @@ create_errors!( help: None, } + /// For when there is an invalid boolean value. @formatted boolean_value_invalid_boolean { args: (actual: impl Display), @@ -547,6 +615,7 @@ create_errors!( help: None, } + /// For when an a boolean value was expected but none was found. @formatted boolean_value_missing_boolean { args: (expected: impl Display), @@ -554,6 +623,7 @@ create_errors!( help: None, } + /// For when there is an invalid char value. @formatted char_value_invalid_char { args: (actual: impl Display), @@ -561,6 +631,7 @@ create_errors!( help: None, } + /// For when negating a field value fails due to a SnarkVM synthesis error. @formatted field_value_negate_operation { args: (error: impl ErrorArg), @@ -568,6 +639,7 @@ create_errors!( help: None, } + /// For when an a field operation cannot be enforced due to a SnarkVM synthesis error. @formatted field_value_binary_operation { args: (operation: impl Display, error: impl ErrorArg), @@ -578,6 +650,7 @@ create_errors!( help: None, } + /// For when there is an invalid field value. @formatted field_value_invalid_field { args: (actual: impl Display), @@ -585,6 +658,7 @@ create_errors!( help: None, } + /// For when an a field value was expected but none was found. @formatted field_value_missing_field { args: (expected: impl Display), @@ -592,13 +666,7 @@ create_errors!( help: None, } - @formatted - field_value_no_inverse { - args: (field: impl Display), - msg: format!("no multiplicative inverse found for field `{}`", field), - help: None, - } - + /// For when negating a group value fails due to a SnarkVM synthesis error. @formatted group_value_negate_operation { args: (error: impl ErrorArg), @@ -606,6 +674,7 @@ create_errors!( help: None, } + /// For when an a group operation cannot be enforced due to a SnarkVM synthesis error. @formatted group_value_binary_operation { args: (operation: impl Display, error: impl ErrorArg), @@ -616,6 +685,7 @@ create_errors!( help: None, } + /// For when there is an invalid group value. @formatted group_value_invalid_group { args: (actual: impl Display), @@ -623,6 +693,7 @@ create_errors!( help: None, } + /// For when an a group value was expected but none was found. @formatted group_value_missing_group { args: (expected: impl Display), @@ -630,6 +701,7 @@ create_errors!( help: None, } + /// For when the synthesis of a group failed due to a SnarkVM synthesis error. @formatted group_value_synthesis_error { args: (error: impl ErrorArg), @@ -637,6 +709,7 @@ create_errors!( help: None, } + /// For when the x coordinate of a group is invalid. @formatted group_value_x_invalid { args: (x: impl Display), @@ -644,6 +717,7 @@ create_errors!( help: None, } + /// For when the y coordinate of a group is invalid. @formatted group_value_y_invalid { args: (y: impl Display), @@ -651,6 +725,7 @@ create_errors!( help: None, } + /// For when the current group value is not on the current supported curve. @formatted group_value_not_on_curve { args: (element: impl Display), @@ -658,6 +733,7 @@ create_errors!( help: None, } + /// For when the x coordinate of a group could not be recovered. @formatted group_value_x_recover { args: (), @@ -665,6 +741,7 @@ create_errors!( help: None, } + /// For when the y coordinate of a group could not be recovered. @formatted group_value_y_recover { args: (), @@ -672,6 +749,7 @@ create_errors!( help: None, } + /// For when a group generator cannot be multiplied by some number. @formatted group_value_n_group { args: (number: impl Display), @@ -679,6 +757,7 @@ create_errors!( help: None, } + /// For when an a signed integer operation cannot be enforced due to a SnarkVM synthesis error. @formatted integer_value_signed { args: (error: impl ErrorArg), @@ -686,6 +765,7 @@ create_errors!( help: None, } + /// For when an a unsigned integer operation cannot be enforced due to a SnarkVM synthesis error. @formatted integer_value_unsigned { args: (error: impl ErrorArg), @@ -696,6 +776,7 @@ create_errors!( help: None, } + /// For when an a integer operation cannot be enforced due to a SnarkVM synthesis error. @formatted integer_value_synthesis { args: (error: impl ErrorArg), @@ -703,6 +784,7 @@ create_errors!( help: None, } + /// For when negating a integer value fails due to a SnarkVM synthesis error. @formatted integer_value_negate_operation { args: (), @@ -710,6 +792,7 @@ create_errors!( help: None, } + /// For when an a binary integer operation cannot be enforced due to a SnarkVM synthesis error. @formatted integer_value_binary_operation { args: (operation: impl Display), @@ -720,6 +803,7 @@ create_errors!( help: None, } + /// For when there is an integer type mismatch, one kind was expected but another was received. @formatted integer_value_integer_type_mismatch { args: (expected: impl Display, received: impl Display), @@ -727,6 +811,7 @@ create_errors!( help: None, } + /// For when there is an invalid integer value. @formatted integer_value_invalid_integer { args: (actual: impl Display), @@ -734,6 +819,7 @@ create_errors!( help: None, } + /// For when an a integer value was expected but none was found. @formatted integer_value_missing_integer { args: (expected: impl Display), @@ -741,6 +827,7 @@ create_errors!( help: None, } + /// For when an a integer operation has no implementation. @formatted integer_value_cannot_evaluate { args: (operation: impl Display), diff --git a/errors/src/compiler/mod.rs b/errors/src/compiler/mod.rs index eebf8a0644..826e7c3274 100644 --- a/errors/src/compiler/mod.rs +++ b/errors/src/compiler/mod.rs @@ -14,5 +14,6 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . +/// This module contains the Compiler error definitions. pub mod compiler_errors; pub use self::compiler_errors::*; diff --git a/errors/src/import/import_errors.rs b/errors/src/import/import_errors.rs index 5a0bfb0d0b..5590b19bc6 100644 --- a/errors/src/import/import_errors.rs +++ b/errors/src/import/import_errors.rs @@ -22,11 +22,12 @@ use std::{ }; create_errors!( + /// ImportError enum that represents all the errors for the `leo-import` crate. ImportError, exit_code_mask: 3000i32, error_code_prefix: "IMP", - // An imported package has the same name as an imported core_package. + /// For when an imported package has the same name as an imported core_package. @formatted conflicting_imports { args: (name: impl Display), @@ -34,6 +35,7 @@ create_errors!( help: None, } + /// For when imports are recursive. @formatted recursive_imports { args: (package: impl Display), @@ -41,7 +43,7 @@ create_errors!( help: None, } - // Failed to convert a file path into an os string. + /// For when the crate failed to convert a file path into an os string. @formatted convert_os_string { args: (), @@ -49,7 +51,7 @@ create_errors!( help: None, } - // Failed to find the directory of the current file. + /// For when the crate failed to find the directory of the current file. @formatted current_directory_error { args: (error: impl ErrorArg), @@ -57,7 +59,7 @@ create_errors!( help: None, } - // Failed to open or get the name of a directory. + /// For when the crate failed to open or get the name of a directory. @formatted directory_error { args: (error: impl ErrorArg, path:impl Debug), @@ -69,7 +71,7 @@ create_errors!( help: None, } - // Failed to find a main file for the current package. + /// For when the crate failed to find a main file for the current package. @formatted expected_main_file { args: (entry: impl Debug), @@ -77,7 +79,7 @@ create_errors!( help: None, } - // Failed to import a package name. + /// For when the crate failed to import a package name. @formatted unknown_package { args: (name: impl Display), @@ -88,6 +90,7 @@ create_errors!( help: None, } + /// / For when the crate failed due to an IO error. @formatted io_error { args: (path: impl Display, error: impl ErrorArg), diff --git a/errors/src/import/mod.rs b/errors/src/import/mod.rs index 834533b32b..2bb4c05771 100644 --- a/errors/src/import/mod.rs +++ b/errors/src/import/mod.rs @@ -14,5 +14,6 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . +/// This module contains the Import error definitions. pub mod import_errors; pub use self::import_errors::*; diff --git a/errors/src/lib.rs b/errors/src/lib.rs index b82a0542b0..965db11d32 100644 --- a/errors/src/lib.rs +++ b/errors/src/lib.rs @@ -14,34 +14,47 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . +#![deny(clippy::all, clippy::missing_docs_in_private_items)] +#![doc = include_str!("../README.md")] + +/// Contains the ASG error definitions. pub mod asg; pub use self::asg::*; +/// Contains the AST error definitions. pub mod ast; pub use self::ast::*; +/// Contains the CLI error definitions. pub mod cli; pub use self::cli::*; +/// Contains the common functionalities for defining errors.. #[macro_use] pub mod common; pub use self::common::*; +/// Contains the Compiler error definitions. pub mod compiler; pub use self::compiler::*; +/// Contains the Import error definitions. pub mod import; pub use self::import::*; +/// Contains the Package error definitions. pub mod package; pub use self::package::*; +/// Contains the Parser error definitions. pub mod parser; pub use self::parser::*; +/// Contains the SnarkVM error definitions. pub mod snarkvm; pub use self::snarkvm::*; +/// Contains the State error definitions. pub mod state; pub use self::state::*; @@ -50,40 +63,53 @@ extern crate thiserror; use leo_input::InputParserError; +/// The LeoError type that contains all sub error types. +/// This allows a unified error type throughout the Leo crates. #[derive(Debug, Error)] pub enum LeoError { + /// Represents an ASG Error in a Leo Error. #[error(transparent)] AsgError(#[from] AsgError), + /// Represents an AST Error in a Leo Error. #[error(transparent)] AstError(#[from] AstError), + /// Represents an CLI Error in a Leo Error. #[error(transparent)] CliError(#[from] CliError), + /// Represents an Compiler Error in a Leo Error. #[error(transparent)] CompilerError(#[from] CompilerError), + /// Represents an Import Error in a Leo Error. #[error(transparent)] ImportError(#[from] ImportError), + /// Represents an Input Error in a Leo Error. #[error(transparent)] InputError(#[from] InputParserError), + /// Represents an Package Error in a Leo Error. #[error(transparent)] PackageError(#[from] PackageError), + /// Represents an Parser Error in a Leo Error. #[error(transparent)] ParserError(#[from] ParserError), + /// Represents an SnarkVM Error in a Leo Error. #[error(transparent)] SnarkVMError(#[from] SnarkVMError), + /// Represents an State Error in a Leo Error. #[error(transparent)] StateError(#[from] StateError), } impl LeoError { + /// Implment exit code for each type of Error, even the ones that don't have one. pub fn exit_code(&self) -> i32 { use LeoError::*; @@ -93,7 +119,7 @@ impl LeoError { CliError(error) => error.exit_code(), CompilerError(error) => error.exit_code(), ImportError(error) => error.exit_code(), - InputError(_error) => 0, // TODO migrate me. + InputError(_error) => 0, // TODO migrate me, or not cause we want inputs to have 0 deps. PackageError(error) => error.exit_code(), ParserError(error) => error.exit_code(), SnarkVMError(_error) => 0, // TODO update once snarkvm implments a global top level error similar to LeoError. @@ -102,6 +128,7 @@ impl LeoError { } } +/// A global result type for all Leo crates, that defaults the errors to be a LeoError. pub type Result = core::result::Result; // #[test] diff --git a/errors/src/package/mod.rs b/errors/src/package/mod.rs index 0aa86f207c..451e2d99f9 100644 --- a/errors/src/package/mod.rs +++ b/errors/src/package/mod.rs @@ -14,5 +14,6 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . +/// This module contains the Package error definitions. pub mod package_errors; pub use self::package_errors::*; diff --git a/errors/src/package/package_errors.rs b/errors/src/package/package_errors.rs index d4c7caf83c..973bd01bdd 100644 --- a/errors/src/package/package_errors.rs +++ b/errors/src/package/package_errors.rs @@ -22,10 +22,12 @@ use std::{ }; create_errors!( + /// PackageError enum that represents all the errors for the `leo-package` crate. PackageError, exit_code_mask: 4000i32, error_code_prefix: "PAK", + /// For when creating the imports directory failed. @backtraced failed_to_create_imports_directory { args: (error: impl ErrorArg), @@ -33,13 +35,15 @@ create_errors!( help: None, } + /// For when the specified import does not exist. @backtraced import_does_not_exist { args: (package: impl Display), msg: format!("package {} does not exist as an import", package), help: None, - } + } + /// For when removing the imports directory failed. @backtraced failed_to_remove_imports_directory { args: (error: impl ErrorArg), @@ -47,6 +51,7 @@ create_errors!( help: None, } + /// For when creating the inputs directory failed. @backtraced failed_to_create_inputs_directory { args: (error: impl ErrorArg), @@ -54,6 +59,7 @@ create_errors!( help: None, } + /// For when getting a input file entry failed. @backtraced failed_to_get_input_file_entry { args: (error: impl ErrorArg), @@ -61,6 +67,7 @@ create_errors!( help: None, } + /// For when getting the input file name failed. @backtraced failed_to_get_input_file_name { args: (file: impl Debug), @@ -68,6 +75,7 @@ create_errors!( help: None, } + /// For when getting the input file type failed. @backtraced failed_to_get_input_file_type { args: (file: impl Debug, error: impl ErrorArg), @@ -75,6 +83,7 @@ create_errors!( help: None, } + /// For when getting the input file has an invalid file type. @backtraced invalid_input_file_type { args: (file: impl Debug, type_: std::fs::FileType), @@ -82,6 +91,7 @@ create_errors!( help: None, } + /// For when reading the input directory failed. @backtraced failed_to_read_inputs_directory { args: (error: impl ErrorArg), @@ -89,6 +99,7 @@ create_errors!( help: None, } + /// For when reading the input file failed. @backtraced failed_to_read_input_file { args: (path: impl Debug), @@ -96,6 +107,7 @@ create_errors!( help: None, } + /// For when the input file has an IO error. @backtraced io_error_input_file { args: (error: impl ErrorArg), @@ -103,6 +115,7 @@ create_errors!( help: None, } + /// For when reading the state file failed. @backtraced failed_to_read_state_file { args: (path: impl Debug), @@ -110,6 +123,7 @@ create_errors!( help: None, } + /// For when the state file has an IO error. @backtraced io_error_state_file { args: (error: impl ErrorArg), @@ -117,6 +131,7 @@ create_errors!( help: None, } + /// For when reading the checksum file failed. @backtraced failed_to_read_checksum_file { args: (path: impl Debug), @@ -124,6 +139,7 @@ create_errors!( help: None, } + /// For when removing the checksum file failed. @backtraced failed_to_remove_checksum_file { args: (path: impl Debug), @@ -131,6 +147,7 @@ create_errors!( help: None, } + /// For when the checksum file has an IO error. @backtraced io_error_checksum_file { args: (error: impl ErrorArg), @@ -138,6 +155,7 @@ create_errors!( help: None, } + /// For when reading the circuit file failed. @backtraced failed_to_read_circuit_file { args: (path: impl Debug), @@ -145,6 +163,7 @@ create_errors!( help: None, } + /// For when removing the circuit file failed. @backtraced failed_to_remove_circuit_file { args: (path: impl Debug), @@ -152,6 +171,7 @@ create_errors!( help: None, } + /// For when the circuit file has an IO error. @backtraced io_error_circuit_file { args: (error: impl ErrorArg), @@ -159,6 +179,7 @@ create_errors!( help: None, } + /// For when creating the outputs directory failed. @backtraced failed_to_create_outputs_directory { args: (error: impl ErrorArg), @@ -173,6 +194,7 @@ create_errors!( help: None, } + /// For when reading the proof file failed. @backtraced failed_to_read_proof_file { args: (path: impl Debug), @@ -180,6 +202,7 @@ create_errors!( help: None, } + /// For when removing the proof file failed. @backtraced failed_to_remove_proof_file { args: (path: impl Debug), @@ -187,6 +210,7 @@ create_errors!( help: None, } + /// For when the proof file has an IO error. @backtraced io_error_proof_file { args: (error: impl ErrorArg), @@ -194,6 +218,7 @@ create_errors!( help: None, } + /// For when reading the prooving key failed. @backtraced failed_to_read_proving_key_file { args: (path: impl Debug), @@ -201,6 +226,7 @@ create_errors!( help: None, } + /// For when removing the prooving key file failed. @backtraced failed_to_remove_proving_key_file { args: (path: impl Debug), @@ -208,13 +234,15 @@ create_errors!( help: None, } + /// For when the proving key file has an IO error. @backtraced io_error_proving_key_file { args: (error: impl ErrorArg), - msg: format!("IO error prooving key file from the provided file path - {}", error), + msg: format!("IO error proving key file from the provided file path - {}", error), help: None, } + /// For when reading the verification key file failed. @backtraced failed_to_read_verification_key_file { args: (path: impl Debug), @@ -222,6 +250,7 @@ create_errors!( help: None, } + /// For when removing the verification key file failed. @backtraced failed_to_remove_verification_key_file { args: (path: impl Debug), @@ -229,6 +258,7 @@ create_errors!( help: None, } + /// For when the verification key file has an IO error. @backtraced io_error_verification_key_file { args: (error: impl ErrorArg), @@ -236,6 +266,7 @@ create_errors!( help: None, } + /// For when the gitignore file has an IO error. @backtraced io_error_gitignore_file { args: (error: impl ErrorArg), @@ -243,6 +274,7 @@ create_errors!( help: None, } + /// For when creating the manifest file failed. @backtraced failed_to_create_manifest_file { args: (filename: impl Display, error: impl ErrorArg), @@ -250,6 +282,7 @@ create_errors!( help: None, } + /// For when getting the manifest file metadata failed. @backtraced failed_to_get_manifest_metadata_file { args: (filename: impl Display, error: impl ErrorArg), @@ -257,6 +290,7 @@ create_errors!( help: None, } + /// For when opening the manifest file failed. @backtraced failed_to_open_manifest_file { args: (filename: impl Display, error: impl ErrorArg), @@ -264,6 +298,7 @@ create_errors!( help: None, } + /// For when parsing the manifest file failed. @backtraced failed_to_parse_manifest_file { args: (filename: impl Display, error: impl ErrorArg), @@ -271,6 +306,7 @@ create_errors!( help: None, } + /// For when reading the manifest file failed. @backtraced failed_to_read_manifest_file { args: (filename: impl Display, error: impl ErrorArg), @@ -278,6 +314,7 @@ create_errors!( help: None, } + /// For when writing the manifest file failed. @backtraced failed_to_write_manifest_file { args: (filename: impl Display, error: impl ErrorArg), @@ -285,6 +322,7 @@ create_errors!( help: None, } + /// For when the manifest file has an IO error. @backtraced io_error_manifest_file { args: (error: impl ErrorArg), @@ -292,6 +330,7 @@ create_errors!( help: None, } + /// For when the readme file has an IO error. @backtraced io_error_readme_file { args: (error: impl ErrorArg), @@ -299,6 +338,7 @@ create_errors!( help: None, } + /// For when creating the zip file failed. @backtraced failed_to_create_zip_file { args: (error: impl ErrorArg), @@ -306,6 +346,7 @@ create_errors!( help: None, } + /// For when opening the zip file failed. @backtraced failed_to_open_zip_file { args: (error: impl ErrorArg), @@ -313,6 +354,7 @@ create_errors!( help: None, } + /// For when reading the zip file failed. @backtraced failed_to_read_zip_file { args: (error: impl ErrorArg), @@ -320,6 +362,7 @@ create_errors!( help: None, } + /// For when writing the zip file failed. @backtraced failed_to_write_zip_file { args: (error: impl ErrorArg), @@ -327,6 +370,7 @@ create_errors!( help: None, } + /// For when removing the zip file failed. @backtraced failed_to_remove_zip_file { args: (path: impl Debug), @@ -334,6 +378,7 @@ create_errors!( help: None, } + /// For when zipping fails. @backtraced failed_to_zip { args: (error: impl ErrorArg), @@ -341,6 +386,7 @@ create_errors!( help: None, } + /// For when the zip file has an IO error. @backtraced io_error_zip_file { args: (error: impl ErrorArg), @@ -348,6 +394,7 @@ create_errors!( help: None, } + /// For when the library file has an IO error. @backtraced io_error_library_file { args: (error: impl ErrorArg), @@ -355,6 +402,7 @@ create_errors!( help: None, } + /// For when the main file has an IO error. @backtraced io_error_main_file { args: (error: impl ErrorArg), @@ -362,6 +410,7 @@ create_errors!( help: None, } + /// For when creating the source directory failed. @backtraced failed_to_create_source_directory { args: (error: impl ErrorArg), @@ -369,6 +418,7 @@ create_errors!( help: None, } + /// For when getting a source file entry failed. @backtraced failed_to_get_source_file_entry { args: (error: impl ErrorArg), @@ -376,6 +426,7 @@ create_errors!( help: None, } + /// For when getting the source file extension failed. @backtraced failed_to_get_source_file_extension { args: (extension: impl Debug), @@ -383,6 +434,7 @@ create_errors!( help: None, } + /// For when getting the source file type failed. @backtraced failed_to_get_source_file_type { args: (file: impl Debug, error: impl ErrorArg), @@ -390,6 +442,7 @@ create_errors!( help: None, } + /// For when getting the source file has an invalid extension. @backtraced invalid_source_file_extension { args: (file: impl Debug, extension: impl Debug), @@ -397,6 +450,7 @@ create_errors!( help: None, } + /// For when getting the source file has an invalid file type. @backtraced invalid_source_file_type { args: (file: impl Debug, type_: std::fs::FileType), @@ -404,6 +458,7 @@ create_errors!( help: None, } + /// For when reading the source directory failed. @backtraced failed_to_read_source_directory { args: (error: impl ErrorArg), @@ -411,6 +466,7 @@ create_errors!( help: None, } + /// For when the package failed to initalize. @backtraced failed_to_initialize_package { args: (package: impl Display, path: impl Debug), @@ -418,6 +474,7 @@ create_errors!( help: None, } + /// For when the package has an invalid name. @backtraced invalid_package_name { args: (package: impl Display), diff --git a/errors/src/parser/mod.rs b/errors/src/parser/mod.rs index 35015c5d70..92b31e4718 100644 --- a/errors/src/parser/mod.rs +++ b/errors/src/parser/mod.rs @@ -14,5 +14,6 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . +/// This module contains the Parser error definitions. pub mod parser_errors; pub use self::parser_errors::*; diff --git a/errors/src/parser/parser_errors.rs b/errors/src/parser/parser_errors.rs index bed0482804..186cd7cec4 100644 --- a/errors/src/parser/parser_errors.rs +++ b/errors/src/parser/parser_errors.rs @@ -19,10 +19,12 @@ use crate::create_errors; use std::fmt::Display; create_errors!( + /// ParserError enum that represents all the errors for the `leo-parser` crate. ParserError, exit_code_mask: 5000i32, error_code_prefix: "PAR", + /// For when the parser encountered an unexpected token. @formatted unexpected_token { args: (message: impl Display, help: String), @@ -30,6 +32,7 @@ create_errors!( help: Some(help), } + /// For when the parser encoutnered an invalid address literal. @formatted invalid_address_lit { args: (token: impl Display), @@ -37,6 +40,7 @@ create_errors!( help: None, } + /// For when the parser encoutnered an empty import list. @formatted invalid_import_list { args: (), @@ -44,6 +48,7 @@ create_errors!( help: None, } + /// For when the parser encoutnered an unexpected End of File. @formatted unexpected_eof { args: (), @@ -51,6 +56,7 @@ create_errors!( help: None, } + /// For when the parser encoutnered an unexpected whitespace. @formatted unexpected_whitespace { args: (left: impl Display, right: impl Display), @@ -58,6 +64,7 @@ create_errors!( help: None, } + /// For when the parser encoutnered an unexpected list of tokens. @formatted unexpected { args: (got: impl Display, expected: impl Display), @@ -65,6 +72,7 @@ create_errors!( help: None, } + /// For when the parser encoutnered a mix of commas and semi-colons in circuit member variables. @formatted mixed_commas_and_semicolons { args: (), @@ -72,6 +80,7 @@ create_errors!( help: None, } + /// For when the parser encoutnered an unexpected identifier. @formatted unexpected_ident { args: (got: impl Display, expected: &[impl Display]), @@ -87,6 +96,7 @@ create_errors!( help: None, } + /// For when the parser encoutnered an unexpected statement. @formatted unexpected_statement { args: (got: impl Display, expected: impl Display), @@ -94,6 +104,7 @@ create_errors!( help: None, } + /// For when the parser encoutnered an unexpected string. @formatted unexpected_str { args: (got: impl Display, expected: impl Display), @@ -101,6 +112,7 @@ create_errors!( help: None, } + /// For when the parser encoutnered an unexpected spread in an array init expression. @formatted spread_in_array_init { args: (), @@ -108,6 +120,7 @@ create_errors!( help: None, } + /// For when the parser encoutnered an invalid assignment target. @formatted invalid_assignment_target { args: (), @@ -115,6 +128,7 @@ create_errors!( help: None, } + /// For when the parser encoutnered an invalid package name. @formatted invalid_package_name { args: (), @@ -122,6 +136,7 @@ create_errors!( help: None, } + /// For when the parser encoutnered an illegal `const self` argument. @formatted illegal_self_const { args: (), @@ -129,6 +144,7 @@ create_errors!( help: None, } + /// For when the parser encoutnered a deprecated `mut` argument in a function. @formatted mut_function_input { args: (), @@ -136,6 +152,7 @@ create_errors!( help: None, } + /// For when the parser encoutnered a deprecated `mut` argument in a let statement. @formatted let_mut_statement { args: (), @@ -143,6 +160,7 @@ create_errors!( help: None, } + /// For when the parser encoutnered a deprecated `test function`. @formatted test_function { args: (), @@ -150,6 +168,7 @@ create_errors!( help: None, } + /// For when the parser encoutnered a deprecated `@context(...)` annotation. @formatted context_annotation { args: (), diff --git a/errors/src/snarkvm/mod.rs b/errors/src/snarkvm/mod.rs index d49a55b02e..deea455023 100644 --- a/errors/src/snarkvm/mod.rs +++ b/errors/src/snarkvm/mod.rs @@ -14,5 +14,6 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . +/// This module contains the SnarkVM error definitions. pub mod snarkvm_errors; pub use self::snarkvm_errors::*; diff --git a/errors/src/snarkvm/snarkvm_errors.rs b/errors/src/snarkvm/snarkvm_errors.rs index 8fe476d698..1007223d78 100644 --- a/errors/src/snarkvm/snarkvm_errors.rs +++ b/errors/src/snarkvm/snarkvm_errors.rs @@ -16,8 +16,13 @@ use eyre::{eyre, ErrReport}; +/// SnarkVMError enum that represents all the errors from SnarkVM. +/// Currently implements default for some SnarkVM locations. +/// Ideally SnarkVM would implement a similar error code system to LeoError +/// then we could just bubble the error up with additional information. #[derive(Debug, Error)] pub enum SnarkVMError { + /// Implments from a eyre ErrReport which is a fork of anyhow. #[error(transparent)] SnarkVMError(#[from] ErrReport), } diff --git a/errors/src/state/mod.rs b/errors/src/state/mod.rs index 842b58c2a6..70561aae86 100644 --- a/errors/src/state/mod.rs +++ b/errors/src/state/mod.rs @@ -14,5 +14,6 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . +/// This module contains the State error definitions. pub mod state_errors; pub use self::state_errors::*; diff --git a/errors/src/state/state_errors.rs b/errors/src/state/state_errors.rs index 9b6c3f6697..c5488f5493 100644 --- a/errors/src/state/state_errors.rs +++ b/errors/src/state/state_errors.rs @@ -22,10 +22,12 @@ use std::{ }; create_errors!( + /// StateError enum that represents all the errors for the `leo-state` crate. StateError, exit_code_mask: 6000i32, error_code_prefix: "STA", + /// For when it cannot parse the state boolean value. @backtraced parse_bool_error { args: (error: impl ErrorArg), @@ -33,6 +35,7 @@ create_errors!( help: None, } + /// For when it cannot parse the state int value. @backtraced parse_int_error { args: (error: impl ErrorArg), @@ -40,6 +43,7 @@ create_errors!( help: None, } + /// For when it expected an array of u8 bytes but found something else. @backtraced expected_bytes { args: (found: impl Display), @@ -47,6 +51,7 @@ create_errors!( help: None, } + /// For when an int was expected but received something else. @backtraced expected_int { args: (found: impl Display), @@ -54,13 +59,15 @@ create_errors!( help: None, } + /// For when it cannot parse the state int value. @backtraced - mising_parameter { + missing_parameter { args: (parameter: impl Display), msg: format!("input parameter `{}` not found in state file", parameter), help: None, } + /// For when the crate encounters an IO error. @backtraced state_io_error { args: (error: impl ErrorArg), diff --git a/imports/src/lib.rs b/imports/src/lib.rs index 6643ca9ece..cc7e046520 100644 --- a/imports/src/lib.rs +++ b/imports/src/lib.rs @@ -15,6 +15,7 @@ // along with the Leo library. If not, see . #![allow(clippy::from_over_into)] +#![doc = include_str!("../README.md")] pub mod parser; pub use self::parser::*; diff --git a/input/src/lib.rs b/input/src/lib.rs index c8f709b229..1b73fdb778 100644 --- a/input/src/lib.rs +++ b/input/src/lib.rs @@ -13,6 +13,9 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . + +#![doc = include_str!("../README.md")] + #[macro_use] extern crate pest_derive; #[macro_use] diff --git a/leo/commands/package/login.rs b/leo/commands/package/login.rs index 652087e9e0..e27d923058 100644 --- a/leo/commands/package/login.rs +++ b/leo/commands/package/login.rs @@ -76,7 +76,7 @@ impl Command for Login { let tok_opt = res.remove("token"); if tok_opt.is_none() { - return Err(CliError::unable_to_get_token().into()); + return Err(CliError::unable_to_get_user_token().into()); }; (tok_opt.unwrap(), email_username) diff --git a/package/src/lib.rs b/package/src/lib.rs index 428f583a62..aa8a7f082a 100644 --- a/package/src/lib.rs +++ b/package/src/lib.rs @@ -14,6 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . +#![doc = include_str!("../README.md")] + pub mod imports; pub mod inputs; pub mod outputs; diff --git a/parser/src/lib.rs b/parser/src/lib.rs index 3824b59903..7b1a0d83aa 100644 --- a/parser/src/lib.rs +++ b/parser/src/lib.rs @@ -20,6 +20,7 @@ //! method to create a new program ast. #![allow(clippy::vec_init_then_push)] +#![doc = include_str!("../README.md")] pub(crate) mod tokenizer; pub use tokenizer::KEYWORD_TOKENS; diff --git a/state/src/lib.rs b/state/src/lib.rs index 70de10048d..88531a4873 100644 --- a/state/src/lib.rs +++ b/state/src/lib.rs @@ -16,6 +16,7 @@ #![allow(clippy::module_inception)] #![allow(clippy::upper_case_acronyms)] +#![doc = include_str!("../README.md")] pub mod local_data_commitment; pub use self::local_data_commitment::*; diff --git a/state/src/utilities/input_value.rs b/state/src/utilities/input_value.rs index e25ee80868..3d7ca2b92a 100644 --- a/state/src/utilities/input_value.rs +++ b/state/src/utilities/input_value.rs @@ -28,7 +28,7 @@ pub fn find_input(name: String, parameters: &IndexMap Ok(value.clone()), - _ => Err(StateError::mising_parameter(name).into()), + _ => Err(StateError::missing_parameter(name).into()), } } diff --git a/synthesizer/src/lib.rs b/synthesizer/src/lib.rs index 80dbc44a44..36396dd78e 100644 --- a/synthesizer/src/lib.rs +++ b/synthesizer/src/lib.rs @@ -14,6 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . +#![doc = include_str!("../README.md")] + pub mod circuit_synthesizer; pub use self::circuit_synthesizer::*; diff --git a/test-framework/README.md b/test-framework/README.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test-framework/src/lib.rs b/test-framework/src/lib.rs index 48860f2f56..86115089ca 100644 --- a/test-framework/src/lib.rs +++ b/test-framework/src/lib.rs @@ -22,6 +22,8 @@ //! To regenerate the tests after a syntax change or failing test, delete the [`tests/expectations/`] //! directory and run the [`parser_tests()`] test in [`parser/src/test.rs`]. +#![doc = include_str!("../README.md")] + pub mod error; pub mod fetch; From 2f045e13cc0b2b72709c84d4a64f4faf7ad356f7 Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Tue, 10 Aug 2021 14:35:30 -0700 Subject: [PATCH 15/58] create docs job, update ciricle ci rust version --- .circleci/config.yml | 26 ++++++++++----------- .github/workflows/docs.yml | 47 ++++++++++++++++++++++++++++++++++++++ leo/lib.rs | 2 ++ 3 files changed, 62 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/docs.yml diff --git a/.circleci/config.yml b/.circleci/config.yml index 5853674ed5..8a2499e9e4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -46,7 +46,7 @@ commands: jobs: check-style: docker: - - image: cimg/rust:1.53 + - image: cimg/rust:1.54 resource_class: xlarge steps: - checkout @@ -61,7 +61,7 @@ jobs: clippy: docker: - - image: cimg/rust:1.53 + - image: cimg/rust:1.54 resource_class: xlarge steps: - checkout @@ -76,7 +76,7 @@ jobs: # code-cov: # docker: - # - image: cimg/rust:1.53.0 + # - image: cimg/rust:1.54.0 # resource_class: xlarge # environment: # RUSTC_BOOTSTRAP: 1 @@ -118,7 +118,7 @@ jobs: leo-executable: docker: - - image: cimg/rust:1.53 + - image: cimg/rust:1.54 resource_class: xlarge steps: - checkout @@ -136,7 +136,7 @@ jobs: leo-new: docker: - - image: cimg/rust:1.53 + - image: cimg/rust:1.54 resource_class: xlarge steps: - attach_workspace: @@ -149,7 +149,7 @@ jobs: leo-init: docker: - - image: cimg/rust:1.53 + - image: cimg/rust:1.54 resource_class: xlarge steps: - attach_workspace: @@ -162,7 +162,7 @@ jobs: leo-clean: docker: - - image: cimg/rust:1.53 + - image: cimg/rust:1.54 resource_class: xlarge steps: - attach_workspace: @@ -175,7 +175,7 @@ jobs: leo-setup: docker: - - image: cimg/rust:1.53 + - image: cimg/rust:1.54 resource_class: xlarge steps: - attach_workspace: @@ -188,7 +188,7 @@ jobs: leo-add-remove: docker: - - image: cimg/rust:1.53 + - image: cimg/rust:1.54 resource_class: xlarge steps: - attach_workspace: @@ -201,7 +201,7 @@ jobs: leo-check-constraints: docker: - - image: cimg/rust:1.53 + - image: cimg/rust:1.54 resource_class: xlarge steps: - attach_workspace: @@ -214,7 +214,7 @@ jobs: leo-login-logout: docker: - - image: cimg/rust:1.53 + - image: cimg/rust:1.54 resource_class: xlarge steps: - attach_workspace: @@ -227,7 +227,7 @@ jobs: leo-clone: docker: - - image: cimg/rust:1.53 + - image: cimg/rust:1.54 resource_class: xlarge steps: - attach_workspace: @@ -240,7 +240,7 @@ jobs: leo-publish: docker: - - image: cimg/rust:1.53 + - image: cimg/rust:1.54 resource_class: xlarge steps: - attach_workspace: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000000..e6ef015f8d --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,47 @@ +name: Master Crates Docs +on: + push: + branches: + - master + +jobs: + build-crates-docs: + name: Build Crates Docs + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Install Rust Stable + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + + - name: Build Cargo Docs + run: | + cargo doc + mv -r ./target/doc/leo /tmp/ + + - name: Save Docs + uses: actions/upload-artifact@master + with: + name: leo-docs + path: /tmp/target/doc/leo + + deploy-crates-docs: + name: Deploy Crates Docs + runs-on: ubuntu-latest + steps: + - name: Load Docs + uses: actions/download-artifact@master + with: + name: leo-docs + path: /tmp/target/doc/leo + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./target/doc/leo \ No newline at end of file diff --git a/leo/lib.rs b/leo/lib.rs index 94ce90e005..6c0c3470b2 100644 --- a/leo/lib.rs +++ b/leo/lib.rs @@ -14,6 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . +#![doc = include_str!("../README.md")] + pub mod api; pub mod commands; pub mod config; From 622ff5a9c355671b583702c075a3e4ab50f59eb1 Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Tue, 10 Aug 2021 19:59:27 -0700 Subject: [PATCH 16/58] finish docs, setup ci to publish docs pages, test docs generation --- .circleci/config.yml | 26 +++---- .github/workflows/ci.yml | 60 +++++++++++++++ .github/workflows/docs.yml | 60 ++++++++++----- .gitignore | 3 + ast/README.md | 1 + ast/src/common/mod.rs | 2 - ast/src/common/positive_number.rs | 2 +- ast/src/common/span.rs | 120 ----------------------------- ast/src/common/tendril_json.rs | 26 ------- ast/src/expression/value.rs | 10 +-- ast/src/groups/group_coordinate.rs | 2 +- ast/src/groups/group_value.rs | 2 +- errors/README.md | 64 +++++++++++++++ errors/src/common/macros.rs | 7 +- errors/src/common/traits.rs | 10 +-- errors/src/lib.rs | 4 +- parser/src/tokenizer/token.rs | 10 +-- 17 files changed, 203 insertions(+), 206 deletions(-) delete mode 100644 ast/src/common/span.rs delete mode 100644 ast/src/common/tendril_json.rs diff --git a/.circleci/config.yml b/.circleci/config.yml index 8a2499e9e4..87c08e53ed 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -46,7 +46,7 @@ commands: jobs: check-style: docker: - - image: cimg/rust:1.54 + - image: cimg/rust:1.54.0 resource_class: xlarge steps: - checkout @@ -61,7 +61,7 @@ jobs: clippy: docker: - - image: cimg/rust:1.54 + - image: cimg/rust:1.54.0 resource_class: xlarge steps: - checkout @@ -76,7 +76,7 @@ jobs: # code-cov: # docker: - # - image: cimg/rust:1.54.0 + # - image: cimg/rust:1.54.0.0 # resource_class: xlarge # environment: # RUSTC_BOOTSTRAP: 1 @@ -118,7 +118,7 @@ jobs: leo-executable: docker: - - image: cimg/rust:1.54 + - image: cimg/rust:1.54.0 resource_class: xlarge steps: - checkout @@ -136,7 +136,7 @@ jobs: leo-new: docker: - - image: cimg/rust:1.54 + - image: cimg/rust:1.54.0 resource_class: xlarge steps: - attach_workspace: @@ -149,7 +149,7 @@ jobs: leo-init: docker: - - image: cimg/rust:1.54 + - image: cimg/rust:1.54.0 resource_class: xlarge steps: - attach_workspace: @@ -162,7 +162,7 @@ jobs: leo-clean: docker: - - image: cimg/rust:1.54 + - image: cimg/rust:1.54.0 resource_class: xlarge steps: - attach_workspace: @@ -175,7 +175,7 @@ jobs: leo-setup: docker: - - image: cimg/rust:1.54 + - image: cimg/rust:1.54.0 resource_class: xlarge steps: - attach_workspace: @@ -188,7 +188,7 @@ jobs: leo-add-remove: docker: - - image: cimg/rust:1.54 + - image: cimg/rust:1.54.0 resource_class: xlarge steps: - attach_workspace: @@ -201,7 +201,7 @@ jobs: leo-check-constraints: docker: - - image: cimg/rust:1.54 + - image: cimg/rust:1.54.0 resource_class: xlarge steps: - attach_workspace: @@ -214,7 +214,7 @@ jobs: leo-login-logout: docker: - - image: cimg/rust:1.54 + - image: cimg/rust:1.54.0 resource_class: xlarge steps: - attach_workspace: @@ -227,7 +227,7 @@ jobs: leo-clone: docker: - - image: cimg/rust:1.54 + - image: cimg/rust:1.54.0 resource_class: xlarge steps: - attach_workspace: @@ -240,7 +240,7 @@ jobs: leo-publish: docker: - - image: cimg/rust:1.54 + - image: cimg/rust:1.54.0 resource_class: xlarge steps: - attach_workspace: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d4d6a4bd8f..5cae3dcd80 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -178,6 +178,66 @@ jobs: - name: Stop sccache server run: sccache --stop-server || true + test-docs: + name: Test Docs + runs-on: ubuntu-latest + env: + RUSTC_WRAPPER: sccache + SCCACHE_CACHE_SIZE: 2G + SCCACHE_DIR: /home/runner/.cache/sccache + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + ref: master + + - name: Install sccache + env: + LINK: https://github.com/mozilla/sccache/releases/download + SCCACHE_VERSION: v0.2.15 + run: | + SCCACHE_FILE=sccache-$SCCACHE_VERSION-x86_64-unknown-linux-musl + mkdir -p $HOME/.local/bin + curl -L "$LINK/$SCCACHE_VERSION/$SCCACHE_FILE.tar.gz" | tar xz + mv -f $SCCACHE_FILE/sccache $HOME/.local/bin/sccache + chmod +x $HOME/.local/bin/sccache + echo "$HOME/.local/bin" >> $GITHUB_PATH + + - name: Cache cargo registry + uses: actions/cache@v2 + continue-on-error: false + with: + path: | + ~/.cargo/registry + ~/.cargo/git + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo- + + - name: Install Rust Stable + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + + - name: Start sccache server + run: sccache --start-server + + - name: Build Cargo Docs + env: + RUSTDOCFLAGS: "--enable-index-page -Zunstable-options" + RUSTC_BOOTSTRAP: "1" + run: | + cargo doc --no-deps --document-private-items --workspace + rm -rf ./tests + + - name: Print sccache stats + run: sccache --show-stats + + - name: Stop sccache server + run: sccache --stop-server || true + codecov: name: Code Coverage runs-on: ubuntu-latest diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index e6ef015f8d..7fa86e8025 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -8,9 +8,27 @@ jobs: build-crates-docs: name: Build Crates Docs runs-on: ubuntu-latest + env: + RUSTC_WRAPPER: sccache + SCCACHE_CACHE_SIZE: 2G + SCCACHE_DIR: /home/runner/.cache/sccache steps: - name: Checkout uses: actions/checkout@v2 + with: + ref: master + + - name: Install sccache + env: + LINK: https://github.com/mozilla/sccache/releases/download + SCCACHE_VERSION: v0.2.15 + run: | + SCCACHE_FILE=sccache-$SCCACHE_VERSION-x86_64-unknown-linux-musl + mkdir -p $HOME/.local/bin + curl -L "$LINK/$SCCACHE_VERSION/$SCCACHE_FILE.tar.gz" | tar xz + mv -f $SCCACHE_FILE/sccache $HOME/.local/bin/sccache + chmod +x $HOME/.local/bin/sccache + echo "$HOME/.local/bin" >> $GITHUB_PATH - name: Install Rust Stable uses: actions-rs/toolchain@v1 @@ -18,30 +36,34 @@ jobs: profile: minimal toolchain: stable override: true + + - name: Save sccache + uses: actions/cache@v2 + continue-on-error: false + with: + path: /home/runner/.cache/sccache + key: ubuntu-sccache-${{ hashFiles('**/Cargo.lock') }} + restore-keys: ubuntu-sccache- + + - name: Start sccache server + run: sccache --start-server - name: Build Cargo Docs + env: + RUSTDOCFLAGS: "--enable-index-page -Zunstable-options" + RUSTC_BOOTSTRAP: "1" run: | - cargo doc - mv -r ./target/doc/leo /tmp/ - - - name: Save Docs - uses: actions/upload-artifact@master - with: - name: leo-docs - path: /tmp/target/doc/leo - - deploy-crates-docs: - name: Deploy Crates Docs - runs-on: ubuntu-latest - steps: - - name: Load Docs - uses: actions/download-artifact@master - with: - name: leo-docs - path: /tmp/target/doc/leo + cargo doc --no-deps --document-private-items --workspace + rm -rf ./tests - name: Deploy uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./target/doc/leo \ No newline at end of file + publish_dir: ./target/doc/ + + - name: Print sccache stats + run: sccache --show-stats + + - name: Stop sccache server + run: sccache --stop-server || true \ No newline at end of file diff --git a/.gitignore b/.gitignore index cabf0b1b00..d01b74f25d 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,9 @@ **/.crates2.json **/bin/ +# sccache from pipeline +sccache*/ + # Emacs gitignore files *~ \#*\# diff --git a/ast/README.md b/ast/README.md index 1ec612648f..99d41e65c6 100644 --- a/ast/README.md +++ b/ast/README.md @@ -1,4 +1,5 @@ # leo-ast + [![Crates.io](https://img.shields.io/crates/v/leo-ast.svg?color=neon)](https://crates.io/crates/leo-ast) [![Authors](https://img.shields.io/badge/authors-Aleo-orange.svg)](../AUTHORS) [![License](https://img.shields.io/badge/License-GPLv3-blue.svg)](./LICENSE.md) diff --git a/ast/src/common/mod.rs b/ast/src/common/mod.rs index 4e67d47321..22df56b6e8 100644 --- a/ast/src/common/mod.rs +++ b/ast/src/common/mod.rs @@ -35,6 +35,4 @@ pub use self_keyword::*; pub mod spread_or_expression; pub use spread_or_expression::*; -pub mod tendril_json; - pub mod vec_tendril_json; diff --git a/ast/src/common/positive_number.rs b/ast/src/common/positive_number.rs index f674463607..c78dea6bca 100644 --- a/ast/src/common/positive_number.rs +++ b/ast/src/common/positive_number.rs @@ -23,7 +23,7 @@ use tendril::StrTendril; /// A number string guaranteed to be positive by the pest grammar. #[derive(Clone, Serialize, Deserialize, Debug, PartialEq, Eq, Hash)] pub struct PositiveNumber { - #[serde(with = "crate::common::tendril_json")] + #[serde(with = "leo_errors::common::tendril_json")] pub value: StrTendril, } diff --git a/ast/src/common/span.rs b/ast/src/common/span.rs deleted file mode 100644 index 830437a39b..0000000000 --- a/ast/src/common/span.rs +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use std::{fmt, sync::Arc}; - -use serde::{Deserialize, Serialize}; -use tendril::StrTendril; - -#[derive(Clone, Debug, Default, Serialize, Deserialize, PartialEq, Eq, Hash)] -pub struct Span { - pub line_start: usize, - pub line_stop: usize, - pub col_start: usize, - pub col_stop: usize, - pub path: Arc, - #[serde(with = "crate::common::tendril_json")] - pub content: StrTendril, -} - -impl fmt::Display for Span { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - if self.line_start == self.line_stop { - write!(f, "{}:{}-{}", self.line_start, self.col_start, self.col_stop) - } else { - write!( - f, - "{}:{}-{}:{}", - self.line_start, self.col_start, self.line_stop, self.col_stop - ) - } - } -} - -impl<'ast> From> for Span { - fn from(span: pest::Span) -> Self { - let start = span.start_pos().line_col(); - let end = span.end_pos().line_col(); - - Span { - line_start: start.0, - line_stop: end.0, - col_start: start.1, - col_stop: end.1, - path: Arc::new(String::new()), - content: span.as_str().into(), - } - } -} - -impl std::ops::Add for &Span { - type Output = Span; - - fn add(self, other: &Span) -> Span { - self.clone() + other.clone() - } -} - -impl std::ops::Add for Span { - type Output = Self; - - #[allow(clippy::comparison_chain)] - fn add(self, other: Self) -> Self { - if self.line_start == other.line_stop { - Span { - line_start: self.line_start, - line_stop: self.line_stop, - col_start: self.col_start.min(other.col_start), - col_stop: self.col_stop.max(other.col_stop), - path: self.path, - content: self.content, - } - } else { - let mut new_content = vec![]; - let self_lines = self.content.lines().collect::>(); - let other_lines = other.content.lines().collect::>(); - for line in self.line_start.min(other.line_start)..self.line_stop.max(other.line_stop) + 1 { - if line >= self.line_start && line <= self.line_stop { - new_content.push(self_lines.get(line - self.line_start).copied().unwrap_or_default()); - } else if line >= other.line_start && line <= other.line_stop { - new_content.push(other_lines.get(line - other.line_start).copied().unwrap_or_default()); - } else if new_content.last().map(|x| *x != "...").unwrap_or(true) { - new_content.push("..."); - } - } - let new_content = new_content.join("\n").into(); - if self.line_start < other.line_stop { - Span { - line_start: self.line_start, - line_stop: other.line_stop, - col_start: self.col_start, - col_stop: other.col_stop, - path: self.path, - content: new_content, - } - } else { - Span { - line_start: other.line_start, - line_stop: self.line_stop, - col_start: other.col_start, - col_stop: self.col_stop, - path: self.path, - content: new_content, - } - } - } - } -} diff --git a/ast/src/common/tendril_json.rs b/ast/src/common/tendril_json.rs deleted file mode 100644 index 35c9b45759..0000000000 --- a/ast/src/common/tendril_json.rs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use serde::{Deserialize, Deserializer, Serializer}; -use tendril::StrTendril; - -pub fn serialize(tendril: &StrTendril, serializer: S) -> Result { - serializer.serialize_str(&tendril[..]) -} - -pub fn deserialize<'de, D: Deserializer<'de>>(deserializer: D) -> Result { - Ok(String::deserialize(deserializer)?.into()) -} diff --git a/ast/src/expression/value.rs b/ast/src/expression/value.rs index 6818423572..0b6722ddb6 100644 --- a/ast/src/expression/value.rs +++ b/ast/src/expression/value.rs @@ -22,15 +22,15 @@ use crate::{Char, CharValue}; #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub enum ValueExpression { // todo: deserialize values here - Address(#[serde(with = "crate::common::tendril_json")] StrTendril, Span), - Boolean(#[serde(with = "crate::common::tendril_json")] StrTendril, Span), + Address(#[serde(with = "leo_errors::common::tendril_json")] StrTendril, Span), + Boolean(#[serde(with = "leo_errors::common::tendril_json")] StrTendril, Span), Char(CharValue), - Field(#[serde(with = "crate::common::tendril_json")] StrTendril, Span), + Field(#[serde(with = "leo_errors::common::tendril_json")] StrTendril, Span), Group(Box), - Implicit(#[serde(with = "crate::common::tendril_json")] StrTendril, Span), + Implicit(#[serde(with = "leo_errors::common::tendril_json")] StrTendril, Span), Integer( IntegerType, - #[serde(with = "crate::common::tendril_json")] StrTendril, + #[serde(with = "leo_errors::common::tendril_json")] StrTendril, Span, ), String(Vec, Span), diff --git a/ast/src/groups/group_coordinate.rs b/ast/src/groups/group_coordinate.rs index 60a2528cf4..d13c7b9d19 100644 --- a/ast/src/groups/group_coordinate.rs +++ b/ast/src/groups/group_coordinate.rs @@ -26,7 +26,7 @@ use tendril::StrTendril; #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub enum GroupCoordinate { - Number(#[serde(with = "crate::common::tendril_json")] StrTendril, Span), + Number(#[serde(with = "leo_errors::common::tendril_json")] StrTendril, Span), SignHigh, SignLow, Inferred, diff --git a/ast/src/groups/group_value.rs b/ast/src/groups/group_value.rs index 45949f735a..489422774e 100644 --- a/ast/src/groups/group_value.rs +++ b/ast/src/groups/group_value.rs @@ -26,7 +26,7 @@ use tendril::StrTendril; #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub enum GroupValue { - Single(#[serde(with = "crate::common::tendril_json")] StrTendril, Span), + Single(#[serde(with = "leo_errors::common::tendril_json")] StrTendril, Span), Tuple(GroupTuple), } diff --git a/errors/README.md b/errors/README.md index e69de29bb2..55c3ac280c 100644 --- a/errors/README.md +++ b/errors/README.md @@ -0,0 +1,64 @@ +# leo-errors + +[![Crates.io](https://img.shields.io/crates/v/leo-ast.svg?color=neon)](https://crates.io/crates/leo-errors) +[![Authors](https://img.shields.io/badge/authors-Aleo-orange.svg)](../AUTHORS) +[![License](https://img.shields.io/badge/License-GPLv3-blue.svg)](./LICENSE.md) + +This directory contains the code for the Errors for all the Leo crates. + +## [Common](./src/common) + +The common section of this crate contains a few sub files: + +- [Backtraced Error](./src/common/backtraced.rs): Which contains the information needed to create a backtraceable error for Leo. +- [Formatted Error](./src/common/formatted.rs): Which contains the information needed to create a formatted error for Leo. +- [Macros](./src/common/macros.rs): Which contains the logic to make creating errors easy through a DSL. It also figures out the error codes for each error via a **top down** method. Meaning all new errors should be added to the bottom of the file. You can specify whether an error is formatted or backtraced through a decorator above a function name, where the formatted ones require a Span as an argument by default. The body takes any additional arguments you want provided to the function, the message, and the optional help message for the error. The additional arguments are just specified to implement traits to avoid as many type conversions in other Leo crates. +- [Span](./src/common/span.rs): Which contains the span object used throughout the other Leo crates(with the exception of the Input crate see more [below](#input)). +- [Tendril JSON](./src/common/tendril_json.rs): Which contains the common logic for how to searlize a StrTendril from the tendril crate. +- [Traits](./src/common/traits.rs): Which contains the common traits in errors to make defining errors easier. + +## Error Types + +These are the different kinds of errors that are made in this crate. Note that if you want more information about the errors please check the crates documentation or the [Error Index](./ERROR_INDEX.md). All errors here with the exception of [SnarkVM Errors](#snarkvm) have a 037 prefixed to their error codes. + +### ASG + +The errors for the `leo-asg` crate. It's error codes will range from 0-999, and be prefixed with the characters `ASG`. + +### AST + +The errors for the `leo-ast` crate. It's error codes will range from 1_000-1_999, and be prefixed with the characters `AST`. + +### CLI + +The errors for the `leo-lang` crate. It's error codes will range from 7_000-7_999, and be prefixed with the characters `CLI`. + +### Compiler + +The errors for the `leo-compiler` crate. It's error codes will range from 2_000-2_999, and be prefixed with the characters `CMP`. + +### Import + +The errors for the `leo-imports` crate. It's error codes will range from 3_000-3_999, and be prefixed with the characters `IMP`. + +### Input + +The errors for the `leo-input` crate. For right now they just have an exit code of 1, as they aren't ported. +The reason they aren't ported is due to a desire for 0 deps in case this crate moves to SnarkVM. + +### Package + +The errors for the `leo-package` crate. It's error codes will range from 4_000-4_999, and be prefixed with the characters `PAK`. + +### Parser + +The errors for the `leo-parser` crate. It's error codes will range from 5_000-5_999, and be prefixed with the characters `PAR`. + +### SnarkVM + +The errors from SnarkVM that bubble up into Leo in some situations. For right now they just have an exit code of 1. +When SnarkVM implments better error codes and messages we can just bubble them up. + +### State + +The errors for the `leo-state` crate. It's error codes will range from 6000-6_999, and be prefixed with the characters `STA`. diff --git a/errors/src/common/macros.rs b/errors/src/common/macros.rs index ed05145009..9dfa00f67c 100644 --- a/errors/src/common/macros.rs +++ b/errors/src/common/macros.rs @@ -22,7 +22,7 @@ macro_rules! create_errors { (@step $_code:expr,) => {}; ($(#[$error_type_docs:meta])* $error_type:ident, exit_code_mask: $exit_code_mask:expr, error_code_prefix: $error_code_prefix:expr, $($(#[$docs:meta])* @$formatted_or_backtraced_list:ident $names:ident { args: ($($arg_names:ident: $arg_types:ty$(,)?)*), msg: $messages:expr, help: $helps:expr, })*) => { #[allow(unused_imports)] // Allow unused for errors that only use formatted or backtraced errors. - use crate::{BacktracedError, ErrorCode, FormattedError, LeoErrorCode, Span}; + use crate::{BacktracedError, FormattedError, LeoErrorCode, Span}; use backtrace::Backtrace; @@ -38,10 +38,7 @@ macro_rules! create_errors { } /// Implements the trait for LeoError Codes. - impl LeoErrorCode for $error_type {} - - /// Implements the Error code trait for each error. - impl ErrorCode for $error_type { + impl LeoErrorCode for $error_type { #[inline(always)] fn exit_code(&self) -> i32 { match self { diff --git a/errors/src/common/traits.rs b/errors/src/common/traits.rs index cc8528507e..b171cb5bfc 100644 --- a/errors/src/common/traits.rs +++ b/errors/src/common/traits.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . /// ErrorCode trait that all Errors should implement. -pub trait ErrorCode: Sized { +pub trait LeoErrorCode: Sized { /// Returns the error's exit code for the program. fn exit_code(&self) -> i32; @@ -24,12 +24,10 @@ pub trait ErrorCode: Sized { /// Returns the error's code type for the program. fn error_type() -> String; -} -/// The LeoErrorCode which has a code identifier of 037(Leo upsidedown and backwards). -/// This is to make the exit codes unique to Leo itself. -pub trait LeoErrorCode: ErrorCode { - /// Inlined function for efficiency. + /// The LeoErrorCode which has a default code identifier of 037 + /// (Leo upsidedown and backwards). This is to make the exit codes + /// unique to Leo itself. #[inline(always)] fn code_identifier() -> i8 { 37 diff --git a/errors/src/lib.rs b/errors/src/lib.rs index 965db11d32..27dc6be2c2 100644 --- a/errors/src/lib.rs +++ b/errors/src/lib.rs @@ -119,10 +119,10 @@ impl LeoError { CliError(error) => error.exit_code(), CompilerError(error) => error.exit_code(), ImportError(error) => error.exit_code(), - InputError(_error) => 0, // TODO migrate me, or not cause we want inputs to have 0 deps. + InputError(_error) => 1, // TODO migrate me, or not cause we want inputs to have 0 deps. PackageError(error) => error.exit_code(), ParserError(error) => error.exit_code(), - SnarkVMError(_error) => 0, // TODO update once snarkvm implments a global top level error similar to LeoError. + SnarkVMError(_error) => 1, // TODO update once snarkvm implments a global top level error similar to LeoError. StateError(error) => error.exit_code(), } } diff --git a/parser/src/tokenizer/token.rs b/parser/src/tokenizer/token.rs index 700da12e9e..bcbfaa36d6 100644 --- a/parser/src/tokenizer/token.rs +++ b/parser/src/tokenizer/token.rs @@ -48,14 +48,14 @@ impl fmt::Display for Char { pub enum Token { // Lexical Grammar // Literals - CommentLine(#[serde(with = "leo_ast::common::tendril_json")] StrTendril), - CommentBlock(#[serde(with = "leo_ast::common::tendril_json")] StrTendril), + CommentLine(#[serde(with = "leo_errors::common::tendril_json")] StrTendril), + CommentBlock(#[serde(with = "leo_errors::common::tendril_json")] StrTendril), StringLit(Vec), - Ident(#[serde(with = "leo_ast::common::tendril_json")] StrTendril), - Int(#[serde(with = "leo_ast::common::tendril_json")] StrTendril), + Ident(#[serde(with = "leo_errors::common::tendril_json")] StrTendril), + Int(#[serde(with = "leo_errors::common::tendril_json")] StrTendril), True, False, - AddressLit(#[serde(with = "leo_ast::common::tendril_json")] StrTendril), + AddressLit(#[serde(with = "leo_errors::common::tendril_json")] StrTendril), CharLit(Char), // Symbols From 51e8ea49de4cf846ce756f8cd73a121f1b71d27d Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Tue, 10 Aug 2021 20:05:15 -0700 Subject: [PATCH 17/58] no circle ci image for rustc 1.54.0 yet --- .circleci/config.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 87c08e53ed..0bb6141c07 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -46,7 +46,7 @@ commands: jobs: check-style: docker: - - image: cimg/rust:1.54.0 + - image: cimg/rust:1.53.0 resource_class: xlarge steps: - checkout @@ -61,7 +61,7 @@ jobs: clippy: docker: - - image: cimg/rust:1.54.0 + - image: cimg/rust:1.53.0 resource_class: xlarge steps: - checkout @@ -76,7 +76,7 @@ jobs: # code-cov: # docker: - # - image: cimg/rust:1.54.0.0 + # - image: cimg/rust:1.53.0.0 # resource_class: xlarge # environment: # RUSTC_BOOTSTRAP: 1 @@ -118,7 +118,7 @@ jobs: leo-executable: docker: - - image: cimg/rust:1.54.0 + - image: cimg/rust:1.53.0 resource_class: xlarge steps: - checkout @@ -136,7 +136,7 @@ jobs: leo-new: docker: - - image: cimg/rust:1.54.0 + - image: cimg/rust:1.53.0 resource_class: xlarge steps: - attach_workspace: @@ -149,7 +149,7 @@ jobs: leo-init: docker: - - image: cimg/rust:1.54.0 + - image: cimg/rust:1.53.0 resource_class: xlarge steps: - attach_workspace: @@ -162,7 +162,7 @@ jobs: leo-clean: docker: - - image: cimg/rust:1.54.0 + - image: cimg/rust:1.53.0 resource_class: xlarge steps: - attach_workspace: @@ -175,7 +175,7 @@ jobs: leo-setup: docker: - - image: cimg/rust:1.54.0 + - image: cimg/rust:1.53.0 resource_class: xlarge steps: - attach_workspace: @@ -188,7 +188,7 @@ jobs: leo-add-remove: docker: - - image: cimg/rust:1.54.0 + - image: cimg/rust:1.53.0 resource_class: xlarge steps: - attach_workspace: @@ -201,7 +201,7 @@ jobs: leo-check-constraints: docker: - - image: cimg/rust:1.54.0 + - image: cimg/rust:1.53.0 resource_class: xlarge steps: - attach_workspace: @@ -214,7 +214,7 @@ jobs: leo-login-logout: docker: - - image: cimg/rust:1.54.0 + - image: cimg/rust:1.53.0 resource_class: xlarge steps: - attach_workspace: @@ -227,7 +227,7 @@ jobs: leo-clone: docker: - - image: cimg/rust:1.54.0 + - image: cimg/rust:1.53.0 resource_class: xlarge steps: - attach_workspace: @@ -240,7 +240,7 @@ jobs: leo-publish: docker: - - image: cimg/rust:1.54.0 + - image: cimg/rust:1.53.0 resource_class: xlarge steps: - attach_workspace: From 478bb83f700ad0024efe30cb9981c553fcdf2f8d Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Tue, 10 Aug 2021 22:56:46 -0700 Subject: [PATCH 18/58] regen tests after removing dead errors, docs --- Cargo.lock | 1 + errors/Cargo.toml | 3 + errors/ERROR_INDEX.md | 17 +++++ errors/src/common/backtraced.rs | 25 +++++-- errors/src/common/formatted.rs | 40 ++++++++--- leo/main.rs | 16 +---- test-framework/src/runner.rs | 3 + .../array/array_range_access_fail.leo.out | 2 +- .../array/array_size_zero_fail.leo.out | 2 +- .../array/input_nested_3x2_fail.leo.out | 2 +- .../array/multi_fail_initializer.leo.out | 2 +- .../compiler/array/multi_fail_inline.leo.out | 2 +- .../array/multi_initializer_fail.leo.out | 2 +- .../array/nested_3x2_value_fail.leo.out | 2 +- .../array/tuple_3x2_value_fail.leo.out | 2 +- .../compiler/compiler/array/type_fail.leo.out | 2 +- .../type_nested_value_nested_3x2_fail.leo.out | 2 +- ...ype_nested_value_nested_4x3x2_fail.leo.out | 2 +- .../type_nested_value_tuple_3x2_fail.leo.out | 2 +- ...type_nested_value_tuple_4x3x2_fail.leo.out | 2 +- .../type_tuple_value_nested_3x2_fail.leo.out | 2 +- ...type_tuple_value_nested_4x3x2_fail.leo.out | 2 +- .../type_tuple_value_tuple_3x2_fail.leo.out | 2 +- .../type_tuple_value_tuple_4x3x2_fail.leo.out | 2 +- .../array/variable_slice_fail.leo.out | 2 +- .../compiler/char/invalid_char.leo.out | 2 +- .../big_self_outside_circuit_fail.leo.out | 2 +- .../circuits/const_self_variable_fail.leo.out | 2 +- .../compiler/circuits/inline_fail.leo.out | 2 +- .../circuits/inline_member_fail.leo.out | 2 +- .../circuits/inline_undefined.leo.out | 2 +- .../circuits/member_function_fail.leo.out | 2 +- .../circuits/member_function_invalid.leo.out | 2 +- .../member_static_function_invalid.leo.out | 2 +- .../member_static_function_undefined.leo.out | 2 +- .../circuits/member_variable_fail.leo.out | 2 +- .../circuits/mut_function_fail.leo.out | 2 +- .../circuits/mut_self_function_fail.leo.out | 2 +- .../mut_self_static_function_fail.leo.out | 2 +- .../circuits/mut_self_variable_fail.leo.out | 2 +- .../circuits/mut_static_function_fail.leo.out | 2 +- .../circuits/mut_variable_fail.leo.out | 2 +- .../compiler/circuits/self_circuit.leo.out | 2 +- .../compiler/circuits/self_fail.leo.out | 2 +- .../circuits/self_member_invalid.leo.out | 2 +- .../circuits/self_member_undefined.leo.out | 2 +- .../compiler/console/log_fail.leo.out | 2 +- .../console/log_parameter_fail_empty.leo.out | 2 +- .../console/log_parameter_fail_none.leo.out | 2 +- .../log_parameter_fail_unknown.leo.out | 2 +- .../core/core_circuit_invalid.leo.out | 2 +- .../core/core_circuit_star_fail.leo.out | 2 +- .../core/core_package_invalid.leo.out | 2 +- .../core_unstable_package_invalid.leo.out | 2 +- .../field/no_space_between_literal.leo.out | 2 +- .../duplicate_definition_fail.leo.out | 2 +- .../function/multiple_returns_fail.leo.out | 2 +- .../multiple_returns_fail_conditional.leo.out | 2 +- .../function/return_array_nested_fail.leo.out | 2 +- .../function/return_array_tuple_fail.leo.out | 2 +- .../compiler/function/scope_fail.leo.out | 2 +- .../compiler/function/undefined.leo.out | 2 +- .../global_consts/modify_global_const.leo.out | 2 +- .../const_input_non_const.leo.out | 2 +- .../const_var_in_both_sections_fail.leo.out | 2 +- .../program_input/main_array_fail.leo.out | 2 +- .../program_input/main_tuple_fail.leo.out | 2 +- .../non_const_input_const.leo.out | 2 +- .../var_in_both_sections_fail.leo.out | 2 +- .../main_array_fail.leo.out | 2 +- .../main_tuple_fail.leo.out | 2 +- .../program_registers/registers_fail.leo.out | 2 +- .../compiler/integers/i128/max_fail.leo.out | 2 +- .../compiler/integers/i128/min_fail.leo.out | 2 +- .../i128/no_space_between_literal.leo.out | 2 +- .../compiler/integers/i16/max_fail.leo.out | 2 +- .../compiler/integers/i16/min_fail.leo.out | 2 +- .../i16/no_space_between_literal.leo.out | 2 +- .../compiler/integers/i32/max_fail.leo.out | 2 +- .../compiler/integers/i32/min_fail.leo.out | 2 +- .../i32/no_space_between_literal.leo.out | 2 +- .../compiler/integers/i64/max_fail.leo.out | 2 +- .../compiler/integers/i64/min_fail.leo.out | 2 +- .../i64/no_space_between_literal.leo.out | 2 +- .../compiler/integers/i8/max_fail.leo.out | 2 +- .../compiler/integers/i8/min_fail.leo.out | 2 +- .../compiler/integers/i8/negate_min.leo.out | 2 +- .../i8/no_space_between_literal.leo.out | 2 +- .../compiler/integers/u128/max_fail.leo.out | 2 +- .../compiler/integers/u128/min_fail.leo.out | 2 +- .../integers/u128/negative_input_fail.leo.out | 2 +- .../u128/no_space_between_literal.leo.out | 2 +- .../compiler/integers/u16/max_fail.leo.out | 2 +- .../compiler/integers/u16/min_fail.leo.out | 2 +- .../integers/u16/negative_input_fail.leo.out | 2 +- .../u16/no_space_between_literal.leo.out | 2 +- .../compiler/integers/u32/max_fail.leo.out | 2 +- .../compiler/integers/u32/min_fail.leo.out | 2 +- .../integers/u32/negative_input_fail.leo.out | 2 +- .../u32/no_space_between_literal.leo.out | 2 +- .../compiler/integers/u64/max_fail.leo.out | 2 +- .../compiler/integers/u64/min_fail.leo.out | 2 +- .../integers/u64/negative_input_fail.leo.out | 2 +- .../u64/no_space_between_literal.leo.out | 2 +- .../compiler/integers/u8/max_fail.leo.out | 2 +- .../compiler/integers/u8/min_fail.leo.out | 2 +- .../integers/u8/negative_input_fail.leo.out | 2 +- .../u8/no_space_between_literal.leo.out | 2 +- .../compiler/mutability/array_fail.leo.out | 2 +- .../compiler/mutability/circuit_fail.leo.out | 2 +- .../mutability/circuit_function_const.leo.out | 2 +- .../circuit_static_function_mut_fail.leo.out | 2 +- .../compiler/mutability/const.leo.out | 2 +- .../mutability/function_input.leo.out | 2 +- .../compiler/mutability/let_fail.leo.out | 2 +- .../statements/assign_ternary.leo.out | 2 +- .../statements/duplicate_variable.leo.out | 2 +- .../statements/ternary_non_const_fail.leo.out | 2 +- .../parser/circuits/fields_fail.leo.out | 2 +- .../parser/expression/array_init_fail.leo.out | 4 +- .../expression/array_inline_fail.leo.out | 10 +-- .../expression/circuit_init_fail.leo.out | 22 +++--- .../expression/literal/address_fail.leo.out | 18 ++--- .../expression/literal/char_fail.leo.out | 70 +++++++++---------- .../expression/literal/group_fail.leo.out | 8 +-- .../expression/literal/string_fail.leo.out | 14 ++-- .../parser/functions/annotated_fail.leo.out | 2 +- .../parser/functions/const_input_fail.leo.out | 2 +- .../import/import_empty_list_fail.leo.out | 2 +- .../parser/parser/import/invalid.leo.out | 2 +- .../parser/statement/conditional_fail.leo.out | 2 +- .../parser/statement/definition_fail.leo.out | 46 ++++++------ .../parser/statement/return_fail.leo.out | 6 +- 133 files changed, 291 insertions(+), 246 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c701be8ef1..ef72add11e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1274,6 +1274,7 @@ version = "1.5.3" dependencies = [ "backtrace", "color-backtrace", + "colored", "derivative", "eyre", "leo-input", diff --git a/errors/Cargo.toml b/errors/Cargo.toml index 83ff0d711e..362716882b 100644 --- a/errors/Cargo.toml +++ b/errors/Cargo.toml @@ -17,6 +17,9 @@ include = [ "Cargo.toml", "src", "README.md", "LICENSE.md" ] license = "GPL-3.0" edition = "2018" +[dependencies] +colored = "2.0.0" + [dependencies.leo-input] path = "../input" version = "1.5.3" diff --git a/errors/ERROR_INDEX.md b/errors/ERROR_INDEX.md index e69de29bb2..fff83fed56 100644 --- a/errors/ERROR_INDEX.md +++ b/errors/ERROR_INDEX.md @@ -0,0 +1,17 @@ +# Leo Error Index + +## ASG Errors: Error Code Range 370_000 - 370_999 + +## AST Errors: Error Code Range 371_000 - 371_999 + +## Compiler Errors: Error Code Range 372_000 - 372_999 + +## Import Errors: Error Code Range 373_000 - 373_999 + +## Package Errors: Error Code Range 374_000 - 374_999 + +## Parser Errors: Error Code Range 375_000 - 375_999 + +## State Errors: Error Code Range 376_000 - 376_999 + +## CLI Errors: Error Code Range 377_000 - 377_999 \ No newline at end of file diff --git a/errors/src/common/backtraced.rs b/errors/src/common/backtraced.rs index 6e49d7e0ef..b26ec01298 100644 --- a/errors/src/common/backtraced.rs +++ b/errors/src/common/backtraced.rs @@ -18,6 +18,7 @@ use std::fmt; use backtrace::Backtrace; use color_backtrace::{BacktracePrinter, Verbosity}; +use colored::Colorize; use derivative::Derivative; /// The indent for an error message. @@ -88,19 +89,33 @@ impl BacktracedError { impl fmt::Display for BacktracedError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let error_message = format!( - "[E{error_type}{code_identifier:0>3}{exit_code:0>4}]: {message}\ - {indent } ", - indent = INDENT, + "Error: [E{error_type}{code_identifier:0>3}{exit_code:0>4}]: {message}", error_type = self.error_type, code_identifier = self.code_identifier, exit_code = self.exit_code, message = self.message, ); - write!(f, "{}", error_message)?; + // To avoid the color enabling characters for comparison with test expectations. + if std::env::var("LEO_TESTFRAMEWORK") + .unwrap_or_default() + .trim() + .to_owned() + .is_empty() + { + write!(f, "{}", error_message.bold().red())?; + } else { + write!(f, "{}", error_message)?; + }; if let Some(help) = &self.help { - write!(f, "{indent } = {help}", indent = INDENT, help = help)?; + write!( + f, + "\n{indent } |\n\ + {indent } = {help}", + indent = INDENT, + help = help + )?; } let leo_backtrace = std::env::var("LEO_BACKTRACE").unwrap_or_default().trim().to_owned(); diff --git a/errors/src/common/formatted.rs b/errors/src/common/formatted.rs index 418129ad6b..5f4c677477 100644 --- a/errors/src/common/formatted.rs +++ b/errors/src/common/formatted.rs @@ -20,6 +20,7 @@ use std::fmt; use backtrace::Backtrace; use color_backtrace::{BacktracePrinter, Verbosity}; +use colored::Colorize; /// Formatted compiler error type /// undefined value `x` @@ -95,20 +96,34 @@ impl fmt::Display for FormattedError { let underlined = underline(self.span.col_start, self.span.col_stop); let error_message = format!( - "[E{error_type}{code_identifier:0>3}{exit_code:0>4}]: {message}\n \ - --> {path}:{line_start}:{start}\n\ - {indent } ", - indent = INDENT, + "[E{error_type}{code_identifier:0>3}{exit_code:0>4}]: {message}", error_type = self.backtrace.error_type, code_identifier = self.backtrace.code_identifier, exit_code = self.backtrace.exit_code, message = self.backtrace.message, + ); + + // To avoid the color enabling characters for comparison with test expectations. + if std::env::var("LEO_TESTFRAMEWORK") + .unwrap_or_default() + .trim() + .to_owned() + .is_empty() + { + write!(f, "{}", error_message.bold().red())?; + } else { + write!(f, "{}", error_message)?; + }; + + write!( + f, + "\n{indent }--> {path}:{line_start}:{start}\n\ + {indent } ", + indent = INDENT, path = &*self.span.path, line_start = self.span.line_start, start = self.span.col_start, - ); - - write!(f, "{}", error_message)?; + )?; for (line_no, line) in self.span.content.lines().enumerate() { writeln!( @@ -122,14 +137,19 @@ impl fmt::Display for FormattedError { write!( f, - "{indent } |{underlined}\n\ - {indent } |\n", + "{indent } |{underlined}", indent = INDENT, underlined = underlined, )?; if let Some(help) = &self.backtrace.help { - write!(f, "{indent } = {help}", indent = INDENT, help = help)?; + write!( + f, + "\n{indent } |\n\ + {indent } = {help}", + indent = INDENT, + help = help + )?; } let leo_backtrace = std::env::var("LEO_BACKTRACE").unwrap_or_default().trim().to_owned(); diff --git a/leo/main.rs b/leo/main.rs index 31bba88608..38a25f722c 100644 --- a/leo/main.rs +++ b/leo/main.rs @@ -27,7 +27,6 @@ use commands::{ }; use leo_errors::Result; -use colored::Colorize; use std::{path::PathBuf, process::exit}; use structopt::{clap::AppSettings, StructOpt}; @@ -221,20 +220,7 @@ fn handle_error(res: Result) -> T { match res { Ok(t) => t, Err(err) => { - eprintln!( - "{} {}", - "Error:".bold().red(), - err.to_string() - .lines() - .enumerate() - .map(|(i, l)| if i == 0 { - l.bold().red().to_string() - } else { - l.to_string() - }) - .collect::>() - .join("\n") - ); + eprintln!("{}", err); exit(err.exit_code()); } } diff --git a/test-framework/src/runner.rs b/test-framework/src/runner.rs index 15e39776ad..6e9a6ccd77 100644 --- a/test-framework/src/runner.rs +++ b/test-framework/src/runner.rs @@ -47,6 +47,7 @@ pub trait Runner { } pub fn run_tests(runner: &T, expectation_category: &str) { + std::env::set_var("LEO_TESTFRAMEWORK", "true"); let mut pass_categories = 0; let mut pass_tests = 0; let mut fail_tests = 0; @@ -226,4 +227,6 @@ pub fn run_tests(runner: &T, expectation_category: &str) { pass_categories ); } + + std::env::remove_var("LEO_TESTFRAMEWORK"); } diff --git a/tests/expectations/compiler/compiler/array/array_range_access_fail.leo.out b/tests/expectations/compiler/compiler/array/array_range_access_fail.leo.out index a731475b0c..f7419ed6be 100644 --- a/tests/expectations/compiler/compiler/array/array_range_access_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/array_range_access_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370020]: array index out of bounds: '0'\n --> compiler-test:7:24\n |\n 7 | const z: [u8; 2] = y[..1u32][..x];\n | ^^^^^^^^^^^^^^\n |\n" + - "[EASG0370020]: array index out of bounds: '0'\n --> compiler-test:7:24\n |\n 7 | const z: [u8; 2] = y[..1u32][..x];\n | ^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/array/array_size_zero_fail.leo.out b/tests/expectations/compiler/compiler/array/array_size_zero_fail.leo.out index 1c072d27ea..72b054f3c7 100644 --- a/tests/expectations/compiler/compiler/array/array_size_zero_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/array_size_zero_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EAST0371006]: received dimension size of 0, expected it to be 1 or larger.\n --> compiler-test:4:13\n |\n 4 | let a = [true; (0)];\n | ^^^^^^^^^^^\n |\n" + - "[EAST0371006]: received dimension size of 0, expected it to be 1 or larger.\n --> compiler-test:4:13\n |\n 4 | let a = [true; (0)];\n | ^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/array/input_nested_3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/input_nested_3x2_fail.leo.out index a4cc3e013d..ab53e76d64 100644 --- a/tests/expectations/compiler/compiler/array/input_nested_3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/input_nested_3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EPAR0375005]: expected ] -- got ')'\n --> compiler-test:4:29\n |\n 4 | return a == [[0u8; 2]; 3)]; // This should be written the right way as this test is for the input file.\n | ^\n |\n" + - "[EPAR0375005]: expected ] -- got ')'\n --> compiler-test:4:29\n |\n 4 | return a == [[0u8; 2]; 3)]; // This should be written the right way as this test is for the input file.\n | ^" diff --git a/tests/expectations/compiler/compiler/array/multi_fail_initializer.leo.out b/tests/expectations/compiler/compiler/array/multi_fail_initializer.leo.out index 644c816a63..f116f4c7f5 100644 --- a/tests/expectations/compiler/compiler/array/multi_fail_initializer.leo.out +++ b/tests/expectations/compiler/compiler/array/multi_fail_initializer.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370026]: unexpected type, expected: 'array of length 2', received: 'array of length 1'\n --> compiler-test:4:31\n |\n 4 | const arr: [u8; (2, 2)] = [[1u8; 2]; 1]; // incorrect dimensions\n | ^^^^^^^^^^^^^\n |\n" + - "[EASG0370026]: unexpected type, expected: 'array of length 2', received: 'array of length 1'\n --> compiler-test:4:31\n |\n 4 | const arr: [u8; (2, 2)] = [[1u8; 2]; 1]; // incorrect dimensions\n | ^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/array/multi_fail_inline.leo.out b/tests/expectations/compiler/compiler/array/multi_fail_inline.leo.out index 354255589c..a66bc47f9d 100644 --- a/tests/expectations/compiler/compiler/array/multi_fail_inline.leo.out +++ b/tests/expectations/compiler/compiler/array/multi_fail_inline.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370026]: unexpected type, expected: 'array of length 2', received: 'array of length 1'\n --> compiler-test:5:35\n |\n 5 | [1u8]]; // incorrect dimensions\n | ^^^^^\n |\n" + - "[EASG0370026]: unexpected type, expected: 'array of length 2', received: 'array of length 1'\n --> compiler-test:5:35\n |\n 5 | [1u8]]; // incorrect dimensions\n | ^^^^^" diff --git a/tests/expectations/compiler/compiler/array/multi_initializer_fail.leo.out b/tests/expectations/compiler/compiler/array/multi_initializer_fail.leo.out index 5e1324734b..4f9547abea 100644 --- a/tests/expectations/compiler/compiler/array/multi_initializer_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/multi_initializer_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370026]: unexpected type, expected: 'array of length 2', received: 'array of length 1'\n --> compiler-test:4:31\n |\n 4 | const arr: [u8; (2, 2)] = [1u8; (2, 1)]; // incorrect dimensions\n | ^^^^^^^^^^^^^\n |\n" + - "[EASG0370026]: unexpected type, expected: 'array of length 2', received: 'array of length 1'\n --> compiler-test:4:31\n |\n 4 | const arr: [u8; (2, 2)] = [1u8; (2, 1)]; // incorrect dimensions\n | ^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/array/nested_3x2_value_fail.leo.out b/tests/expectations/compiler/compiler/array/nested_3x2_value_fail.leo.out index edcdb8e667..c97ec4f007 100644 --- a/tests/expectations/compiler/compiler/array/nested_3x2_value_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/nested_3x2_value_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:6:30\n |\n 6 | const a: [u32; (3, 2)] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n" + - "[EASG0370026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:6:30\n |\n 6 | const a: [u32; (3, 2)] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/array/tuple_3x2_value_fail.leo.out b/tests/expectations/compiler/compiler/array/tuple_3x2_value_fail.leo.out index 8c1f7c74db..1944b1fab0 100644 --- a/tests/expectations/compiler/compiler/array/tuple_3x2_value_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/tuple_3x2_value_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:5:30\n |\n 5 | const a: [u32; (3, 2)] = [0; (2, 3)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n" + - "[EASG0370026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:5:30\n |\n 5 | const a: [u32; (3, 2)] = [0; (2, 3)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/array/type_fail.leo.out b/tests/expectations/compiler/compiler/array/type_fail.leo.out index a50e651d51..46a4c0a8b7 100644 --- a/tests/expectations/compiler/compiler/array/type_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EPAR0375005]: expected ( -- got '-'\n --> compiler-test:4:19\n |\n 4 | const a: [u8; -2] = [0u32; 2];\n | ^\n |\n" + - "[EPAR0375005]: expected ( -- got '-'\n --> compiler-test:4:19\n |\n 4 | const a: [u8; -2] = [0u32; 2];\n | ^" diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2_fail.leo.out index 07dd118983..bdefc59a37 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:4:29\n |\n 4 | const b: [[u8; 2]; 3] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n" + - "[EASG0370026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:4:29\n |\n 4 | const b: [[u8; 2]; 3] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2_fail.leo.out index 4cabe9d99d..8946a3988f 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370026]: unexpected type, expected: 'array of length 4', received: 'array of length 2'\n --> compiler-test:4:34\n |\n 4 | const b: [[[u8; 2]; 3]; 4] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^^^^^^\n |\n" + - "[EASG0370026]: unexpected type, expected: 'array of length 4', received: 'array of length 2'\n --> compiler-test:4:34\n |\n 4 | const b: [[[u8; 2]; 3]; 4] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2_fail.leo.out index 3b28a36400..6e922340bd 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:4:29\n |\n 4 | const b: [[u8; 2]; 3] = [0; (2, 3)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n" + - "[EASG0370026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:4:29\n |\n 4 | const b: [[u8; 2]; 3] = [0; (2, 3)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2_fail.leo.out index 940ca289fc..4e320dde46 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370026]: unexpected type, expected: 'array of length 4', received: 'array of length 2'\n --> compiler-test:4:34\n |\n 4 | const b: [[[u8; 2]; 3]; 4] = [0; (2, 3, 4)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^^^^\n |\n" + - "[EASG0370026]: unexpected type, expected: 'array of length 4', received: 'array of length 2'\n --> compiler-test:4:34\n |\n 4 | const b: [[[u8; 2]; 3]; 4] = [0; (2, 3, 4)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2_fail.leo.out index 17f549ba28..98f1c440a0 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370026]: unexpected type, expected: 'array of length 2', received: 'array of length 3'\n --> compiler-test:4:29\n |\n 4 | const b: [u8; (2, 3)] = [[0; 2]; 3]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n" + - "[EASG0370026]: unexpected type, expected: 'array of length 2', received: 'array of length 3'\n --> compiler-test:4:29\n |\n 4 | const b: [u8; (2, 3)] = [[0; 2]; 3]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2_fail.leo.out index 5b7937c26b..512e196ff6 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370026]: unexpected type, expected: 'array of length 4', received: 'array of length 2'\n --> compiler-test:4:32\n |\n 4 | const b: [u8; (4, 3, 2)] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^^^^^^\n |\n" + - "[EASG0370026]: unexpected type, expected: 'array of length 4', received: 'array of length 2'\n --> compiler-test:4:32\n |\n 4 | const b: [u8; (4, 3, 2)] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2_fail.leo.out index eb76782593..7236c085d8 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370026]: unexpected type, expected: 'array of length 2', received: 'array of length 3'\n --> compiler-test:4:29\n |\n 4 | const b: [u8; (2, 3)] = [0; (3, 2)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n" + - "[EASG0370026]: unexpected type, expected: 'array of length 2', received: 'array of length 3'\n --> compiler-test:4:29\n |\n 4 | const b: [u8; (2, 3)] = [0; (3, 2)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2_fail.leo.out index fcef71477c..3d2be04739 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370026]: unexpected type, expected: 'array of length 4', received: 'array of length 2'\n --> compiler-test:4:32\n |\n 4 | const b: [u8; (4, 3, 2)] = [0; (2, 3, 4)]; // initializer (incorrectly reversed order)\n | ^^^^^^^^^^^^^^\n |\n" + - "[EASG0370026]: unexpected type, expected: 'array of length 4', received: 'array of length 2'\n --> compiler-test:4:32\n |\n 4 | const b: [u8; (4, 3, 2)] = [0; (2, 3, 4)]; // initializer (incorrectly reversed order)\n | ^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/array/variable_slice_fail.leo.out b/tests/expectations/compiler/compiler/array/variable_slice_fail.leo.out index da66178465..40a2241cda 100644 --- a/tests/expectations/compiler/compiler/array/variable_slice_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/variable_slice_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EPAR0375007]: unexpected identifier: expected 'assert', 'error', 'log' -- got 'debug'\n --> compiler-test:7:17\n |\n 7 | console.debug(\"{}\", x);\n | ^^^^^\n |\n" + - "[EPAR0375007]: unexpected identifier: expected 'assert', 'error', 'log' -- got 'debug'\n --> compiler-test:7:17\n |\n 7 | console.debug(\"{}\", x);\n | ^^^^^" diff --git a/tests/expectations/compiler/compiler/char/invalid_char.leo.out b/tests/expectations/compiler/compiler/char/invalid_char.leo.out index 961c24c719..7b113239d6 100644 --- a/tests/expectations/compiler/compiler/char/invalid_char.leo.out +++ b/tests/expectations/compiler/compiler/char/invalid_char.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EPAR0375000]: '\n --> compiler-test:4:23\n |\n 4 | const not_valid = '';\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> compiler-test:4:23\n |\n 4 | const not_valid = '';\n | ^\n |\n = HELP TODO" diff --git a/tests/expectations/compiler/compiler/circuits/big_self_outside_circuit_fail.leo.out b/tests/expectations/compiler/compiler/circuits/big_self_outside_circuit_fail.leo.out index e2c5bc279f..9f2b5148ce 100644 --- a/tests/expectations/compiler/compiler/circuits/big_self_outside_circuit_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/big_self_outside_circuit_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EAST0371005]: cannot call keyword `Self` outside of a circuit function\n --> compiler-test:16:3\n |\n 16 | let foo: Self = Foo::new();\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n" + - "[EAST0371005]: cannot call keyword `Self` outside of a circuit function\n --> compiler-test:16:3\n |\n 16 | let foo: Self = Foo::new();\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/circuits/const_self_variable_fail.leo.out b/tests/expectations/compiler/compiler/circuits/const_self_variable_fail.leo.out index 509cc38427..4537c590e5 100644 --- a/tests/expectations/compiler/compiler/circuits/const_self_variable_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/const_self_variable_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370033]: illegal assignment to immutable variable 'self'\n --> compiler-test:7:9\n |\n 7 | self.a = new;\n | ^^^^^^^^^^^^\n |\n" + - "[EASG0370033]: illegal assignment to immutable variable 'self'\n --> compiler-test:7:9\n |\n 7 | self.a = new;\n | ^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/circuits/inline_fail.leo.out b/tests/expectations/compiler/compiler/circuits/inline_fail.leo.out index b6ca5e71f3..dbfc704f47 100644 --- a/tests/expectations/compiler/compiler/circuits/inline_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/inline_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370003]: missing circuit member 'x' for initialization of circuit 'Foo'\n --> compiler-test:9:15\n |\n 9 | const a = Foo { y: 0u32 };\n | ^^^^^^^^^^^^^^^\n |\n" + - "[EASG0370003]: missing circuit member 'x' for initialization of circuit 'Foo'\n --> compiler-test:9:15\n |\n 9 | const a = Foo { y: 0u32 };\n | ^^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/circuits/inline_member_fail.leo.out b/tests/expectations/compiler/compiler/circuits/inline_member_fail.leo.out index 54f190ceb4..777ff0faa1 100644 --- a/tests/expectations/compiler/compiler/circuits/inline_member_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/inline_member_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370003]: missing circuit member 'x' for initialization of circuit 'Foo'\n --> compiler-test:9:15\n |\n 9 | const a = Foo { y };\n | ^^^^^^^^^\n |\n" + - "[EASG0370003]: missing circuit member 'x' for initialization of circuit 'Foo'\n --> compiler-test:9:15\n |\n 9 | const a = Foo { y };\n | ^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/circuits/inline_undefined.leo.out b/tests/expectations/compiler/compiler/circuits/inline_undefined.leo.out index 32088345dd..b291d04c86 100644 --- a/tests/expectations/compiler/compiler/circuits/inline_undefined.leo.out +++ b/tests/expectations/compiler/compiler/circuits/inline_undefined.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370000]: failed to resolve circuit: 'Foo'\n --> compiler-test:4:15\n |\n 4 | const a = Foo { };\n | ^^^\n |\n" + - "[EASG0370000]: failed to resolve circuit: 'Foo'\n --> compiler-test:4:15\n |\n 4 | const a = Foo { };\n | ^^^" diff --git a/tests/expectations/compiler/compiler/circuits/member_function_fail.leo.out b/tests/expectations/compiler/compiler/circuits/member_function_fail.leo.out index 30cde4955f..4f3d3bcda7 100644 --- a/tests/expectations/compiler/compiler/circuits/member_function_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_function_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370002]: illegal reference to non-existant member 'echoed' of circuit 'Foo'\n --> compiler-test:11:17\n |\n 11 | const err = a.echoed(1u32);\n | ^^^^^^^^\n |\n" + - "[EASG0370002]: illegal reference to non-existant member 'echoed' of circuit 'Foo'\n --> compiler-test:11:17\n |\n 11 | const err = a.echoed(1u32);\n | ^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/circuits/member_function_invalid.leo.out b/tests/expectations/compiler/compiler/circuits/member_function_invalid.leo.out index 49d835949a..20a2113cb8 100644 --- a/tests/expectations/compiler/compiler/circuits/member_function_invalid.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_function_invalid.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370009]: cannot call static function 'echo' of circuit 'Foo' from target\n --> compiler-test:11:17\n |\n 11 | const err = a.echo(1u32); // echo is a static function and must be accessed using `::`\n | ^^^^^^\n |\n" + - "[EASG0370009]: cannot call static function 'echo' of circuit 'Foo' from target\n --> compiler-test:11:17\n |\n 11 | const err = a.echo(1u32); // echo is a static function and must be accessed using `::`\n | ^^^^^^" diff --git a/tests/expectations/compiler/compiler/circuits/member_static_function_invalid.leo.out b/tests/expectations/compiler/compiler/circuits/member_static_function_invalid.leo.out index 8c5a786f5a..e0a7893ca7 100644 --- a/tests/expectations/compiler/compiler/circuits/member_static_function_invalid.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_static_function_invalid.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370028]: failed to resolve variable reference 'Foo'\n --> compiler-test:10:17\n |\n 10 | const err = Foo.echo(1u32); // Invalid, echo is a static function and must be accessed using `::`\n | ^^^\n |\n" + - "[EASG0370028]: failed to resolve variable reference 'Foo'\n --> compiler-test:10:17\n |\n 10 | const err = Foo.echo(1u32); // Invalid, echo is a static function and must be accessed using `::`\n | ^^^" diff --git a/tests/expectations/compiler/compiler/circuits/member_static_function_undefined.leo.out b/tests/expectations/compiler/compiler/circuits/member_static_function_undefined.leo.out index 826e54b9d2..9137f01c35 100644 --- a/tests/expectations/compiler/compiler/circuits/member_static_function_undefined.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_static_function_undefined.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370002]: illegal reference to non-existant member 'echoed' of circuit 'Foo'\n --> compiler-test:10:17\n |\n 10 | const err = Foo::echoed(1u32);\n | ^^^^^^^^^^^\n |\n" + - "[EASG0370002]: illegal reference to non-existant member 'echoed' of circuit 'Foo'\n --> compiler-test:10:17\n |\n 10 | const err = Foo::echoed(1u32);\n | ^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/circuits/member_variable_fail.leo.out b/tests/expectations/compiler/compiler/circuits/member_variable_fail.leo.out index 725bbd0d85..1b7a7ef433 100644 --- a/tests/expectations/compiler/compiler/circuits/member_variable_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_variable_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370002]: illegal reference to non-existant member 'y' of circuit 'Foo'\n --> compiler-test:9:17\n |\n 9 | const err = a.y;\n | ^^^\n |\n" + - "[EASG0370002]: illegal reference to non-existant member 'y' of circuit 'Foo'\n --> compiler-test:9:17\n |\n 9 | const err = a.y;\n | ^^^" diff --git a/tests/expectations/compiler/compiler/circuits/mut_function_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_function_fail.leo.out index 0176469603..c7b24139c7 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_function_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_function_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370007]: attempt to assign to function 'bar'\n --> compiler-test:12:5\n |\n 12 | f.bar = 1u8;\n | ^^^^^^^^^^^\n |\n" + - "[EASG0370007]: attempt to assign to function 'bar'\n --> compiler-test:12:5\n |\n 12 | f.bar = 1u8;\n | ^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_function_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_function_fail.leo.out index 6ceec18fd7..5bbee2c259 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_self_function_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_self_function_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370007]: attempt to assign to function 'bar'\n --> compiler-test:9:9\n |\n 9 | self.bar = new;\n | ^^^^^^^^^^^^^^\n |\n" + - "[EASG0370007]: attempt to assign to function 'bar'\n --> compiler-test:9:9\n |\n 9 | self.bar = new;\n | ^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_static_function_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_static_function_fail.leo.out index 6ceec18fd7..5bbee2c259 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_self_static_function_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_self_static_function_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370007]: attempt to assign to function 'bar'\n --> compiler-test:9:9\n |\n 9 | self.bar = new;\n | ^^^^^^^^^^^^^^\n |\n" + - "[EASG0370007]: attempt to assign to function 'bar'\n --> compiler-test:9:9\n |\n 9 | self.bar = new;\n | ^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_variable_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_variable_fail.leo.out index 509cc38427..4537c590e5 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_self_variable_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_self_variable_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370033]: illegal assignment to immutable variable 'self'\n --> compiler-test:7:9\n |\n 7 | self.a = new;\n | ^^^^^^^^^^^^\n |\n" + - "[EASG0370033]: illegal assignment to immutable variable 'self'\n --> compiler-test:7:9\n |\n 7 | self.a = new;\n | ^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/circuits/mut_static_function_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_static_function_fail.leo.out index 8f6a9d491d..741984f4f9 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_static_function_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_static_function_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370006]: extra circuit member 'a' for initialization of circuit 'Foo' is not allowed\n --> compiler-test:8:19\n |\n 8 | let f = Foo { a: 0u8 };\n | ^\n |\n" + - "[EASG0370006]: extra circuit member 'a' for initialization of circuit 'Foo' is not allowed\n --> compiler-test:8:19\n |\n 8 | let f = Foo { a: 0u8 };\n | ^" diff --git a/tests/expectations/compiler/compiler/circuits/mut_variable_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_variable_fail.leo.out index 914a8322c6..8313b7d48d 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_variable_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_variable_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370033]: illegal assignment to immutable variable 'f'\n --> compiler-test:10:5\n |\n 10 | f.a = 1u8;\n | ^^^^^^^^^\n |\n" + - "[EASG0370033]: illegal assignment to immutable variable 'f'\n --> compiler-test:10:5\n |\n 10 | f.a = 1u8;\n | ^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/circuits/self_circuit.leo.out b/tests/expectations/compiler/compiler/circuits/self_circuit.leo.out index 6f33019bc8..ef1a754925 100644 --- a/tests/expectations/compiler/compiler/circuits/self_circuit.leo.out +++ b/tests/expectations/compiler/compiler/circuits/self_circuit.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EPAR0375009]: unexpected string: expected 'ident', got 'static'\n --> compiler-test:5:5\n |\n 5 | static function new() -> Self {\n | ^^^^^^\n |\n" + - "[EPAR0375009]: unexpected string: expected 'ident', got 'static'\n --> compiler-test:5:5\n |\n 5 | static function new() -> Self {\n | ^^^^^^" diff --git a/tests/expectations/compiler/compiler/circuits/self_fail.leo.out b/tests/expectations/compiler/compiler/circuits/self_fail.leo.out index ac29c46aa3..c0229f3a4a 100644 --- a/tests/expectations/compiler/compiler/circuits/self_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/self_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370000]: failed to resolve circuit: 'Self'\n --> compiler-test:4:5\n |\n 4 | Self::main();\n | ^^^^\n |\n" + - "[EASG0370000]: failed to resolve circuit: 'Self'\n --> compiler-test:4:5\n |\n 4 | Self::main();\n | ^^^^" diff --git a/tests/expectations/compiler/compiler/circuits/self_member_invalid.leo.out b/tests/expectations/compiler/compiler/circuits/self_member_invalid.leo.out index 55b5fddc0b..1455cce070 100644 --- a/tests/expectations/compiler/compiler/circuits/self_member_invalid.leo.out +++ b/tests/expectations/compiler/compiler/circuits/self_member_invalid.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370009]: cannot call static function 'bar' of circuit 'Foo' from target\n --> compiler-test:13:17\n |\n 13 | const err = foo.bar();\n | ^^^^^^^\n |\n" + - "[EASG0370009]: cannot call static function 'bar' of circuit 'Foo' from target\n --> compiler-test:13:17\n |\n 13 | const err = foo.bar();\n | ^^^^^^^" diff --git a/tests/expectations/compiler/compiler/circuits/self_member_undefined.leo.out b/tests/expectations/compiler/compiler/circuits/self_member_undefined.leo.out index 9622608bd4..4caa6447af 100644 --- a/tests/expectations/compiler/compiler/circuits/self_member_undefined.leo.out +++ b/tests/expectations/compiler/compiler/circuits/self_member_undefined.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370009]: cannot call static function 'bar' of circuit 'Foo' from target\n --> compiler-test:11:17\n |\n 11 | const err = foo.bar();\n | ^^^^^^^\n |\n" + - "[EASG0370009]: cannot call static function 'bar' of circuit 'Foo' from target\n --> compiler-test:11:17\n |\n 11 | const err = foo.bar();\n | ^^^^^^^" diff --git a/tests/expectations/compiler/compiler/console/log_fail.leo.out b/tests/expectations/compiler/compiler/console/log_fail.leo.out index 0c8fb9379a..86efc9335b 100644 --- a/tests/expectations/compiler/compiler/console/log_fail.leo.out +++ b/tests/expectations/compiler/compiler/console/log_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EPAR0375009]: unexpected string: expected 'formatted string', got 'hello'\n --> compiler-test:4:18\n |\n 4 | console.log( hello );\n | ^^^^^\n |\n" + - "[EPAR0375009]: unexpected string: expected 'formatted string', got 'hello'\n --> compiler-test:4:18\n |\n 4 | console.log( hello );\n | ^^^^^" diff --git a/tests/expectations/compiler/compiler/console/log_parameter_fail_empty.leo.out b/tests/expectations/compiler/compiler/console/log_parameter_fail_empty.leo.out index 8ac23ecc1c..2f33b8473f 100644 --- a/tests/expectations/compiler/compiler/console/log_parameter_fail_empty.leo.out +++ b/tests/expectations/compiler/compiler/console/log_parameter_fail_empty.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[ECMP0372006]: Formatter given 1 containers and found 0 parameters\n --> compiler-test:4:17\n |\n 4 | console.log(\"{}\");\n | ^^^^\n |\n" + - "[ECMP0372006]: Formatter given 1 containers and found 0 parameters\n --> compiler-test:4:17\n |\n 4 | console.log(\"{}\");\n | ^^^^" diff --git a/tests/expectations/compiler/compiler/console/log_parameter_fail_none.leo.out b/tests/expectations/compiler/compiler/console/log_parameter_fail_none.leo.out index ee603776ca..a266680c8a 100644 --- a/tests/expectations/compiler/compiler/console/log_parameter_fail_none.leo.out +++ b/tests/expectations/compiler/compiler/console/log_parameter_fail_none.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[ECMP0372006]: Formatter given 0 containers and found 1 parameters\n --> compiler-test:4:17\n |\n 4 | console.log(\"\", 1u32);\n | ^^^^^^^^\n |\n" + - "[ECMP0372006]: Formatter given 0 containers and found 1 parameters\n --> compiler-test:4:17\n |\n 4 | console.log(\"\", 1u32);\n | ^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/console/log_parameter_fail_unknown.leo.out b/tests/expectations/compiler/compiler/console/log_parameter_fail_unknown.leo.out index 7cd476b188..7f276aced3 100644 --- a/tests/expectations/compiler/compiler/console/log_parameter_fail_unknown.leo.out +++ b/tests/expectations/compiler/compiler/console/log_parameter_fail_unknown.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370028]: failed to resolve variable reference 'a'\n --> compiler-test:4:23\n |\n 4 | console.log(\"{}\", a);\n | ^\n |\n" + - "[EASG0370028]: failed to resolve variable reference 'a'\n --> compiler-test:4:23\n |\n 4 | console.log(\"{}\", a);\n | ^" diff --git a/tests/expectations/compiler/compiler/core/core_circuit_invalid.leo.out b/tests/expectations/compiler/compiler/core/core_circuit_invalid.leo.out index 1e5971ee53..431a5723a9 100644 --- a/tests/expectations/compiler/compiler/core/core_circuit_invalid.leo.out +++ b/tests/expectations/compiler/compiler/core/core_circuit_invalid.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370001]: failed to resolve import: 'core.unstable.blake2s.BadCircuit'\n --> compiler-test:3:30\n |\n 3 | import core.unstable.blake2s.BadCircuit; // `BadCircuit` is not included in the blake2s package\n | ^^^^^^^^^^\n |\n" + - "[EASG0370001]: failed to resolve import: 'core.unstable.blake2s.BadCircuit'\n --> compiler-test:3:30\n |\n 3 | import core.unstable.blake2s.BadCircuit; // `BadCircuit` is not included in the blake2s package\n | ^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/core/core_circuit_star_fail.leo.out b/tests/expectations/compiler/compiler/core/core_circuit_star_fail.leo.out index 23c999faf5..4c849b9e38 100644 --- a/tests/expectations/compiler/compiler/core/core_circuit_star_fail.leo.out +++ b/tests/expectations/compiler/compiler/core/core_circuit_star_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370001]: failed to resolve import: 'core'\n --> :0:0\n |\n |\n" + - "[EASG0370001]: failed to resolve import: 'core'\n --> :0:0\n |" diff --git a/tests/expectations/compiler/compiler/core/core_package_invalid.leo.out b/tests/expectations/compiler/compiler/core/core_package_invalid.leo.out index 23c999faf5..4c849b9e38 100644 --- a/tests/expectations/compiler/compiler/core/core_package_invalid.leo.out +++ b/tests/expectations/compiler/compiler/core/core_package_invalid.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370001]: failed to resolve import: 'core'\n --> :0:0\n |\n |\n" + - "[EASG0370001]: failed to resolve import: 'core'\n --> :0:0\n |" diff --git a/tests/expectations/compiler/compiler/core/core_unstable_package_invalid.leo.out b/tests/expectations/compiler/compiler/core/core_unstable_package_invalid.leo.out index 3c94548f8a..6d38e183e7 100644 --- a/tests/expectations/compiler/compiler/core/core_unstable_package_invalid.leo.out +++ b/tests/expectations/compiler/compiler/core/core_unstable_package_invalid.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370001]: failed to resolve import: 'core.unstable'\n --> :0:0\n |\n |\n" + - "[EASG0370001]: failed to resolve import: 'core.unstable'\n --> :0:0\n |" diff --git a/tests/expectations/compiler/compiler/field/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/field/no_space_between_literal.leo.out index 27946e7915..8c11fa16f6 100644 --- a/tests/expectations/compiler/compiler/field/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/field/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EPAR0375004]: Unexpected white space between terms 1 and field\n --> compiler-test:4:13\n |\n 4 | const f = 1 field;\n | ^\n |\n" + - "[EPAR0375004]: Unexpected white space between terms 1 and field\n --> compiler-test:4:13\n |\n 4 | const f = 1 field;\n | ^" diff --git a/tests/expectations/compiler/compiler/function/duplicate_definition_fail.leo.out b/tests/expectations/compiler/compiler/function/duplicate_definition_fail.leo.out index aaffccc60a..9ed152edc4 100644 --- a/tests/expectations/compiler/compiler/function/duplicate_definition_fail.leo.out +++ b/tests/expectations/compiler/compiler/function/duplicate_definition_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "- Circuit has no constraints, use inputs and registers in program to produce them" + - "[EASG0370016]: a function named \"main\" already exists in this scope\n --> compiler-test:8:1\n |\n 8 | function main() {\n|\n 9 | ...\n|\n 10 | }\n | ^" diff --git a/tests/expectations/compiler/compiler/function/multiple_returns_fail.leo.out b/tests/expectations/compiler/compiler/function/multiple_returns_fail.leo.out index ac90160ec0..a65315ecea 100644 --- a/tests/expectations/compiler/compiler/function/multiple_returns_fail.leo.out +++ b/tests/expectations/compiler/compiler/function/multiple_returns_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370035]: function 'main' failed to validate return path: 'cannot have asymmetrical return in if statement'\n --> compiler-test:4:5\n |\n 4 | if true {\n|\n 5 | ...\n|\n 6 | }\n | ^\n |\n" + - "[EASG0370035]: function 'main' failed to validate return path: 'cannot have asymmetrical return in if statement'\n --> compiler-test:4:5\n |\n 4 | if true {\n|\n 5 | ...\n|\n 6 | }\n | ^" diff --git a/tests/expectations/compiler/compiler/function/multiple_returns_fail_conditional.leo.out b/tests/expectations/compiler/compiler/function/multiple_returns_fail_conditional.leo.out index 74d6f60b02..38b5a50c7f 100644 --- a/tests/expectations/compiler/compiler/function/multiple_returns_fail_conditional.leo.out +++ b/tests/expectations/compiler/compiler/function/multiple_returns_fail_conditional.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370034]: function 'main' missing return for all paths\n --> compiler-test:3:1\n |\n 3 | function main() -> bool {\n|\n 4 | ...\n|\n 5 | }\n|\n 6 | \n|\n 7 | \n|\n 8 | \n|\n 9 | \n|\n 10 | \n | ^\n |\n" + - "[EASG0370034]: function 'main' missing return for all paths\n --> compiler-test:3:1\n |\n 3 | function main() -> bool {\n|\n 4 | ...\n|\n 5 | }\n|\n 6 | \n|\n 7 | \n|\n 8 | \n|\n 9 | \n|\n 10 | \n | ^" diff --git a/tests/expectations/compiler/compiler/function/return_array_nested_fail.leo.out b/tests/expectations/compiler/compiler/function/return_array_nested_fail.leo.out index a3c7fbbc4d..77d4b327fd 100644 --- a/tests/expectations/compiler/compiler/function/return_array_nested_fail.leo.out +++ b/tests/expectations/compiler/compiler/function/return_array_nested_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:4:12\n |\n 4 | return [0u8; (2, 3)]; // The correct 3x2 array tuple is `[0u8; (3, 2)]`\n | ^^^^^^^^^^^^^\n |\n" + - "[EASG0370026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:4:12\n |\n 4 | return [0u8; (2, 3)]; // The correct 3x2 array tuple is `[0u8; (3, 2)]`\n | ^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/function/return_array_tuple_fail.leo.out b/tests/expectations/compiler/compiler/function/return_array_tuple_fail.leo.out index e97f4d69d5..3942de65f9 100644 --- a/tests/expectations/compiler/compiler/function/return_array_tuple_fail.leo.out +++ b/tests/expectations/compiler/compiler/function/return_array_tuple_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:4:12\n |\n 4 | return [[0u8; 3]; 2]; // The correct 3x2 nested array is `[0u8; 2]; 3]`\n | ^^^^^^^^^^^^^\n |\n" + - "[EASG0370026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:4:12\n |\n 4 | return [[0u8; 3]; 2]; // The correct 3x2 nested array is `[0u8; 2]; 3]`\n | ^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/function/scope_fail.leo.out b/tests/expectations/compiler/compiler/function/scope_fail.leo.out index 42f360912e..756ce3315a 100644 --- a/tests/expectations/compiler/compiler/function/scope_fail.leo.out +++ b/tests/expectations/compiler/compiler/function/scope_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370028]: failed to resolve variable reference 'myGlobal'\n --> compiler-test:5:12\n |\n 5 | return myGlobal;\n | ^^^^^^^^\n |\n" + - "[EASG0370028]: failed to resolve variable reference 'myGlobal'\n --> compiler-test:5:12\n |\n 5 | return myGlobal;\n | ^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/function/undefined.leo.out b/tests/expectations/compiler/compiler/function/undefined.leo.out index ab42dc3506..7e23e1e81d 100644 --- a/tests/expectations/compiler/compiler/function/undefined.leo.out +++ b/tests/expectations/compiler/compiler/function/undefined.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370024]: failed to resolve function: 'my_function'\n --> compiler-test:5:5\n |\n 5 | my_function();\n | ^^^^^^^^^^^\n |\n" + - "[EASG0370024]: failed to resolve function: 'my_function'\n --> compiler-test:5:5\n |\n 5 | my_function();\n | ^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/global_consts/modify_global_const.leo.out b/tests/expectations/compiler/compiler/global_consts/modify_global_const.leo.out index 892c5a4471..e559c1bb65 100644 --- a/tests/expectations/compiler/compiler/global_consts/modify_global_const.leo.out +++ b/tests/expectations/compiler/compiler/global_consts/modify_global_const.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370033]: illegal assignment to immutable variable 'basic'\n --> compiler-test:7:5\n |\n 7 | basic = 2u32;\n | ^^^^^^^^^^^^\n |\n" + - "[EASG0370033]: illegal assignment to immutable variable 'basic'\n --> compiler-test:7:5\n |\n 7 | basic = 2u32;\n | ^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/const_input_non_const.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/const_input_non_const.leo.out index ac6119b006..ca311dc132 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/const_input_non_const.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/const_input_non_const.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[ECMP0372029]: Expected input variable `a` to be non-constant. Move input variable `a` to [main] section of input file\n --> compiler-test:3:15\n |\n 3 | function main(a: u32) {\n | ^\n |\n" + - "[ECMP0372029]: Expected input variable `a` to be non-constant. Move input variable `a` to [main] section of input file\n --> compiler-test:3:15\n |\n 3 | function main(a: u32) {\n | ^" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/const_var_in_both_sections_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/const_var_in_both_sections_fail.leo.out index 363383036f..d64826e60a 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/const_var_in_both_sections_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/const_var_in_both_sections_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[ECMP0372035]: Input variable a declared twice\n --> compiler-test:3:21\n |\n 3 | function main(const a: u32) {\n | ^\n |\n" + - "[ECMP0372035]: Input variable a declared twice\n --> compiler-test:3:21\n |\n 3 | function main(const a: u32) {\n | ^" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_array_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_array_fail.leo.out index fe63044a6f..f8a8abadcc 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_array_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_array_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[ECMP0372031]: Input array dimensions mismatch expected 1, found array dimensions 2\n --> compiler-test:3:15\n |\n 3 | function main(x: [i16; 2]) {\n | ^\n |\n" + - "[ECMP0372031]: Input array dimensions mismatch expected 1, found array dimensions 2\n --> compiler-test:3:15\n |\n 3 | function main(x: [i16; 2]) {\n | ^" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_tuple_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_tuple_fail.leo.out index e48aa7c880..3f4f9a6b68 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_tuple_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_tuple_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[ECMP0372032]: Input tuple size mismatch expected 3, found tuple with length 2\n --> compiler-test:3:15\n |\n 3 | function main(x: (u8, bool, u8)) {\n | ^\n |\n" + - "[ECMP0372032]: Input tuple size mismatch expected 3, found tuple with length 2\n --> compiler-test:3:15\n |\n 3 | function main(x: (u8, bool, u8)) {\n | ^" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/non_const_input_const.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/non_const_input_const.leo.out index b733727bfc..f2c1441102 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/non_const_input_const.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/non_const_input_const.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370025]: failed to resolve type for variable definition 'unknown'\n --> compiler-test:4:17\n |\n 4 | let b = a * 2;\n | ^\n |\n" + - "[EASG0370025]: failed to resolve type for variable definition 'unknown'\n --> compiler-test:4:17\n |\n 4 | let b = a * 2;\n | ^" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/var_in_both_sections_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/var_in_both_sections_fail.leo.out index d1883828ab..b7df393dab 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/var_in_both_sections_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/var_in_both_sections_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[ECMP0372035]: Input variable a declared twice\n --> compiler-test:3:15\n |\n 3 | function main(a: u32) {\n | ^\n |\n" + - "[ECMP0372035]: Input variable a declared twice\n --> compiler-test:3:15\n |\n 3 | function main(a: u32) {\n | ^" diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array_fail.leo.out index 55f797f152..5554af092d 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[ECMP0372031]: Input array dimensions mismatch expected 2, found array dimensions 1\n --> compiler-test:3:21\n |\n 3 | function main(const x: [i16; 2]) {\n | ^\n |\n" + - "[ECMP0372031]: Input array dimensions mismatch expected 2, found array dimensions 1\n --> compiler-test:3:21\n |\n 3 | function main(const x: [i16; 2]) {\n | ^" diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple_fail.leo.out index f160e71d49..7ef6131070 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[ECMP0372032]: Input tuple size mismatch expected 3, found tuple with length 2\n --> compiler-test:3:21\n |\n 3 | function main(const x: (u8, bool, u8)) {\n | ^\n |\n" + - "[ECMP0372032]: Input tuple size mismatch expected 3, found tuple with length 2\n --> compiler-test:3:21\n |\n 3 | function main(const x: (u8, bool, u8)) {\n | ^" diff --git a/tests/expectations/compiler/compiler/input_files/program_registers/registers_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_registers/registers_fail.leo.out index b18b8067e6..4f9040da47 100644 --- a/tests/expectations/compiler/compiler/input_files/program_registers/registers_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_registers/registers_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[ECMP0372037]: Mismatched types. Expected register output type `u8`, found type `bool`.\n --> compiler-test:3:1\n |\n 3 | function main() -> bool {\n|\n 4 | ...\n|\n 5 | }\n | ^\n |\n" + - "[ECMP0372037]: Mismatched types. Expected register output type `u8`, found type `bool`.\n --> compiler-test:3:1\n |\n 3 | function main() -> bool {\n|\n 4 | ...\n|\n 5 | }\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/i128/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/i128/max_fail.leo.out index ae12eba14b..9208ae7f2e 100644 --- a/tests/expectations/compiler/compiler/integers/i128/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370031]: failed to parse int value '170141183460469231731687303715884105728'\n --> compiler-test:4:21\n |\n 4 | const a: i128 = 170141183460469231731687303715884105728;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n" + - "[EASG0370031]: failed to parse int value '170141183460469231731687303715884105728'\n --> compiler-test:4:21\n |\n 4 | const a: i128 = 170141183460469231731687303715884105728;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/integers/i128/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/i128/min_fail.leo.out index 2d2c4ef60f..ec718e85f8 100644 --- a/tests/expectations/compiler/compiler/integers/i128/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370031]: failed to parse int value '-170141183460469231731687303715884105729'\n --> compiler-test:4:21\n |\n 4 | const a: i128 = -170141183460469231731687303715884105729;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n" + - "[EASG0370031]: failed to parse int value '-170141183460469231731687303715884105729'\n --> compiler-test:4:21\n |\n 4 | const a: i128 = -170141183460469231731687303715884105729;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/integers/i128/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/i128/no_space_between_literal.leo.out index f03038e19e..cbb9e5c9b3 100644 --- a/tests/expectations/compiler/compiler/integers/i128/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EPAR0375004]: Unexpected white space between terms 1 and i128\n --> compiler-test:4:15\n |\n 4 | const i = 1 i128;\n | ^\n |\n" + - "[EPAR0375004]: Unexpected white space between terms 1 and i128\n --> compiler-test:4:15\n |\n 4 | const i = 1 i128;\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/i16/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/i16/max_fail.leo.out index 35e5b9c50e..98e8506db7 100644 --- a/tests/expectations/compiler/compiler/integers/i16/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370031]: failed to parse int value '32768'\n --> compiler-test:4:20\n |\n 4 | const a: i16 = 32768;\n | ^^^^^\n |\n" + - "[EASG0370031]: failed to parse int value '32768'\n --> compiler-test:4:20\n |\n 4 | const a: i16 = 32768;\n | ^^^^^" diff --git a/tests/expectations/compiler/compiler/integers/i16/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/i16/min_fail.leo.out index 8d554ad123..a5dcfcfd90 100644 --- a/tests/expectations/compiler/compiler/integers/i16/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370031]: failed to parse int value '-32769'\n --> compiler-test:4:20\n |\n 4 | const a: i16 = -32769;\n | ^^^^^^\n |\n" + - "[EASG0370031]: failed to parse int value '-32769'\n --> compiler-test:4:20\n |\n 4 | const a: i16 = -32769;\n | ^^^^^^" diff --git a/tests/expectations/compiler/compiler/integers/i16/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/i16/no_space_between_literal.leo.out index ca5f64f024..67126f15a9 100644 --- a/tests/expectations/compiler/compiler/integers/i16/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EPAR0375004]: Unexpected white space between terms 1 and i16\n --> compiler-test:4:15\n |\n 4 | const i = 1 i16;\n | ^\n |\n" + - "[EPAR0375004]: Unexpected white space between terms 1 and i16\n --> compiler-test:4:15\n |\n 4 | const i = 1 i16;\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/i32/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/i32/max_fail.leo.out index 1ae58d6fd0..18db60aa5b 100644 --- a/tests/expectations/compiler/compiler/integers/i32/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370031]: failed to parse int value '2147483648'\n --> compiler-test:4:20\n |\n 4 | const a: i32 = 2147483648;\n | ^^^^^^^^^^\n |\n" + - "[EASG0370031]: failed to parse int value '2147483648'\n --> compiler-test:4:20\n |\n 4 | const a: i32 = 2147483648;\n | ^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/integers/i32/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/i32/min_fail.leo.out index febde4b6b1..02267227cc 100644 --- a/tests/expectations/compiler/compiler/integers/i32/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370031]: failed to parse int value '-2147483649'\n --> compiler-test:4:20\n |\n 4 | const a: i32 = -2147483649;\n | ^^^^^^^^^^^\n |\n" + - "[EASG0370031]: failed to parse int value '-2147483649'\n --> compiler-test:4:20\n |\n 4 | const a: i32 = -2147483649;\n | ^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/integers/i32/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/i32/no_space_between_literal.leo.out index b08793ae84..857110d2bd 100644 --- a/tests/expectations/compiler/compiler/integers/i32/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EPAR0375004]: Unexpected white space between terms 1 and i32\n --> compiler-test:4:15\n |\n 4 | const i = 1 i32;\n | ^\n |\n" + - "[EPAR0375004]: Unexpected white space between terms 1 and i32\n --> compiler-test:4:15\n |\n 4 | const i = 1 i32;\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/i64/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/i64/max_fail.leo.out index 012f7b62b0..78d3b9d31c 100644 --- a/tests/expectations/compiler/compiler/integers/i64/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370031]: failed to parse int value '9223372036854775808'\n --> compiler-test:4:20\n |\n 4 | const a: i64 = 9223372036854775808;\n | ^^^^^^^^^^^^^^^^^^^\n |\n" + - "[EASG0370031]: failed to parse int value '9223372036854775808'\n --> compiler-test:4:20\n |\n 4 | const a: i64 = 9223372036854775808;\n | ^^^^^^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/integers/i64/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/i64/min_fail.leo.out index baf0938005..523ccdc254 100644 --- a/tests/expectations/compiler/compiler/integers/i64/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370031]: failed to parse int value '-9223372036854775809'\n --> compiler-test:4:20\n |\n 4 | const a: i64 = -9223372036854775809;\n | ^^^^^^^^^^^^^^^^^^^^\n |\n" + - "[EASG0370031]: failed to parse int value '-9223372036854775809'\n --> compiler-test:4:20\n |\n 4 | const a: i64 = -9223372036854775809;\n | ^^^^^^^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/integers/i64/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/i64/no_space_between_literal.leo.out index fc03677fec..d3276291f9 100644 --- a/tests/expectations/compiler/compiler/integers/i64/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EPAR0375004]: Unexpected white space between terms 1 and i64\n --> compiler-test:4:15\n |\n 4 | const i = 1 i64;\n | ^\n |\n" + - "[EPAR0375004]: Unexpected white space between terms 1 and i64\n --> compiler-test:4:15\n |\n 4 | const i = 1 i64;\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/i8/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/i8/max_fail.leo.out index 29f393ceee..0831ab47ca 100644 --- a/tests/expectations/compiler/compiler/integers/i8/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370031]: failed to parse int value '128'\n --> compiler-test:4:19\n |\n 4 | const a: i8 = 128;\n | ^^^\n |\n" + - "[EASG0370031]: failed to parse int value '128'\n --> compiler-test:4:19\n |\n 4 | const a: i8 = 128;\n | ^^^" diff --git a/tests/expectations/compiler/compiler/integers/i8/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/i8/min_fail.leo.out index 2506030859..1cc2290801 100644 --- a/tests/expectations/compiler/compiler/integers/i8/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370031]: failed to parse int value '-129'\n --> compiler-test:4:19\n |\n 4 | const a: i8 = -129;\n | ^^^^\n |\n" + - "[EASG0370031]: failed to parse int value '-129'\n --> compiler-test:4:19\n |\n 4 | const a: i8 = -129;\n | ^^^^" diff --git a/tests/expectations/compiler/compiler/integers/i8/negate_min.leo.out b/tests/expectations/compiler/compiler/integers/i8/negate_min.leo.out index ee247aba3a..11b2da517a 100644 --- a/tests/expectations/compiler/compiler/integers/i8/negate_min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/negate_min.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[ECMP0372085]: integer operation failed due to the signed integer error `Integer overflow`\n --> compiler-test:5:15\n |\n 5 | const b = -a;\n | ^^\n |\n" + - "[ECMP0372083]: integer operation failed due to the signed integer error `Integer overflow`\n --> compiler-test:5:15\n |\n 5 | const b = -a;\n | ^^" diff --git a/tests/expectations/compiler/compiler/integers/i8/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/i8/no_space_between_literal.leo.out index 68e994b64d..88c69d2202 100644 --- a/tests/expectations/compiler/compiler/integers/i8/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EPAR0375004]: Unexpected white space between terms 1 and i8\n --> compiler-test:4:15\n |\n 4 | const i = 1 i8;\n | ^\n |\n" + - "[EPAR0375004]: Unexpected white space between terms 1 and i8\n --> compiler-test:4:15\n |\n 4 | const i = 1 i8;\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/u128/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/u128/max_fail.leo.out index e1c414fdd7..ffbabad476 100644 --- a/tests/expectations/compiler/compiler/integers/u128/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370031]: failed to parse int value '340282366920938463463374607431768211456'\n --> compiler-test:4:21\n |\n 4 | const a: u128 = 340282366920938463463374607431768211456;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n" + - "[EASG0370031]: failed to parse int value '340282366920938463463374607431768211456'\n --> compiler-test:4:21\n |\n 4 | const a: u128 = 340282366920938463463374607431768211456;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/integers/u128/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/u128/min_fail.leo.out index 57b1d67350..5a4135c7f4 100644 --- a/tests/expectations/compiler/compiler/integers/u128/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370031]: failed to parse int value '-1'\n --> compiler-test:4:21\n |\n 4 | const a: u128 = -1;\n | ^^\n |\n" + - "[EASG0370031]: failed to parse int value '-1'\n --> compiler-test:4:21\n |\n 4 | const a: u128 = -1;\n | ^^" diff --git a/tests/expectations/compiler/compiler/integers/u128/negative_input_fail.leo.out b/tests/expectations/compiler/compiler/integers/u128/negative_input_fail.leo.out index 02fc9d5a62..98df173765 100644 --- a/tests/expectations/compiler/compiler/integers/u128/negative_input_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/negative_input_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[ECMP0372091]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u128) {}\n | ^\n |\n" + - "[ECMP0372089]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u128) {}\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/u128/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/u128/no_space_between_literal.leo.out index 6d7eb04daa..94c49ab253 100644 --- a/tests/expectations/compiler/compiler/integers/u128/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EPAR0375004]: Unexpected white space between terms 1 and u128\n --> compiler-test:4:15\n |\n 4 | const i = 1 u128;\n | ^\n |\n" + - "[EPAR0375004]: Unexpected white space between terms 1 and u128\n --> compiler-test:4:15\n |\n 4 | const i = 1 u128;\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/u16/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/u16/max_fail.leo.out index c5e25e8633..d2d4378769 100644 --- a/tests/expectations/compiler/compiler/integers/u16/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370031]: failed to parse int value '65536'\n --> compiler-test:4:20\n |\n 4 | const a: u16 = 65536;\n | ^^^^^\n |\n" + - "[EASG0370031]: failed to parse int value '65536'\n --> compiler-test:4:20\n |\n 4 | const a: u16 = 65536;\n | ^^^^^" diff --git a/tests/expectations/compiler/compiler/integers/u16/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/u16/min_fail.leo.out index b20cac401a..a4db8be980 100644 --- a/tests/expectations/compiler/compiler/integers/u16/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370031]: failed to parse int value '-1'\n --> compiler-test:4:20\n |\n 4 | const a: u16 = -1;\n | ^^\n |\n" + - "[EASG0370031]: failed to parse int value '-1'\n --> compiler-test:4:20\n |\n 4 | const a: u16 = -1;\n | ^^" diff --git a/tests/expectations/compiler/compiler/integers/u16/negative_input_fail.leo.out b/tests/expectations/compiler/compiler/integers/u16/negative_input_fail.leo.out index cd8a3a133e..b06d59885c 100644 --- a/tests/expectations/compiler/compiler/integers/u16/negative_input_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/negative_input_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[ECMP0372091]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u16) {}\n | ^\n |\n" + - "[ECMP0372089]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u16) {}\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/u16/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/u16/no_space_between_literal.leo.out index 72324b9454..c4a70ccfa8 100644 --- a/tests/expectations/compiler/compiler/integers/u16/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EPAR0375004]: Unexpected white space between terms 1 and u16\n --> compiler-test:4:15\n |\n 4 | const i = 1 u16;\n | ^\n |\n" + - "[EPAR0375004]: Unexpected white space between terms 1 and u16\n --> compiler-test:4:15\n |\n 4 | const i = 1 u16;\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/u32/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/u32/max_fail.leo.out index 618c97e68d..f5321add3b 100644 --- a/tests/expectations/compiler/compiler/integers/u32/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370031]: failed to parse int value '4294967296'\n --> compiler-test:4:20\n |\n 4 | const a: u32 = 4294967296;\n | ^^^^^^^^^^\n |\n" + - "[EASG0370031]: failed to parse int value '4294967296'\n --> compiler-test:4:20\n |\n 4 | const a: u32 = 4294967296;\n | ^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/integers/u32/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/u32/min_fail.leo.out index 2a9026fd20..50a083ccac 100644 --- a/tests/expectations/compiler/compiler/integers/u32/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370031]: failed to parse int value '-1'\n --> compiler-test:4:20\n |\n 4 | const a: u32 = -1;\n | ^^\n |\n" + - "[EASG0370031]: failed to parse int value '-1'\n --> compiler-test:4:20\n |\n 4 | const a: u32 = -1;\n | ^^" diff --git a/tests/expectations/compiler/compiler/integers/u32/negative_input_fail.leo.out b/tests/expectations/compiler/compiler/integers/u32/negative_input_fail.leo.out index 3cd188e123..6679d32bb9 100644 --- a/tests/expectations/compiler/compiler/integers/u32/negative_input_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/negative_input_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[ECMP0372091]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u32) {}\n | ^\n |\n" + - "[ECMP0372089]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u32) {}\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/u32/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/u32/no_space_between_literal.leo.out index 98b4b81f82..5cdc0667e8 100644 --- a/tests/expectations/compiler/compiler/integers/u32/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EPAR0375004]: Unexpected white space between terms 1 and u32\n --> compiler-test:4:15\n |\n 4 | const i = 1 u32;\n | ^\n |\n" + - "[EPAR0375004]: Unexpected white space between terms 1 and u32\n --> compiler-test:4:15\n |\n 4 | const i = 1 u32;\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/u64/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/u64/max_fail.leo.out index a8047bb9f4..58697defb8 100644 --- a/tests/expectations/compiler/compiler/integers/u64/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370031]: failed to parse int value '18446744073709551616'\n --> compiler-test:4:20\n |\n 4 | const a: u64 = 18446744073709551616;\n | ^^^^^^^^^^^^^^^^^^^^\n |\n" + - "[EASG0370031]: failed to parse int value '18446744073709551616'\n --> compiler-test:4:20\n |\n 4 | const a: u64 = 18446744073709551616;\n | ^^^^^^^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/integers/u64/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/u64/min_fail.leo.out index 726368cfd0..6cafe3c760 100644 --- a/tests/expectations/compiler/compiler/integers/u64/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370031]: failed to parse int value '-1'\n --> compiler-test:4:20\n |\n 4 | const a: u64 = -1;\n | ^^\n |\n" + - "[EASG0370031]: failed to parse int value '-1'\n --> compiler-test:4:20\n |\n 4 | const a: u64 = -1;\n | ^^" diff --git a/tests/expectations/compiler/compiler/integers/u64/negative_input_fail.leo.out b/tests/expectations/compiler/compiler/integers/u64/negative_input_fail.leo.out index 1bc057ff1f..62c3d9b7c9 100644 --- a/tests/expectations/compiler/compiler/integers/u64/negative_input_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/negative_input_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[ECMP0372091]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u64) {}\n | ^\n |\n" + - "[ECMP0372089]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u64) {}\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/u64/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/u64/no_space_between_literal.leo.out index 631103d644..e20ed83f0a 100644 --- a/tests/expectations/compiler/compiler/integers/u64/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EPAR0375004]: Unexpected white space between terms 1 and u64\n --> compiler-test:4:15\n |\n 4 | const i = 1 u64;\n | ^\n |\n" + - "[EPAR0375004]: Unexpected white space between terms 1 and u64\n --> compiler-test:4:15\n |\n 4 | const i = 1 u64;\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/u8/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/u8/max_fail.leo.out index 6c9ef55071..20c2232e4e 100644 --- a/tests/expectations/compiler/compiler/integers/u8/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370031]: failed to parse int value '256'\n --> compiler-test:4:19\n |\n 4 | const a: u8 = 256;\n | ^^^\n |\n" + - "[EASG0370031]: failed to parse int value '256'\n --> compiler-test:4:19\n |\n 4 | const a: u8 = 256;\n | ^^^" diff --git a/tests/expectations/compiler/compiler/integers/u8/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/u8/min_fail.leo.out index f5b1967221..82791fa784 100644 --- a/tests/expectations/compiler/compiler/integers/u8/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370031]: failed to parse int value '-1'\n --> compiler-test:4:19\n |\n 4 | const a: u8 = -1;\n | ^^\n |\n" + - "[EASG0370031]: failed to parse int value '-1'\n --> compiler-test:4:19\n |\n 4 | const a: u8 = -1;\n | ^^" diff --git a/tests/expectations/compiler/compiler/integers/u8/negative_input_fail.leo.out b/tests/expectations/compiler/compiler/integers/u8/negative_input_fail.leo.out index 7986564994..5b71ba6c73 100644 --- a/tests/expectations/compiler/compiler/integers/u8/negative_input_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/negative_input_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[ECMP0372091]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u8) {}\n | ^\n |\n" + - "[ECMP0372089]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u8) {}\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/u8/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/u8/no_space_between_literal.leo.out index 90e59ffc47..609e887f98 100644 --- a/tests/expectations/compiler/compiler/integers/u8/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EPAR0375004]: Unexpected white space between terms 1 and u8\n --> compiler-test:4:15\n |\n 4 | const i = 1 u8;\n | ^\n |\n" + - "[EPAR0375004]: Unexpected white space between terms 1 and u8\n --> compiler-test:4:15\n |\n 4 | const i = 1 u8;\n | ^" diff --git a/tests/expectations/compiler/compiler/mutability/array_fail.leo.out b/tests/expectations/compiler/compiler/mutability/array_fail.leo.out index 352d10486e..59d907acf7 100644 --- a/tests/expectations/compiler/compiler/mutability/array_fail.leo.out +++ b/tests/expectations/compiler/compiler/mutability/array_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370033]: illegal assignment to immutable variable 'a'\n --> compiler-test:5:5\n |\n 5 | a[0] = 0;\n | ^^^^^^^^\n |\n" + - "[EASG0370033]: illegal assignment to immutable variable 'a'\n --> compiler-test:5:5\n |\n 5 | a[0] = 0;\n | ^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/mutability/circuit_fail.leo.out b/tests/expectations/compiler/compiler/mutability/circuit_fail.leo.out index 4fa62c92a5..b874c61310 100644 --- a/tests/expectations/compiler/compiler/mutability/circuit_fail.leo.out +++ b/tests/expectations/compiler/compiler/mutability/circuit_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370033]: illegal assignment to immutable variable 'a'\n --> compiler-test:10:5\n |\n 10 | a.x = 0;\n | ^^^^^^^\n |\n" + - "[EASG0370033]: illegal assignment to immutable variable 'a'\n --> compiler-test:10:5\n |\n 10 | a.x = 0;\n | ^^^^^^^" diff --git a/tests/expectations/compiler/compiler/mutability/circuit_function_const.leo.out b/tests/expectations/compiler/compiler/mutability/circuit_function_const.leo.out index 1fef874ed5..b716bb9f14 100644 --- a/tests/expectations/compiler/compiler/mutability/circuit_function_const.leo.out +++ b/tests/expectations/compiler/compiler/mutability/circuit_function_const.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370010]: cannot call mutable member function 'foo' of circuit 'Foo' from immutable context\n --> compiler-test:15:5\n |\n 15 | a.foo();\n | ^^^^^\n |\n" + - "[EASG0370010]: cannot call mutable member function 'foo' of circuit 'Foo' from immutable context\n --> compiler-test:15:5\n |\n 15 | a.foo();\n | ^^^^^" diff --git a/tests/expectations/compiler/compiler/mutability/circuit_static_function_mut_fail.leo.out b/tests/expectations/compiler/compiler/mutability/circuit_static_function_mut_fail.leo.out index 1c2af74302..d1cc1063a3 100644 --- a/tests/expectations/compiler/compiler/mutability/circuit_static_function_mut_fail.leo.out +++ b/tests/expectations/compiler/compiler/mutability/circuit_static_function_mut_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370006]: extra circuit member 'x' for initialization of circuit 'Foo' is not allowed\n --> compiler-test:8:19\n |\n 8 | let a = Foo { x: 1 };\n | ^\n |\n" + - "[EASG0370006]: extra circuit member 'x' for initialization of circuit 'Foo' is not allowed\n --> compiler-test:8:19\n |\n 8 | let a = Foo { x: 1 };\n | ^" diff --git a/tests/expectations/compiler/compiler/mutability/const.leo.out b/tests/expectations/compiler/compiler/mutability/const.leo.out index 13e1097b8d..697794d4d1 100644 --- a/tests/expectations/compiler/compiler/mutability/const.leo.out +++ b/tests/expectations/compiler/compiler/mutability/const.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370033]: illegal assignment to immutable variable 'a'\n --> compiler-test:6:5\n |\n 6 | a = 0;\n | ^^^^^\n |\n" + - "[EASG0370033]: illegal assignment to immutable variable 'a'\n --> compiler-test:6:5\n |\n 6 | a = 0;\n | ^^^^^" diff --git a/tests/expectations/compiler/compiler/mutability/function_input.leo.out b/tests/expectations/compiler/compiler/mutability/function_input.leo.out index eda0f12d94..61e1f3a101 100644 --- a/tests/expectations/compiler/compiler/mutability/function_input.leo.out +++ b/tests/expectations/compiler/compiler/mutability/function_input.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370028]: failed to resolve variable reference 'a'\n --> compiler-test:5:5\n |\n 5 | a = false;\n | ^\n |\n" + - "[EASG0370028]: failed to resolve variable reference 'a'\n --> compiler-test:5:5\n |\n 5 | a = false;\n | ^" diff --git a/tests/expectations/compiler/compiler/mutability/let_fail.leo.out b/tests/expectations/compiler/compiler/mutability/let_fail.leo.out index 13e1097b8d..697794d4d1 100644 --- a/tests/expectations/compiler/compiler/mutability/let_fail.leo.out +++ b/tests/expectations/compiler/compiler/mutability/let_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370033]: illegal assignment to immutable variable 'a'\n --> compiler-test:6:5\n |\n 6 | a = 0;\n | ^^^^^\n |\n" + - "[EASG0370033]: illegal assignment to immutable variable 'a'\n --> compiler-test:6:5\n |\n 6 | a = 0;\n | ^^^^^" diff --git a/tests/expectations/compiler/compiler/statements/assign_ternary.leo.out b/tests/expectations/compiler/compiler/statements/assign_ternary.leo.out index cd13ddbdbf..cb3a74368e 100644 --- a/tests/expectations/compiler/compiler/statements/assign_ternary.leo.out +++ b/tests/expectations/compiler/compiler/statements/assign_ternary.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370021]: ternary sides had different types: left u32, right bool\n --> compiler-test:4:13\n |\n 4 | let x = true ? x: true;\n | ^^^^^^^^^^^^^^\n |\n" + - "[EASG0370021]: ternary sides had different types: left u32, right bool\n --> compiler-test:4:13\n |\n 4 | let x = true ? x: true;\n | ^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/statements/duplicate_variable.leo.out b/tests/expectations/compiler/compiler/statements/duplicate_variable.leo.out index 4e9aa2afb9..fdfd4f0fd5 100644 --- a/tests/expectations/compiler/compiler/statements/duplicate_variable.leo.out +++ b/tests/expectations/compiler/compiler/statements/duplicate_variable.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370017]: a variable named \"x\" already exists in this scope\n --> compiler-test:5:3\n |\n 5 | let x = true;\n | ^^^^^^^^^^^^\n |\n" + - "[EASG0370017]: a variable named \"x\" already exists in this scope\n --> compiler-test:5:3\n |\n 5 | let x = true;\n | ^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/statements/ternary_non_const_fail.leo.out b/tests/expectations/compiler/compiler/statements/ternary_non_const_fail.leo.out index a1bef5838c..de7feb05aa 100644 --- a/tests/expectations/compiler/compiler/statements/ternary_non_const_fail.leo.out +++ b/tests/expectations/compiler/compiler/statements/ternary_non_const_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370015]: failed to create const variable(s) 'y' with non constant values.\n --> compiler-test:5:5\n |\n 5 | const y = x > 2u8? 1u8 : 2u8;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n" + - "[EASG0370015]: failed to create const variable(s) 'y' with non constant values.\n --> compiler-test:5:5\n |\n 5 | const y = x > 2u8? 1u8 : 2u8;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^" diff --git a/tests/expectations/parser/parser/circuits/fields_fail.leo.out b/tests/expectations/parser/parser/circuits/fields_fail.leo.out index 6ed112fbcc..b8496ba91c 100644 --- a/tests/expectations/parser/parser/circuits/fields_fail.leo.out +++ b/tests/expectations/parser/parser/circuits/fields_fail.leo.out @@ -2,4 +2,4 @@ namespace: Parse expectation: Fail outputs: - - "[EPAR0375006]: Cannot mix use of commas and semi-colons for circuit member variable declarations.\n --> test:10:11\n |\n 10 | y: u32;\n | ^\n |\n" + - "[EPAR0375006]: Cannot mix use of commas and semi-colons for circuit member variable declarations.\n --> test:10:11\n |\n 10 | y: u32;\n | ^" diff --git a/tests/expectations/parser/parser/expression/array_init_fail.leo.out b/tests/expectations/parser/parser/expression/array_init_fail.leo.out index ec72c2ef27..c8f6d05fcb 100644 --- a/tests/expectations/parser/parser/expression/array_init_fail.leo.out +++ b/tests/expectations/parser/parser/expression/array_init_fail.leo.out @@ -2,5 +2,5 @@ namespace: ParseExpression expectation: Fail outputs: - - "[EPAR0375010]: illegal spread in array initializer\n --> test:1:1\n |\n 1 | [...0u8; 1]\n | ^^^^^^^\n |\n" - - "[EPAR0375010]: illegal spread in array initializer\n --> test:1:1\n |\n 1 | [...0; 1]\n | ^^^^^\n |\n" + - "[EPAR0375010]: illegal spread in array initializer\n --> test:1:1\n |\n 1 | [...0u8; 1]\n | ^^^^^^^" + - "[EPAR0375010]: illegal spread in array initializer\n --> test:1:1\n |\n 1 | [...0; 1]\n | ^^^^^" diff --git a/tests/expectations/parser/parser/expression/array_inline_fail.leo.out b/tests/expectations/parser/parser/expression/array_inline_fail.leo.out index 80065f1a45..9285c9e971 100644 --- a/tests/expectations/parser/parser/expression/array_inline_fail.leo.out +++ b/tests/expectations/parser/parser/expression/array_inline_fail.leo.out @@ -2,8 +2,8 @@ namespace: ParseExpression expectation: Fail outputs: - - "[EPAR0375009]: unexpected string: expected 'expression', got ','\n --> test:1:2\n |\n 1 | [,]\n | ^\n |\n" - - "[EPAR0375009]: unexpected string: expected 'expression', got ','\n --> test:1:2\n |\n 1 | [,,]\n | ^\n |\n" - - "[EPAR0375009]: unexpected string: expected 'expression', got ','\n --> test:1:4\n |\n 1 | [0,,]\n | ^\n |\n" - - "[EPAR0375009]: unexpected string: expected 'expression', got ','\n --> test:1:2\n |\n 1 | [,0]\n | ^\n |\n" - - "[EPAR0375009]: unexpected string: expected 'expression', got ','\n --> test:1:2\n |\n 1 | [,0,]\n | ^\n |\n" + - "[EPAR0375009]: unexpected string: expected 'expression', got ','\n --> test:1:2\n |\n 1 | [,]\n | ^" + - "[EPAR0375009]: unexpected string: expected 'expression', got ','\n --> test:1:2\n |\n 1 | [,,]\n | ^" + - "[EPAR0375009]: unexpected string: expected 'expression', got ','\n --> test:1:4\n |\n 1 | [0,,]\n | ^" + - "[EPAR0375009]: unexpected string: expected 'expression', got ','\n --> test:1:2\n |\n 1 | [,0]\n | ^" + - "[EPAR0375009]: unexpected string: expected 'expression', got ','\n --> test:1:2\n |\n 1 | [,0,]\n | ^" diff --git a/tests/expectations/parser/parser/expression/circuit_init_fail.leo.out b/tests/expectations/parser/parser/expression/circuit_init_fail.leo.out index e3e8bdae7c..960ca41ce7 100644 --- a/tests/expectations/parser/parser/expression/circuit_init_fail.leo.out +++ b/tests/expectations/parser/parser/expression/circuit_init_fail.leo.out @@ -2,15 +2,15 @@ namespace: ParseExpression expectation: Fail outputs: - - "[EPAR0375003]: unexpected EOF\n --> test:1:3\n |\n 1 | x {\n | ^\n |\n" + - "[EPAR0375003]: unexpected EOF\n --> test:1:3\n |\n 1 | x {\n | ^" - "did not consume all input: '}' @ 1:3-4\n" - - "[EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:4\n |\n 1 | x {,}\n | ^\n |\n" - - "[EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:5\n |\n 1 | x { , }\n | ^\n |\n" - - "[EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:4\n |\n 1 | x {,,,}\n | ^\n |\n" - - "[EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:6\n |\n 1 | x {x,,}\n | ^\n |\n" - - "[EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:4\n |\n 1 | x {,,x}\n | ^\n |\n" - - "[EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:4\n |\n 1 | x {,x}\n | ^\n |\n" - - "[EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:8\n |\n 1 | x {x:y,,}\n | ^\n |\n" - - "[EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:4\n |\n 1 | x {,,x:y}\n | ^\n |\n" - - "[EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:4\n |\n 1 | x {,x:y}\n | ^\n |\n" - - "[EPAR0375009]: unexpected string: expected 'expression', got '}'\n --> test:1:6\n |\n 1 | x {x:}\n | ^\n |\n" + - "[EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:4\n |\n 1 | x {,}\n | ^" + - "[EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:5\n |\n 1 | x { , }\n | ^" + - "[EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:4\n |\n 1 | x {,,,}\n | ^" + - "[EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:6\n |\n 1 | x {x,,}\n | ^" + - "[EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:4\n |\n 1 | x {,,x}\n | ^" + - "[EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:4\n |\n 1 | x {,x}\n | ^" + - "[EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:8\n |\n 1 | x {x:y,,}\n | ^" + - "[EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:4\n |\n 1 | x {,,x:y}\n | ^" + - "[EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:4\n |\n 1 | x {,x:y}\n | ^" + - "[EPAR0375009]: unexpected string: expected 'expression', got '}'\n --> test:1:6\n |\n 1 | x {x:}\n | ^" diff --git a/tests/expectations/parser/parser/expression/literal/address_fail.leo.out b/tests/expectations/parser/parser/expression/literal/address_fail.leo.out index dd51e3f232..b2336bd422 100644 --- a/tests/expectations/parser/parser/expression/literal/address_fail.leo.out +++ b/tests/expectations/parser/parser/expression/literal/address_fail.leo.out @@ -2,12 +2,12 @@ namespace: Token expectation: Fail outputs: - - "[EPAR0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n" - - "[EPAR0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6Z2eu975wnpz2925ntjccd5cfqxtyu8sta57J9'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6Z2eu975wnpz2925ntjccd5cfqxtyu8sta57J9\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n" - - "[EPAR0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n" - - "[EPAR0375001]: invalid address literal: 'aleo1'\n --> test:1:1\n |\n 1 | aleo1\n | ^^^^^\n |\n" - - "[EPAR0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n" - - "[EPAR0375001]: invalid address literal: 'aleo1'\n --> test:1:1\n |\n 1 | aleo1\n | ^^^^^\n |\n" - - "[EPAR0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n" - - "[EPAR0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d11'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d11\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n" - - "[EPAR0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1x'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1x\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n" + - "[EPAR0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" + - "[EPAR0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6Z2eu975wnpz2925ntjccd5cfqxtyu8sta57J9'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6Z2eu975wnpz2925ntjccd5cfqxtyu8sta57J9\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" + - "[EPAR0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" + - "[EPAR0375001]: invalid address literal: 'aleo1'\n --> test:1:1\n |\n 1 | aleo1\n | ^^^^^" + - "[EPAR0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" + - "[EPAR0375001]: invalid address literal: 'aleo1'\n --> test:1:1\n |\n 1 | aleo1\n | ^^^^^" + - "[EPAR0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" + - "[EPAR0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d11'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d11\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" + - "[EPAR0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1x'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1x\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" diff --git a/tests/expectations/parser/parser/expression/literal/char_fail.leo.out b/tests/expectations/parser/parser/expression/literal/char_fail.leo.out index 86149f8440..2ac57ba838 100644 --- a/tests/expectations/parser/parser/expression/literal/char_fail.leo.out +++ b/tests/expectations/parser/parser/expression/literal/char_fail.leo.out @@ -2,38 +2,38 @@ namespace: Token expectation: Fail outputs: - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | 'a\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | ''\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\x9A'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\x7'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\x7g'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\xz'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\x80'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\xc1'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\xc2'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\xDF'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\xC0'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\xe0'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\x9f'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | 'abcdefg'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\t\\t'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\a'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\z'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\A'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\Z'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\1'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\9'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\*'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\x'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u{bbbbb}\\u{aaaa}'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\uz'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u1'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u123'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u{2764z'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u{276g}'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u00000000'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u01000000'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u9999999'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '😭😂😘'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | 'a\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | ''\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\x9A'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\x7'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\x7g'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\xz'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\x80'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\xc1'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\xc2'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\xDF'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\xC0'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\xe0'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\x9f'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | 'abcdefg'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\t\\t'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\a'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\z'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\A'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\Z'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\1'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\9'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\*'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\x'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u{bbbbb}\\u{aaaa}'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\uz'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u1'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u123'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u{2764z'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u{276g}'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u00000000'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u01000000'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u9999999'\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '😭😂😘'\n | ^\n |\n = HELP TODO" diff --git a/tests/expectations/parser/parser/expression/literal/group_fail.leo.out b/tests/expectations/parser/parser/expression/literal/group_fail.leo.out index 52fed9d204..1a3f3b5fc3 100644 --- a/tests/expectations/parser/parser/expression/literal/group_fail.leo.out +++ b/tests/expectations/parser/parser/expression/literal/group_fail.leo.out @@ -2,12 +2,12 @@ namespace: ParseExpression expectation: Fail outputs: - - "[EPAR0375009]: unexpected string: expected 'expression', got 'group'\n --> test:1:1\n |\n 1 | group\n | ^^^^^\n |\n" + - "[EPAR0375009]: unexpected string: expected 'expression', got 'group'\n --> test:1:1\n |\n 1 | group\n | ^^^^^" - "did not consume all input: 'group' @ 1:3-8\n" - "did not consume all input: 'group' @ 1:6-11\n" - - "[EPAR0375009]: unexpected string: expected 'expression', got ','\n --> test:1:2\n |\n 1 | (,)group\n | ^\n |\n" - - "[EPAR0375009]: unexpected string: expected 'expression', got '+'\n --> test:1:2\n |\n 1 | (+, -,)group\n | ^\n |\n" - - "[EPAR0375009]: unexpected string: expected 'expression', got ','\n --> test:1:2\n |\n 1 | (,+, -)group\n | ^\n |\n" + - "[EPAR0375009]: unexpected string: expected 'expression', got ','\n --> test:1:2\n |\n 1 | (,)group\n | ^" + - "[EPAR0375009]: unexpected string: expected 'expression', got '+'\n --> test:1:2\n |\n 1 | (+, -,)group\n | ^" + - "[EPAR0375009]: unexpected string: expected 'expression', got ','\n --> test:1:2\n |\n 1 | (,+, -)group\n | ^" - "did not consume all input: 'group' @ 1:6-11\n" - "did not consume all input: 'group' @ 1:12-17\n" - "did not consume all input: 'group' @ 1:15-20\n" diff --git a/tests/expectations/parser/parser/expression/literal/string_fail.leo.out b/tests/expectations/parser/parser/expression/literal/string_fail.leo.out index bd516b65ee..d539ecc86d 100644 --- a/tests/expectations/parser/parser/expression/literal/string_fail.leo.out +++ b/tests/expectations/parser/parser/expression/literal/string_fail.leo.out @@ -2,10 +2,10 @@ namespace: Token expectation: Fail outputs: - - "[EPAR0375000]: \"\n --> test:1:1\n |\n 1 | \"Hello world!\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: \"\n --> test:1:1\n |\n 1 | \"\\\"\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: \"\n --> test:1:1\n |\n 1 | \"\\l\"\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: \"\n --> test:1:1\n |\n 1 | \"\\uaaa\"\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: \"\n --> test:1:1\n |\n 1 | \"\\u\"\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: \"\n --> test:1:1\n |\n 1 | \"\\xFF\"\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: \"\n --> test:1:1\n |\n 1 | \"\\x\"\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: \"\n --> test:1:1\n |\n 1 | \"Hello world!\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: \"\n --> test:1:1\n |\n 1 | \"\\\"\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: \"\n --> test:1:1\n |\n 1 | \"\\l\"\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: \"\n --> test:1:1\n |\n 1 | \"\\uaaa\"\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: \"\n --> test:1:1\n |\n 1 | \"\\u\"\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: \"\n --> test:1:1\n |\n 1 | \"\\xFF\"\n | ^\n |\n = HELP TODO" + - "[EPAR0375000]: \"\n --> test:1:1\n |\n 1 | \"\\x\"\n | ^\n |\n = HELP TODO" diff --git a/tests/expectations/parser/parser/functions/annotated_fail.leo.out b/tests/expectations/parser/parser/functions/annotated_fail.leo.out index 7cb5df0e2d..6d5c9045cc 100644 --- a/tests/expectations/parser/parser/functions/annotated_fail.leo.out +++ b/tests/expectations/parser/parser/functions/annotated_fail.leo.out @@ -2,4 +2,4 @@ namespace: Parse expectation: Fail outputs: - - "[EPAR0375005]: expected 'identifier', 'number' -- got ')'\n --> test:3:12\n |\n 3 | @test(test,)\n | ^\n |\n" + - "[EPAR0375005]: expected 'identifier', 'number' -- got ')'\n --> test:3:12\n |\n 3 | @test(test,)\n | ^" diff --git a/tests/expectations/parser/parser/functions/const_input_fail.leo.out b/tests/expectations/parser/parser/functions/const_input_fail.leo.out index 2d40fcbd53..68fe07f5dc 100644 --- a/tests/expectations/parser/parser/functions/const_input_fail.leo.out +++ b/tests/expectations/parser/parser/functions/const_input_fail.leo.out @@ -2,4 +2,4 @@ namespace: Parse expectation: Fail outputs: - - "[EPAR0375009]: unexpected string: expected 'ident', got 'input'\n --> test:3:18\n |\n 3 | function x(const input) {\n | ^^^^^\n |\n" + - "[EPAR0375009]: unexpected string: expected 'ident', got 'input'\n --> test:3:18\n |\n 3 | function x(const input) {\n | ^^^^^" diff --git a/tests/expectations/parser/parser/import/import_empty_list_fail.leo.out b/tests/expectations/parser/parser/import/import_empty_list_fail.leo.out index 1ee031881f..dd9ee350f9 100644 --- a/tests/expectations/parser/parser/import/import_empty_list_fail.leo.out +++ b/tests/expectations/parser/parser/import/import_empty_list_fail.leo.out @@ -2,4 +2,4 @@ namespace: Parse expectation: Fail outputs: - - "[EPAR0375002]: Cannot import empty list\n --> test:3:8\n |\n 3 | import a.();\n | ^\n |\n" + - "[EPAR0375002]: Cannot import empty list\n --> test:3:8\n |\n 3 | import a.();\n | ^" diff --git a/tests/expectations/parser/parser/import/invalid.leo.out b/tests/expectations/parser/parser/import/invalid.leo.out index bcd90f3474..6dbb36e91b 100644 --- a/tests/expectations/parser/parser/import/invalid.leo.out +++ b/tests/expectations/parser/parser/import/invalid.leo.out @@ -2,4 +2,4 @@ namespace: Parse expectation: Fail outputs: - - "[EPAR0375005]: expected . -- got ';'\n --> test:3:18\n |\n 3 | import foo as bar;\n | ^\n |\n" + - "[EPAR0375005]: expected . -- got ';'\n --> test:3:18\n |\n 3 | import foo as bar;\n | ^" diff --git a/tests/expectations/parser/parser/statement/conditional_fail.leo.out b/tests/expectations/parser/parser/statement/conditional_fail.leo.out index e3b90f2821..e0e265d83d 100644 --- a/tests/expectations/parser/parser/statement/conditional_fail.leo.out +++ b/tests/expectations/parser/parser/statement/conditional_fail.leo.out @@ -2,4 +2,4 @@ namespace: ParseStatement expectation: Fail outputs: - - "[EPAR0375008]: unexpected statement: expected 'Block or Conditional', got 'let mut x = 2;'\n --> test:1:17\n |\n 1 | if true {} else let x = 2;\n | ^^^^^^^^^\n |\n" + - "[EPAR0375008]: unexpected statement: expected 'Block or Conditional', got 'let mut x = 2;'\n --> test:1:17\n |\n 1 | if true {} else let x = 2;\n | ^^^^^^^^^" diff --git a/tests/expectations/parser/parser/statement/definition_fail.leo.out b/tests/expectations/parser/parser/statement/definition_fail.leo.out index 0e0d87112c..413d1e3c72 100644 --- a/tests/expectations/parser/parser/statement/definition_fail.leo.out +++ b/tests/expectations/parser/parser/statement/definition_fail.leo.out @@ -2,26 +2,26 @@ namespace: ParseStatement expectation: Fail outputs: - - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x = expr;\n | ^^^^^^^\n |\n" - - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x = ();\n | ^^^^^^^\n |\n" - - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x = x+y;\n | ^^^^^^^\n |\n" - - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x = (x,y);\n | ^^^^^^^\n |\n" - - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x = x();\n | ^^^^^^^\n |\n" - - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x = expr;\n | ^^^^^^^^^\n |\n" - - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x = ();\n | ^^^^^^^^^\n |\n" - - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x = x+y;\n | ^^^^^^^^^\n |\n" - - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x = (x,y);\n | ^^^^^^^^^\n |\n" - - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x = x();\n | ^^^^^^^^^\n |\n" - - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x: u32 = expr;\n | ^^^^^^^\n |\n" - - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x: u32 = ();\n | ^^^^^^^\n |\n" - - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x: u32 = x+y;\n | ^^^^^^^\n |\n" - - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x: u32 = (x,y);\n | ^^^^^^^\n |\n" - - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x: u32 = x();\n | ^^^^^^^\n |\n" - - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x: u32 = expr;\n | ^^^^^^^^^\n |\n" - - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x: u32 = ();\n | ^^^^^^^^^\n |\n" - - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x: u32 = x+y;\n | ^^^^^^^^^\n |\n" - - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x: u32 = (x,y);\n | ^^^^^^^^^\n |\n" - - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x: u32 = x();\n | ^^^^^^^^^\n |\n" - - "[EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:10\n |\n 1 | let (x,y,,) = ();\n | ^\n |\n" - - "[EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:6\n |\n 1 | let (,x,y) = ();\n | ^\n |\n" - - "[EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:8\n |\n 1 | let (x,,y) = ();\n | ^\n |\n" + - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x = expr;\n | ^^^^^^^" + - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x = ();\n | ^^^^^^^" + - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x = x+y;\n | ^^^^^^^" + - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x = (x,y);\n | ^^^^^^^" + - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x = x();\n | ^^^^^^^" + - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x = expr;\n | ^^^^^^^^^" + - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x = ();\n | ^^^^^^^^^" + - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x = x+y;\n | ^^^^^^^^^" + - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x = (x,y);\n | ^^^^^^^^^" + - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x = x();\n | ^^^^^^^^^" + - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x: u32 = expr;\n | ^^^^^^^" + - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x: u32 = ();\n | ^^^^^^^" + - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x: u32 = x+y;\n | ^^^^^^^" + - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x: u32 = (x,y);\n | ^^^^^^^" + - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x: u32 = x();\n | ^^^^^^^" + - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x: u32 = expr;\n | ^^^^^^^^^" + - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x: u32 = ();\n | ^^^^^^^^^" + - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x: u32 = x+y;\n | ^^^^^^^^^" + - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x: u32 = (x,y);\n | ^^^^^^^^^" + - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x: u32 = x();\n | ^^^^^^^^^" + - "[EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:10\n |\n 1 | let (x,y,,) = ();\n | ^" + - "[EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:6\n |\n 1 | let (,x,y) = ();\n | ^" + - "[EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:8\n |\n 1 | let (x,,y) = ();\n | ^" diff --git a/tests/expectations/parser/parser/statement/return_fail.leo.out b/tests/expectations/parser/parser/statement/return_fail.leo.out index 5577d4150b..c1212369a9 100644 --- a/tests/expectations/parser/parser/statement/return_fail.leo.out +++ b/tests/expectations/parser/parser/statement/return_fail.leo.out @@ -2,6 +2,6 @@ namespace: ParseStatement expectation: Fail outputs: - - "[EPAR0375003]: unexpected EOF\n --> test:1:1\n |\n 1 | return\n | ^^^^^^\n |\n" - - "[EPAR0375003]: unexpected EOF\n --> test:1:8\n |\n 1 | return 5\n | ^\n |\n" - - "[EPAR0375009]: unexpected string: expected 'expression', got 'if'\n --> test:2:1\n |\n 2 | if x {}\n | ^^\n |\n" + - "[EPAR0375003]: unexpected EOF\n --> test:1:1\n |\n 1 | return\n | ^^^^^^" + - "[EPAR0375003]: unexpected EOF\n --> test:1:8\n |\n 1 | return 5\n | ^" + - "[EPAR0375009]: unexpected string: expected 'expression', got 'if'\n --> test:2:1\n |\n 2 | if x {}\n | ^^" From 62b26ad70591ec2cac13f0f9eb63d7e1a3e5fced Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Tue, 10 Aug 2021 23:37:00 -0700 Subject: [PATCH 19/58] fix clippy warning on not windows --- errors/ERROR_INDEX.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/errors/ERROR_INDEX.md b/errors/ERROR_INDEX.md index fff83fed56..c8f08dd654 100644 --- a/errors/ERROR_INDEX.md +++ b/errors/ERROR_INDEX.md @@ -14,4 +14,4 @@ ## State Errors: Error Code Range 376_000 - 376_999 -## CLI Errors: Error Code Range 377_000 - 377_999 \ No newline at end of file +## CLI Errors: Error Code Range 377_000 - 377_999 From 7d7671f126d3d103ae73e0068dcf1efa3e6de758 Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Tue, 10 Aug 2021 23:44:18 -0700 Subject: [PATCH 20/58] fix clippy warning on not windows --- leo/logger.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/leo/logger.rs b/leo/logger.rs index 0cb89fa3b6..c359c91f48 100644 --- a/leo/logger.rs +++ b/leo/logger.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use leo_errors::{CliError, Result}; +use leo_errors::Result; use std::{fmt, sync::Once}; @@ -214,7 +214,7 @@ where pub fn init_logger(_app_name: &'static str, verbosity: usize) -> Result<()> { // This line enables Windows 10 ANSI coloring API. #[cfg(target_family = "windows")] - ansi_term::enable_ansi_support().map_err(|_| CliError::failed_to_enable_ansi_support())?; + ansi_term::enable_ansi_support().map_err(|_| leo_errors::CliError::failed_to_enable_ansi_support())?; use tracing_subscriber::fmt::writer::MakeWriterExt; From 5ab562386a61037a32e3c8f3b8a107b25ca623de Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Tue, 10 Aug 2021 23:54:24 -0700 Subject: [PATCH 21/58] my only guess is caching is messing up code coverage --- .github/workflows/ci.yml | 44 +--------------------------------------- 1 file changed, 1 insertion(+), 43 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5cae3dcd80..78d031963b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -249,18 +249,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v1 - - - name: Install sccache Ubuntu - env: - LINK: https://github.com/mozilla/sccache/releases/download - SCCACHE_VERSION: v0.2.15 - run: | - SCCACHE_FILE=sccache-$SCCACHE_VERSION-x86_64-unknown-linux-musl - mkdir -p $HOME/.local/bin - curl -L "$LINK/$SCCACHE_VERSION/$SCCACHE_FILE.tar.gz" | tar xz - mv -f $SCCACHE_FILE/sccache $HOME/.local/bin/sccache - chmod +x $HOME/.local/bin/sccache - echo "$HOME/.local/bin" >> $GITHUB_PATH - name: Install Rust uses: actions-rs/toolchain@v1 @@ -270,30 +258,6 @@ jobs: override: true components: rustfmt - - name: Cache cargo registry - uses: actions/cache@v2 - continue-on-error: false - with: - path: | - ~/.cargo/registry - ~/.cargo/git - key: codecov-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - codecov-cargo- - - - name: Save sccache - uses: actions/cache@v2 - continue-on-error: false - with: - path: /Users/runner/Library/Caches/Mozilla.sccache - key: codecov-sccache-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - codecov-sccache- - - - name: Start sccache server - run: | - sccache --start-server - - name: Test uses: actions-rs/cargo@v1 with: @@ -323,10 +287,4 @@ jobs: uses: codecov/codecov-action@v1 with: github-token: ${{ secrets.GITHUB_TOKEN }} - token: ${{ secrets.CODECOV_TOKEN }} - - - name: Print sccache stats - run: sccache --show-stats - - - name: Stop sccache server - run: sccache --stop-server || true + token: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file From a17b0ee888d08dc6f48960f9b84eea3f493e5e3b Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Tue, 10 Aug 2021 23:57:19 -0700 Subject: [PATCH 22/58] typo fix --- .github/workflows/ci.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 78d031963b..7dc2e0a622 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -243,9 +243,6 @@ jobs: runs-on: ubuntu-latest env: RUSTC_BOOTSTRAP: 1 - RUSTC_WRAPPER: sccache - SCCACHE_CACHE_SIZE: 2G - SCCACHE_DIR: /home/runner/.cache/sccache steps: - name: Checkout uses: actions/checkout@v1 From 93d2871332c244c308f3a183fc4478845b60d1a0 Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Wed, 11 Aug 2021 00:09:22 -0700 Subject: [PATCH 23/58] wasn't a caching issue, I'm not sure --- .github/workflows/ci.yml | 55 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7dc2e0a622..f3dd8d8af2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -220,6 +220,14 @@ jobs: profile: minimal toolchain: stable override: true + + - name: Save sccache + uses: actions/cache@v2 + continue-on-error: false + with: + path: /home/runner/.cache/sccache + key: ubuntu-sccache-${{ hashFiles('**/Cargo.lock') }} + restore-keys: ubuntu-sccache- - name: Start sccache server run: sccache --start-server @@ -243,9 +251,24 @@ jobs: runs-on: ubuntu-latest env: RUSTC_BOOTSTRAP: 1 + RUSTC_WRAPPER: sccache + SCCACHE_CACHE_SIZE: 2G + SCCACHE_DIR: /home/runner/.cache/sccache steps: - name: Checkout uses: actions/checkout@v1 + + - name: Install sccache Ubuntu + env: + LINK: https://github.com/mozilla/sccache/releases/download + SCCACHE_VERSION: v0.2.15 + run: | + SCCACHE_FILE=sccache-$SCCACHE_VERSION-x86_64-unknown-linux-musl + mkdir -p $HOME/.local/bin + curl -L "$LINK/$SCCACHE_VERSION/$SCCACHE_FILE.tar.gz" | tar xz + mv -f $SCCACHE_FILE/sccache $HOME/.local/bin/sccache + chmod +x $HOME/.local/bin/sccache + echo "$HOME/.local/bin" >> $GITHUB_PATH - name: Install Rust uses: actions-rs/toolchain@v1 @@ -255,6 +278,30 @@ jobs: override: true components: rustfmt + - name: Cache cargo registry + uses: actions/cache@v2 + continue-on-error: false + with: + path: | + ~/.cargo/registry + ~/.cargo/git + key: codecov-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + codecov-cargo- + + - name: Save sccache + uses: actions/cache@v2 + continue-on-error: false + with: + path: /Users/runner/Library/Caches/Mozilla.sccache + key: codecov-sccache-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + codecov-sccache- + + - name: Start sccache server + run: | + sccache --start-server + - name: Test uses: actions-rs/cargo@v1 with: @@ -284,4 +331,10 @@ jobs: uses: codecov/codecov-action@v1 with: github-token: ${{ secrets.GITHUB_TOKEN }} - token: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file + token: ${{ secrets.CODECOV_TOKEN }} + + - name: Print sccache stats + run: sccache --show-stats + + - name: Stop sccache server + run: sccache --stop-server || true From ad5591d6fe99cd688af7092f8ebdd8d0c066034d Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Wed, 11 Aug 2021 00:18:27 -0700 Subject: [PATCH 24/58] disable including readmes in crates documetnation while circleci doesn't support 1.54 --- asg-passes/src/lib.rs | 3 ++- asg/src/lib.rs | 3 ++- ast/src/lib.rs | 3 ++- compiler/src/lib.rs | 3 +++ errors/src/lib.rs | 5 ++++- imports/src/lib.rs | 3 ++- input/src/lib.rs | 3 ++- leo/lib.rs | 3 ++- package/src/lib.rs | 3 ++- parser/src/lib.rs | 3 ++- state/src/lib.rs | 3 ++- synthesizer/src/lib.rs | 3 ++- test-framework/src/lib.rs | 3 ++- 13 files changed, 29 insertions(+), 12 deletions(-) diff --git a/asg-passes/src/lib.rs b/asg-passes/src/lib.rs index 1904bf782d..4703e4242e 100644 --- a/asg-passes/src/lib.rs +++ b/asg-passes/src/lib.rs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -#![doc = include_str!("../README.md")] +// Re-enable when circleci supports rust 1.54.0. +// #![doc = include_str!("../README.md")] pub mod constant_folding; pub use constant_folding::*; diff --git a/asg/src/lib.rs b/asg/src/lib.rs index ecb5702ab6..ad8ca9f304 100644 --- a/asg/src/lib.rs +++ b/asg/src/lib.rs @@ -24,7 +24,8 @@ #![allow(clippy::from_over_into)] #![allow(clippy::result_unit_err)] -#![doc = include_str!("../README.md")] +// Re-enable when circleci supports rust 1.54.0. +// #![doc = include_str!("../README.md")] pub mod checks; pub use checks::*; diff --git a/ast/src/lib.rs b/ast/src/lib.rs index 58a45a6677..d1367a89b8 100644 --- a/ast/src/lib.rs +++ b/ast/src/lib.rs @@ -20,7 +20,8 @@ //! The [`Ast`] type is intended to be parsed and modified by different passes //! of the Leo compiler. The Leo compiler can generate a set of R1CS constraints from any [`Ast`]. -#![doc = include_str!("../README.md")] +// Re-enable when circleci supports rust 1.54.0. +// #![doc = include_str!("../README.md")] pub mod annotation; pub use self::annotation::*; diff --git a/compiler/src/lib.rs b/compiler/src/lib.rs index a99bb5cc07..e96d936a19 100644 --- a/compiler/src/lib.rs +++ b/compiler/src/lib.rs @@ -21,6 +21,9 @@ #![allow(clippy::module_inception)] #![allow(clippy::upper_case_acronyms)] +// Re-enable when circleci supports rust 1.54.0. +// #![doc = include_str!("../README.md")] + pub mod compiler; pub mod console; diff --git a/errors/src/lib.rs b/errors/src/lib.rs index 27dc6be2c2..bb78eb0289 100644 --- a/errors/src/lib.rs +++ b/errors/src/lib.rs @@ -15,7 +15,10 @@ // along with the Leo library. If not, see . #![deny(clippy::all, clippy::missing_docs_in_private_items)] -#![doc = include_str!("../README.md")] +// Re-enable when circleci supports rust 1.54.0. +// #![doc = include_str!("../README.md")] + +//! `leo-errors` crate. /// Contains the ASG error definitions. pub mod asg; diff --git a/imports/src/lib.rs b/imports/src/lib.rs index cc7e046520..f575b7fa91 100644 --- a/imports/src/lib.rs +++ b/imports/src/lib.rs @@ -15,7 +15,8 @@ // along with the Leo library. If not, see . #![allow(clippy::from_over_into)] -#![doc = include_str!("../README.md")] +// Re-enable when circleci supports rust 1.54.0. +// #![doc = include_str!("../README.md")] pub mod parser; pub use self::parser::*; diff --git a/input/src/lib.rs b/input/src/lib.rs index 1b73fdb778..75a8a45ab8 100644 --- a/input/src/lib.rs +++ b/input/src/lib.rs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -#![doc = include_str!("../README.md")] +// Re-enable when circleci supports rust 1.54.0. +// #![doc = include_str!("../README.md")] #[macro_use] extern crate pest_derive; diff --git a/leo/lib.rs b/leo/lib.rs index 6c0c3470b2..3a730c0f4e 100644 --- a/leo/lib.rs +++ b/leo/lib.rs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -#![doc = include_str!("../README.md")] +// Re-enable when circleci supports rust 1.54.0. +// #![doc = include_str!("../README.md")] pub mod api; pub mod commands; diff --git a/package/src/lib.rs b/package/src/lib.rs index aa8a7f082a..4353e74b31 100644 --- a/package/src/lib.rs +++ b/package/src/lib.rs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -#![doc = include_str!("../README.md")] +// Re-enable when circleci supports rust 1.54.0. +// #![doc = include_str!("../README.md")] pub mod imports; pub mod inputs; diff --git a/parser/src/lib.rs b/parser/src/lib.rs index 7b1a0d83aa..88e23bb1b8 100644 --- a/parser/src/lib.rs +++ b/parser/src/lib.rs @@ -20,7 +20,8 @@ //! method to create a new program ast. #![allow(clippy::vec_init_then_push)] -#![doc = include_str!("../README.md")] +// Re-enable when circleci supports rust 1.54.0. +// #![doc = include_str!("../README.md")] pub(crate) mod tokenizer; pub use tokenizer::KEYWORD_TOKENS; diff --git a/state/src/lib.rs b/state/src/lib.rs index 88531a4873..6778312f1d 100644 --- a/state/src/lib.rs +++ b/state/src/lib.rs @@ -16,7 +16,8 @@ #![allow(clippy::module_inception)] #![allow(clippy::upper_case_acronyms)] -#![doc = include_str!("../README.md")] +// Re-enable when circleci supports rust 1.54.0. +// #![doc = include_str!("../README.md")] pub mod local_data_commitment; pub use self::local_data_commitment::*; diff --git a/synthesizer/src/lib.rs b/synthesizer/src/lib.rs index 36396dd78e..542e05f6c3 100644 --- a/synthesizer/src/lib.rs +++ b/synthesizer/src/lib.rs @@ -14,7 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -#![doc = include_str!("../README.md")] +// Re-enable when circleci supports rust 1.54.0. +// #![doc = include_str!("../README.md")] pub mod circuit_synthesizer; pub use self::circuit_synthesizer::*; diff --git a/test-framework/src/lib.rs b/test-framework/src/lib.rs index 86115089ca..aa000235be 100644 --- a/test-framework/src/lib.rs +++ b/test-framework/src/lib.rs @@ -22,7 +22,8 @@ //! To regenerate the tests after a syntax change or failing test, delete the [`tests/expectations/`] //! directory and run the [`parser_tests()`] test in [`parser/src/test.rs`]. -#![doc = include_str!("../README.md")] +// Re-enable when circleci supports rust 1.54.0. +// #![doc = include_str!("../README.md")] pub mod error; From faa9054e885b9f453cc272a74c1351c5f483a014 Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Thu, 12 Aug 2021 00:34:21 -0700 Subject: [PATCH 25/58] add Error: word to start of formatted --- errors/src/common/formatted.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/errors/src/common/formatted.rs b/errors/src/common/formatted.rs index 5f4c677477..6d4f2f8abe 100644 --- a/errors/src/common/formatted.rs +++ b/errors/src/common/formatted.rs @@ -96,7 +96,7 @@ impl fmt::Display for FormattedError { let underlined = underline(self.span.col_start, self.span.col_stop); let error_message = format!( - "[E{error_type}{code_identifier:0>3}{exit_code:0>4}]: {message}", + "Error: [E{error_type}{code_identifier:0>3}{exit_code:0>4}]: {message}", error_type = self.backtrace.error_type, code_identifier = self.backtrace.code_identifier, exit_code = self.backtrace.exit_code, From fe3de3900e6ba5d0ae9886bcd24ff2ff7e25835f Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Thu, 12 Aug 2021 01:30:24 -0700 Subject: [PATCH 26/58] add rfc for primtive types as circuits --- docs/rfc/009-primitive-type-circuits.md | 64 +++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 docs/rfc/009-primitive-type-circuits.md diff --git a/docs/rfc/009-primitive-type-circuits.md b/docs/rfc/009-primitive-type-circuits.md new file mode 100644 index 0000000000..7d2e461b2d --- /dev/null +++ b/docs/rfc/009-primitive-type-circuits.md @@ -0,0 +1,64 @@ +# Leo RFC 001: Initial String Support + +## Authors + +- Max Bruce +- Collin Chin +- Alessandro Coglio +- Eric McCarthy +- Jon Pavlik +- Damir Shamanaev +- Damon Sicore +- Howard Wu + +## Status + +DRAFT + +## Summary + +This RFC proposes that the primitive types in Leo (integers, fields, etc.) are treated as circuits. The actual type primitives would still exist within the compiler and language. However, whenever a type primitive is encountered, it would be treated as a circuit(similar to Java types being objects). Note that this would not affect circuit synthesis. + +## Motivation + +Several languages have their types represented by an object within the language itself. This approach allows for a clean interface to provide built-in methods or static members for these basic types. + +## Design + +### Semantics + +Leo already has support for circuits. As such, the change would occur mainly during the parsing stage. However, we would still validate the parsing of literals/tuple-expressions/array-expressions the same way; the resulting type would just be a circuit. When we encounter either implicit types or an explicitly typed system, they would be parsed as a circuit. + +We could implement the circuits internally as follows: + +```ts +circuit U8 { + data: u8 +} +``` + +As for AST clarity's sake, these circuits should still be written to the AST the same way as the current primitives are. + +It would benefit us to store these circuits in a separate list of circuits on the AST that are pre-defined. + +All current operations on these circuits representing the basic functions should still work. These operations can easily be implemented by just leveraging the actual type primitive stored within the circuit. + +Now methods and static members would be first-class citizens of the circuits treated similarly to current operations like existing primitive operators. For example, in the following: + +```ts +let x = 1u8.to_bits(); +``` + +the method call would be treated as a gadget call. This implementation would save us implementing Leo methods the same way as blake2s currently is. + +## Drawbacks + +This change adds more complexity to the language. + +## Effect on Ecosystem + +None. All currently valid Leo programs would still be valid after this proposal. + +## Alternatives + +For implementing built-in operators, we could also allow operator overloading and then have a default overloaded method on these circuits. From f0de65835c0e4910edd11ed18a5cd5383dbcf029 Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Thu, 12 Aug 2021 02:15:12 -0700 Subject: [PATCH 27/58] regen tests, debug out a import test --- compiler/src/test.rs | 8 +++ .../array/array_range_access_fail.leo.out | 2 +- .../array/array_size_zero_fail.leo.out | 2 +- .../array/input_nested_3x2_fail.leo.out | 2 +- .../array/multi_fail_initializer.leo.out | 2 +- .../compiler/array/multi_fail_inline.leo.out | 2 +- .../array/multi_initializer_fail.leo.out | 2 +- .../array/nested_3x2_value_fail.leo.out | 2 +- .../array/tuple_3x2_value_fail.leo.out | 2 +- .../compiler/compiler/array/type_fail.leo.out | 2 +- .../type_nested_value_nested_3x2_fail.leo.out | 2 +- ...ype_nested_value_nested_4x3x2_fail.leo.out | 2 +- .../type_nested_value_tuple_3x2_fail.leo.out | 2 +- ...type_nested_value_tuple_4x3x2_fail.leo.out | 2 +- .../type_tuple_value_nested_3x2_fail.leo.out | 2 +- ...type_tuple_value_nested_4x3x2_fail.leo.out | 2 +- .../type_tuple_value_tuple_3x2_fail.leo.out | 2 +- .../type_tuple_value_tuple_4x3x2_fail.leo.out | 2 +- .../array/variable_slice_fail.leo.out | 2 +- .../compiler/char/invalid_char.leo.out | 2 +- .../big_self_outside_circuit_fail.leo.out | 2 +- .../circuits/const_self_variable_fail.leo.out | 2 +- .../compiler/circuits/inline_fail.leo.out | 2 +- .../circuits/inline_member_fail.leo.out | 2 +- .../circuits/inline_undefined.leo.out | 2 +- .../circuits/member_function_fail.leo.out | 2 +- .../circuits/member_function_invalid.leo.out | 2 +- .../member_static_function_invalid.leo.out | 2 +- .../member_static_function_undefined.leo.out | 2 +- .../circuits/member_variable_fail.leo.out | 2 +- .../circuits/mut_function_fail.leo.out | 2 +- .../circuits/mut_self_function_fail.leo.out | 2 +- .../mut_self_static_function_fail.leo.out | 2 +- .../circuits/mut_self_variable_fail.leo.out | 2 +- .../circuits/mut_static_function_fail.leo.out | 2 +- .../circuits/mut_variable_fail.leo.out | 2 +- .../compiler/circuits/self_circuit.leo.out | 2 +- .../compiler/circuits/self_fail.leo.out | 2 +- .../circuits/self_member_invalid.leo.out | 2 +- .../circuits/self_member_undefined.leo.out | 2 +- .../compiler/console/log_fail.leo.out | 2 +- .../console/log_parameter_fail_empty.leo.out | 2 +- .../console/log_parameter_fail_none.leo.out | 2 +- .../log_parameter_fail_unknown.leo.out | 2 +- .../core/core_circuit_invalid.leo.out | 2 +- .../core/core_circuit_star_fail.leo.out | 2 +- .../core/core_package_invalid.leo.out | 2 +- .../core_unstable_package_invalid.leo.out | 2 +- .../field/no_space_between_literal.leo.out | 2 +- .../duplicate_definition_fail.leo.out | 2 +- .../function/multiple_returns_fail.leo.out | 2 +- .../multiple_returns_fail_conditional.leo.out | 2 +- .../function/return_array_nested_fail.leo.out | 2 +- .../function/return_array_tuple_fail.leo.out | 2 +- .../compiler/function/scope_fail.leo.out | 2 +- .../compiler/function/undefined.leo.out | 2 +- .../global_consts/modify_global_const.leo.out | 2 +- .../const_input_non_const.leo.out | 2 +- .../const_var_in_both_sections_fail.leo.out | 2 +- .../program_input/main_array_fail.leo.out | 2 +- .../program_input/main_tuple_fail.leo.out | 2 +- .../non_const_input_const.leo.out | 2 +- .../var_in_both_sections_fail.leo.out | 2 +- .../main_array_fail.leo.out | 2 +- .../main_tuple_fail.leo.out | 2 +- .../program_registers/registers_fail.leo.out | 2 +- .../compiler/integers/i128/max_fail.leo.out | 2 +- .../compiler/integers/i128/min_fail.leo.out | 2 +- .../i128/no_space_between_literal.leo.out | 2 +- .../compiler/integers/i16/max_fail.leo.out | 2 +- .../compiler/integers/i16/min_fail.leo.out | 2 +- .../i16/no_space_between_literal.leo.out | 2 +- .../compiler/integers/i32/max_fail.leo.out | 2 +- .../compiler/integers/i32/min_fail.leo.out | 2 +- .../i32/no_space_between_literal.leo.out | 2 +- .../compiler/integers/i64/max_fail.leo.out | 2 +- .../compiler/integers/i64/min_fail.leo.out | 2 +- .../i64/no_space_between_literal.leo.out | 2 +- .../compiler/integers/i8/max_fail.leo.out | 2 +- .../compiler/integers/i8/min_fail.leo.out | 2 +- .../compiler/integers/i8/negate_min.leo.out | 2 +- .../i8/no_space_between_literal.leo.out | 2 +- .../compiler/integers/u128/max_fail.leo.out | 2 +- .../compiler/integers/u128/min_fail.leo.out | 2 +- .../integers/u128/negative_input_fail.leo.out | 2 +- .../u128/no_space_between_literal.leo.out | 2 +- .../compiler/integers/u16/max_fail.leo.out | 2 +- .../compiler/integers/u16/min_fail.leo.out | 2 +- .../integers/u16/negative_input_fail.leo.out | 2 +- .../u16/no_space_between_literal.leo.out | 2 +- .../compiler/integers/u32/max_fail.leo.out | 2 +- .../compiler/integers/u32/min_fail.leo.out | 2 +- .../integers/u32/negative_input_fail.leo.out | 2 +- .../u32/no_space_between_literal.leo.out | 2 +- .../compiler/integers/u64/max_fail.leo.out | 2 +- .../compiler/integers/u64/min_fail.leo.out | 2 +- .../integers/u64/negative_input_fail.leo.out | 2 +- .../u64/no_space_between_literal.leo.out | 2 +- .../compiler/integers/u8/max_fail.leo.out | 2 +- .../compiler/integers/u8/min_fail.leo.out | 2 +- .../integers/u8/negative_input_fail.leo.out | 2 +- .../u8/no_space_between_literal.leo.out | 2 +- .../compiler/mutability/array_fail.leo.out | 2 +- .../compiler/mutability/circuit_fail.leo.out | 2 +- .../mutability/circuit_function_const.leo.out | 2 +- .../circuit_static_function_mut_fail.leo.out | 2 +- .../compiler/mutability/const.leo.out | 2 +- .../mutability/function_input.leo.out | 2 +- .../compiler/mutability/let_fail.leo.out | 2 +- .../statements/assign_ternary.leo.out | 2 +- .../statements/duplicate_variable.leo.out | 2 +- .../statements/ternary_non_const_fail.leo.out | 2 +- .../parser/circuits/fields_fail.leo.out | 2 +- .../parser/expression/array_init_fail.leo.out | 4 +- .../expression/array_inline_fail.leo.out | 10 +-- .../expression/circuit_init_fail.leo.out | 22 +++--- .../expression/literal/address_fail.leo.out | 18 ++--- .../expression/literal/char_fail.leo.out | 70 +++++++++---------- .../expression/literal/group_fail.leo.out | 8 +-- .../expression/literal/string_fail.leo.out | 14 ++-- .../parser/functions/annotated_fail.leo.out | 2 +- .../parser/functions/const_input_fail.leo.out | 2 +- .../import/import_empty_list_fail.leo.out | 2 +- .../parser/parser/import/invalid.leo.out | 2 +- .../parser/statement/conditional_fail.leo.out | 2 +- .../parser/statement/definition_fail.leo.out | 46 ++++++------ .../parser/statement/return_fail.leo.out | 6 +- 127 files changed, 224 insertions(+), 216 deletions(-) diff --git a/compiler/src/test.rs b/compiler/src/test.rs index 244fa58961..61e411393f 100644 --- a/compiler/src/test.rs +++ b/compiler/src/test.rs @@ -226,6 +226,14 @@ impl Namespace for CompileNamespace { .unwrap_or_else(|_| "Error converting ast to string.".to_string()), ); + if test.name == "import_weird_names_nested" { + println!( + "{:?}", + Ast::from_json_file("/tmp/output/initial_ast.json".into()) + .unwrap_or_else(|_| Ast::new(Program::new("Error reading initial theorem.".to_string()))) + ); + } + if std::fs::read_dir("/tmp/output").is_ok() { std::fs::remove_dir_all(std::path::Path::new("/tmp/output")).expect("Error failed to clean up output dir."); } diff --git a/tests/expectations/compiler/compiler/array/array_range_access_fail.leo.out b/tests/expectations/compiler/compiler/array/array_range_access_fail.leo.out index f7419ed6be..5961919c76 100644 --- a/tests/expectations/compiler/compiler/array/array_range_access_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/array_range_access_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370020]: array index out of bounds: '0'\n --> compiler-test:7:24\n |\n 7 | const z: [u8; 2] = y[..1u32][..x];\n | ^^^^^^^^^^^^^^" + - "Error: [EASG0370020]: array index out of bounds: '0'\n --> compiler-test:7:24\n |\n 7 | const z: [u8; 2] = y[..1u32][..x];\n | ^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/array/array_size_zero_fail.leo.out b/tests/expectations/compiler/compiler/array/array_size_zero_fail.leo.out index 72b054f3c7..8b96eb47b0 100644 --- a/tests/expectations/compiler/compiler/array/array_size_zero_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/array_size_zero_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EAST0371006]: received dimension size of 0, expected it to be 1 or larger.\n --> compiler-test:4:13\n |\n 4 | let a = [true; (0)];\n | ^^^^^^^^^^^" + - "Error: [EAST0371006]: received dimension size of 0, expected it to be 1 or larger.\n --> compiler-test:4:13\n |\n 4 | let a = [true; (0)];\n | ^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/array/input_nested_3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/input_nested_3x2_fail.leo.out index ab53e76d64..ede4c5bbaf 100644 --- a/tests/expectations/compiler/compiler/array/input_nested_3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/input_nested_3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EPAR0375005]: expected ] -- got ')'\n --> compiler-test:4:29\n |\n 4 | return a == [[0u8; 2]; 3)]; // This should be written the right way as this test is for the input file.\n | ^" + - "Error: [EPAR0375005]: expected ] -- got ')'\n --> compiler-test:4:29\n |\n 4 | return a == [[0u8; 2]; 3)]; // This should be written the right way as this test is for the input file.\n | ^" diff --git a/tests/expectations/compiler/compiler/array/multi_fail_initializer.leo.out b/tests/expectations/compiler/compiler/array/multi_fail_initializer.leo.out index f116f4c7f5..1d1099918d 100644 --- a/tests/expectations/compiler/compiler/array/multi_fail_initializer.leo.out +++ b/tests/expectations/compiler/compiler/array/multi_fail_initializer.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370026]: unexpected type, expected: 'array of length 2', received: 'array of length 1'\n --> compiler-test:4:31\n |\n 4 | const arr: [u8; (2, 2)] = [[1u8; 2]; 1]; // incorrect dimensions\n | ^^^^^^^^^^^^^" + - "Error: [EASG0370026]: unexpected type, expected: 'array of length 2', received: 'array of length 1'\n --> compiler-test:4:31\n |\n 4 | const arr: [u8; (2, 2)] = [[1u8; 2]; 1]; // incorrect dimensions\n | ^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/array/multi_fail_inline.leo.out b/tests/expectations/compiler/compiler/array/multi_fail_inline.leo.out index a66bc47f9d..3579bced18 100644 --- a/tests/expectations/compiler/compiler/array/multi_fail_inline.leo.out +++ b/tests/expectations/compiler/compiler/array/multi_fail_inline.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370026]: unexpected type, expected: 'array of length 2', received: 'array of length 1'\n --> compiler-test:5:35\n |\n 5 | [1u8]]; // incorrect dimensions\n | ^^^^^" + - "Error: [EASG0370026]: unexpected type, expected: 'array of length 2', received: 'array of length 1'\n --> compiler-test:5:35\n |\n 5 | [1u8]]; // incorrect dimensions\n | ^^^^^" diff --git a/tests/expectations/compiler/compiler/array/multi_initializer_fail.leo.out b/tests/expectations/compiler/compiler/array/multi_initializer_fail.leo.out index 4f9547abea..547204826a 100644 --- a/tests/expectations/compiler/compiler/array/multi_initializer_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/multi_initializer_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370026]: unexpected type, expected: 'array of length 2', received: 'array of length 1'\n --> compiler-test:4:31\n |\n 4 | const arr: [u8; (2, 2)] = [1u8; (2, 1)]; // incorrect dimensions\n | ^^^^^^^^^^^^^" + - "Error: [EASG0370026]: unexpected type, expected: 'array of length 2', received: 'array of length 1'\n --> compiler-test:4:31\n |\n 4 | const arr: [u8; (2, 2)] = [1u8; (2, 1)]; // incorrect dimensions\n | ^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/array/nested_3x2_value_fail.leo.out b/tests/expectations/compiler/compiler/array/nested_3x2_value_fail.leo.out index c97ec4f007..61b1d5a67b 100644 --- a/tests/expectations/compiler/compiler/array/nested_3x2_value_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/nested_3x2_value_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:6:30\n |\n 6 | const a: [u32; (3, 2)] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^" + - "Error: [EASG0370026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:6:30\n |\n 6 | const a: [u32; (3, 2)] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/array/tuple_3x2_value_fail.leo.out b/tests/expectations/compiler/compiler/array/tuple_3x2_value_fail.leo.out index 1944b1fab0..7ec8d35fa4 100644 --- a/tests/expectations/compiler/compiler/array/tuple_3x2_value_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/tuple_3x2_value_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:5:30\n |\n 5 | const a: [u32; (3, 2)] = [0; (2, 3)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^" + - "Error: [EASG0370026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:5:30\n |\n 5 | const a: [u32; (3, 2)] = [0; (2, 3)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/array/type_fail.leo.out b/tests/expectations/compiler/compiler/array/type_fail.leo.out index 46a4c0a8b7..2023c8eda1 100644 --- a/tests/expectations/compiler/compiler/array/type_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EPAR0375005]: expected ( -- got '-'\n --> compiler-test:4:19\n |\n 4 | const a: [u8; -2] = [0u32; 2];\n | ^" + - "Error: [EPAR0375005]: expected ( -- got '-'\n --> compiler-test:4:19\n |\n 4 | const a: [u8; -2] = [0u32; 2];\n | ^" diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2_fail.leo.out index bdefc59a37..cb227c9e85 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:4:29\n |\n 4 | const b: [[u8; 2]; 3] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^" + - "Error: [EASG0370026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:4:29\n |\n 4 | const b: [[u8; 2]; 3] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2_fail.leo.out index 8946a3988f..3dd59694d9 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370026]: unexpected type, expected: 'array of length 4', received: 'array of length 2'\n --> compiler-test:4:34\n |\n 4 | const b: [[[u8; 2]; 3]; 4] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^^^^^^" + - "Error: [EASG0370026]: unexpected type, expected: 'array of length 4', received: 'array of length 2'\n --> compiler-test:4:34\n |\n 4 | const b: [[[u8; 2]; 3]; 4] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2_fail.leo.out index 6e922340bd..b0c5e21798 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:4:29\n |\n 4 | const b: [[u8; 2]; 3] = [0; (2, 3)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^" + - "Error: [EASG0370026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:4:29\n |\n 4 | const b: [[u8; 2]; 3] = [0; (2, 3)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2_fail.leo.out index 4e320dde46..54179727d5 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370026]: unexpected type, expected: 'array of length 4', received: 'array of length 2'\n --> compiler-test:4:34\n |\n 4 | const b: [[[u8; 2]; 3]; 4] = [0; (2, 3, 4)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^^^^" + - "Error: [EASG0370026]: unexpected type, expected: 'array of length 4', received: 'array of length 2'\n --> compiler-test:4:34\n |\n 4 | const b: [[[u8; 2]; 3]; 4] = [0; (2, 3, 4)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2_fail.leo.out index 98f1c440a0..a782c491e2 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370026]: unexpected type, expected: 'array of length 2', received: 'array of length 3'\n --> compiler-test:4:29\n |\n 4 | const b: [u8; (2, 3)] = [[0; 2]; 3]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^" + - "Error: [EASG0370026]: unexpected type, expected: 'array of length 2', received: 'array of length 3'\n --> compiler-test:4:29\n |\n 4 | const b: [u8; (2, 3)] = [[0; 2]; 3]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2_fail.leo.out index 512e196ff6..78be85a377 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370026]: unexpected type, expected: 'array of length 4', received: 'array of length 2'\n --> compiler-test:4:32\n |\n 4 | const b: [u8; (4, 3, 2)] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^^^^^^" + - "Error: [EASG0370026]: unexpected type, expected: 'array of length 4', received: 'array of length 2'\n --> compiler-test:4:32\n |\n 4 | const b: [u8; (4, 3, 2)] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2_fail.leo.out index 7236c085d8..69ea29b49f 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370026]: unexpected type, expected: 'array of length 2', received: 'array of length 3'\n --> compiler-test:4:29\n |\n 4 | const b: [u8; (2, 3)] = [0; (3, 2)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^" + - "Error: [EASG0370026]: unexpected type, expected: 'array of length 2', received: 'array of length 3'\n --> compiler-test:4:29\n |\n 4 | const b: [u8; (2, 3)] = [0; (3, 2)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2_fail.leo.out index 3d2be04739..66fc9e0415 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370026]: unexpected type, expected: 'array of length 4', received: 'array of length 2'\n --> compiler-test:4:32\n |\n 4 | const b: [u8; (4, 3, 2)] = [0; (2, 3, 4)]; // initializer (incorrectly reversed order)\n | ^^^^^^^^^^^^^^" + - "Error: [EASG0370026]: unexpected type, expected: 'array of length 4', received: 'array of length 2'\n --> compiler-test:4:32\n |\n 4 | const b: [u8; (4, 3, 2)] = [0; (2, 3, 4)]; // initializer (incorrectly reversed order)\n | ^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/array/variable_slice_fail.leo.out b/tests/expectations/compiler/compiler/array/variable_slice_fail.leo.out index 40a2241cda..d69981da1c 100644 --- a/tests/expectations/compiler/compiler/array/variable_slice_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/variable_slice_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EPAR0375007]: unexpected identifier: expected 'assert', 'error', 'log' -- got 'debug'\n --> compiler-test:7:17\n |\n 7 | console.debug(\"{}\", x);\n | ^^^^^" + - "Error: [EPAR0375007]: unexpected identifier: expected 'assert', 'error', 'log' -- got 'debug'\n --> compiler-test:7:17\n |\n 7 | console.debug(\"{}\", x);\n | ^^^^^" diff --git a/tests/expectations/compiler/compiler/char/invalid_char.leo.out b/tests/expectations/compiler/compiler/char/invalid_char.leo.out index 7b113239d6..8f728c62b9 100644 --- a/tests/expectations/compiler/compiler/char/invalid_char.leo.out +++ b/tests/expectations/compiler/compiler/char/invalid_char.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EPAR0375000]: '\n --> compiler-test:4:23\n |\n 4 | const not_valid = '';\n | ^\n |\n = HELP TODO" + - "Error: [EPAR0375000]: '\n --> compiler-test:4:23\n |\n 4 | const not_valid = '';\n | ^\n |\n = HELP TODO" diff --git a/tests/expectations/compiler/compiler/circuits/big_self_outside_circuit_fail.leo.out b/tests/expectations/compiler/compiler/circuits/big_self_outside_circuit_fail.leo.out index 9f2b5148ce..ba8870e8cf 100644 --- a/tests/expectations/compiler/compiler/circuits/big_self_outside_circuit_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/big_self_outside_circuit_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EAST0371005]: cannot call keyword `Self` outside of a circuit function\n --> compiler-test:16:3\n |\n 16 | let foo: Self = Foo::new();\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^" + - "Error: [EAST0371005]: cannot call keyword `Self` outside of a circuit function\n --> compiler-test:16:3\n |\n 16 | let foo: Self = Foo::new();\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/circuits/const_self_variable_fail.leo.out b/tests/expectations/compiler/compiler/circuits/const_self_variable_fail.leo.out index 4537c590e5..fb798c1e90 100644 --- a/tests/expectations/compiler/compiler/circuits/const_self_variable_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/const_self_variable_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370033]: illegal assignment to immutable variable 'self'\n --> compiler-test:7:9\n |\n 7 | self.a = new;\n | ^^^^^^^^^^^^" + - "Error: [EASG0370033]: illegal assignment to immutable variable 'self'\n --> compiler-test:7:9\n |\n 7 | self.a = new;\n | ^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/circuits/inline_fail.leo.out b/tests/expectations/compiler/compiler/circuits/inline_fail.leo.out index dbfc704f47..0afc915e8f 100644 --- a/tests/expectations/compiler/compiler/circuits/inline_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/inline_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370003]: missing circuit member 'x' for initialization of circuit 'Foo'\n --> compiler-test:9:15\n |\n 9 | const a = Foo { y: 0u32 };\n | ^^^^^^^^^^^^^^^" + - "Error: [EASG0370003]: missing circuit member 'x' for initialization of circuit 'Foo'\n --> compiler-test:9:15\n |\n 9 | const a = Foo { y: 0u32 };\n | ^^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/circuits/inline_member_fail.leo.out b/tests/expectations/compiler/compiler/circuits/inline_member_fail.leo.out index 777ff0faa1..8af15fda33 100644 --- a/tests/expectations/compiler/compiler/circuits/inline_member_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/inline_member_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370003]: missing circuit member 'x' for initialization of circuit 'Foo'\n --> compiler-test:9:15\n |\n 9 | const a = Foo { y };\n | ^^^^^^^^^" + - "Error: [EASG0370003]: missing circuit member 'x' for initialization of circuit 'Foo'\n --> compiler-test:9:15\n |\n 9 | const a = Foo { y };\n | ^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/circuits/inline_undefined.leo.out b/tests/expectations/compiler/compiler/circuits/inline_undefined.leo.out index b291d04c86..bbcaeb8205 100644 --- a/tests/expectations/compiler/compiler/circuits/inline_undefined.leo.out +++ b/tests/expectations/compiler/compiler/circuits/inline_undefined.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370000]: failed to resolve circuit: 'Foo'\n --> compiler-test:4:15\n |\n 4 | const a = Foo { };\n | ^^^" + - "Error: [EASG0370000]: failed to resolve circuit: 'Foo'\n --> compiler-test:4:15\n |\n 4 | const a = Foo { };\n | ^^^" diff --git a/tests/expectations/compiler/compiler/circuits/member_function_fail.leo.out b/tests/expectations/compiler/compiler/circuits/member_function_fail.leo.out index 4f3d3bcda7..22869c14b5 100644 --- a/tests/expectations/compiler/compiler/circuits/member_function_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_function_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370002]: illegal reference to non-existant member 'echoed' of circuit 'Foo'\n --> compiler-test:11:17\n |\n 11 | const err = a.echoed(1u32);\n | ^^^^^^^^" + - "Error: [EASG0370002]: illegal reference to non-existant member 'echoed' of circuit 'Foo'\n --> compiler-test:11:17\n |\n 11 | const err = a.echoed(1u32);\n | ^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/circuits/member_function_invalid.leo.out b/tests/expectations/compiler/compiler/circuits/member_function_invalid.leo.out index 20a2113cb8..500bd65a04 100644 --- a/tests/expectations/compiler/compiler/circuits/member_function_invalid.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_function_invalid.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370009]: cannot call static function 'echo' of circuit 'Foo' from target\n --> compiler-test:11:17\n |\n 11 | const err = a.echo(1u32); // echo is a static function and must be accessed using `::`\n | ^^^^^^" + - "Error: [EASG0370009]: cannot call static function 'echo' of circuit 'Foo' from target\n --> compiler-test:11:17\n |\n 11 | const err = a.echo(1u32); // echo is a static function and must be accessed using `::`\n | ^^^^^^" diff --git a/tests/expectations/compiler/compiler/circuits/member_static_function_invalid.leo.out b/tests/expectations/compiler/compiler/circuits/member_static_function_invalid.leo.out index e0a7893ca7..221febe732 100644 --- a/tests/expectations/compiler/compiler/circuits/member_static_function_invalid.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_static_function_invalid.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370028]: failed to resolve variable reference 'Foo'\n --> compiler-test:10:17\n |\n 10 | const err = Foo.echo(1u32); // Invalid, echo is a static function and must be accessed using `::`\n | ^^^" + - "Error: [EASG0370028]: failed to resolve variable reference 'Foo'\n --> compiler-test:10:17\n |\n 10 | const err = Foo.echo(1u32); // Invalid, echo is a static function and must be accessed using `::`\n | ^^^" diff --git a/tests/expectations/compiler/compiler/circuits/member_static_function_undefined.leo.out b/tests/expectations/compiler/compiler/circuits/member_static_function_undefined.leo.out index 9137f01c35..cb5b0b662f 100644 --- a/tests/expectations/compiler/compiler/circuits/member_static_function_undefined.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_static_function_undefined.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370002]: illegal reference to non-existant member 'echoed' of circuit 'Foo'\n --> compiler-test:10:17\n |\n 10 | const err = Foo::echoed(1u32);\n | ^^^^^^^^^^^" + - "Error: [EASG0370002]: illegal reference to non-existant member 'echoed' of circuit 'Foo'\n --> compiler-test:10:17\n |\n 10 | const err = Foo::echoed(1u32);\n | ^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/circuits/member_variable_fail.leo.out b/tests/expectations/compiler/compiler/circuits/member_variable_fail.leo.out index 1b7a7ef433..cfb960f1d4 100644 --- a/tests/expectations/compiler/compiler/circuits/member_variable_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_variable_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370002]: illegal reference to non-existant member 'y' of circuit 'Foo'\n --> compiler-test:9:17\n |\n 9 | const err = a.y;\n | ^^^" + - "Error: [EASG0370002]: illegal reference to non-existant member 'y' of circuit 'Foo'\n --> compiler-test:9:17\n |\n 9 | const err = a.y;\n | ^^^" diff --git a/tests/expectations/compiler/compiler/circuits/mut_function_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_function_fail.leo.out index c7b24139c7..0c960ce1f0 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_function_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_function_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370007]: attempt to assign to function 'bar'\n --> compiler-test:12:5\n |\n 12 | f.bar = 1u8;\n | ^^^^^^^^^^^" + - "Error: [EASG0370007]: attempt to assign to function 'bar'\n --> compiler-test:12:5\n |\n 12 | f.bar = 1u8;\n | ^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_function_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_function_fail.leo.out index 5bbee2c259..f45fda2e57 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_self_function_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_self_function_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370007]: attempt to assign to function 'bar'\n --> compiler-test:9:9\n |\n 9 | self.bar = new;\n | ^^^^^^^^^^^^^^" + - "Error: [EASG0370007]: attempt to assign to function 'bar'\n --> compiler-test:9:9\n |\n 9 | self.bar = new;\n | ^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_static_function_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_static_function_fail.leo.out index 5bbee2c259..f45fda2e57 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_self_static_function_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_self_static_function_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370007]: attempt to assign to function 'bar'\n --> compiler-test:9:9\n |\n 9 | self.bar = new;\n | ^^^^^^^^^^^^^^" + - "Error: [EASG0370007]: attempt to assign to function 'bar'\n --> compiler-test:9:9\n |\n 9 | self.bar = new;\n | ^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_variable_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_variable_fail.leo.out index 4537c590e5..fb798c1e90 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_self_variable_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_self_variable_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370033]: illegal assignment to immutable variable 'self'\n --> compiler-test:7:9\n |\n 7 | self.a = new;\n | ^^^^^^^^^^^^" + - "Error: [EASG0370033]: illegal assignment to immutable variable 'self'\n --> compiler-test:7:9\n |\n 7 | self.a = new;\n | ^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/circuits/mut_static_function_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_static_function_fail.leo.out index 741984f4f9..bfa56e7615 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_static_function_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_static_function_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370006]: extra circuit member 'a' for initialization of circuit 'Foo' is not allowed\n --> compiler-test:8:19\n |\n 8 | let f = Foo { a: 0u8 };\n | ^" + - "Error: [EASG0370006]: extra circuit member 'a' for initialization of circuit 'Foo' is not allowed\n --> compiler-test:8:19\n |\n 8 | let f = Foo { a: 0u8 };\n | ^" diff --git a/tests/expectations/compiler/compiler/circuits/mut_variable_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_variable_fail.leo.out index 8313b7d48d..8331680b0c 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_variable_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_variable_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370033]: illegal assignment to immutable variable 'f'\n --> compiler-test:10:5\n |\n 10 | f.a = 1u8;\n | ^^^^^^^^^" + - "Error: [EASG0370033]: illegal assignment to immutable variable 'f'\n --> compiler-test:10:5\n |\n 10 | f.a = 1u8;\n | ^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/circuits/self_circuit.leo.out b/tests/expectations/compiler/compiler/circuits/self_circuit.leo.out index ef1a754925..0ec6fb0092 100644 --- a/tests/expectations/compiler/compiler/circuits/self_circuit.leo.out +++ b/tests/expectations/compiler/compiler/circuits/self_circuit.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EPAR0375009]: unexpected string: expected 'ident', got 'static'\n --> compiler-test:5:5\n |\n 5 | static function new() -> Self {\n | ^^^^^^" + - "Error: [EPAR0375009]: unexpected string: expected 'ident', got 'static'\n --> compiler-test:5:5\n |\n 5 | static function new() -> Self {\n | ^^^^^^" diff --git a/tests/expectations/compiler/compiler/circuits/self_fail.leo.out b/tests/expectations/compiler/compiler/circuits/self_fail.leo.out index c0229f3a4a..21e22afac0 100644 --- a/tests/expectations/compiler/compiler/circuits/self_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/self_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370000]: failed to resolve circuit: 'Self'\n --> compiler-test:4:5\n |\n 4 | Self::main();\n | ^^^^" + - "Error: [EASG0370000]: failed to resolve circuit: 'Self'\n --> compiler-test:4:5\n |\n 4 | Self::main();\n | ^^^^" diff --git a/tests/expectations/compiler/compiler/circuits/self_member_invalid.leo.out b/tests/expectations/compiler/compiler/circuits/self_member_invalid.leo.out index 1455cce070..e56afced75 100644 --- a/tests/expectations/compiler/compiler/circuits/self_member_invalid.leo.out +++ b/tests/expectations/compiler/compiler/circuits/self_member_invalid.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370009]: cannot call static function 'bar' of circuit 'Foo' from target\n --> compiler-test:13:17\n |\n 13 | const err = foo.bar();\n | ^^^^^^^" + - "Error: [EASG0370009]: cannot call static function 'bar' of circuit 'Foo' from target\n --> compiler-test:13:17\n |\n 13 | const err = foo.bar();\n | ^^^^^^^" diff --git a/tests/expectations/compiler/compiler/circuits/self_member_undefined.leo.out b/tests/expectations/compiler/compiler/circuits/self_member_undefined.leo.out index 4caa6447af..cf5e022627 100644 --- a/tests/expectations/compiler/compiler/circuits/self_member_undefined.leo.out +++ b/tests/expectations/compiler/compiler/circuits/self_member_undefined.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370009]: cannot call static function 'bar' of circuit 'Foo' from target\n --> compiler-test:11:17\n |\n 11 | const err = foo.bar();\n | ^^^^^^^" + - "Error: [EASG0370009]: cannot call static function 'bar' of circuit 'Foo' from target\n --> compiler-test:11:17\n |\n 11 | const err = foo.bar();\n | ^^^^^^^" diff --git a/tests/expectations/compiler/compiler/console/log_fail.leo.out b/tests/expectations/compiler/compiler/console/log_fail.leo.out index 86efc9335b..cb0e724299 100644 --- a/tests/expectations/compiler/compiler/console/log_fail.leo.out +++ b/tests/expectations/compiler/compiler/console/log_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EPAR0375009]: unexpected string: expected 'formatted string', got 'hello'\n --> compiler-test:4:18\n |\n 4 | console.log( hello );\n | ^^^^^" + - "Error: [EPAR0375009]: unexpected string: expected 'formatted string', got 'hello'\n --> compiler-test:4:18\n |\n 4 | console.log( hello );\n | ^^^^^" diff --git a/tests/expectations/compiler/compiler/console/log_parameter_fail_empty.leo.out b/tests/expectations/compiler/compiler/console/log_parameter_fail_empty.leo.out index 2f33b8473f..dd0c8befab 100644 --- a/tests/expectations/compiler/compiler/console/log_parameter_fail_empty.leo.out +++ b/tests/expectations/compiler/compiler/console/log_parameter_fail_empty.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[ECMP0372006]: Formatter given 1 containers and found 0 parameters\n --> compiler-test:4:17\n |\n 4 | console.log(\"{}\");\n | ^^^^" + - "Error: [ECMP0372006]: Formatter given 1 containers and found 0 parameters\n --> compiler-test:4:17\n |\n 4 | console.log(\"{}\");\n | ^^^^" diff --git a/tests/expectations/compiler/compiler/console/log_parameter_fail_none.leo.out b/tests/expectations/compiler/compiler/console/log_parameter_fail_none.leo.out index a266680c8a..97cc9b7321 100644 --- a/tests/expectations/compiler/compiler/console/log_parameter_fail_none.leo.out +++ b/tests/expectations/compiler/compiler/console/log_parameter_fail_none.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[ECMP0372006]: Formatter given 0 containers and found 1 parameters\n --> compiler-test:4:17\n |\n 4 | console.log(\"\", 1u32);\n | ^^^^^^^^" + - "Error: [ECMP0372006]: Formatter given 0 containers and found 1 parameters\n --> compiler-test:4:17\n |\n 4 | console.log(\"\", 1u32);\n | ^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/console/log_parameter_fail_unknown.leo.out b/tests/expectations/compiler/compiler/console/log_parameter_fail_unknown.leo.out index 7f276aced3..dc064690fd 100644 --- a/tests/expectations/compiler/compiler/console/log_parameter_fail_unknown.leo.out +++ b/tests/expectations/compiler/compiler/console/log_parameter_fail_unknown.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370028]: failed to resolve variable reference 'a'\n --> compiler-test:4:23\n |\n 4 | console.log(\"{}\", a);\n | ^" + - "Error: [EASG0370028]: failed to resolve variable reference 'a'\n --> compiler-test:4:23\n |\n 4 | console.log(\"{}\", a);\n | ^" diff --git a/tests/expectations/compiler/compiler/core/core_circuit_invalid.leo.out b/tests/expectations/compiler/compiler/core/core_circuit_invalid.leo.out index 431a5723a9..ff9c43b3f1 100644 --- a/tests/expectations/compiler/compiler/core/core_circuit_invalid.leo.out +++ b/tests/expectations/compiler/compiler/core/core_circuit_invalid.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370001]: failed to resolve import: 'core.unstable.blake2s.BadCircuit'\n --> compiler-test:3:30\n |\n 3 | import core.unstable.blake2s.BadCircuit; // `BadCircuit` is not included in the blake2s package\n | ^^^^^^^^^^" + - "Error: [EASG0370001]: failed to resolve import: 'core.unstable.blake2s.BadCircuit'\n --> compiler-test:3:30\n |\n 3 | import core.unstable.blake2s.BadCircuit; // `BadCircuit` is not included in the blake2s package\n | ^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/core/core_circuit_star_fail.leo.out b/tests/expectations/compiler/compiler/core/core_circuit_star_fail.leo.out index 4c849b9e38..89336f9227 100644 --- a/tests/expectations/compiler/compiler/core/core_circuit_star_fail.leo.out +++ b/tests/expectations/compiler/compiler/core/core_circuit_star_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370001]: failed to resolve import: 'core'\n --> :0:0\n |" + - "Error: [EASG0370001]: failed to resolve import: 'core'\n --> :0:0\n |" diff --git a/tests/expectations/compiler/compiler/core/core_package_invalid.leo.out b/tests/expectations/compiler/compiler/core/core_package_invalid.leo.out index 4c849b9e38..89336f9227 100644 --- a/tests/expectations/compiler/compiler/core/core_package_invalid.leo.out +++ b/tests/expectations/compiler/compiler/core/core_package_invalid.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370001]: failed to resolve import: 'core'\n --> :0:0\n |" + - "Error: [EASG0370001]: failed to resolve import: 'core'\n --> :0:0\n |" diff --git a/tests/expectations/compiler/compiler/core/core_unstable_package_invalid.leo.out b/tests/expectations/compiler/compiler/core/core_unstable_package_invalid.leo.out index 6d38e183e7..f45b179d2e 100644 --- a/tests/expectations/compiler/compiler/core/core_unstable_package_invalid.leo.out +++ b/tests/expectations/compiler/compiler/core/core_unstable_package_invalid.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370001]: failed to resolve import: 'core.unstable'\n --> :0:0\n |" + - "Error: [EASG0370001]: failed to resolve import: 'core.unstable'\n --> :0:0\n |" diff --git a/tests/expectations/compiler/compiler/field/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/field/no_space_between_literal.leo.out index 8c11fa16f6..c5eccb9b71 100644 --- a/tests/expectations/compiler/compiler/field/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/field/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EPAR0375004]: Unexpected white space between terms 1 and field\n --> compiler-test:4:13\n |\n 4 | const f = 1 field;\n | ^" + - "Error: [EPAR0375004]: Unexpected white space between terms 1 and field\n --> compiler-test:4:13\n |\n 4 | const f = 1 field;\n | ^" diff --git a/tests/expectations/compiler/compiler/function/duplicate_definition_fail.leo.out b/tests/expectations/compiler/compiler/function/duplicate_definition_fail.leo.out index 9ed152edc4..b96997a9cc 100644 --- a/tests/expectations/compiler/compiler/function/duplicate_definition_fail.leo.out +++ b/tests/expectations/compiler/compiler/function/duplicate_definition_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370016]: a function named \"main\" already exists in this scope\n --> compiler-test:8:1\n |\n 8 | function main() {\n|\n 9 | ...\n|\n 10 | }\n | ^" + - "Error: [EASG0370016]: a function named \"main\" already exists in this scope\n --> compiler-test:8:1\n |\n 8 | function main() {\n|\n 9 | ...\n|\n 10 | }\n | ^" diff --git a/tests/expectations/compiler/compiler/function/multiple_returns_fail.leo.out b/tests/expectations/compiler/compiler/function/multiple_returns_fail.leo.out index a65315ecea..cf80360e9a 100644 --- a/tests/expectations/compiler/compiler/function/multiple_returns_fail.leo.out +++ b/tests/expectations/compiler/compiler/function/multiple_returns_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370035]: function 'main' failed to validate return path: 'cannot have asymmetrical return in if statement'\n --> compiler-test:4:5\n |\n 4 | if true {\n|\n 5 | ...\n|\n 6 | }\n | ^" + - "Error: [EASG0370035]: function 'main' failed to validate return path: 'cannot have asymmetrical return in if statement'\n --> compiler-test:4:5\n |\n 4 | if true {\n|\n 5 | ...\n|\n 6 | }\n | ^" diff --git a/tests/expectations/compiler/compiler/function/multiple_returns_fail_conditional.leo.out b/tests/expectations/compiler/compiler/function/multiple_returns_fail_conditional.leo.out index 38b5a50c7f..2d0d2d86f0 100644 --- a/tests/expectations/compiler/compiler/function/multiple_returns_fail_conditional.leo.out +++ b/tests/expectations/compiler/compiler/function/multiple_returns_fail_conditional.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370034]: function 'main' missing return for all paths\n --> compiler-test:3:1\n |\n 3 | function main() -> bool {\n|\n 4 | ...\n|\n 5 | }\n|\n 6 | \n|\n 7 | \n|\n 8 | \n|\n 9 | \n|\n 10 | \n | ^" + - "Error: [EASG0370034]: function 'main' missing return for all paths\n --> compiler-test:3:1\n |\n 3 | function main() -> bool {\n|\n 4 | ...\n|\n 5 | }\n|\n 6 | \n|\n 7 | \n|\n 8 | \n|\n 9 | \n|\n 10 | \n | ^" diff --git a/tests/expectations/compiler/compiler/function/return_array_nested_fail.leo.out b/tests/expectations/compiler/compiler/function/return_array_nested_fail.leo.out index 77d4b327fd..1315fb284f 100644 --- a/tests/expectations/compiler/compiler/function/return_array_nested_fail.leo.out +++ b/tests/expectations/compiler/compiler/function/return_array_nested_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:4:12\n |\n 4 | return [0u8; (2, 3)]; // The correct 3x2 array tuple is `[0u8; (3, 2)]`\n | ^^^^^^^^^^^^^" + - "Error: [EASG0370026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:4:12\n |\n 4 | return [0u8; (2, 3)]; // The correct 3x2 array tuple is `[0u8; (3, 2)]`\n | ^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/function/return_array_tuple_fail.leo.out b/tests/expectations/compiler/compiler/function/return_array_tuple_fail.leo.out index 3942de65f9..ec44831b0f 100644 --- a/tests/expectations/compiler/compiler/function/return_array_tuple_fail.leo.out +++ b/tests/expectations/compiler/compiler/function/return_array_tuple_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:4:12\n |\n 4 | return [[0u8; 3]; 2]; // The correct 3x2 nested array is `[0u8; 2]; 3]`\n | ^^^^^^^^^^^^^" + - "Error: [EASG0370026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:4:12\n |\n 4 | return [[0u8; 3]; 2]; // The correct 3x2 nested array is `[0u8; 2]; 3]`\n | ^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/function/scope_fail.leo.out b/tests/expectations/compiler/compiler/function/scope_fail.leo.out index 756ce3315a..989d129c74 100644 --- a/tests/expectations/compiler/compiler/function/scope_fail.leo.out +++ b/tests/expectations/compiler/compiler/function/scope_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370028]: failed to resolve variable reference 'myGlobal'\n --> compiler-test:5:12\n |\n 5 | return myGlobal;\n | ^^^^^^^^" + - "Error: [EASG0370028]: failed to resolve variable reference 'myGlobal'\n --> compiler-test:5:12\n |\n 5 | return myGlobal;\n | ^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/function/undefined.leo.out b/tests/expectations/compiler/compiler/function/undefined.leo.out index 7e23e1e81d..ba2e4447cb 100644 --- a/tests/expectations/compiler/compiler/function/undefined.leo.out +++ b/tests/expectations/compiler/compiler/function/undefined.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370024]: failed to resolve function: 'my_function'\n --> compiler-test:5:5\n |\n 5 | my_function();\n | ^^^^^^^^^^^" + - "Error: [EASG0370024]: failed to resolve function: 'my_function'\n --> compiler-test:5:5\n |\n 5 | my_function();\n | ^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/global_consts/modify_global_const.leo.out b/tests/expectations/compiler/compiler/global_consts/modify_global_const.leo.out index e559c1bb65..d551456bce 100644 --- a/tests/expectations/compiler/compiler/global_consts/modify_global_const.leo.out +++ b/tests/expectations/compiler/compiler/global_consts/modify_global_const.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370033]: illegal assignment to immutable variable 'basic'\n --> compiler-test:7:5\n |\n 7 | basic = 2u32;\n | ^^^^^^^^^^^^" + - "Error: [EASG0370033]: illegal assignment to immutable variable 'basic'\n --> compiler-test:7:5\n |\n 7 | basic = 2u32;\n | ^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/const_input_non_const.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/const_input_non_const.leo.out index ca311dc132..fde3e4206d 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/const_input_non_const.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/const_input_non_const.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[ECMP0372029]: Expected input variable `a` to be non-constant. Move input variable `a` to [main] section of input file\n --> compiler-test:3:15\n |\n 3 | function main(a: u32) {\n | ^" + - "Error: [ECMP0372029]: Expected input variable `a` to be non-constant. Move input variable `a` to [main] section of input file\n --> compiler-test:3:15\n |\n 3 | function main(a: u32) {\n | ^" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/const_var_in_both_sections_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/const_var_in_both_sections_fail.leo.out index d64826e60a..fd59f17a81 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/const_var_in_both_sections_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/const_var_in_both_sections_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[ECMP0372035]: Input variable a declared twice\n --> compiler-test:3:21\n |\n 3 | function main(const a: u32) {\n | ^" + - "Error: [ECMP0372035]: Input variable a declared twice\n --> compiler-test:3:21\n |\n 3 | function main(const a: u32) {\n | ^" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_array_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_array_fail.leo.out index f8a8abadcc..30df60f303 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_array_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_array_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[ECMP0372031]: Input array dimensions mismatch expected 1, found array dimensions 2\n --> compiler-test:3:15\n |\n 3 | function main(x: [i16; 2]) {\n | ^" + - "Error: [ECMP0372031]: Input array dimensions mismatch expected 1, found array dimensions 2\n --> compiler-test:3:15\n |\n 3 | function main(x: [i16; 2]) {\n | ^" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_tuple_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_tuple_fail.leo.out index 3f4f9a6b68..e15fabc998 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_tuple_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_tuple_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[ECMP0372032]: Input tuple size mismatch expected 3, found tuple with length 2\n --> compiler-test:3:15\n |\n 3 | function main(x: (u8, bool, u8)) {\n | ^" + - "Error: [ECMP0372032]: Input tuple size mismatch expected 3, found tuple with length 2\n --> compiler-test:3:15\n |\n 3 | function main(x: (u8, bool, u8)) {\n | ^" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/non_const_input_const.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/non_const_input_const.leo.out index f2c1441102..7cb4eab0ad 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/non_const_input_const.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/non_const_input_const.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370025]: failed to resolve type for variable definition 'unknown'\n --> compiler-test:4:17\n |\n 4 | let b = a * 2;\n | ^" + - "Error: [EASG0370025]: failed to resolve type for variable definition 'unknown'\n --> compiler-test:4:17\n |\n 4 | let b = a * 2;\n | ^" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/var_in_both_sections_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/var_in_both_sections_fail.leo.out index b7df393dab..5ec6400513 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/var_in_both_sections_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/var_in_both_sections_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[ECMP0372035]: Input variable a declared twice\n --> compiler-test:3:15\n |\n 3 | function main(a: u32) {\n | ^" + - "Error: [ECMP0372035]: Input variable a declared twice\n --> compiler-test:3:15\n |\n 3 | function main(a: u32) {\n | ^" diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array_fail.leo.out index 5554af092d..9c720585eb 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[ECMP0372031]: Input array dimensions mismatch expected 2, found array dimensions 1\n --> compiler-test:3:21\n |\n 3 | function main(const x: [i16; 2]) {\n | ^" + - "Error: [ECMP0372031]: Input array dimensions mismatch expected 2, found array dimensions 1\n --> compiler-test:3:21\n |\n 3 | function main(const x: [i16; 2]) {\n | ^" diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple_fail.leo.out index 7ef6131070..93830cd25a 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[ECMP0372032]: Input tuple size mismatch expected 3, found tuple with length 2\n --> compiler-test:3:21\n |\n 3 | function main(const x: (u8, bool, u8)) {\n | ^" + - "Error: [ECMP0372032]: Input tuple size mismatch expected 3, found tuple with length 2\n --> compiler-test:3:21\n |\n 3 | function main(const x: (u8, bool, u8)) {\n | ^" diff --git a/tests/expectations/compiler/compiler/input_files/program_registers/registers_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_registers/registers_fail.leo.out index 4f9040da47..ee3409a8ea 100644 --- a/tests/expectations/compiler/compiler/input_files/program_registers/registers_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_registers/registers_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[ECMP0372037]: Mismatched types. Expected register output type `u8`, found type `bool`.\n --> compiler-test:3:1\n |\n 3 | function main() -> bool {\n|\n 4 | ...\n|\n 5 | }\n | ^" + - "Error: [ECMP0372037]: Mismatched types. Expected register output type `u8`, found type `bool`.\n --> compiler-test:3:1\n |\n 3 | function main() -> bool {\n|\n 4 | ...\n|\n 5 | }\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/i128/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/i128/max_fail.leo.out index 9208ae7f2e..9026291d1a 100644 --- a/tests/expectations/compiler/compiler/integers/i128/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370031]: failed to parse int value '170141183460469231731687303715884105728'\n --> compiler-test:4:21\n |\n 4 | const a: i128 = 170141183460469231731687303715884105728;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" + - "Error: [EASG0370031]: failed to parse int value '170141183460469231731687303715884105728'\n --> compiler-test:4:21\n |\n 4 | const a: i128 = 170141183460469231731687303715884105728;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/integers/i128/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/i128/min_fail.leo.out index ec718e85f8..7a09f07f02 100644 --- a/tests/expectations/compiler/compiler/integers/i128/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370031]: failed to parse int value '-170141183460469231731687303715884105729'\n --> compiler-test:4:21\n |\n 4 | const a: i128 = -170141183460469231731687303715884105729;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" + - "Error: [EASG0370031]: failed to parse int value '-170141183460469231731687303715884105729'\n --> compiler-test:4:21\n |\n 4 | const a: i128 = -170141183460469231731687303715884105729;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/integers/i128/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/i128/no_space_between_literal.leo.out index cbb9e5c9b3..14e4ee187f 100644 --- a/tests/expectations/compiler/compiler/integers/i128/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EPAR0375004]: Unexpected white space between terms 1 and i128\n --> compiler-test:4:15\n |\n 4 | const i = 1 i128;\n | ^" + - "Error: [EPAR0375004]: Unexpected white space between terms 1 and i128\n --> compiler-test:4:15\n |\n 4 | const i = 1 i128;\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/i16/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/i16/max_fail.leo.out index 98e8506db7..fa665292e6 100644 --- a/tests/expectations/compiler/compiler/integers/i16/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370031]: failed to parse int value '32768'\n --> compiler-test:4:20\n |\n 4 | const a: i16 = 32768;\n | ^^^^^" + - "Error: [EASG0370031]: failed to parse int value '32768'\n --> compiler-test:4:20\n |\n 4 | const a: i16 = 32768;\n | ^^^^^" diff --git a/tests/expectations/compiler/compiler/integers/i16/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/i16/min_fail.leo.out index a5dcfcfd90..c54cf7d4d2 100644 --- a/tests/expectations/compiler/compiler/integers/i16/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370031]: failed to parse int value '-32769'\n --> compiler-test:4:20\n |\n 4 | const a: i16 = -32769;\n | ^^^^^^" + - "Error: [EASG0370031]: failed to parse int value '-32769'\n --> compiler-test:4:20\n |\n 4 | const a: i16 = -32769;\n | ^^^^^^" diff --git a/tests/expectations/compiler/compiler/integers/i16/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/i16/no_space_between_literal.leo.out index 67126f15a9..ea8a530c33 100644 --- a/tests/expectations/compiler/compiler/integers/i16/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EPAR0375004]: Unexpected white space between terms 1 and i16\n --> compiler-test:4:15\n |\n 4 | const i = 1 i16;\n | ^" + - "Error: [EPAR0375004]: Unexpected white space between terms 1 and i16\n --> compiler-test:4:15\n |\n 4 | const i = 1 i16;\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/i32/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/i32/max_fail.leo.out index 18db60aa5b..52c9d46119 100644 --- a/tests/expectations/compiler/compiler/integers/i32/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370031]: failed to parse int value '2147483648'\n --> compiler-test:4:20\n |\n 4 | const a: i32 = 2147483648;\n | ^^^^^^^^^^" + - "Error: [EASG0370031]: failed to parse int value '2147483648'\n --> compiler-test:4:20\n |\n 4 | const a: i32 = 2147483648;\n | ^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/integers/i32/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/i32/min_fail.leo.out index 02267227cc..76eb3daffa 100644 --- a/tests/expectations/compiler/compiler/integers/i32/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370031]: failed to parse int value '-2147483649'\n --> compiler-test:4:20\n |\n 4 | const a: i32 = -2147483649;\n | ^^^^^^^^^^^" + - "Error: [EASG0370031]: failed to parse int value '-2147483649'\n --> compiler-test:4:20\n |\n 4 | const a: i32 = -2147483649;\n | ^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/integers/i32/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/i32/no_space_between_literal.leo.out index 857110d2bd..731ad7d55d 100644 --- a/tests/expectations/compiler/compiler/integers/i32/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EPAR0375004]: Unexpected white space between terms 1 and i32\n --> compiler-test:4:15\n |\n 4 | const i = 1 i32;\n | ^" + - "Error: [EPAR0375004]: Unexpected white space between terms 1 and i32\n --> compiler-test:4:15\n |\n 4 | const i = 1 i32;\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/i64/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/i64/max_fail.leo.out index 78d3b9d31c..586880c425 100644 --- a/tests/expectations/compiler/compiler/integers/i64/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370031]: failed to parse int value '9223372036854775808'\n --> compiler-test:4:20\n |\n 4 | const a: i64 = 9223372036854775808;\n | ^^^^^^^^^^^^^^^^^^^" + - "Error: [EASG0370031]: failed to parse int value '9223372036854775808'\n --> compiler-test:4:20\n |\n 4 | const a: i64 = 9223372036854775808;\n | ^^^^^^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/integers/i64/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/i64/min_fail.leo.out index 523ccdc254..e937843da5 100644 --- a/tests/expectations/compiler/compiler/integers/i64/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370031]: failed to parse int value '-9223372036854775809'\n --> compiler-test:4:20\n |\n 4 | const a: i64 = -9223372036854775809;\n | ^^^^^^^^^^^^^^^^^^^^" + - "Error: [EASG0370031]: failed to parse int value '-9223372036854775809'\n --> compiler-test:4:20\n |\n 4 | const a: i64 = -9223372036854775809;\n | ^^^^^^^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/integers/i64/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/i64/no_space_between_literal.leo.out index d3276291f9..5f6922206c 100644 --- a/tests/expectations/compiler/compiler/integers/i64/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EPAR0375004]: Unexpected white space between terms 1 and i64\n --> compiler-test:4:15\n |\n 4 | const i = 1 i64;\n | ^" + - "Error: [EPAR0375004]: Unexpected white space between terms 1 and i64\n --> compiler-test:4:15\n |\n 4 | const i = 1 i64;\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/i8/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/i8/max_fail.leo.out index 0831ab47ca..4c5f219d6e 100644 --- a/tests/expectations/compiler/compiler/integers/i8/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370031]: failed to parse int value '128'\n --> compiler-test:4:19\n |\n 4 | const a: i8 = 128;\n | ^^^" + - "Error: [EASG0370031]: failed to parse int value '128'\n --> compiler-test:4:19\n |\n 4 | const a: i8 = 128;\n | ^^^" diff --git a/tests/expectations/compiler/compiler/integers/i8/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/i8/min_fail.leo.out index 1cc2290801..940f2096a9 100644 --- a/tests/expectations/compiler/compiler/integers/i8/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370031]: failed to parse int value '-129'\n --> compiler-test:4:19\n |\n 4 | const a: i8 = -129;\n | ^^^^" + - "Error: [EASG0370031]: failed to parse int value '-129'\n --> compiler-test:4:19\n |\n 4 | const a: i8 = -129;\n | ^^^^" diff --git a/tests/expectations/compiler/compiler/integers/i8/negate_min.leo.out b/tests/expectations/compiler/compiler/integers/i8/negate_min.leo.out index 11b2da517a..0fafb838ba 100644 --- a/tests/expectations/compiler/compiler/integers/i8/negate_min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/negate_min.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[ECMP0372083]: integer operation failed due to the signed integer error `Integer overflow`\n --> compiler-test:5:15\n |\n 5 | const b = -a;\n | ^^" + - "Error: [ECMP0372083]: integer operation failed due to the signed integer error `Integer overflow`\n --> compiler-test:5:15\n |\n 5 | const b = -a;\n | ^^" diff --git a/tests/expectations/compiler/compiler/integers/i8/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/i8/no_space_between_literal.leo.out index 88c69d2202..1cdbda5f17 100644 --- a/tests/expectations/compiler/compiler/integers/i8/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EPAR0375004]: Unexpected white space between terms 1 and i8\n --> compiler-test:4:15\n |\n 4 | const i = 1 i8;\n | ^" + - "Error: [EPAR0375004]: Unexpected white space between terms 1 and i8\n --> compiler-test:4:15\n |\n 4 | const i = 1 i8;\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/u128/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/u128/max_fail.leo.out index ffbabad476..1e59b8e4f9 100644 --- a/tests/expectations/compiler/compiler/integers/u128/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370031]: failed to parse int value '340282366920938463463374607431768211456'\n --> compiler-test:4:21\n |\n 4 | const a: u128 = 340282366920938463463374607431768211456;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" + - "Error: [EASG0370031]: failed to parse int value '340282366920938463463374607431768211456'\n --> compiler-test:4:21\n |\n 4 | const a: u128 = 340282366920938463463374607431768211456;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/integers/u128/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/u128/min_fail.leo.out index 5a4135c7f4..f74b261793 100644 --- a/tests/expectations/compiler/compiler/integers/u128/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370031]: failed to parse int value '-1'\n --> compiler-test:4:21\n |\n 4 | const a: u128 = -1;\n | ^^" + - "Error: [EASG0370031]: failed to parse int value '-1'\n --> compiler-test:4:21\n |\n 4 | const a: u128 = -1;\n | ^^" diff --git a/tests/expectations/compiler/compiler/integers/u128/negative_input_fail.leo.out b/tests/expectations/compiler/compiler/integers/u128/negative_input_fail.leo.out index 98df173765..c923771547 100644 --- a/tests/expectations/compiler/compiler/integers/u128/negative_input_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/negative_input_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[ECMP0372089]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u128) {}\n | ^" + - "Error: [ECMP0372089]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u128) {}\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/u128/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/u128/no_space_between_literal.leo.out index 94c49ab253..13902eae38 100644 --- a/tests/expectations/compiler/compiler/integers/u128/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EPAR0375004]: Unexpected white space between terms 1 and u128\n --> compiler-test:4:15\n |\n 4 | const i = 1 u128;\n | ^" + - "Error: [EPAR0375004]: Unexpected white space between terms 1 and u128\n --> compiler-test:4:15\n |\n 4 | const i = 1 u128;\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/u16/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/u16/max_fail.leo.out index d2d4378769..f72e74eabd 100644 --- a/tests/expectations/compiler/compiler/integers/u16/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370031]: failed to parse int value '65536'\n --> compiler-test:4:20\n |\n 4 | const a: u16 = 65536;\n | ^^^^^" + - "Error: [EASG0370031]: failed to parse int value '65536'\n --> compiler-test:4:20\n |\n 4 | const a: u16 = 65536;\n | ^^^^^" diff --git a/tests/expectations/compiler/compiler/integers/u16/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/u16/min_fail.leo.out index a4db8be980..ec1525d1ec 100644 --- a/tests/expectations/compiler/compiler/integers/u16/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370031]: failed to parse int value '-1'\n --> compiler-test:4:20\n |\n 4 | const a: u16 = -1;\n | ^^" + - "Error: [EASG0370031]: failed to parse int value '-1'\n --> compiler-test:4:20\n |\n 4 | const a: u16 = -1;\n | ^^" diff --git a/tests/expectations/compiler/compiler/integers/u16/negative_input_fail.leo.out b/tests/expectations/compiler/compiler/integers/u16/negative_input_fail.leo.out index b06d59885c..d7b8b136ee 100644 --- a/tests/expectations/compiler/compiler/integers/u16/negative_input_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/negative_input_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[ECMP0372089]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u16) {}\n | ^" + - "Error: [ECMP0372089]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u16) {}\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/u16/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/u16/no_space_between_literal.leo.out index c4a70ccfa8..b236bbea52 100644 --- a/tests/expectations/compiler/compiler/integers/u16/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EPAR0375004]: Unexpected white space between terms 1 and u16\n --> compiler-test:4:15\n |\n 4 | const i = 1 u16;\n | ^" + - "Error: [EPAR0375004]: Unexpected white space between terms 1 and u16\n --> compiler-test:4:15\n |\n 4 | const i = 1 u16;\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/u32/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/u32/max_fail.leo.out index f5321add3b..f33b079724 100644 --- a/tests/expectations/compiler/compiler/integers/u32/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370031]: failed to parse int value '4294967296'\n --> compiler-test:4:20\n |\n 4 | const a: u32 = 4294967296;\n | ^^^^^^^^^^" + - "Error: [EASG0370031]: failed to parse int value '4294967296'\n --> compiler-test:4:20\n |\n 4 | const a: u32 = 4294967296;\n | ^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/integers/u32/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/u32/min_fail.leo.out index 50a083ccac..acab12b37c 100644 --- a/tests/expectations/compiler/compiler/integers/u32/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370031]: failed to parse int value '-1'\n --> compiler-test:4:20\n |\n 4 | const a: u32 = -1;\n | ^^" + - "Error: [EASG0370031]: failed to parse int value '-1'\n --> compiler-test:4:20\n |\n 4 | const a: u32 = -1;\n | ^^" diff --git a/tests/expectations/compiler/compiler/integers/u32/negative_input_fail.leo.out b/tests/expectations/compiler/compiler/integers/u32/negative_input_fail.leo.out index 6679d32bb9..304c83ff0e 100644 --- a/tests/expectations/compiler/compiler/integers/u32/negative_input_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/negative_input_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[ECMP0372089]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u32) {}\n | ^" + - "Error: [ECMP0372089]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u32) {}\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/u32/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/u32/no_space_between_literal.leo.out index 5cdc0667e8..ffae67da70 100644 --- a/tests/expectations/compiler/compiler/integers/u32/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EPAR0375004]: Unexpected white space between terms 1 and u32\n --> compiler-test:4:15\n |\n 4 | const i = 1 u32;\n | ^" + - "Error: [EPAR0375004]: Unexpected white space between terms 1 and u32\n --> compiler-test:4:15\n |\n 4 | const i = 1 u32;\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/u64/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/u64/max_fail.leo.out index 58697defb8..eb02af02a1 100644 --- a/tests/expectations/compiler/compiler/integers/u64/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370031]: failed to parse int value '18446744073709551616'\n --> compiler-test:4:20\n |\n 4 | const a: u64 = 18446744073709551616;\n | ^^^^^^^^^^^^^^^^^^^^" + - "Error: [EASG0370031]: failed to parse int value '18446744073709551616'\n --> compiler-test:4:20\n |\n 4 | const a: u64 = 18446744073709551616;\n | ^^^^^^^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/integers/u64/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/u64/min_fail.leo.out index 6cafe3c760..d6c8da7920 100644 --- a/tests/expectations/compiler/compiler/integers/u64/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370031]: failed to parse int value '-1'\n --> compiler-test:4:20\n |\n 4 | const a: u64 = -1;\n | ^^" + - "Error: [EASG0370031]: failed to parse int value '-1'\n --> compiler-test:4:20\n |\n 4 | const a: u64 = -1;\n | ^^" diff --git a/tests/expectations/compiler/compiler/integers/u64/negative_input_fail.leo.out b/tests/expectations/compiler/compiler/integers/u64/negative_input_fail.leo.out index 62c3d9b7c9..153869f2e1 100644 --- a/tests/expectations/compiler/compiler/integers/u64/negative_input_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/negative_input_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[ECMP0372089]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u64) {}\n | ^" + - "Error: [ECMP0372089]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u64) {}\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/u64/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/u64/no_space_between_literal.leo.out index e20ed83f0a..d0142db447 100644 --- a/tests/expectations/compiler/compiler/integers/u64/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EPAR0375004]: Unexpected white space between terms 1 and u64\n --> compiler-test:4:15\n |\n 4 | const i = 1 u64;\n | ^" + - "Error: [EPAR0375004]: Unexpected white space between terms 1 and u64\n --> compiler-test:4:15\n |\n 4 | const i = 1 u64;\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/u8/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/u8/max_fail.leo.out index 20c2232e4e..a94c06481a 100644 --- a/tests/expectations/compiler/compiler/integers/u8/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370031]: failed to parse int value '256'\n --> compiler-test:4:19\n |\n 4 | const a: u8 = 256;\n | ^^^" + - "Error: [EASG0370031]: failed to parse int value '256'\n --> compiler-test:4:19\n |\n 4 | const a: u8 = 256;\n | ^^^" diff --git a/tests/expectations/compiler/compiler/integers/u8/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/u8/min_fail.leo.out index 82791fa784..a767289f9e 100644 --- a/tests/expectations/compiler/compiler/integers/u8/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370031]: failed to parse int value '-1'\n --> compiler-test:4:19\n |\n 4 | const a: u8 = -1;\n | ^^" + - "Error: [EASG0370031]: failed to parse int value '-1'\n --> compiler-test:4:19\n |\n 4 | const a: u8 = -1;\n | ^^" diff --git a/tests/expectations/compiler/compiler/integers/u8/negative_input_fail.leo.out b/tests/expectations/compiler/compiler/integers/u8/negative_input_fail.leo.out index 5b71ba6c73..48ddecbb71 100644 --- a/tests/expectations/compiler/compiler/integers/u8/negative_input_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/negative_input_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[ECMP0372089]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u8) {}\n | ^" + - "Error: [ECMP0372089]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u8) {}\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/u8/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/u8/no_space_between_literal.leo.out index 609e887f98..ff2b29278c 100644 --- a/tests/expectations/compiler/compiler/integers/u8/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EPAR0375004]: Unexpected white space between terms 1 and u8\n --> compiler-test:4:15\n |\n 4 | const i = 1 u8;\n | ^" + - "Error: [EPAR0375004]: Unexpected white space between terms 1 and u8\n --> compiler-test:4:15\n |\n 4 | const i = 1 u8;\n | ^" diff --git a/tests/expectations/compiler/compiler/mutability/array_fail.leo.out b/tests/expectations/compiler/compiler/mutability/array_fail.leo.out index 59d907acf7..1994ea61f6 100644 --- a/tests/expectations/compiler/compiler/mutability/array_fail.leo.out +++ b/tests/expectations/compiler/compiler/mutability/array_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370033]: illegal assignment to immutable variable 'a'\n --> compiler-test:5:5\n |\n 5 | a[0] = 0;\n | ^^^^^^^^" + - "Error: [EASG0370033]: illegal assignment to immutable variable 'a'\n --> compiler-test:5:5\n |\n 5 | a[0] = 0;\n | ^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/mutability/circuit_fail.leo.out b/tests/expectations/compiler/compiler/mutability/circuit_fail.leo.out index b874c61310..2acdf7d78e 100644 --- a/tests/expectations/compiler/compiler/mutability/circuit_fail.leo.out +++ b/tests/expectations/compiler/compiler/mutability/circuit_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370033]: illegal assignment to immutable variable 'a'\n --> compiler-test:10:5\n |\n 10 | a.x = 0;\n | ^^^^^^^" + - "Error: [EASG0370033]: illegal assignment to immutable variable 'a'\n --> compiler-test:10:5\n |\n 10 | a.x = 0;\n | ^^^^^^^" diff --git a/tests/expectations/compiler/compiler/mutability/circuit_function_const.leo.out b/tests/expectations/compiler/compiler/mutability/circuit_function_const.leo.out index b716bb9f14..b74ade55c8 100644 --- a/tests/expectations/compiler/compiler/mutability/circuit_function_const.leo.out +++ b/tests/expectations/compiler/compiler/mutability/circuit_function_const.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370010]: cannot call mutable member function 'foo' of circuit 'Foo' from immutable context\n --> compiler-test:15:5\n |\n 15 | a.foo();\n | ^^^^^" + - "Error: [EASG0370010]: cannot call mutable member function 'foo' of circuit 'Foo' from immutable context\n --> compiler-test:15:5\n |\n 15 | a.foo();\n | ^^^^^" diff --git a/tests/expectations/compiler/compiler/mutability/circuit_static_function_mut_fail.leo.out b/tests/expectations/compiler/compiler/mutability/circuit_static_function_mut_fail.leo.out index d1cc1063a3..5f13e6a818 100644 --- a/tests/expectations/compiler/compiler/mutability/circuit_static_function_mut_fail.leo.out +++ b/tests/expectations/compiler/compiler/mutability/circuit_static_function_mut_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370006]: extra circuit member 'x' for initialization of circuit 'Foo' is not allowed\n --> compiler-test:8:19\n |\n 8 | let a = Foo { x: 1 };\n | ^" + - "Error: [EASG0370006]: extra circuit member 'x' for initialization of circuit 'Foo' is not allowed\n --> compiler-test:8:19\n |\n 8 | let a = Foo { x: 1 };\n | ^" diff --git a/tests/expectations/compiler/compiler/mutability/const.leo.out b/tests/expectations/compiler/compiler/mutability/const.leo.out index 697794d4d1..bc943a8225 100644 --- a/tests/expectations/compiler/compiler/mutability/const.leo.out +++ b/tests/expectations/compiler/compiler/mutability/const.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370033]: illegal assignment to immutable variable 'a'\n --> compiler-test:6:5\n |\n 6 | a = 0;\n | ^^^^^" + - "Error: [EASG0370033]: illegal assignment to immutable variable 'a'\n --> compiler-test:6:5\n |\n 6 | a = 0;\n | ^^^^^" diff --git a/tests/expectations/compiler/compiler/mutability/function_input.leo.out b/tests/expectations/compiler/compiler/mutability/function_input.leo.out index 61e1f3a101..d62ff241ee 100644 --- a/tests/expectations/compiler/compiler/mutability/function_input.leo.out +++ b/tests/expectations/compiler/compiler/mutability/function_input.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370028]: failed to resolve variable reference 'a'\n --> compiler-test:5:5\n |\n 5 | a = false;\n | ^" + - "Error: [EASG0370028]: failed to resolve variable reference 'a'\n --> compiler-test:5:5\n |\n 5 | a = false;\n | ^" diff --git a/tests/expectations/compiler/compiler/mutability/let_fail.leo.out b/tests/expectations/compiler/compiler/mutability/let_fail.leo.out index 697794d4d1..bc943a8225 100644 --- a/tests/expectations/compiler/compiler/mutability/let_fail.leo.out +++ b/tests/expectations/compiler/compiler/mutability/let_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370033]: illegal assignment to immutable variable 'a'\n --> compiler-test:6:5\n |\n 6 | a = 0;\n | ^^^^^" + - "Error: [EASG0370033]: illegal assignment to immutable variable 'a'\n --> compiler-test:6:5\n |\n 6 | a = 0;\n | ^^^^^" diff --git a/tests/expectations/compiler/compiler/statements/assign_ternary.leo.out b/tests/expectations/compiler/compiler/statements/assign_ternary.leo.out index cb3a74368e..f5373d32e9 100644 --- a/tests/expectations/compiler/compiler/statements/assign_ternary.leo.out +++ b/tests/expectations/compiler/compiler/statements/assign_ternary.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370021]: ternary sides had different types: left u32, right bool\n --> compiler-test:4:13\n |\n 4 | let x = true ? x: true;\n | ^^^^^^^^^^^^^^" + - "Error: [EASG0370021]: ternary sides had different types: left u32, right bool\n --> compiler-test:4:13\n |\n 4 | let x = true ? x: true;\n | ^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/statements/duplicate_variable.leo.out b/tests/expectations/compiler/compiler/statements/duplicate_variable.leo.out index fdfd4f0fd5..0dc18a17b6 100644 --- a/tests/expectations/compiler/compiler/statements/duplicate_variable.leo.out +++ b/tests/expectations/compiler/compiler/statements/duplicate_variable.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370017]: a variable named \"x\" already exists in this scope\n --> compiler-test:5:3\n |\n 5 | let x = true;\n | ^^^^^^^^^^^^" + - "Error: [EASG0370017]: a variable named \"x\" already exists in this scope\n --> compiler-test:5:3\n |\n 5 | let x = true;\n | ^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/statements/ternary_non_const_fail.leo.out b/tests/expectations/compiler/compiler/statements/ternary_non_const_fail.leo.out index de7feb05aa..73c6f6e92c 100644 --- a/tests/expectations/compiler/compiler/statements/ternary_non_const_fail.leo.out +++ b/tests/expectations/compiler/compiler/statements/ternary_non_const_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "[EASG0370015]: failed to create const variable(s) 'y' with non constant values.\n --> compiler-test:5:5\n |\n 5 | const y = x > 2u8? 1u8 : 2u8;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^" + - "Error: [EASG0370015]: failed to create const variable(s) 'y' with non constant values.\n --> compiler-test:5:5\n |\n 5 | const y = x > 2u8? 1u8 : 2u8;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^" diff --git a/tests/expectations/parser/parser/circuits/fields_fail.leo.out b/tests/expectations/parser/parser/circuits/fields_fail.leo.out index b8496ba91c..a195c893e7 100644 --- a/tests/expectations/parser/parser/circuits/fields_fail.leo.out +++ b/tests/expectations/parser/parser/circuits/fields_fail.leo.out @@ -2,4 +2,4 @@ namespace: Parse expectation: Fail outputs: - - "[EPAR0375006]: Cannot mix use of commas and semi-colons for circuit member variable declarations.\n --> test:10:11\n |\n 10 | y: u32;\n | ^" + - "Error: [EPAR0375006]: Cannot mix use of commas and semi-colons for circuit member variable declarations.\n --> test:10:11\n |\n 10 | y: u32;\n | ^" diff --git a/tests/expectations/parser/parser/expression/array_init_fail.leo.out b/tests/expectations/parser/parser/expression/array_init_fail.leo.out index c8f6d05fcb..4b8f94e586 100644 --- a/tests/expectations/parser/parser/expression/array_init_fail.leo.out +++ b/tests/expectations/parser/parser/expression/array_init_fail.leo.out @@ -2,5 +2,5 @@ namespace: ParseExpression expectation: Fail outputs: - - "[EPAR0375010]: illegal spread in array initializer\n --> test:1:1\n |\n 1 | [...0u8; 1]\n | ^^^^^^^" - - "[EPAR0375010]: illegal spread in array initializer\n --> test:1:1\n |\n 1 | [...0; 1]\n | ^^^^^" + - "Error: [EPAR0375010]: illegal spread in array initializer\n --> test:1:1\n |\n 1 | [...0u8; 1]\n | ^^^^^^^" + - "Error: [EPAR0375010]: illegal spread in array initializer\n --> test:1:1\n |\n 1 | [...0; 1]\n | ^^^^^" diff --git a/tests/expectations/parser/parser/expression/array_inline_fail.leo.out b/tests/expectations/parser/parser/expression/array_inline_fail.leo.out index 9285c9e971..4d2804e7c0 100644 --- a/tests/expectations/parser/parser/expression/array_inline_fail.leo.out +++ b/tests/expectations/parser/parser/expression/array_inline_fail.leo.out @@ -2,8 +2,8 @@ namespace: ParseExpression expectation: Fail outputs: - - "[EPAR0375009]: unexpected string: expected 'expression', got ','\n --> test:1:2\n |\n 1 | [,]\n | ^" - - "[EPAR0375009]: unexpected string: expected 'expression', got ','\n --> test:1:2\n |\n 1 | [,,]\n | ^" - - "[EPAR0375009]: unexpected string: expected 'expression', got ','\n --> test:1:4\n |\n 1 | [0,,]\n | ^" - - "[EPAR0375009]: unexpected string: expected 'expression', got ','\n --> test:1:2\n |\n 1 | [,0]\n | ^" - - "[EPAR0375009]: unexpected string: expected 'expression', got ','\n --> test:1:2\n |\n 1 | [,0,]\n | ^" + - "Error: [EPAR0375009]: unexpected string: expected 'expression', got ','\n --> test:1:2\n |\n 1 | [,]\n | ^" + - "Error: [EPAR0375009]: unexpected string: expected 'expression', got ','\n --> test:1:2\n |\n 1 | [,,]\n | ^" + - "Error: [EPAR0375009]: unexpected string: expected 'expression', got ','\n --> test:1:4\n |\n 1 | [0,,]\n | ^" + - "Error: [EPAR0375009]: unexpected string: expected 'expression', got ','\n --> test:1:2\n |\n 1 | [,0]\n | ^" + - "Error: [EPAR0375009]: unexpected string: expected 'expression', got ','\n --> test:1:2\n |\n 1 | [,0,]\n | ^" diff --git a/tests/expectations/parser/parser/expression/circuit_init_fail.leo.out b/tests/expectations/parser/parser/expression/circuit_init_fail.leo.out index 960ca41ce7..e38a7ea93f 100644 --- a/tests/expectations/parser/parser/expression/circuit_init_fail.leo.out +++ b/tests/expectations/parser/parser/expression/circuit_init_fail.leo.out @@ -2,15 +2,15 @@ namespace: ParseExpression expectation: Fail outputs: - - "[EPAR0375003]: unexpected EOF\n --> test:1:3\n |\n 1 | x {\n | ^" + - "Error: [EPAR0375003]: unexpected EOF\n --> test:1:3\n |\n 1 | x {\n | ^" - "did not consume all input: '}' @ 1:3-4\n" - - "[EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:4\n |\n 1 | x {,}\n | ^" - - "[EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:5\n |\n 1 | x { , }\n | ^" - - "[EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:4\n |\n 1 | x {,,,}\n | ^" - - "[EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:6\n |\n 1 | x {x,,}\n | ^" - - "[EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:4\n |\n 1 | x {,,x}\n | ^" - - "[EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:4\n |\n 1 | x {,x}\n | ^" - - "[EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:8\n |\n 1 | x {x:y,,}\n | ^" - - "[EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:4\n |\n 1 | x {,,x:y}\n | ^" - - "[EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:4\n |\n 1 | x {,x:y}\n | ^" - - "[EPAR0375009]: unexpected string: expected 'expression', got '}'\n --> test:1:6\n |\n 1 | x {x:}\n | ^" + - "Error: [EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:4\n |\n 1 | x {,}\n | ^" + - "Error: [EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:5\n |\n 1 | x { , }\n | ^" + - "Error: [EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:4\n |\n 1 | x {,,,}\n | ^" + - "Error: [EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:6\n |\n 1 | x {x,,}\n | ^" + - "Error: [EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:4\n |\n 1 | x {,,x}\n | ^" + - "Error: [EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:4\n |\n 1 | x {,x}\n | ^" + - "Error: [EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:8\n |\n 1 | x {x:y,,}\n | ^" + - "Error: [EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:4\n |\n 1 | x {,,x:y}\n | ^" + - "Error: [EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:4\n |\n 1 | x {,x:y}\n | ^" + - "Error: [EPAR0375009]: unexpected string: expected 'expression', got '}'\n --> test:1:6\n |\n 1 | x {x:}\n | ^" diff --git a/tests/expectations/parser/parser/expression/literal/address_fail.leo.out b/tests/expectations/parser/parser/expression/literal/address_fail.leo.out index b2336bd422..6f39f1dec4 100644 --- a/tests/expectations/parser/parser/expression/literal/address_fail.leo.out +++ b/tests/expectations/parser/parser/expression/literal/address_fail.leo.out @@ -2,12 +2,12 @@ namespace: Token expectation: Fail outputs: - - "[EPAR0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" - - "[EPAR0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6Z2eu975wnpz2925ntjccd5cfqxtyu8sta57J9'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6Z2eu975wnpz2925ntjccd5cfqxtyu8sta57J9\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" - - "[EPAR0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" - - "[EPAR0375001]: invalid address literal: 'aleo1'\n --> test:1:1\n |\n 1 | aleo1\n | ^^^^^" - - "[EPAR0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" - - "[EPAR0375001]: invalid address literal: 'aleo1'\n --> test:1:1\n |\n 1 | aleo1\n | ^^^^^" - - "[EPAR0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" - - "[EPAR0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d11'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d11\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" - - "[EPAR0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1x'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1x\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" + - "Error: [EPAR0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" + - "Error: [EPAR0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6Z2eu975wnpz2925ntjccd5cfqxtyu8sta57J9'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6Z2eu975wnpz2925ntjccd5cfqxtyu8sta57J9\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" + - "Error: [EPAR0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" + - "Error: [EPAR0375001]: invalid address literal: 'aleo1'\n --> test:1:1\n |\n 1 | aleo1\n | ^^^^^" + - "Error: [EPAR0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" + - "Error: [EPAR0375001]: invalid address literal: 'aleo1'\n --> test:1:1\n |\n 1 | aleo1\n | ^^^^^" + - "Error: [EPAR0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" + - "Error: [EPAR0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d11'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d11\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" + - "Error: [EPAR0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1x'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1x\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" diff --git a/tests/expectations/parser/parser/expression/literal/char_fail.leo.out b/tests/expectations/parser/parser/expression/literal/char_fail.leo.out index 2ac57ba838..944bd1c196 100644 --- a/tests/expectations/parser/parser/expression/literal/char_fail.leo.out +++ b/tests/expectations/parser/parser/expression/literal/char_fail.leo.out @@ -2,38 +2,38 @@ namespace: Token expectation: Fail outputs: - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | 'a\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | ''\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\x9A'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\x7'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\x7g'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\xz'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\x80'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\xc1'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\xc2'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\xDF'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\xC0'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\xe0'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\x9f'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | 'abcdefg'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\t\\t'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\a'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\z'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\A'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\Z'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\1'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\9'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\*'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\x'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u{bbbbb}\\u{aaaa}'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\uz'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u1'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u123'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u{2764z'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u{276g}'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u00000000'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u01000000'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u9999999'\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: '\n --> test:1:1\n |\n 1 | '😭😂😘'\n | ^\n |\n = HELP TODO" + - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\'\n | ^\n |\n = HELP TODO" + - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | 'a\n | ^\n |\n = HELP TODO" + - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | ''\n | ^\n |\n = HELP TODO" + - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\x9A'\n | ^\n |\n = HELP TODO" + - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\x7'\n | ^\n |\n = HELP TODO" + - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\x7g'\n | ^\n |\n = HELP TODO" + - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\xz'\n | ^\n |\n = HELP TODO" + - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\x80'\n | ^\n |\n = HELP TODO" + - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\xc1'\n | ^\n |\n = HELP TODO" + - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\xc2'\n | ^\n |\n = HELP TODO" + - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\xDF'\n | ^\n |\n = HELP TODO" + - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\xC0'\n | ^\n |\n = HELP TODO" + - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\xe0'\n | ^\n |\n = HELP TODO" + - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\x9f'\n | ^\n |\n = HELP TODO" + - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | 'abcdefg'\n | ^\n |\n = HELP TODO" + - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\t\\t'\n | ^\n |\n = HELP TODO" + - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\a'\n | ^\n |\n = HELP TODO" + - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\z'\n | ^\n |\n = HELP TODO" + - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\A'\n | ^\n |\n = HELP TODO" + - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\Z'\n | ^\n |\n = HELP TODO" + - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\1'\n | ^\n |\n = HELP TODO" + - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\9'\n | ^\n |\n = HELP TODO" + - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\*'\n | ^\n |\n = HELP TODO" + - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\x'\n | ^\n |\n = HELP TODO" + - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u'\n | ^\n |\n = HELP TODO" + - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u{bbbbb}\\u{aaaa}'\n | ^\n |\n = HELP TODO" + - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\uz'\n | ^\n |\n = HELP TODO" + - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u1'\n | ^\n |\n = HELP TODO" + - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u123'\n | ^\n |\n = HELP TODO" + - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u{2764z'\n | ^\n |\n = HELP TODO" + - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u{276g}'\n | ^\n |\n = HELP TODO" + - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u00000000'\n | ^\n |\n = HELP TODO" + - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u01000000'\n | ^\n |\n = HELP TODO" + - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u9999999'\n | ^\n |\n = HELP TODO" + - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '😭😂😘'\n | ^\n |\n = HELP TODO" diff --git a/tests/expectations/parser/parser/expression/literal/group_fail.leo.out b/tests/expectations/parser/parser/expression/literal/group_fail.leo.out index 1a3f3b5fc3..befe1a0513 100644 --- a/tests/expectations/parser/parser/expression/literal/group_fail.leo.out +++ b/tests/expectations/parser/parser/expression/literal/group_fail.leo.out @@ -2,12 +2,12 @@ namespace: ParseExpression expectation: Fail outputs: - - "[EPAR0375009]: unexpected string: expected 'expression', got 'group'\n --> test:1:1\n |\n 1 | group\n | ^^^^^" + - "Error: [EPAR0375009]: unexpected string: expected 'expression', got 'group'\n --> test:1:1\n |\n 1 | group\n | ^^^^^" - "did not consume all input: 'group' @ 1:3-8\n" - "did not consume all input: 'group' @ 1:6-11\n" - - "[EPAR0375009]: unexpected string: expected 'expression', got ','\n --> test:1:2\n |\n 1 | (,)group\n | ^" - - "[EPAR0375009]: unexpected string: expected 'expression', got '+'\n --> test:1:2\n |\n 1 | (+, -,)group\n | ^" - - "[EPAR0375009]: unexpected string: expected 'expression', got ','\n --> test:1:2\n |\n 1 | (,+, -)group\n | ^" + - "Error: [EPAR0375009]: unexpected string: expected 'expression', got ','\n --> test:1:2\n |\n 1 | (,)group\n | ^" + - "Error: [EPAR0375009]: unexpected string: expected 'expression', got '+'\n --> test:1:2\n |\n 1 | (+, -,)group\n | ^" + - "Error: [EPAR0375009]: unexpected string: expected 'expression', got ','\n --> test:1:2\n |\n 1 | (,+, -)group\n | ^" - "did not consume all input: 'group' @ 1:6-11\n" - "did not consume all input: 'group' @ 1:12-17\n" - "did not consume all input: 'group' @ 1:15-20\n" diff --git a/tests/expectations/parser/parser/expression/literal/string_fail.leo.out b/tests/expectations/parser/parser/expression/literal/string_fail.leo.out index d539ecc86d..8f79cc3a34 100644 --- a/tests/expectations/parser/parser/expression/literal/string_fail.leo.out +++ b/tests/expectations/parser/parser/expression/literal/string_fail.leo.out @@ -2,10 +2,10 @@ namespace: Token expectation: Fail outputs: - - "[EPAR0375000]: \"\n --> test:1:1\n |\n 1 | \"Hello world!\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: \"\n --> test:1:1\n |\n 1 | \"\\\"\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: \"\n --> test:1:1\n |\n 1 | \"\\l\"\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: \"\n --> test:1:1\n |\n 1 | \"\\uaaa\"\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: \"\n --> test:1:1\n |\n 1 | \"\\u\"\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: \"\n --> test:1:1\n |\n 1 | \"\\xFF\"\n | ^\n |\n = HELP TODO" - - "[EPAR0375000]: \"\n --> test:1:1\n |\n 1 | \"\\x\"\n | ^\n |\n = HELP TODO" + - "Error: [EPAR0375000]: \"\n --> test:1:1\n |\n 1 | \"Hello world!\n | ^\n |\n = HELP TODO" + - "Error: [EPAR0375000]: \"\n --> test:1:1\n |\n 1 | \"\\\"\n | ^\n |\n = HELP TODO" + - "Error: [EPAR0375000]: \"\n --> test:1:1\n |\n 1 | \"\\l\"\n | ^\n |\n = HELP TODO" + - "Error: [EPAR0375000]: \"\n --> test:1:1\n |\n 1 | \"\\uaaa\"\n | ^\n |\n = HELP TODO" + - "Error: [EPAR0375000]: \"\n --> test:1:1\n |\n 1 | \"\\u\"\n | ^\n |\n = HELP TODO" + - "Error: [EPAR0375000]: \"\n --> test:1:1\n |\n 1 | \"\\xFF\"\n | ^\n |\n = HELP TODO" + - "Error: [EPAR0375000]: \"\n --> test:1:1\n |\n 1 | \"\\x\"\n | ^\n |\n = HELP TODO" diff --git a/tests/expectations/parser/parser/functions/annotated_fail.leo.out b/tests/expectations/parser/parser/functions/annotated_fail.leo.out index 6d5c9045cc..b8cd8b8d51 100644 --- a/tests/expectations/parser/parser/functions/annotated_fail.leo.out +++ b/tests/expectations/parser/parser/functions/annotated_fail.leo.out @@ -2,4 +2,4 @@ namespace: Parse expectation: Fail outputs: - - "[EPAR0375005]: expected 'identifier', 'number' -- got ')'\n --> test:3:12\n |\n 3 | @test(test,)\n | ^" + - "Error: [EPAR0375005]: expected 'identifier', 'number' -- got ')'\n --> test:3:12\n |\n 3 | @test(test,)\n | ^" diff --git a/tests/expectations/parser/parser/functions/const_input_fail.leo.out b/tests/expectations/parser/parser/functions/const_input_fail.leo.out index 68fe07f5dc..4d782992f1 100644 --- a/tests/expectations/parser/parser/functions/const_input_fail.leo.out +++ b/tests/expectations/parser/parser/functions/const_input_fail.leo.out @@ -2,4 +2,4 @@ namespace: Parse expectation: Fail outputs: - - "[EPAR0375009]: unexpected string: expected 'ident', got 'input'\n --> test:3:18\n |\n 3 | function x(const input) {\n | ^^^^^" + - "Error: [EPAR0375009]: unexpected string: expected 'ident', got 'input'\n --> test:3:18\n |\n 3 | function x(const input) {\n | ^^^^^" diff --git a/tests/expectations/parser/parser/import/import_empty_list_fail.leo.out b/tests/expectations/parser/parser/import/import_empty_list_fail.leo.out index dd9ee350f9..208a8168e2 100644 --- a/tests/expectations/parser/parser/import/import_empty_list_fail.leo.out +++ b/tests/expectations/parser/parser/import/import_empty_list_fail.leo.out @@ -2,4 +2,4 @@ namespace: Parse expectation: Fail outputs: - - "[EPAR0375002]: Cannot import empty list\n --> test:3:8\n |\n 3 | import a.();\n | ^" + - "Error: [EPAR0375002]: Cannot import empty list\n --> test:3:8\n |\n 3 | import a.();\n | ^" diff --git a/tests/expectations/parser/parser/import/invalid.leo.out b/tests/expectations/parser/parser/import/invalid.leo.out index 6dbb36e91b..62e236873f 100644 --- a/tests/expectations/parser/parser/import/invalid.leo.out +++ b/tests/expectations/parser/parser/import/invalid.leo.out @@ -2,4 +2,4 @@ namespace: Parse expectation: Fail outputs: - - "[EPAR0375005]: expected . -- got ';'\n --> test:3:18\n |\n 3 | import foo as bar;\n | ^" + - "Error: [EPAR0375005]: expected . -- got ';'\n --> test:3:18\n |\n 3 | import foo as bar;\n | ^" diff --git a/tests/expectations/parser/parser/statement/conditional_fail.leo.out b/tests/expectations/parser/parser/statement/conditional_fail.leo.out index e0e265d83d..5edf5ccd68 100644 --- a/tests/expectations/parser/parser/statement/conditional_fail.leo.out +++ b/tests/expectations/parser/parser/statement/conditional_fail.leo.out @@ -2,4 +2,4 @@ namespace: ParseStatement expectation: Fail outputs: - - "[EPAR0375008]: unexpected statement: expected 'Block or Conditional', got 'let mut x = 2;'\n --> test:1:17\n |\n 1 | if true {} else let x = 2;\n | ^^^^^^^^^" + - "Error: [EPAR0375008]: unexpected statement: expected 'Block or Conditional', got 'let mut x = 2;'\n --> test:1:17\n |\n 1 | if true {} else let x = 2;\n | ^^^^^^^^^" diff --git a/tests/expectations/parser/parser/statement/definition_fail.leo.out b/tests/expectations/parser/parser/statement/definition_fail.leo.out index 413d1e3c72..d80b64d83e 100644 --- a/tests/expectations/parser/parser/statement/definition_fail.leo.out +++ b/tests/expectations/parser/parser/statement/definition_fail.leo.out @@ -2,26 +2,26 @@ namespace: ParseStatement expectation: Fail outputs: - - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x = expr;\n | ^^^^^^^" - - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x = ();\n | ^^^^^^^" - - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x = x+y;\n | ^^^^^^^" - - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x = (x,y);\n | ^^^^^^^" - - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x = x();\n | ^^^^^^^" - - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x = expr;\n | ^^^^^^^^^" - - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x = ();\n | ^^^^^^^^^" - - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x = x+y;\n | ^^^^^^^^^" - - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x = (x,y);\n | ^^^^^^^^^" - - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x = x();\n | ^^^^^^^^^" - - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x: u32 = expr;\n | ^^^^^^^" - - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x: u32 = ();\n | ^^^^^^^" - - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x: u32 = x+y;\n | ^^^^^^^" - - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x: u32 = (x,y);\n | ^^^^^^^" - - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x: u32 = x();\n | ^^^^^^^" - - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x: u32 = expr;\n | ^^^^^^^^^" - - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x: u32 = ();\n | ^^^^^^^^^" - - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x: u32 = x+y;\n | ^^^^^^^^^" - - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x: u32 = (x,y);\n | ^^^^^^^^^" - - "[EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x: u32 = x();\n | ^^^^^^^^^" - - "[EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:10\n |\n 1 | let (x,y,,) = ();\n | ^" - - "[EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:6\n |\n 1 | let (,x,y) = ();\n | ^" - - "[EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:8\n |\n 1 | let (x,,y) = ();\n | ^" + - "Error: [EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x = expr;\n | ^^^^^^^" + - "Error: [EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x = ();\n | ^^^^^^^" + - "Error: [EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x = x+y;\n | ^^^^^^^" + - "Error: [EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x = (x,y);\n | ^^^^^^^" + - "Error: [EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x = x();\n | ^^^^^^^" + - "Error: [EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x = expr;\n | ^^^^^^^^^" + - "Error: [EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x = ();\n | ^^^^^^^^^" + - "Error: [EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x = x+y;\n | ^^^^^^^^^" + - "Error: [EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x = (x,y);\n | ^^^^^^^^^" + - "Error: [EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x = x();\n | ^^^^^^^^^" + - "Error: [EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x: u32 = expr;\n | ^^^^^^^" + - "Error: [EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x: u32 = ();\n | ^^^^^^^" + - "Error: [EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x: u32 = x+y;\n | ^^^^^^^" + - "Error: [EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x: u32 = (x,y);\n | ^^^^^^^" + - "Error: [EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x: u32 = x();\n | ^^^^^^^" + - "Error: [EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x: u32 = expr;\n | ^^^^^^^^^" + - "Error: [EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x: u32 = ();\n | ^^^^^^^^^" + - "Error: [EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x: u32 = x+y;\n | ^^^^^^^^^" + - "Error: [EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x: u32 = (x,y);\n | ^^^^^^^^^" + - "Error: [EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x: u32 = x();\n | ^^^^^^^^^" + - "Error: [EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:10\n |\n 1 | let (x,y,,) = ();\n | ^" + - "Error: [EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:6\n |\n 1 | let (,x,y) = ();\n | ^" + - "Error: [EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:8\n |\n 1 | let (x,,y) = ();\n | ^" diff --git a/tests/expectations/parser/parser/statement/return_fail.leo.out b/tests/expectations/parser/parser/statement/return_fail.leo.out index c1212369a9..46ed0ecc34 100644 --- a/tests/expectations/parser/parser/statement/return_fail.leo.out +++ b/tests/expectations/parser/parser/statement/return_fail.leo.out @@ -2,6 +2,6 @@ namespace: ParseStatement expectation: Fail outputs: - - "[EPAR0375003]: unexpected EOF\n --> test:1:1\n |\n 1 | return\n | ^^^^^^" - - "[EPAR0375003]: unexpected EOF\n --> test:1:8\n |\n 1 | return 5\n | ^" - - "[EPAR0375009]: unexpected string: expected 'expression', got 'if'\n --> test:2:1\n |\n 2 | if x {}\n | ^^" + - "Error: [EPAR0375003]: unexpected EOF\n --> test:1:1\n |\n 1 | return\n | ^^^^^^" + - "Error: [EPAR0375003]: unexpected EOF\n --> test:1:8\n |\n 1 | return 5\n | ^" + - "Error: [EPAR0375009]: unexpected string: expected 'expression', got 'if'\n --> test:2:1\n |\n 2 | if x {}\n | ^^" From bd0032e98be196a6ac332c990c83924cfafdef1b Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Thu, 12 Aug 2021 02:25:43 -0700 Subject: [PATCH 28/58] realized not all tests were being run with cargo test-all-features --- .github/workflows/ci.yml | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f3dd8d8af2..675a7eb5b9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,15 +92,14 @@ jobs: - name: Start sccache server run: | sccache --start-server - - - name: Install cargo-all-features - run: | - cargo install cargo-all-features - name: Test - run: | - cd package - cargo test-all-features + uses: actions-rs/cargo@v1 + with: + command: test + args: --all --features ci_skip -- --nocapture + env: + CARGO_INCREMENTAL: "0" - name: Print sccache stats run: sccache --show-stats @@ -160,17 +159,11 @@ jobs: run: | sccache --start-server - - name: Install cargo-all-features - run: | - SDKROOT=$(xcrun -sdk macosx11.1 --show-sdk-path) \ - MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx11.1 --show-sdk-platform-version) \ - cargo install cargo-all-features - - name: Test run: | SDKROOT=$(xcrun -sdk macosx11.1 --show-sdk-path) \ MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx11.1 --show-sdk-platform-version) \ - cd package && cargo test-all-features + cd package && cargo test --all --features ci_skip -- --nocapture - name: Print sccache stats run: sccache --show-stats @@ -306,7 +299,7 @@ jobs: uses: actions-rs/cargo@v1 with: command: test - args: --all --features ci_skip + args: --all --features ci_skip -- --nocapture env: CARGO_INCREMENTAL: "0" From ab5fcecae20d37907ce669d2e8b9a8a539264908 Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Thu, 12 Aug 2021 02:42:42 -0700 Subject: [PATCH 29/58] more debugging --- .github/workflows/ci.yml | 2 +- compiler/src/test.rs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 675a7eb5b9..2e6207a5ed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -163,7 +163,7 @@ jobs: run: | SDKROOT=$(xcrun -sdk macosx11.1 --show-sdk-path) \ MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx11.1 --show-sdk-platform-version) \ - cd package && cargo test --all --features ci_skip -- --nocapture + cd package && cargo test --all -- --nocapture - name: Print sccache stats run: sccache --show-stats diff --git a/compiler/src/test.rs b/compiler/src/test.rs index 61e411393f..77eac35212 100644 --- a/compiler/src/test.rs +++ b/compiler/src/test.rs @@ -228,9 +228,11 @@ impl Namespace for CompileNamespace { if test.name == "import_weird_names_nested" { println!( - "{:?}", + "{}", Ast::from_json_file("/tmp/output/initial_ast.json".into()) .unwrap_or_else(|_| Ast::new(Program::new("Error reading initial theorem.".to_string()))) + .to_json_string() + .unwrap_or_else(|_| "Error converting ast to string.".to_string()), ); } From a09f6f0c8328867998c036c31de79ffef1a233c1 Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Thu, 12 Aug 2021 03:27:18 -0700 Subject: [PATCH 30/58] serilization for span that's test dependent --- compiler/src/test.rs | 10 - errors/src/common/mod.rs | 2 +- errors/src/common/span.rs | 31 +- .../compiler/compiler/address/branch.leo.out | 6 +- .../compiler/compiler/address/equal.leo.out | 6 +- .../compiler/compiler/address/index.leo.out | 6 +- .../compiler/compiler/address/ternary.leo.out | 6 +- .../compiler/array/complex_access.leo.out | 6 +- .../compiler/array/equal_initializer.leo.out | 6 +- .../array/equal_initializer_2.leo.out | 6 +- .../compiler/array/input_nested_3x2.leo.out | 6 +- .../compiler/array/input_tuple_3x2.leo.out | 6 +- .../compiler/array/multi_initializer.leo.out | 6 +- .../compiler/compiler/array/nested.leo.out | 6 +- .../compiler/array/nested_3x2_value.leo.out | 6 +- .../compiler/compiler/array/registers.leo.out | 6 +- .../compiler/compiler/array/slice.leo.out | 6 +- .../compiler/array/slice_lower.leo.out | 6 +- .../compiler/compiler/array/spread.leo.out | 6 +- .../compiler/array/ternary_in_array.leo.out | 6 +- .../compiler/array/tuple_3x2_value.leo.out | 6 +- .../compiler/array/type_input_3x2.leo.out | 6 +- .../compiler/array/type_input_4x3x2.leo.out | 6 +- .../type_nested_value_nested_3x2.leo.out | 6 +- .../type_nested_value_nested_4x3x2.leo.out | 6 +- .../array/type_nested_value_tuple_3x2.leo.out | 6 +- .../type_nested_value_tuple_4x3x2.leo.out | 6 +- .../array/type_tuple_value_nested_3x2.leo.out | 6 +- .../type_tuple_value_nested_4x3x2.leo.out | 6 +- .../array/type_tuple_value_tuple_3x2.leo.out | 6 +- .../type_tuple_value_tuple_4x3x2.leo.out | 6 +- .../compiler/compiler/boolean/and.leo.out | 6 +- .../compiler/boolean/conditional.leo.out | 6 +- .../compiler/compiler/boolean/equal.leo.out | 6 +- .../compiler/boolean/not_equal.leo.out | 6 +- .../compiler/compiler/boolean/or.leo.out | 6 +- .../compiler/compiler/char/circuit.leo.out | 6 +- .../compiler/compiler/char/neq.leo.out | 6 +- .../compiler/char/nonprinting.leo.out | 6 +- .../compiler/compiler/char/out.leo.out | 6 +- .../big_self_in_circuit_replacement.leo.out | 6 +- .../circuits/const_self_variable.leo.out | 6 +- ...ne_circuit_inside_circuit_function.leo.out | 6 +- .../circuits/duplicate_name_context.leo.out | 6 +- .../compiler/compiler/circuits/inline.leo.out | 6 +- .../circuits/inline_member_pass.leo.out | 6 +- .../compiler/circuits/member_function.leo.out | 6 +- .../circuits/member_function_nested.leo.out | 6 +- .../circuits/member_static_function.leo.out | 6 +- .../member_static_function_nested.leo.out | 6 +- .../compiler/circuits/member_variable.leo.out | 6 +- .../member_variable_and_function.leo.out | 6 +- .../circuits/mut_self_variable.leo.out | 6 +- .../circuits/mut_self_variable_branch.leo.out | 6 +- .../mut_self_variable_conditional.leo.out | 6 +- .../compiler/circuits/mut_variable.leo.out | 6 +- .../mutable_call_immutable_context.leo.out | 6 +- .../compiler/circuits/pedersen_mock.leo.out | 6 +- .../compiler/circuits/self_member.leo.out | 6 +- .../compiler/compiler/console/assert.leo.out | 6 +- .../console/conditional_assert.leo.out | 6 +- .../compiler/compiler/console/error.leo.out | 6 +- .../compiler/compiler/console/log.leo.out | 6 +- .../compiler/console/log_conditional.leo.out | 6 +- .../compiler/console/log_input.leo.out | 6 +- .../compiler/console/log_parameter.leo.out | 6 +- .../console/log_parameter_many.leo.out | 6 +- .../compiler/definition/out_of_order.leo.out | 6 +- .../out_of_order_with_import.leo.out | 6 +- .../compiler/compiler/field/add.leo.out | 6 +- .../compiler/compiler/field/div.leo.out | 6 +- .../compiler/compiler/field/eq.leo.out | 6 +- .../compiler/compiler/field/field.leo.out | 6 +- .../compiler/compiler/field/mul.leo.out | 6 +- .../compiler/compiler/field/negate.leo.out | 6 +- .../compiler/function/array_input.leo.out | 6 +- .../function/array_params_direct_call.leo.out | 6 +- .../function/conditional_return.leo.out | 6 +- .../compiler/compiler/function/empty.leo.out | 6 +- .../compiler/function/iteration.leo.out | 6 +- .../function/iteration_repeated.leo.out | 6 +- .../function/multiple_returns.leo.out | 6 +- .../function/multiple_returns_main.leo.out | 6 +- .../compiler/function/newlines.leo.out | 6 +- .../compiler/function/repeated.leo.out | 6 +- .../compiler/compiler/function/return.leo.out | 6 +- .../function/return_array_nested_pass.leo.out | 6 +- .../function/return_array_tuple_pass.leo.out | 6 +- .../compiler/function/return_tuple.leo.out | 6 +- .../function/return_tuple_conditional.leo.out | 6 +- .../compiler/function/value_unchanged.leo.out | 6 +- .../global_consts/global_const_types.leo.out | 6 +- .../tests/import_dependency_folder.leo.out | 6 +- .../compiler/import_local/import_all.leo.out | 6 +- .../compiler/import_local/import_as.leo.out | 6 +- .../compiler/import_local/import_dir.leo.out | 6 +- .../import_local/import_files.leo.out | 6 +- .../compiler/import_local/import_many.leo.out | 6 +- .../import_local/import_weird_names.leo.out | 6 +- .../import_weird_names_nested.leo.out | 6 +- .../input_files/program_input/main.leo.out | 6 +- .../program_input/main_array.leo.out | 6 +- .../program_input/main_char.leo.out | 6 +- .../program_input/main_field.leo.out | 6 +- .../program_input/main_group.leo.out | 6 +- .../main_multi_dimension_array.leo.out | 6 +- .../program_input/main_multiple.leo.out | 6 +- .../program_input/main_string.leo.out | 6 +- .../program_input/main_tuple.leo.out | 6 +- .../basic.leo.out | 6 +- .../token_withdraw.leo.out | 6 +- .../program_input_constants/main.leo.out | 6 +- .../main_array.leo.out | 6 +- .../program_input_constants/main_char.leo.out | 6 +- .../main_field.leo.out | 6 +- .../main_group.leo.out | 6 +- .../main_multi_dimension_array.leo.out | 6 +- .../main_multiple.leo.out | 6 +- .../main_string.leo.out | 6 +- .../main_tuple.leo.out | 6 +- .../program_registers/registers_array.leo.out | 6 +- .../program_registers/registers_pass.leo.out | 6 +- .../program_state/access_all.leo.out | 6 +- .../program_state/access_state.leo.out | 6 +- .../input_files/program_state/basic.leo.out | 6 +- .../compiler/integers/i128/add.leo.out | 6 +- .../integers/i128/console_assert.leo.out | 6 +- .../compiler/integers/i128/div.leo.out | 6 +- .../compiler/integers/i128/eq.leo.out | 6 +- .../compiler/integers/i128/ge.leo.out | 6 +- .../compiler/integers/i128/gt.leo.out | 6 +- .../compiler/integers/i128/le.leo.out | 6 +- .../compiler/integers/i128/lt.leo.out | 6 +- .../compiler/integers/i128/max.leo.out | 6 +- .../compiler/integers/i128/min.leo.out | 6 +- .../compiler/integers/i128/mul.leo.out | 6 +- .../compiler/integers/i128/ne.leo.out | 6 +- .../compiler/integers/i128/negate.leo.out | 6 +- .../compiler/integers/i128/negate_min.leo.out | 6 +- .../integers/i128/negate_zero.leo.out | 6 +- .../compiler/integers/i128/sub.leo.out | 6 +- .../compiler/integers/i128/ternary.leo.out | 6 +- .../compiler/integers/i16/add.leo.out | 6 +- .../integers/i16/console_assert.leo.out | 6 +- .../compiler/integers/i16/div.leo.out | 6 +- .../compiler/compiler/integers/i16/eq.leo.out | 6 +- .../compiler/compiler/integers/i16/ge.leo.out | 6 +- .../compiler/compiler/integers/i16/gt.leo.out | 6 +- .../compiler/compiler/integers/i16/le.leo.out | 6 +- .../compiler/compiler/integers/i16/lt.leo.out | 6 +- .../compiler/integers/i16/max.leo.out | 6 +- .../compiler/integers/i16/min.leo.out | 6 +- .../compiler/integers/i16/mul.leo.out | 6 +- .../compiler/compiler/integers/i16/ne.leo.out | 6 +- .../compiler/integers/i16/negate.leo.out | 6 +- .../compiler/integers/i16/negate_min.leo.out | 6 +- .../compiler/integers/i16/negate_zero.leo.out | 6 +- .../compiler/integers/i16/sub.leo.out | 6 +- .../compiler/integers/i16/ternary.leo.out | 6 +- .../compiler/integers/i32/add.leo.out | 6 +- .../integers/i32/console_assert.leo.out | 6 +- .../compiler/integers/i32/div.leo.out | 6 +- .../compiler/compiler/integers/i32/eq.leo.out | 6 +- .../compiler/compiler/integers/i32/ge.leo.out | 6 +- .../compiler/compiler/integers/i32/gt.leo.out | 6 +- .../compiler/compiler/integers/i32/le.leo.out | 6 +- .../compiler/compiler/integers/i32/lt.leo.out | 6 +- .../compiler/integers/i32/max.leo.out | 6 +- .../compiler/integers/i32/min.leo.out | 6 +- .../compiler/integers/i32/mul.leo.out | 6 +- .../compiler/compiler/integers/i32/ne.leo.out | 6 +- .../compiler/integers/i32/negate.leo.out | 6 +- .../compiler/integers/i32/negate_min.leo.out | 6 +- .../compiler/integers/i32/negate_zero.leo.out | 6 +- .../compiler/integers/i32/sub.leo.out | 6 +- .../compiler/integers/i32/ternary.leo.out | 6 +- .../compiler/integers/i64/add.leo.out | 6 +- .../integers/i64/console_assert.leo.out | 6 +- .../compiler/integers/i64/div.leo.out | 6 +- .../compiler/compiler/integers/i64/eq.leo.out | 6 +- .../compiler/compiler/integers/i64/ge.leo.out | 6 +- .../compiler/compiler/integers/i64/gt.leo.out | 6 +- .../compiler/compiler/integers/i64/le.leo.out | 6 +- .../compiler/compiler/integers/i64/lt.leo.out | 6 +- .../compiler/integers/i64/max.leo.out | 6 +- .../compiler/integers/i64/min.leo.out | 6 +- .../compiler/integers/i64/mul.leo.out | 6 +- .../compiler/compiler/integers/i64/ne.leo.out | 6 +- .../compiler/integers/i64/negate.leo.out | 6 +- .../compiler/integers/i64/negate_min.leo.out | 6 +- .../compiler/integers/i64/negate_zero.leo.out | 6 +- .../compiler/integers/i64/sub.leo.out | 6 +- .../compiler/integers/i64/ternary.leo.out | 6 +- .../compiler/compiler/integers/i8/add.leo.out | 6 +- .../integers/i8/console_assert.leo.out | 6 +- .../compiler/compiler/integers/i8/div.leo.out | 6 +- .../compiler/compiler/integers/i8/eq.leo.out | 6 +- .../compiler/compiler/integers/i8/ge.leo.out | 6 +- .../compiler/compiler/integers/i8/gt.leo.out | 6 +- .../compiler/compiler/integers/i8/le.leo.out | 6 +- .../compiler/compiler/integers/i8/lt.leo.out | 6 +- .../compiler/compiler/integers/i8/max.leo.out | 6 +- .../compiler/compiler/integers/i8/min.leo.out | 6 +- .../compiler/compiler/integers/i8/mul.leo.out | 6 +- .../compiler/compiler/integers/i8/ne.leo.out | 6 +- .../compiler/integers/i8/negate.leo.out | 6 +- .../compiler/integers/i8/negate_zero.leo.out | 6 +- .../compiler/compiler/integers/i8/sub.leo.out | 6 +- .../compiler/integers/i8/ternary.leo.out | 6 +- .../compiler/integers/u128/add.leo.out | 6 +- .../integers/u128/console_assert.leo.out | 6 +- .../compiler/integers/u128/div.leo.out | 6 +- .../compiler/integers/u128/eq.leo.out | 6 +- .../compiler/integers/u128/ge.leo.out | 6 +- .../compiler/integers/u128/gt.leo.out | 6 +- .../compiler/integers/u128/input.leo.out | 6 +- .../compiler/integers/u128/le.leo.out | 6 +- .../compiler/integers/u128/lt.leo.out | 6 +- .../compiler/integers/u128/max.leo.out | 6 +- .../compiler/integers/u128/min.leo.out | 6 +- .../compiler/integers/u128/mul.leo.out | 6 +- .../compiler/integers/u128/ne.leo.out | 6 +- .../compiler/integers/u128/sub.leo.out | 6 +- .../compiler/integers/u128/ternary.leo.out | 6 +- .../compiler/integers/u16/add.leo.out | 6 +- .../integers/u16/console_assert.leo.out | 6 +- .../compiler/integers/u16/div.leo.out | 6 +- .../compiler/compiler/integers/u16/eq.leo.out | 6 +- .../compiler/compiler/integers/u16/ge.leo.out | 6 +- .../compiler/compiler/integers/u16/gt.leo.out | 6 +- .../compiler/integers/u16/input.leo.out | 6 +- .../compiler/compiler/integers/u16/le.leo.out | 6 +- .../compiler/compiler/integers/u16/lt.leo.out | 6 +- .../compiler/integers/u16/max.leo.out | 6 +- .../compiler/integers/u16/min.leo.out | 6 +- .../compiler/integers/u16/mul.leo.out | 6 +- .../compiler/compiler/integers/u16/ne.leo.out | 6 +- .../compiler/integers/u16/sub.leo.out | 6 +- .../compiler/integers/u16/ternary.leo.out | 6 +- .../compiler/integers/u32/add.leo.out | 6 +- .../integers/u32/console_assert.leo.out | 6 +- .../compiler/integers/u32/div.leo.out | 6 +- .../compiler/compiler/integers/u32/eq.leo.out | 6 +- .../compiler/compiler/integers/u32/ge.leo.out | 6 +- .../compiler/compiler/integers/u32/gt.leo.out | 6 +- .../compiler/integers/u32/input.leo.out | 6 +- .../compiler/compiler/integers/u32/le.leo.out | 6 +- .../compiler/compiler/integers/u32/lt.leo.out | 6 +- .../compiler/integers/u32/max.leo.out | 6 +- .../compiler/integers/u32/min.leo.out | 6 +- .../compiler/integers/u32/mul.leo.out | 6 +- .../compiler/compiler/integers/u32/ne.leo.out | 6 +- .../compiler/integers/u32/sub.leo.out | 6 +- .../compiler/integers/u32/ternary.leo.out | 6 +- .../compiler/integers/u64/add.leo.out | 6 +- .../integers/u64/console_assert.leo.out | 6 +- .../compiler/integers/u64/div.leo.out | 6 +- .../compiler/compiler/integers/u64/eq.leo.out | 6 +- .../compiler/compiler/integers/u64/ge.leo.out | 6 +- .../compiler/compiler/integers/u64/gt.leo.out | 6 +- .../compiler/integers/u64/input.leo.out | 6 +- .../compiler/compiler/integers/u64/le.leo.out | 6 +- .../compiler/compiler/integers/u64/lt.leo.out | 6 +- .../compiler/integers/u64/max.leo.out | 6 +- .../compiler/integers/u64/min.leo.out | 6 +- .../compiler/integers/u64/mul.leo.out | 6 +- .../compiler/compiler/integers/u64/ne.leo.out | 6 +- .../compiler/integers/u64/sub.leo.out | 6 +- .../compiler/integers/u64/ternary.leo.out | 6 +- .../compiler/compiler/integers/u8/add.leo.out | 6 +- .../integers/u8/console_assert.leo.out | 6 +- .../compiler/compiler/integers/u8/div.leo.out | 6 +- .../compiler/compiler/integers/u8/eq.leo.out | 6 +- .../compiler/compiler/integers/u8/ge.leo.out | 6 +- .../compiler/compiler/integers/u8/gt.leo.out | 6 +- .../compiler/integers/u8/input.leo.out | 6 +- .../compiler/compiler/integers/u8/le.leo.out | 6 +- .../compiler/compiler/integers/u8/lt.leo.out | 6 +- .../compiler/compiler/integers/u8/max.leo.out | 6 +- .../compiler/compiler/integers/u8/min.leo.out | 6 +- .../compiler/compiler/integers/u8/mul.leo.out | 6 +- .../compiler/compiler/integers/u8/ne.leo.out | 6 +- .../compiler/compiler/integers/u8/sub.leo.out | 6 +- .../compiler/integers/u8/ternary.leo.out | 6 +- .../compiler/mutability/array_dyn_mut.leo.out | 6 +- .../mutability/array_dyn_mut_indirect.leo.out | 6 +- .../compiler/mutability/array_mut.leo.out | 6 +- .../mutability/array_splice_mut.leo.out | 6 +- .../mutability/array_tuple_mut.leo.out | 6 +- .../mutability/circuit_function_mut.leo.out | 6 +- .../mutability/circuit_variable_mut.leo.out | 6 +- .../compiler/mutability/cond_mut.leo.out | 6 +- .../mutability/function_input_mut.leo.out | 6 +- .../compiler/mutability/let_mut.leo.out | 6 +- .../mutability/let_mut_nested.leo.out | 6 +- .../compiler/compiler/mutability/swap.leo.out | 6 +- .../compiler/statements/all_loops.leo.out | 6 +- .../compiler/statements/block.leo.out | 6 +- .../compiler/statements/chain.leo.out | 6 +- .../statements/compound_assignment.leo.out | 6 +- .../compiler/statements/for_loop.leo.out | 6 +- .../statements/iteration_basic.leo.out | 6 +- .../statements/iteration_variable.leo.out | 6 +- .../statements/multiple_returns.leo.out | 6 +- .../compiler/statements/mutate.leo.out | 6 +- .../compiler/statements/nested_mutate.leo.out | 6 +- .../compiler/statements/reverse_loops.leo.out | 6 +- .../compiler/statements/reverse_one.leo.out | 6 +- .../compiler/compiler/string/circuit.leo.out | 6 +- .../compiler/compiler/string/equality.leo.out | 6 +- .../compiler/compiler/string/replace.leo.out | 6 +- .../string/string_transformation.leo.out | 6 +- .../compiler/compiler/tuples/access.leo.out | 6 +- .../compiler/compiler/tuples/basic.leo.out | 6 +- .../compiler/tuples/dependent.leo.out | 6 +- .../compiler/tuples/destructured.leo.out | 6 +- .../compiler/tuples/nested_access.leo.out | 6 +- .../parser/parser/circuits/big_self.leo.out | 16 +- .../parser/parser/circuits/empty.leo.out | 4 +- .../circuits/field_and_functions.leo.out | 28 +- .../parser/parser/circuits/fields.leo.out | 8 +- .../parser/parser/circuits/functions.leo.out | 24 +- .../parser/parser/circuits/mut_self.leo.out | 16 +- .../parser/parser/circuits/self.leo.out | 16 +- .../expression/access/array_access.leo.out | 84 +-- .../access/array_range_access.leo.out | 130 ++--- .../parser/expression/access/call.leo.out | 68 +-- .../parser/expression/access/circuit.leo.out | 48 +- .../expression/access/circuit_static.leo.out | 48 +- .../parser/expression/access/tuple.leo.out | 30 +- .../parser/expression/array_init.leo.out | 28 +- .../parser/expression/array_inline.leo.out | 64 +-- .../parser/expression/binary/add.leo.out | 68 +-- .../parser/expression/binary/and.leo.out | 22 +- .../parser/expression/binary/div.leo.out | 36 +- .../parser/expression/binary/eq.leo.out | 56 +- .../parser/expression/binary/exp.leo.out | 48 +- .../parser/expression/binary/gt.leo.out | 68 +-- .../parser/expression/binary/gte.leo.out | 68 +-- .../parser/expression/binary/lt.leo.out | 68 +-- .../parser/expression/binary/lte.leo.out | 68 +-- .../parser/expression/binary/mul.leo.out | 58 +- .../parser/expression/binary/ne.leo.out | 56 +- .../parser/expression/binary/or.leo.out | 68 +-- .../parser/expression/binary/sub.leo.out | 36 +- .../parser/parser/expression/cast.leo.out | 56 +- .../parser/expression/circuit_init.leo.out | 60 +-- .../parser/parser/expression/ident.leo.out | 38 +- .../expression/literal/address_parse.leo.out | 8 +- .../expression/literal/bool_parse.leo.out | 4 +- .../expression/literal/char_parse.leo.out | 102 ++-- .../parser/expression/literal/group.leo.out | 130 ++--- .../literal/int_parse/field.leo.out | 210 ++++---- .../expression/literal/int_parse/i128.leo.out | 210 ++++---- .../expression/literal/int_parse/i16.leo.out | 210 ++++---- .../expression/literal/int_parse/i32.leo.out | 210 ++++---- .../expression/literal/int_parse/i64.leo.out | 210 ++++---- .../expression/literal/int_parse/i8.leo.out | 210 ++++---- .../literal/int_parse/implicit.leo.out | 210 ++++---- .../literal/int_parse/mono_group.leo.out | 210 ++++---- .../expression/literal/int_parse/u128.leo.out | 210 ++++---- .../expression/literal/int_parse/u16.leo.out | 210 ++++---- .../expression/literal/int_parse/u32.leo.out | 210 ++++---- .../expression/literal/int_parse/u64.leo.out | 210 ++++---- .../expression/literal/int_parse/u8.leo.out | 210 ++++---- .../expression/literal/string_parse.leo.out | 28 +- .../parser/parser/expression/ternary.leo.out | 36 +- .../parser/parser/expression/tuple.leo.out | 32 +- .../parser/expression/unary/negate.leo.out | 38 +- .../parser/expression/unary/not.leo.out | 38 +- .../parser/parser/functions/annotated.leo.out | 16 +- .../parser/functions/annotated_param.leo.out | 16 +- .../parser/functions/annotated_twice.leo.out | 20 +- .../parser/functions/const_param.leo.out | 40 +- .../parser/functions/const_self_bad.leo.out | 14 +- .../parser/parser/functions/empty.leo.out | 12 +- .../parser/parser/functions/empty2.leo.out | 8 +- .../parser/functions/param_array.leo.out | 16 +- .../parser/functions/param_circuit.leo.out | 18 +- .../parser/functions/param_tuple.leo.out | 16 +- .../parser/parser/functions/params.leo.out | 20 +- .../parser/functions/params_return.leo.out | 20 +- .../parser/parser/functions/return.leo.out | 12 +- .../parser/functions/return_tuple.leo.out | 12 +- .../parser/parser/import/alias.leo.out | 12 +- .../parser/parser/import/basic.leo.out | 10 +- .../parser/parser/import/many_import.leo.out | 48 +- .../parser/import/many_import_star.leo.out | 52 +- .../parser/parser/import/names.leo.out | 30 +- .../parser/import/names_underscore.leo.out | 10 +- .../parser/parser/import/star.leo.out | 8 +- .../parser/parser/statement/assign.leo.out | 132 ++--- .../parser/parser/statement/block.leo.out | 32 +- .../parser/statement/conditional.leo.out | 78 +-- .../parser/parser/statement/console.leo.out | 40 +- .../parser/statement/definition.leo.out | 500 +++++++++--------- .../parser/statement/expression.leo.out | 30 +- .../parser/parser/statement/iteration.leo.out | 52 +- .../parser/parser/statement/return.leo.out | 32 +- 399 files changed, 3941 insertions(+), 3924 deletions(-) diff --git a/compiler/src/test.rs b/compiler/src/test.rs index 77eac35212..244fa58961 100644 --- a/compiler/src/test.rs +++ b/compiler/src/test.rs @@ -226,16 +226,6 @@ impl Namespace for CompileNamespace { .unwrap_or_else(|_| "Error converting ast to string.".to_string()), ); - if test.name == "import_weird_names_nested" { - println!( - "{}", - Ast::from_json_file("/tmp/output/initial_ast.json".into()) - .unwrap_or_else(|_| Ast::new(Program::new("Error reading initial theorem.".to_string()))) - .to_json_string() - .unwrap_or_else(|_| "Error converting ast to string.".to_string()), - ); - } - if std::fs::read_dir("/tmp/output").is_ok() { std::fs::remove_dir_all(std::path::Path::new("/tmp/output")).expect("Error failed to clean up output dir."); } diff --git a/errors/src/common/mod.rs b/errors/src/common/mod.rs index 581a1c1bc0..9ec9731a6b 100644 --- a/errors/src/common/mod.rs +++ b/errors/src/common/mod.rs @@ -29,7 +29,7 @@ pub use self::macros::*; /// This module contains the common span object for Leo crates. pub mod span; -pub use self::span::*; +pub use self::span::Span; /// This module contains information on how to serialize and /// deserialze StrTendril type. diff --git a/errors/src/common/span.rs b/errors/src/common/span.rs index 1264e609a5..e2d1d451f3 100644 --- a/errors/src/common/span.rs +++ b/errors/src/common/span.rs @@ -17,12 +17,13 @@ use std::{fmt, sync::Arc, usize}; use pest::Span as PestSpan; -use serde::{Deserialize, Serialize}; +use serde::ser::{Serialize, SerializeStruct, Serializer}; +use serde::Deserialize; use tendril::StrTendril; /// The span type which tracks where formatted errors originate from in a Leo file. /// This is used in many spots throughout the rest of the Leo crates. -#[derive(Clone, Debug, Default, Deserialize, Eq, Hash, PartialEq, Serialize)] +#[derive(Clone, Debug, Default, Deserialize, Eq, Hash, PartialEq)] pub struct Span { /// The line number where the error started. pub line_start: usize, @@ -66,6 +67,32 @@ impl Span { } } +impl Serialize for Span { + /// Custom serialization for testing purposes. + fn serialize(&self, serializer: S) -> Result + where + S: Serializer, + { + let mut state = serializer.serialize_struct("Color", 3)?; + state.serialize_field("line_start", &self.line_start)?; + state.serialize_field("line_stop", &self.line_stop)?; + state.serialize_field("col_start", &self.col_start)?; + state.serialize_field("col_stop", &self.col_stop)?; + if std::env::var("LEO_TESTFRAMEWORK") + .unwrap_or_default() + .trim() + .to_owned() + .is_empty() + { + state.serialize_field("path", &self.path)?; + } else { + state.serialize_field("path", "")?; + } + state.serialize_field("content", &self.content[..])?; + state.end() + } +} + /// Conversion from a pest span where the leo-input library uses these. impl fmt::Display for Span { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { diff --git a/tests/expectations/compiler/compiler/address/branch.leo.out b/tests/expectations/compiler/compiler/address/branch.leo.out index a4c062bc76..f820743540 100644 --- a/tests/expectations/compiler/compiler/address/branch.leo.out +++ b/tests/expectations/compiler/compiler/address/branch.leo.out @@ -16,6 +16,6 @@ outputs: a: type: bool value: "true" - initial_ast: a7748573e4731753b76889c6d4c28e9589e114860a163da87957cf20b916f733 - canonicalized_ast: a7748573e4731753b76889c6d4c28e9589e114860a163da87957cf20b916f733 - type_inferenced_ast: af3663710ad6278c3d2e28a753d62084505746cd49de11949fe5e8e390ffcc60 + initial_ast: 9c0c4094669cbb415b9d650a42335ba05a7026573e925d468de562577f90686b + canonicalized_ast: 9c0c4094669cbb415b9d650a42335ba05a7026573e925d468de562577f90686b + type_inferenced_ast: 1b636553844640391e976115df709060a44e64346cbf06b4207a6f4c443e36b1 diff --git a/tests/expectations/compiler/compiler/address/equal.leo.out b/tests/expectations/compiler/compiler/address/equal.leo.out index 1cdb5f2fea..06d3c264e9 100644 --- a/tests/expectations/compiler/compiler/address/equal.leo.out +++ b/tests/expectations/compiler/compiler/address/equal.leo.out @@ -22,6 +22,6 @@ outputs: a: type: bool value: "false" - initial_ast: 1b4069c1fe2f0b258116c5864b19dfb2205e3cd8e13ea79d78fcdb0e9c1a8d50 - canonicalized_ast: 1b4069c1fe2f0b258116c5864b19dfb2205e3cd8e13ea79d78fcdb0e9c1a8d50 - type_inferenced_ast: d2aefbdd9fd4c931d4ee60f1a435f3da0d827e7425d2fd0a9868de22cc11ed73 + initial_ast: a98138d9c59f7f9d7a6ed08713bc78a84059734eb5ee7479abeea88ce02da881 + canonicalized_ast: a98138d9c59f7f9d7a6ed08713bc78a84059734eb5ee7479abeea88ce02da881 + type_inferenced_ast: e0c1d57acb15679e25c78cc4fe3266b85ce26d4d7d23b55a78c49c33f0b3d550 diff --git a/tests/expectations/compiler/compiler/address/index.leo.out b/tests/expectations/compiler/compiler/address/index.leo.out index b4cda33ee6..251698d31e 100644 --- a/tests/expectations/compiler/compiler/address/index.leo.out +++ b/tests/expectations/compiler/compiler/address/index.leo.out @@ -16,6 +16,6 @@ outputs: a: type: bool value: "true" - initial_ast: 8934e4c1d645f6f98fe59f48bbf687623e811c99e504e87c6989bc00af62194a - canonicalized_ast: 8934e4c1d645f6f98fe59f48bbf687623e811c99e504e87c6989bc00af62194a - type_inferenced_ast: 70af835aeaec1d5bc1c4a3186635260ff44743e0d3a7aa5ac9f2c98ec03bd23e + initial_ast: 87761daaf7a803becfc809b948e4f34a2c38e4bfe3b8f5184e6923ad707be714 + canonicalized_ast: 87761daaf7a803becfc809b948e4f34a2c38e4bfe3b8f5184e6923ad707be714 + type_inferenced_ast: 46539f9daa06cc132acaeeacf88a766d7f7673de8b9d2ea3ef01bb330520b00f diff --git a/tests/expectations/compiler/compiler/address/ternary.leo.out b/tests/expectations/compiler/compiler/address/ternary.leo.out index 6caf58d690..94d76dce8b 100644 --- a/tests/expectations/compiler/compiler/address/ternary.leo.out +++ b/tests/expectations/compiler/compiler/address/ternary.leo.out @@ -22,6 +22,6 @@ outputs: a: type: bool value: "false" - initial_ast: 975c6893ed20b632a3dc9c39f7fe9f381e7dda4b17b6c1f05ff7480e3bf2ee9d - canonicalized_ast: 975c6893ed20b632a3dc9c39f7fe9f381e7dda4b17b6c1f05ff7480e3bf2ee9d - type_inferenced_ast: bbc3818f0267a746d6ab324ef9b9de489ca65cd1624f528dae941841f39517af + initial_ast: 08a406e8214b12bec43b41364c4d19fd81b227915ab2deb9c572b140c43aeabe + canonicalized_ast: 08a406e8214b12bec43b41364c4d19fd81b227915ab2deb9c572b140c43aeabe + type_inferenced_ast: 5c194c9590eb53fa1a6af575e63bf54860befa24d3636610aa68c46b72d839a8 diff --git a/tests/expectations/compiler/compiler/array/complex_access.leo.out b/tests/expectations/compiler/compiler/array/complex_access.leo.out index b90f25e21b..b7f4e36e2a 100644 --- a/tests/expectations/compiler/compiler/array/complex_access.leo.out +++ b/tests/expectations/compiler/compiler/array/complex_access.leo.out @@ -16,6 +16,6 @@ outputs: out: type: bool value: "true" - initial_ast: 9808de8c342c41e060d3d3134eb168c8d8cc3ff0641cb8d9779a1746b9fa1687 - canonicalized_ast: 1479a9afd623ad11ca137555fd86a3f0a6da39641d5b2da712273242541c246e - type_inferenced_ast: 9bf998e088b9cce0f40a0326fa8e744c88d8168e04c563a2fbd6a57acd23da1f + initial_ast: 10f8520f03661d994c22d2c73d8049a1b2af19a9a0d75edd6af15a8979aa299a + canonicalized_ast: 3b8301335066fe2bfe8eba905ab33bc816e911591a7873d9ea4ce42ea1709aee + type_inferenced_ast: 380dcc1b3581ded8098020e5a311d98aa17c5b19259ea0b7a4457d417ac2fe5f diff --git a/tests/expectations/compiler/compiler/array/equal_initializer.leo.out b/tests/expectations/compiler/compiler/array/equal_initializer.leo.out index 720cfd8180..55b00f98ff 100644 --- a/tests/expectations/compiler/compiler/array/equal_initializer.leo.out +++ b/tests/expectations/compiler/compiler/array/equal_initializer.leo.out @@ -22,6 +22,6 @@ outputs: x: type: bool value: "false" - initial_ast: 25f4af112eb1512952d78bb7fa1d5287e3ab778255307f69304bbe1756575085 - canonicalized_ast: 248b7cc7462c3f035f337c9232a08bb5a911d7f4e153dd804a32bc597adb0210 - type_inferenced_ast: ebc3a5632c2d65e51cd9934b1ee4e395867808deeda3ecddfeaebb1b08093ed7 + initial_ast: fda944cb99bf4cedbfd531f2aafa9338f3d374ecbbfd40196cd82ccdfc462541 + canonicalized_ast: 5e78fec68f5bf00fcc574930106ebf0883cc6122e3378fa245294619e7b2dc84 + type_inferenced_ast: 7db6bf5aae7f4929e44e3d068c366a8917b937a43770b2f62ee35df4fb58eb81 diff --git a/tests/expectations/compiler/compiler/array/equal_initializer_2.leo.out b/tests/expectations/compiler/compiler/array/equal_initializer_2.leo.out index 4c4524fe2a..6a76b09bed 100644 --- a/tests/expectations/compiler/compiler/array/equal_initializer_2.leo.out +++ b/tests/expectations/compiler/compiler/array/equal_initializer_2.leo.out @@ -22,6 +22,6 @@ outputs: x: type: bool value: "true" - initial_ast: b3bae883863f88babaafa80d4c029974767fba5fea89ac8c2ab10512e61a38ba - canonicalized_ast: 9070de3276acf8d06ac58439247130e444c9b02de25b968ad1fc746650a1896c - type_inferenced_ast: 40a38002031be2cf0141c9ea33562fe69fc3891baeba9c92c487915b97d82507 + initial_ast: 7c27f9b122c5bfdff2c53d5474e99c4e7da6a4a1454f43242c87e508ed564c72 + canonicalized_ast: 3d416efd3620b8851ac1ce3e14dc0b80baa7c11901beee61cc7e47ea7d177fe2 + type_inferenced_ast: 34042fc568040adc10883279bd68c7efd24ba63717013aca008eeaaef32bc1c9 diff --git a/tests/expectations/compiler/compiler/array/input_nested_3x2.leo.out b/tests/expectations/compiler/compiler/array/input_nested_3x2.leo.out index 39dcd7c529..9d3c5d1d5d 100644 --- a/tests/expectations/compiler/compiler/array/input_nested_3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/input_nested_3x2.leo.out @@ -16,6 +16,6 @@ outputs: x: type: bool value: "true" - initial_ast: f5e4014d45239734a04d57c7b130fdf9752de245a4341062063aa5e818c5aa05 - canonicalized_ast: 8c16a6b011fc067411acaa497386bc5df9b96b91ef739f4992ba416ecf98bafc - type_inferenced_ast: 17d810699ef381a0a9c4efcd2ad6da64b76ce5d629c05db7b2d07d563e077548 + initial_ast: 218388bf03161d2c04e5aeea2c86e9c81d2bec8f080a1cf8cdaf003c15598f23 + canonicalized_ast: dcc0c2c9f6acc9d8b565c0445e5e879ad76564c2b323587ae5d8ed84b5977d13 + type_inferenced_ast: 26266c1f1ddaf309dbead42e49f4e41752e5e1fe72cdc3a24953088d08df953a diff --git a/tests/expectations/compiler/compiler/array/input_tuple_3x2.leo.out b/tests/expectations/compiler/compiler/array/input_tuple_3x2.leo.out index d77f05d984..30616ab39e 100644 --- a/tests/expectations/compiler/compiler/array/input_tuple_3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/input_tuple_3x2.leo.out @@ -16,6 +16,6 @@ outputs: x: type: bool value: "true" - initial_ast: 25f4af112eb1512952d78bb7fa1d5287e3ab778255307f69304bbe1756575085 - canonicalized_ast: 248b7cc7462c3f035f337c9232a08bb5a911d7f4e153dd804a32bc597adb0210 - type_inferenced_ast: ebc3a5632c2d65e51cd9934b1ee4e395867808deeda3ecddfeaebb1b08093ed7 + initial_ast: fda944cb99bf4cedbfd531f2aafa9338f3d374ecbbfd40196cd82ccdfc462541 + canonicalized_ast: 5e78fec68f5bf00fcc574930106ebf0883cc6122e3378fa245294619e7b2dc84 + type_inferenced_ast: 7db6bf5aae7f4929e44e3d068c366a8917b937a43770b2f62ee35df4fb58eb81 diff --git a/tests/expectations/compiler/compiler/array/multi_initializer.leo.out b/tests/expectations/compiler/compiler/array/multi_initializer.leo.out index bdaafd4168..cbda44a22b 100644 --- a/tests/expectations/compiler/compiler/array/multi_initializer.leo.out +++ b/tests/expectations/compiler/compiler/array/multi_initializer.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 21f90ee0a01e1238101360b72909766a148155d853fd903a3031d66340915101 - canonicalized_ast: cccb2040ce9b654f27e9a8e36976f220545c2888ed2aa9db73843b38407322f2 - type_inferenced_ast: 7cee4f94edf86b6c61af5dbb389b8901c57292810abf4cd6b4855dfee40370c7 + initial_ast: 32a53c1270d2a7384c5d1a0cbda49d9634db09dc2b69fae444fb4f36109bb8fa + canonicalized_ast: 88df9d661f84ad6650c5d81dd0ec07b5a07fbb2ceda5fde1ba545bc3391ac9ce + type_inferenced_ast: 5aaf153f3c03ac9e11e500a1e60f0ea11d1b5c736c3209118f3c67c0321a490b diff --git a/tests/expectations/compiler/compiler/array/nested.leo.out b/tests/expectations/compiler/compiler/array/nested.leo.out index 3e23b2d19b..cc8839129d 100644 --- a/tests/expectations/compiler/compiler/array/nested.leo.out +++ b/tests/expectations/compiler/compiler/array/nested.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 796cfe23085a2fd72700df353d266d3e2f62e893faeba8ed1af5ee5178f8e706 - canonicalized_ast: d06970075b65456a138d9286fd3c445c928a55bf9819d98603b494c38563eae1 - type_inferenced_ast: 41b1e49c972a34ed3d4629feabe3cb37f2078ba44fd1f3bee0a1888ca86f7ae4 + initial_ast: 8f10cab9e9d44f9e2bf63d3de712fbfd56e311fe1bf9a8cdd2d29d23acdca9bd + canonicalized_ast: f4516c7e913f38f8fcfe8be1061ea4960a44891e92f369f7a114ff87ae08385d + type_inferenced_ast: 530a5d13568caa8db612d73623d876294110f2d2ca4fa57f7dc67d7a8b6bb75b diff --git a/tests/expectations/compiler/compiler/array/nested_3x2_value.leo.out b/tests/expectations/compiler/compiler/array/nested_3x2_value.leo.out index a2f41114c4..12dafb6498 100644 --- a/tests/expectations/compiler/compiler/array/nested_3x2_value.leo.out +++ b/tests/expectations/compiler/compiler/array/nested_3x2_value.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 3c24983a1b881bd00f5f0fd3a40b471a35f5252798f4ed81784b68693529ad59 - canonicalized_ast: 177d06133dcc527a3110335158a888f4a0e5a5e904c2d6df57807563fd0ab386 - type_inferenced_ast: 06e32299c26e20b9a25104686911ecd4e94123bd8a90e7890a244b6288678f27 + initial_ast: 896fc62bde36645825dc69df4fadb323db666acf660708e94a699f1028fff42e + canonicalized_ast: 7ee6031329c67e55206272781e4b790372743eaf797585428417995e833ce6e0 + type_inferenced_ast: 37f276c62c7619fc7e541006b5d70f2d628419243b561b52352ea5d944f395bb diff --git a/tests/expectations/compiler/compiler/array/registers.leo.out b/tests/expectations/compiler/compiler/array/registers.leo.out index 9960fc5374..a5e25dc509 100644 --- a/tests/expectations/compiler/compiler/array/registers.leo.out +++ b/tests/expectations/compiler/compiler/array/registers.leo.out @@ -22,6 +22,6 @@ outputs: r: type: "[u8; 3]" value: "\"123\"" - initial_ast: 81dd2c459d5a1bff4963fb2cfdc67348183061934025b96739dc05c7b65a2a8b - canonicalized_ast: 81dd2c459d5a1bff4963fb2cfdc67348183061934025b96739dc05c7b65a2a8b - type_inferenced_ast: fcb8de69c92dff4a4adb8a160fc3b78042f394cd0dc627c5bf06820a095d7012 + initial_ast: 8081e76e99bf5f637adacbf3ebc7f55c0cce51add474de0bd53da72ea559f489 + canonicalized_ast: 8081e76e99bf5f637adacbf3ebc7f55c0cce51add474de0bd53da72ea559f489 + type_inferenced_ast: 7fdc1c08d6bc57661b15407868ca23940aea04ec9e4d36d9e41f151a8cf09461 diff --git a/tests/expectations/compiler/compiler/array/slice.leo.out b/tests/expectations/compiler/compiler/array/slice.leo.out index 9b847d5e42..b81968aa2f 100644 --- a/tests/expectations/compiler/compiler/array/slice.leo.out +++ b/tests/expectations/compiler/compiler/array/slice.leo.out @@ -16,6 +16,6 @@ outputs: x: type: bool value: "true" - initial_ast: ca5fc7bf19d8e6ee1b1421f1a37ea84c42bc89e8ac90711488bc17e996e88a91 - canonicalized_ast: ca5fc7bf19d8e6ee1b1421f1a37ea84c42bc89e8ac90711488bc17e996e88a91 - type_inferenced_ast: 2823901914ffea0d4cfcf449b9e45b46f67255e0b50f7a946b0552b240bedc0d + initial_ast: e29ed0519cc383934fa19fb0efb6d8789f973a26dbeef8d88859efb29624c3d9 + canonicalized_ast: e29ed0519cc383934fa19fb0efb6d8789f973a26dbeef8d88859efb29624c3d9 + type_inferenced_ast: 7051b05b956b9b30cd64b5e7fb93837b78731742431f3210e0b67cc308fd37f4 diff --git a/tests/expectations/compiler/compiler/array/slice_lower.leo.out b/tests/expectations/compiler/compiler/array/slice_lower.leo.out index b704c3d6ee..75eea7dc8e 100644 --- a/tests/expectations/compiler/compiler/array/slice_lower.leo.out +++ b/tests/expectations/compiler/compiler/array/slice_lower.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: a588964cfb6989b22b8bf7d6feaf90d09e228d61b09a48fd4e5e4b44473b5bd0 - canonicalized_ast: a588964cfb6989b22b8bf7d6feaf90d09e228d61b09a48fd4e5e4b44473b5bd0 - type_inferenced_ast: 838744e4d681a06ccb685d0c0de65897234d64f0a49887e896fbda087f3edfd6 + initial_ast: 847923c2af8832e5f2e9b7ba33e6da05ce6b782fc49061817bf0e8c1f308af78 + canonicalized_ast: 847923c2af8832e5f2e9b7ba33e6da05ce6b782fc49061817bf0e8c1f308af78 + type_inferenced_ast: d9feb9d3324d32ade64eb50f2f49ba54f656430197085755558bc972f3d76252 diff --git a/tests/expectations/compiler/compiler/array/spread.leo.out b/tests/expectations/compiler/compiler/array/spread.leo.out index 8399078a3b..7e9446a229 100644 --- a/tests/expectations/compiler/compiler/array/spread.leo.out +++ b/tests/expectations/compiler/compiler/array/spread.leo.out @@ -16,6 +16,6 @@ outputs: x: type: bool value: "true" - initial_ast: 2506cc8885eaae80a2ff90d1d231440dcfafd10fd8eb53317112ff2d2240d65e - canonicalized_ast: 2506cc8885eaae80a2ff90d1d231440dcfafd10fd8eb53317112ff2d2240d65e - type_inferenced_ast: bc0e1e40fcb7ac04e1dec943be5b93a1e39d43bee68a26713716765775674577 + initial_ast: b213065cf9a69052aa42e5e2599ebbec19429b7c8f286dd29baefdd22de5ae11 + canonicalized_ast: b213065cf9a69052aa42e5e2599ebbec19429b7c8f286dd29baefdd22de5ae11 + type_inferenced_ast: 6cbb6af27980d61e07df3f9f54b77ca34463c79df3f4980870b9c184847eac27 diff --git a/tests/expectations/compiler/compiler/array/ternary_in_array.leo.out b/tests/expectations/compiler/compiler/array/ternary_in_array.leo.out index b8e13e745e..290104d615 100644 --- a/tests/expectations/compiler/compiler/array/ternary_in_array.leo.out +++ b/tests/expectations/compiler/compiler/array/ternary_in_array.leo.out @@ -16,6 +16,6 @@ outputs: x: type: bool value: "true" - initial_ast: e238db049bc888e9243b421a188edbe5ae160127164b6bb75e54125052455565 - canonicalized_ast: e238db049bc888e9243b421a188edbe5ae160127164b6bb75e54125052455565 - type_inferenced_ast: e498240b5cb8c4d46a0b1035f208025df8e5feeabf9dddaa859a0a695ae8c5f6 + initial_ast: d073d355e5dc63d782bf7511301b7d3460b1909f20cb951275b4160818f91e96 + canonicalized_ast: d073d355e5dc63d782bf7511301b7d3460b1909f20cb951275b4160818f91e96 + type_inferenced_ast: e896efa565b20c373020f3e3fb2ca68c2ee836512b4968d61b920e9ed6889fdb diff --git a/tests/expectations/compiler/compiler/array/tuple_3x2_value.leo.out b/tests/expectations/compiler/compiler/array/tuple_3x2_value.leo.out index 9658df9ec6..4d05669210 100644 --- a/tests/expectations/compiler/compiler/array/tuple_3x2_value.leo.out +++ b/tests/expectations/compiler/compiler/array/tuple_3x2_value.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: d6195e7c9e70c521660ba312c607850110d864a1979004972a0f2908d476efd3 - canonicalized_ast: a3483e0912a5d47c95775b1b2d2c62fa5acd5f3c0432757dc261475183156490 - type_inferenced_ast: 54b0f61496c50ced01700f61d9c3eac6056d3835f38c2f39fe0c20e45447be63 + initial_ast: e2d243135efb97b9b091ce0e5c7286b71ff3561da860cae9db7af5cbeb696f6c + canonicalized_ast: 28d1ec3e1349fa7d140bbb51cdefbe85dc73ce6e1ef540fa4cf9ce7700411a8c + type_inferenced_ast: 9928c37278b67a3d0882f1cb7b2b1fe630ad0771ac1e95509028c3e9241a3bbf diff --git a/tests/expectations/compiler/compiler/array/type_input_3x2.leo.out b/tests/expectations/compiler/compiler/array/type_input_3x2.leo.out index e8f18bfbcc..c373102927 100644 --- a/tests/expectations/compiler/compiler/array/type_input_3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_input_3x2.leo.out @@ -16,6 +16,6 @@ outputs: x: type: bool value: "true" - initial_ast: 42d14deb7baaf81b59723a453b1aa09e68bfc8677ce2903596de69ad6b7677ab - canonicalized_ast: 42d14deb7baaf81b59723a453b1aa09e68bfc8677ce2903596de69ad6b7677ab - type_inferenced_ast: 1559a3a4db454285ab969d20276d9112fca0b24f6726f64d4b0371dccde32abf + initial_ast: ddb20cbb9ecf52a8f9d61766f0bdf76d01d3a7854c5ca018f88e226592e44940 + canonicalized_ast: ddb20cbb9ecf52a8f9d61766f0bdf76d01d3a7854c5ca018f88e226592e44940 + type_inferenced_ast: c7c2205a1fb4587b6281f21d34a2cafae1583106e19af3beaead87b623cb61d6 diff --git a/tests/expectations/compiler/compiler/array/type_input_4x3x2.leo.out b/tests/expectations/compiler/compiler/array/type_input_4x3x2.leo.out index a7152bc822..4f5f0df1eb 100644 --- a/tests/expectations/compiler/compiler/array/type_input_4x3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_input_4x3x2.leo.out @@ -16,6 +16,6 @@ outputs: x: type: bool value: "true" - initial_ast: c7cf923f9ca2a963279a8ff7ae9aa0a11eaddc8ba3e107d48f3aef1d1c55a50f - canonicalized_ast: c7cf923f9ca2a963279a8ff7ae9aa0a11eaddc8ba3e107d48f3aef1d1c55a50f - type_inferenced_ast: 58b19d80de0abea85877257b60305e1f7b9d2e67044f60d0159699131d4ba6ec + initial_ast: 8b5cb35e1fe17071cd7aa404be247a325dde350d6954aaa1c58ee0bb0dd4d333 + canonicalized_ast: 8b5cb35e1fe17071cd7aa404be247a325dde350d6954aaa1c58ee0bb0dd4d333 + type_inferenced_ast: 4661ca8ff2e993ddae82000b6db73db86b63af8c4557d22975abbe9a63cb14e5 diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2.leo.out index 2e2e0728b1..c1b8050f09 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2.leo.out @@ -16,6 +16,6 @@ outputs: x: type: bool value: "true" - initial_ast: dbc983cae35c2cd763e9bc4505a2d1e6c063fa62ccdc858a75644175512c1558 - canonicalized_ast: dbc983cae35c2cd763e9bc4505a2d1e6c063fa62ccdc858a75644175512c1558 - type_inferenced_ast: 42686f9d46c46c829259d4b68643d144d126e61a899e3c413ea09d0ed12d24d1 + initial_ast: af5c8bc684c384ee78844b52c6752ba286378bb41218faf63446caf1d7d98c6f + canonicalized_ast: af5c8bc684c384ee78844b52c6752ba286378bb41218faf63446caf1d7d98c6f + type_inferenced_ast: c15b64210f2f8afad3f9819f877f287c2a6a08e2edd6adeb4375527c4d1f426b diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2.leo.out index 50fb2317b8..370eac3c75 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 42a9307b4efda61137f9816a43e5c07a9d6b143bd88f609be7e549cb3b21d731 - canonicalized_ast: 42a9307b4efda61137f9816a43e5c07a9d6b143bd88f609be7e549cb3b21d731 - type_inferenced_ast: 67e643a53bb3efb99367869a1f3a937570f61658b004a4261e87b028f4976fad + initial_ast: 98381a0a6fe09deaba7e43c014332664b608098bed9855ce1c19b6494b26cebd + canonicalized_ast: 98381a0a6fe09deaba7e43c014332664b608098bed9855ce1c19b6494b26cebd + type_inferenced_ast: 40c047076318d5931ad0d3a3aaa6ddd8245a012b68f5ae3792c1b6334e444bbb diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2.leo.out index e5632b4283..e9b1149d19 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 073b0033613b8c2f8ca027d0486697b5503943dbc65cec9cbbc6b5665e7432e4 - canonicalized_ast: 6751d75a95af032784678411bb4e0f59b509ec624daea475cab10b9cf14fe6a0 - type_inferenced_ast: 9b9ac4ba4533ecae7ec74da2ab929cfa85be393391887e95ffadf4d1df3004be + initial_ast: e51e19607178661b8069b140d903234ad67047f876e428cd98577a317c1c63ea + canonicalized_ast: 9ece5eb8b7cfd8d9f46e1f5d56932463bfade9ed0dc7aa5cb4ea1a02710fabb6 + type_inferenced_ast: 75035a66a260d555fd66fc58a8c349cf77a88e649d9af5a21620b1d0ce69ab76 diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2.leo.out index 04cb12ed87..15843373df 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: d04220b24fd2648e859fab4caf69727b5532dbe1ee68db9d569153514e161a85 - canonicalized_ast: 36d30f97ff15f08a4a88b384a362168014d56bc90d6a3837fd213b2acfc42357 - type_inferenced_ast: 363bdf0ef5cf40b1b63a2cefa3d509ca731809568b7392899cbe73ec13104ecd + initial_ast: c7388d8c25c6c593bbf9df42442c773fde414f17c608ea3f44e7d2b1d2da742a + canonicalized_ast: 1f78e26797ec426580278599d668230e3ff5c73f8bfe5ee34aa2cfeb2bc8f501 + type_inferenced_ast: e1850f46b6a18ce3fdc6be9fe8cd71df61b47c11cf4b6904e9006feec39724a7 diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2.leo.out index d341a7bbfc..e2d1fa8e57 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 15fa7dd3949e323b759a7290ff433fb0f6ec83308b1b9b1a6bb129650191bc80 - canonicalized_ast: 6a0262a7865ecf453b147449c52f23a1ffb38995c45d0a7c23a78255b9cbbb1b - type_inferenced_ast: 571acef2dd154ad80da051c43f402a9d10593c07b234de69fe9fc19284f09849 + initial_ast: 5ef47c66a7103fb79151a128b79e270c775761f85ba7b600fa62feedb9d776a1 + canonicalized_ast: d85e3d11bcb9ea34f4c0115bc19ab6cc9706e24f337127a5deb76a23762b1cc7 + type_inferenced_ast: 4b484d40365dd5e0440645a4ae057979e008f58b9072977da44a4936d6844201 diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2.leo.out index 5e2b931939..fcfdc4afa1 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: ec1e31c0b1e2cc2cfa1476b9189d1b3e95e786d5b55e4c350a6888860613f4b2 - canonicalized_ast: dacc5bfe970669abcebe9363e0bc84fe7fb8e0c816dda756b00cc38ae993e781 - type_inferenced_ast: f8c48aff4a11661fe164e69af32a99a5259f05a10287de26aea2fd323d4744ef + initial_ast: 9c4ccc3962870de33739e88f016f9ad2a26fce1dd9d83777e75146a770a7c843 + canonicalized_ast: 342998b2e6b4e15992c0ae8f8f9e88fd61028b9f5251a1a44eb0a5e748fb914a + type_inferenced_ast: bcb57fa0c03974b04bab42f1000a0896442859aefed0b3da4122f9e2eb6d3bcb diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2.leo.out index 736befa2e7..446db73b3b 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 37ec6089b9e1af0c552e259848d1ecd8bb361dd8a5c348d6b34f7f5262dc6f40 - canonicalized_ast: ad2b199caadb797e02aded3020468c9d7a2b3094652c3b27436b8f98cc71dc05 - type_inferenced_ast: cb373502d7141af431342592470482ef936a5fc9e6f4ede8a01e8e98537988de + initial_ast: f58024907a398764d1f82717bfb3c428f3bcaf199612fb58f57da612dc0f31d9 + canonicalized_ast: f08780773dfd122a26f9afb8a17ead2177a7741fe658510d4cb3e00e80ac43e6 + type_inferenced_ast: cfb5f5e51dede0eb87e637bfc6cf995c8f15c32fea3caf92c0a73b5af430a9fb diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2.leo.out index 026cb9b481..c467079faf 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: b351c4655069ba4e5ae6759b10109406d64b74c652aab8be3547912df3e10c83 - canonicalized_ast: e9e15873ef2727704b7b4f711516e6f8833a177fe4ff9379823dca293ecb8a72 - type_inferenced_ast: d040a5aac628379fa32c3e36980f8dac3996a5240bc3482e44c2fdb1d8c3ef60 + initial_ast: aabfd4724373f68e44dac450426c84c619f8441e02f4cec46bf1a96b01d687c6 + canonicalized_ast: 2768446224453862bedd1449de91a6f9e82a06ce41a23dc4afef2e8bc2faf078 + type_inferenced_ast: 24346a907649334e87888b2744dfda551e8ca3248b1e357d432ce0d027f44a9b diff --git a/tests/expectations/compiler/compiler/boolean/and.leo.out b/tests/expectations/compiler/compiler/boolean/and.leo.out index 80cf302a7a..996e5e721a 100644 --- a/tests/expectations/compiler/compiler/boolean/and.leo.out +++ b/tests/expectations/compiler/compiler/boolean/and.leo.out @@ -34,6 +34,6 @@ outputs: x: type: bool value: "true" - initial_ast: 457931d2a45a5872b3f523ee9ed3ae922635750e38048927ee39dcd2fdaf338d - canonicalized_ast: 457931d2a45a5872b3f523ee9ed3ae922635750e38048927ee39dcd2fdaf338d - type_inferenced_ast: 5268ad28b10aedcd44c0aafced11ed0351999fceb6a202ed5a1faf833da5c2c4 + initial_ast: e412bc079077d0894afdfb1b2bdcb0627216e64e05b93d53c065acaab6602648 + canonicalized_ast: e412bc079077d0894afdfb1b2bdcb0627216e64e05b93d53c065acaab6602648 + type_inferenced_ast: 8455cc489d00cc4c2efb999f238544d267605c78c4a3711f3968daff8b1b691f diff --git a/tests/expectations/compiler/compiler/boolean/conditional.leo.out b/tests/expectations/compiler/compiler/boolean/conditional.leo.out index 1e0ae4c270..d0f6d47bc6 100644 --- a/tests/expectations/compiler/compiler/boolean/conditional.leo.out +++ b/tests/expectations/compiler/compiler/boolean/conditional.leo.out @@ -34,6 +34,6 @@ outputs: x: type: bool value: "true" - initial_ast: 57ab6c27f0cc1f947f533b8758a8d7643358eb972fa52d8e97fd12403a3a14e0 - canonicalized_ast: 57ab6c27f0cc1f947f533b8758a8d7643358eb972fa52d8e97fd12403a3a14e0 - type_inferenced_ast: 55a49f89b8b70b430ca8919b6dbbb3b350a98a8a9e498377d878dd4336a050e6 + initial_ast: 76acb7e9a4a70256e7a92d168c9455fed850a3773a9ea92ec5216456b2f3f5ca + canonicalized_ast: 76acb7e9a4a70256e7a92d168c9455fed850a3773a9ea92ec5216456b2f3f5ca + type_inferenced_ast: ae2c4bcde83fa9bddf1c0a7a2c32a910f7f8e43abf52bcb2275c8fce1349af1f diff --git a/tests/expectations/compiler/compiler/boolean/equal.leo.out b/tests/expectations/compiler/compiler/boolean/equal.leo.out index 2883376a47..52e543e167 100644 --- a/tests/expectations/compiler/compiler/boolean/equal.leo.out +++ b/tests/expectations/compiler/compiler/boolean/equal.leo.out @@ -34,6 +34,6 @@ outputs: x: type: bool value: "true" - initial_ast: dcd562246dac98c86986cd3c8519ef6bab0d6ad9eb910ef2b797e25eebf66160 - canonicalized_ast: dcd562246dac98c86986cd3c8519ef6bab0d6ad9eb910ef2b797e25eebf66160 - type_inferenced_ast: ac5fc2712e702bdd3735bdac2885d028ed66ced47e0f3c310f8c17191a6aa9fe + initial_ast: 9ca546550b286113dcfe9e345b58f996e01e7f3429b33f4829bdeda7a09939a1 + canonicalized_ast: 9ca546550b286113dcfe9e345b58f996e01e7f3429b33f4829bdeda7a09939a1 + type_inferenced_ast: f5ad424921b7256fb2553793ee3a83d11cb70e2c6f7d6df99d93631bb534ab90 diff --git a/tests/expectations/compiler/compiler/boolean/not_equal.leo.out b/tests/expectations/compiler/compiler/boolean/not_equal.leo.out index 1384632ee4..55e1086478 100644 --- a/tests/expectations/compiler/compiler/boolean/not_equal.leo.out +++ b/tests/expectations/compiler/compiler/boolean/not_equal.leo.out @@ -34,6 +34,6 @@ outputs: x: type: bool value: "false" - initial_ast: aa57c32deb2ca3f69aac1c8d6ab1c9ca787d7539d15dd6ae1d132c4bdf1628f0 - canonicalized_ast: aa57c32deb2ca3f69aac1c8d6ab1c9ca787d7539d15dd6ae1d132c4bdf1628f0 - type_inferenced_ast: 730367497b7b56381f29321e18eade74d70107a6d8c657b47022215015f53801 + initial_ast: c220ba73f75ff1651a98991ee4f5ea021dabdde2a1c08e949deb2aa1ecb65390 + canonicalized_ast: c220ba73f75ff1651a98991ee4f5ea021dabdde2a1c08e949deb2aa1ecb65390 + type_inferenced_ast: 30507ab22a8ebd6bb0f239d34923201b6381a722e11649c0b1ee73acd9317902 diff --git a/tests/expectations/compiler/compiler/boolean/or.leo.out b/tests/expectations/compiler/compiler/boolean/or.leo.out index 451ad885f1..06dddec499 100644 --- a/tests/expectations/compiler/compiler/boolean/or.leo.out +++ b/tests/expectations/compiler/compiler/boolean/or.leo.out @@ -34,6 +34,6 @@ outputs: x: type: bool value: "true" - initial_ast: fe77500ebf653bfe8620287f2c9e52f0e985c915a09a285be3b659a308649a65 - canonicalized_ast: fe77500ebf653bfe8620287f2c9e52f0e985c915a09a285be3b659a308649a65 - type_inferenced_ast: 52112d0a4983f119ba82655780b8aead34d1cced758e5595ce62dbc717f95cae + initial_ast: b511fd260063b7d9608269bd67b0fdbe8ad9bd4ea1263fe1de4487ae071ce373 + canonicalized_ast: b511fd260063b7d9608269bd67b0fdbe8ad9bd4ea1263fe1de4487ae071ce373 + type_inferenced_ast: e1844ed06868262cb955e23c6844a44e64c156897ab166356a5ce4b1e0f6ce16 diff --git a/tests/expectations/compiler/compiler/char/circuit.leo.out b/tests/expectations/compiler/compiler/char/circuit.leo.out index 65ee2bb59e..db3bf3dd36 100644 --- a/tests/expectations/compiler/compiler/char/circuit.leo.out +++ b/tests/expectations/compiler/compiler/char/circuit.leo.out @@ -100,6 +100,6 @@ outputs: r: type: char value: "'\\u{1f62d}'" - initial_ast: 680d480560e2a187669f5bf3c328cee1865021cbe4c19f3350db843d312b6406 - canonicalized_ast: 680d480560e2a187669f5bf3c328cee1865021cbe4c19f3350db843d312b6406 - type_inferenced_ast: 385365a7d46c458c2d5f94690acc53191bf234bcdb928a9efc454c33ba06718a + initial_ast: cd951a04ce5ef7c9de242229574bea37ff8b7b9f74ab673b01c3d41527de2179 + canonicalized_ast: cd951a04ce5ef7c9de242229574bea37ff8b7b9f74ab673b01c3d41527de2179 + type_inferenced_ast: 3fe7acb8144387410019e5bdfaff1b87c7969a25f68184df6b11091ac1bf64bf diff --git a/tests/expectations/compiler/compiler/char/neq.leo.out b/tests/expectations/compiler/compiler/char/neq.leo.out index 650ac5b345..21321ccb74 100644 --- a/tests/expectations/compiler/compiler/char/neq.leo.out +++ b/tests/expectations/compiler/compiler/char/neq.leo.out @@ -100,6 +100,6 @@ outputs: r: type: char value: "'a'" - initial_ast: 66ea1340fc8ae77142ea3d254d8d3350a2775549ea7ba0ab550ec88b5c5721d4 - canonicalized_ast: 66ea1340fc8ae77142ea3d254d8d3350a2775549ea7ba0ab550ec88b5c5721d4 - type_inferenced_ast: 7b07de0d440a813b674c11dcc71fa4daee8224d5136844d66bc7fafa60f38725 + initial_ast: be224a09ae4accb70784b57ed46907da9ffec12019023cd93d57c0496f508fd3 + canonicalized_ast: be224a09ae4accb70784b57ed46907da9ffec12019023cd93d57c0496f508fd3 + type_inferenced_ast: b287f08b3e9cf836b40d4ed75dc0195fa6e70e84051976e33529a7708790fc6f diff --git a/tests/expectations/compiler/compiler/char/nonprinting.leo.out b/tests/expectations/compiler/compiler/char/nonprinting.leo.out index 2acf2401e1..d56ddc3bbe 100644 --- a/tests/expectations/compiler/compiler/char/nonprinting.leo.out +++ b/tests/expectations/compiler/compiler/char/nonprinting.leo.out @@ -19,6 +19,6 @@ outputs: r1: type: bool value: "true" - initial_ast: 3484f8dedfe79e122e5b4a7e7d00fa185fa08884b67e6824b29580694c5983f6 - canonicalized_ast: 3484f8dedfe79e122e5b4a7e7d00fa185fa08884b67e6824b29580694c5983f6 - type_inferenced_ast: 47dc1acd415b62312ed330c9ef12620f187858ea2b0572b3404936cfb902cdd4 + initial_ast: 740e6bb885f1daaa7fee1d7f54a885a46315be42cfbdc3ccce59e1c5fc9ca9f1 + canonicalized_ast: 740e6bb885f1daaa7fee1d7f54a885a46315be42cfbdc3ccce59e1c5fc9ca9f1 + type_inferenced_ast: fd2b61864849e92b4ff3ba2e6d116db22e260754db0cd4cc4f09396cb065387a diff --git a/tests/expectations/compiler/compiler/char/out.leo.out b/tests/expectations/compiler/compiler/char/out.leo.out index ab57323b5e..72630163a4 100644 --- a/tests/expectations/compiler/compiler/char/out.leo.out +++ b/tests/expectations/compiler/compiler/char/out.leo.out @@ -100,6 +100,6 @@ outputs: r: type: char value: "'\\u{1f62d}'" - initial_ast: bfd9bc4584922f1010085bd8f2a44594eb07c5c3ffbca6efa5eecc08c5134c0b - canonicalized_ast: bfd9bc4584922f1010085bd8f2a44594eb07c5c3ffbca6efa5eecc08c5134c0b - type_inferenced_ast: 5986610003c35e0ad024bf0b3a002fe6228548ccd7d99fc2a18f140609851337 + initial_ast: d99f5828d608a8276317325e26e0160a8f715a3f12d336a1ad4c7a487665ab2b + canonicalized_ast: d99f5828d608a8276317325e26e0160a8f715a3f12d336a1ad4c7a487665ab2b + type_inferenced_ast: a183d62d41415685263e16f9f434b96b110421d5f9344e29f96f9a3ba6bdd63f diff --git a/tests/expectations/compiler/compiler/circuits/big_self_in_circuit_replacement.leo.out b/tests/expectations/compiler/compiler/circuits/big_self_in_circuit_replacement.leo.out index 7bd0bf3fb0..d3ea62fbaf 100644 --- a/tests/expectations/compiler/compiler/circuits/big_self_in_circuit_replacement.leo.out +++ b/tests/expectations/compiler/compiler/circuits/big_self_in_circuit_replacement.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: aa87a9d1c477e2d5b7ae824fb434188dd6c5c519dd27ebaecd30e44be401ee1b - canonicalized_ast: f188b62839a17478878fe1dfc9863bac20fa1c0c6cf51eae5e13c5f5f79f6c1a - type_inferenced_ast: 9e838aeeebdd2f800c2e7305614f123c27d8390fbadabf1bcb15dae6466669a6 + initial_ast: 12a3a0966e472cd150c9be3488ef8fa05c2acbd8e6bd7a8b4e60810060100717 + canonicalized_ast: 376cd2cd19920d2e08a647a65a94320e6921bb9bdd93307c3958fc25fa4d3073 + type_inferenced_ast: 85e9c164aea5fc92e5351b8bec47ec1e65620d56f01423e11fe034259b67d7da diff --git a/tests/expectations/compiler/compiler/circuits/const_self_variable.leo.out b/tests/expectations/compiler/compiler/circuits/const_self_variable.leo.out index 0dec0b1733..0827822dbc 100644 --- a/tests/expectations/compiler/compiler/circuits/const_self_variable.leo.out +++ b/tests/expectations/compiler/compiler/circuits/const_self_variable.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: da9350459a9579ec5961fc26b81a67a88060caaaea27448fa02f86271227b213 - canonicalized_ast: da9350459a9579ec5961fc26b81a67a88060caaaea27448fa02f86271227b213 - type_inferenced_ast: 2dd2c4378253f239047ae310657e24dae70ba7181d1cf08d89007c2f1a37d332 + initial_ast: e381c58c3d3af3336ded12b5db5a2f2a71b420cd1fdbbf7eaa2dbe0ec903d547 + canonicalized_ast: e381c58c3d3af3336ded12b5db5a2f2a71b420cd1fdbbf7eaa2dbe0ec903d547 + type_inferenced_ast: 208f0a2681d12c62b60bdd85c25c28c60b479c20846792d2a5b06426c045edc1 diff --git a/tests/expectations/compiler/compiler/circuits/define_circuit_inside_circuit_function.leo.out b/tests/expectations/compiler/compiler/circuits/define_circuit_inside_circuit_function.leo.out index 8423b5b6ec..c3a06e4e34 100644 --- a/tests/expectations/compiler/compiler/circuits/define_circuit_inside_circuit_function.leo.out +++ b/tests/expectations/compiler/compiler/circuits/define_circuit_inside_circuit_function.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 583cb3219a67fcbb30d241dec9e2860d99db27b109c8d095c10838ea342efd3c - canonicalized_ast: 583cb3219a67fcbb30d241dec9e2860d99db27b109c8d095c10838ea342efd3c - type_inferenced_ast: bbb33dca916b1310a58492ecd4bc74ed03ef3ab87870391839fc8b627f31e941 + initial_ast: 71afd59d48b7a5725c040ba4f5cbc217bd46d0fbaad0bd82047032b20dc1cea7 + canonicalized_ast: 71afd59d48b7a5725c040ba4f5cbc217bd46d0fbaad0bd82047032b20dc1cea7 + type_inferenced_ast: 47ad2c3e7620a0ae7b24169100607802fad08cf9f0ab595ebd78addbc5359d12 diff --git a/tests/expectations/compiler/compiler/circuits/duplicate_name_context.leo.out b/tests/expectations/compiler/compiler/circuits/duplicate_name_context.leo.out index e477b4a944..86c27a6c27 100644 --- a/tests/expectations/compiler/compiler/circuits/duplicate_name_context.leo.out +++ b/tests/expectations/compiler/compiler/circuits/duplicate_name_context.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: e96236da6f97f8472930c05f30db95afa0c914060fe3ee908af57dbc1644f6b8 - canonicalized_ast: e96236da6f97f8472930c05f30db95afa0c914060fe3ee908af57dbc1644f6b8 - type_inferenced_ast: 933e32a944dbeba01b9c1600ccdec94370927087a3a2b5511bdf4767b5fecd7b + initial_ast: 111c8bca8f07afa989ca6c7e90e66bf6951e04d59aa2ef60f64d0038f6bd06a6 + canonicalized_ast: 111c8bca8f07afa989ca6c7e90e66bf6951e04d59aa2ef60f64d0038f6bd06a6 + type_inferenced_ast: 19623dcb1932cbfa82b16d5708cbe3283c7ffce9d1af1e177276e7ebcbe7e951 diff --git a/tests/expectations/compiler/compiler/circuits/inline.leo.out b/tests/expectations/compiler/compiler/circuits/inline.leo.out index 859d29d610..7f814ccfb5 100644 --- a/tests/expectations/compiler/compiler/circuits/inline.leo.out +++ b/tests/expectations/compiler/compiler/circuits/inline.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: u32 value: "100" - initial_ast: 7a6b3abb44b3770f98b45c1f961539ae538e1b5fb2b62ae7bffeaf2209739bc3 - canonicalized_ast: 7a6b3abb44b3770f98b45c1f961539ae538e1b5fb2b62ae7bffeaf2209739bc3 - type_inferenced_ast: 88703ec6b9780a1e7629b14afd0e3da35ff4d68f968db2926242f745d6f61b4d + initial_ast: 181f6d20025c125f510c3bbf9dab7936155b23a046e30663b602543262690efe + canonicalized_ast: 181f6d20025c125f510c3bbf9dab7936155b23a046e30663b602543262690efe + type_inferenced_ast: f6ab78af624e7e102515f1ee9f50a84e987db4584307141d526775cdb80da506 diff --git a/tests/expectations/compiler/compiler/circuits/inline_member_pass.leo.out b/tests/expectations/compiler/compiler/circuits/inline_member_pass.leo.out index 86e9316902..9d1e3faded 100644 --- a/tests/expectations/compiler/compiler/circuits/inline_member_pass.leo.out +++ b/tests/expectations/compiler/compiler/circuits/inline_member_pass.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 489c3e8ccafc04e118846f4009d93dfbf018902fbdcd1dde6798cc853bcd8903 - canonicalized_ast: 4b8614afcbaf258d87202daa83f1340762d9a90f4edd7723b8a83df74acbbeb1 - type_inferenced_ast: 3e23d0db328e40ffa2a1ced543295650aa724a8b2dc795bbca54a40ca726b59a + initial_ast: d5e8c08c6a19699ff2be86d39e9ebd41e323dc284576ba6f52c49a62eeab79c9 + canonicalized_ast: 2433daf73b2335fc2db4f00f8804ca516f04072e273a5e7217a5b290445043e1 + type_inferenced_ast: 3199daaafcb76155503937860b663a8a92162e84e0b4c942f94fd2b1dbe0dc66 diff --git a/tests/expectations/compiler/compiler/circuits/member_function.leo.out b/tests/expectations/compiler/compiler/circuits/member_function.leo.out index 206329dc34..47a0d09b00 100644 --- a/tests/expectations/compiler/compiler/circuits/member_function.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_function.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 8eacc56577069bef188ac3bbabbceaca5fb8955af1e8ea74ef52f01ce7bd4516 - canonicalized_ast: 8eacc56577069bef188ac3bbabbceaca5fb8955af1e8ea74ef52f01ce7bd4516 - type_inferenced_ast: d5947d1cd599d713fdaafe3cc1084784639c768d5069151dfe7dd0cb02e28ae2 + initial_ast: 5289f23055d0851d8b154501acbbace2da9ae7d5064f78e9e870b3c0450ac3e1 + canonicalized_ast: 5289f23055d0851d8b154501acbbace2da9ae7d5064f78e9e870b3c0450ac3e1 + type_inferenced_ast: 53668b53579ae10c6299e4ef5ccdc459dab29b35b996476334022c24fe915958 diff --git a/tests/expectations/compiler/compiler/circuits/member_function_nested.leo.out b/tests/expectations/compiler/compiler/circuits/member_function_nested.leo.out index c36f829b9a..4297a6d213 100644 --- a/tests/expectations/compiler/compiler/circuits/member_function_nested.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_function_nested.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: f4796f1f9215d0c6d42478aae63b1495dfad36eaaec4a981dddac9def85ffef0 - canonicalized_ast: f4796f1f9215d0c6d42478aae63b1495dfad36eaaec4a981dddac9def85ffef0 - type_inferenced_ast: f808f56c8af9d6677bf54e7f777b3023f82144462df704dc4f3e39830be4c109 + initial_ast: 103ec635fd095c831e1b7dd0e89fb86f82380f85ac96df20e91a2f75ddb8b87d + canonicalized_ast: 103ec635fd095c831e1b7dd0e89fb86f82380f85ac96df20e91a2f75ddb8b87d + type_inferenced_ast: 43313200085be347f7429b294e8e5edc61f6a7698df689f5ca9f9740984c8534 diff --git a/tests/expectations/compiler/compiler/circuits/member_static_function.leo.out b/tests/expectations/compiler/compiler/circuits/member_static_function.leo.out index 6630cd07bc..deb77ed8fb 100644 --- a/tests/expectations/compiler/compiler/circuits/member_static_function.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_static_function.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 75577795f48b9c4f50fed7051e3d76e4b76e3d3b6896ead606d3ebe925e43d2f - canonicalized_ast: 75577795f48b9c4f50fed7051e3d76e4b76e3d3b6896ead606d3ebe925e43d2f - type_inferenced_ast: 60a0557cf60a23b458e3a7ef25299f3fef8cae5c473446b54bb7e98ed91b70f0 + initial_ast: a09c26dcd49814e5df7dc933932bbcdcf502d3e40e5b9975a73f63f03bdbda21 + canonicalized_ast: a09c26dcd49814e5df7dc933932bbcdcf502d3e40e5b9975a73f63f03bdbda21 + type_inferenced_ast: 2b000c5f36d84015d02ee34afe409ba569090a3744786a7c6f7fff78d397120c diff --git a/tests/expectations/compiler/compiler/circuits/member_static_function_nested.leo.out b/tests/expectations/compiler/compiler/circuits/member_static_function_nested.leo.out index 14f7a27016..d33254e205 100644 --- a/tests/expectations/compiler/compiler/circuits/member_static_function_nested.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_static_function_nested.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 4c74b65863cddde8ce523495358ab619ec48645dcb8409658a3fb3d7a3821d6d - canonicalized_ast: 45dc35a683e14503f8a1fc40280f05e7d096b49896f115ffa649e76b9cd80941 - type_inferenced_ast: 11af72cfc90adc12c3412e3067ad285a2279de0f4f12af5081dbe27c58b5a3bf + initial_ast: b001d188b90cae9717d631d28e5d1863c439441e17d61b0be9560b2b3bbb1e0d + canonicalized_ast: fbb2e8a8462d2b2da2e445d1111d0e33f89e88cc5d20ddbd3af707616c5672d5 + type_inferenced_ast: ceb9c391dee91311bb2a5c7e48ac4cad327d9f1c502b559ba88df956727bd866 diff --git a/tests/expectations/compiler/compiler/circuits/member_variable.leo.out b/tests/expectations/compiler/compiler/circuits/member_variable.leo.out index 3d5447716c..a43d211bcf 100644 --- a/tests/expectations/compiler/compiler/circuits/member_variable.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_variable.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 701fc149d818f5cfc5c0a2465c46ca76c42d6d558ec0077960a37ae179f401b0 - canonicalized_ast: 701fc149d818f5cfc5c0a2465c46ca76c42d6d558ec0077960a37ae179f401b0 - type_inferenced_ast: 6a3729bb8e9948a84a0fd5a825510420f57ec7979695dc816795a83258a415e8 + initial_ast: 3aa5764cbd902c2cc381caf3799f6444d8a751ac296d2df46836798c7c2516c7 + canonicalized_ast: 3aa5764cbd902c2cc381caf3799f6444d8a751ac296d2df46836798c7c2516c7 + type_inferenced_ast: 81579961aa1f500134365339e17642c1e18ef0fc7c4a2231c71bbd5136be81b1 diff --git a/tests/expectations/compiler/compiler/circuits/member_variable_and_function.leo.out b/tests/expectations/compiler/compiler/circuits/member_variable_and_function.leo.out index 7ede51f889..944eca671d 100644 --- a/tests/expectations/compiler/compiler/circuits/member_variable_and_function.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_variable_and_function.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 033ac2bd59dacfd0e1f551feee772337e15a3c9eca8fa64075b1f6c411b2f235 - canonicalized_ast: 033ac2bd59dacfd0e1f551feee772337e15a3c9eca8fa64075b1f6c411b2f235 - type_inferenced_ast: a90d633d8db0a339186dc314f4de35ed970aec22cfccd423f49824ade7dcf70b + initial_ast: c47b15931cf28e5e59b3d179a47fcc4587983b70ca759005a857453c672e2a9e + canonicalized_ast: c47b15931cf28e5e59b3d179a47fcc4587983b70ca759005a857453c672e2a9e + type_inferenced_ast: c3eb89894262dfa346936a88224a76a113faf0b260918a9d70b9cd9327f98ab3 diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_variable.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_variable.leo.out index a7c760ec44..e4e8062313 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_self_variable.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_self_variable.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 35c17de2e9d8a63b29cbeaeeb7eebfa886ff4ae536938e571e953ee206ba8a59 - canonicalized_ast: 8f09ad7c9a20220bf8d9fe7e5c84a7c1e99b840fbeb682fb5646df9a05efbd8b - type_inferenced_ast: b1e1e8b1c22a2c98f82d26a1a339952dbe085366b5dc3bb36d71cf4c842739b9 + initial_ast: 88691b6324a60d5e0dd23b6afa9078c4e806395f9b5fc072b2d59c72d4e242f8 + canonicalized_ast: 9f92fbeecfc58a153d539735798e482a44deb5d1bf303463838f15639de24d7e + type_inferenced_ast: 0c1b51a5710965c5e07f9189775e7e2f9b0e9a6bc0e368ae1162547fbf55f993 diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_variable_branch.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_variable_branch.leo.out index 90c520afac..9895e288ff 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_self_variable_branch.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_self_variable_branch.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 5654f2be64d7879bfa2cb49029bd6c3b757c0eb28dd32744de41a28effae5891 - canonicalized_ast: 42710d4ec40860cbd1a88da9738960c5a07a6a9937436ec474b3f1bbc805aac4 - type_inferenced_ast: d7f138829083963f935922d492a94a693b963d3acee6fadb325be8d99f0e4d19 + initial_ast: 7c4442a07900405f1bb78d46068d1599b16183552f0878abf9c3e661b6cc5f41 + canonicalized_ast: d52ffd68c34f9cb3833c30936001f18de9a340873615bb5b911ef5df4e2ed5eb + type_inferenced_ast: 2422a89048dd0a5f6ee26a31a095f9cab777b14886a367be90ad78fe18e71523 diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_variable_conditional.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_variable_conditional.leo.out index d50ce4095d..91f96d4963 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_self_variable_conditional.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_self_variable_conditional.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 46fccf2a1d04ff7bbfb9a88eeceb6cfd39adcf7ce2e2323d4fb83f4ae3dba273 - canonicalized_ast: 222568f9f7b61876690514fdd2dd12419b2e889269a2b7aabd7223d291167da5 - type_inferenced_ast: f1a5656978bd48409401788332b1a1d90c969178e65af06b54d5b4445be84375 + initial_ast: e5d4fa7417a305e83e4af12e3dcc9e085d372068babbefa514ae9a28bc96a819 + canonicalized_ast: c588d34fa9b1fce593f783a68cd3effff86f7be33dc08a5fd7656daa3a48f208 + type_inferenced_ast: 7d2d688ad6f94b586fd60dab4dd072d66cfeadad9e61e3009e9d83bee93f2a42 diff --git a/tests/expectations/compiler/compiler/circuits/mut_variable.leo.out b/tests/expectations/compiler/compiler/circuits/mut_variable.leo.out index bff2c8dada..dbf432a628 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_variable.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_variable.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 684a9fc0a433525dfbe52d8037588845ad55782b2c1b046bd91049c3b9d9ea4c - canonicalized_ast: 684a9fc0a433525dfbe52d8037588845ad55782b2c1b046bd91049c3b9d9ea4c - type_inferenced_ast: 1fce4132eea4711a6b42fab47478d3608d16df3930554350ed46d865162f7043 + initial_ast: ed8aa86dd6afe56565d936044fec2b6c290e84637d27b09d25935b4c35fc70ee + canonicalized_ast: ed8aa86dd6afe56565d936044fec2b6c290e84637d27b09d25935b4c35fc70ee + type_inferenced_ast: 3d7bb92c36d453181318441e251d393fd5168de3c15441a744af9b5230420b0e diff --git a/tests/expectations/compiler/compiler/circuits/mutable_call_immutable_context.leo.out b/tests/expectations/compiler/compiler/circuits/mutable_call_immutable_context.leo.out index 5ea932e6db..ae3f5b6f97 100644 --- a/tests/expectations/compiler/compiler/circuits/mutable_call_immutable_context.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mutable_call_immutable_context.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: bd8793749cfd151b89162febc55b6bb6de1be867a0009da6a8470106953db630 - canonicalized_ast: 9ecf61f153db9d0912cae6891258e0ebdaecd0da6eef7bbc92c3a6476c7adf6d - type_inferenced_ast: 6908fc70e763ff518a9942a3b930aac64b70075be1b734c2ac93175ca1f16f97 + initial_ast: a65aa4129ecc625f548f2eeaa411c3949f2f5b51db559842fe889b5a063981d9 + canonicalized_ast: 0fa4ca18f2103707d382cc926b3787ebee35d00a7e29692ecbb4158b87ddbb6e + type_inferenced_ast: 57c4afa4a03a741af17435b4f10907bcf65ef9f17a55a50cc779aa24af39a2dd diff --git a/tests/expectations/compiler/compiler/circuits/pedersen_mock.leo.out b/tests/expectations/compiler/compiler/circuits/pedersen_mock.leo.out index bec7e9cfc6..fd5ce09577 100644 --- a/tests/expectations/compiler/compiler/circuits/pedersen_mock.leo.out +++ b/tests/expectations/compiler/compiler/circuits/pedersen_mock.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: c983e5e79b4325ac133ac1a5ff0b1655c646111389991286322b8c16c5833837 - canonicalized_ast: 8dcb714238ef7e9fd3c66a7a12ec4621bb4e9ac5994f1c692215a9f93463ce9e - type_inferenced_ast: ebd34799bd1c6936ca5032812d2466bade58df616cc06e3c6e57151a06b78601 + initial_ast: 56a342fe09244cea63c7ed0cf0b641d7347978abfc28e4f19e60b38cc94087a2 + canonicalized_ast: a44d595304cf53de81e57ede4bf038dbcc641d45d3776bf6fb475a0d48673b29 + type_inferenced_ast: 4eee3c5c2c191e3b9bd9acf8cf52836207712259f835ffa0ae9e63769fb4fb65 diff --git a/tests/expectations/compiler/compiler/circuits/self_member.leo.out b/tests/expectations/compiler/compiler/circuits/self_member.leo.out index 5311554177..01ca00717e 100644 --- a/tests/expectations/compiler/compiler/circuits/self_member.leo.out +++ b/tests/expectations/compiler/compiler/circuits/self_member.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: ef90c67bd868ad3d1362b37acad99a97316700c60c9667a4d67b8ad392b2922c - canonicalized_ast: ef90c67bd868ad3d1362b37acad99a97316700c60c9667a4d67b8ad392b2922c - type_inferenced_ast: 636fbf53660cedd9c05b6c361fae19ae5adaae85adc98e888308072ef843f8fa + initial_ast: 2b9656370d8c43247d8924222ec13e2f2ee988558b13b0e52e3b8fa0b9752115 + canonicalized_ast: 2b9656370d8c43247d8924222ec13e2f2ee988558b13b0e52e3b8fa0b9752115 + type_inferenced_ast: 0096338c25c3f93d38e41ae493fcb53396d95b83c4d277b97cca7f7692f0fefe diff --git a/tests/expectations/compiler/compiler/console/assert.leo.out b/tests/expectations/compiler/compiler/console/assert.leo.out index c4c2771a9b..a7e0c31461 100644 --- a/tests/expectations/compiler/compiler/console/assert.leo.out +++ b/tests/expectations/compiler/compiler/console/assert.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 70bf9e6efa84336b4d023dd5484ad15897678c9d4851b5d7cfdb8cb6b79facaa - canonicalized_ast: 70bf9e6efa84336b4d023dd5484ad15897678c9d4851b5d7cfdb8cb6b79facaa - type_inferenced_ast: b410b94ea2070cbfe393229700288a461896a65bb84feed3c0a006aae04566f8 + initial_ast: dd4fe27f2213405f1261a5dd08619e96f2164c6984ce1efbc034ebeb0f8159f6 + canonicalized_ast: dd4fe27f2213405f1261a5dd08619e96f2164c6984ce1efbc034ebeb0f8159f6 + type_inferenced_ast: 72c60ddc90e6db8f7e97f9881813ece3d45d333ca4aa5d64368565113c42522f diff --git a/tests/expectations/compiler/compiler/console/conditional_assert.leo.out b/tests/expectations/compiler/compiler/console/conditional_assert.leo.out index c05f689b08..492efd51f6 100644 --- a/tests/expectations/compiler/compiler/console/conditional_assert.leo.out +++ b/tests/expectations/compiler/compiler/console/conditional_assert.leo.out @@ -16,6 +16,6 @@ outputs: - input_file: cond_2.in output: registers: {} - initial_ast: d6aad3c859ad1b7f4d3d258c9489cd5a4c26b3a36b10b40dd823c976fb3e1000 - canonicalized_ast: 0291e08f42b60c0ef76f666e610bc7ef850f22e3cb849088f516e2feb312cf6e - type_inferenced_ast: f414dd49f054e54d564501fa52bb266dd152d8c32a84dd54b61f782380d02dbe + initial_ast: bf6d2879d4bd942a4ef5eef595f5770edb8f718eab43108bce52b5864c54cdf2 + canonicalized_ast: 0d7d8284630e9e3a72809d48b53cd178efe4cd5652ef37ecb01d366d0c21351e + type_inferenced_ast: 1cab3711be24468ea0c8291fc6ced605fc908220a52b6444c6b0fe00571d26a7 diff --git a/tests/expectations/compiler/compiler/console/error.leo.out b/tests/expectations/compiler/compiler/console/error.leo.out index a8be560200..91f5bdbaff 100644 --- a/tests/expectations/compiler/compiler/console/error.leo.out +++ b/tests/expectations/compiler/compiler/console/error.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 637b1f2fc3317138b7352122cab1754c30833e87208d443d9657aa178d7e5a31 - canonicalized_ast: 637b1f2fc3317138b7352122cab1754c30833e87208d443d9657aa178d7e5a31 - type_inferenced_ast: b003fc86b328eb76ffb5f13e4cc8b1d19da3c64c9b34ee9f116c46b998121cd3 + initial_ast: f65d7556d2d52b3e33bfd12a70350bc67ff21a55d470e8795700e7d3fad7d04d + canonicalized_ast: f65d7556d2d52b3e33bfd12a70350bc67ff21a55d470e8795700e7d3fad7d04d + type_inferenced_ast: 7b5616a0e84f7a6b0acfdd98a770832382914b1d3d16cbdf33605beb207475b1 diff --git a/tests/expectations/compiler/compiler/console/log.leo.out b/tests/expectations/compiler/compiler/console/log.leo.out index de703bffbf..24587486a3 100644 --- a/tests/expectations/compiler/compiler/console/log.leo.out +++ b/tests/expectations/compiler/compiler/console/log.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 7f5540a6b26be4fbf33c59d72ed8ba4697bbfffde5a674bacc5846ea6254194d - canonicalized_ast: 7f5540a6b26be4fbf33c59d72ed8ba4697bbfffde5a674bacc5846ea6254194d - type_inferenced_ast: 0a7837344c544abc21e4be2946292baac4553ad6b29c77e8a08a4032b592b206 + initial_ast: affca079b67e0869881ba79627ffd7ccd27ea8d5f189403d8427ef98e1056bd7 + canonicalized_ast: affca079b67e0869881ba79627ffd7ccd27ea8d5f189403d8427ef98e1056bd7 + type_inferenced_ast: 521fd1f1dbc9c68595e4bdbe1e9bad8e6c44710d145438fc35269e2f8c438df1 diff --git a/tests/expectations/compiler/compiler/console/log_conditional.leo.out b/tests/expectations/compiler/compiler/console/log_conditional.leo.out index 37cfe37ac7..758799b010 100644 --- a/tests/expectations/compiler/compiler/console/log_conditional.leo.out +++ b/tests/expectations/compiler/compiler/console/log_conditional.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 686cf650236e7d5578b163101eb4104f0dbdb0fe9ed72ebf109f518b2ab18568 - canonicalized_ast: 686cf650236e7d5578b163101eb4104f0dbdb0fe9ed72ebf109f518b2ab18568 - type_inferenced_ast: dddd466784e0095ccd9004c9b3fe011290e36cc0b0a0ceb20ed4052f99aa9b35 + initial_ast: a5bd96138155ee38f07e7b41608868d053f06bb3e938fd5a90303028a8996fdd + canonicalized_ast: a5bd96138155ee38f07e7b41608868d053f06bb3e938fd5a90303028a8996fdd + type_inferenced_ast: ad95e7881e367efc029e79d2df541305add838367a6b03816c73aed641890740 diff --git a/tests/expectations/compiler/compiler/console/log_input.leo.out b/tests/expectations/compiler/compiler/console/log_input.leo.out index ef23f2153c..14c302e08d 100644 --- a/tests/expectations/compiler/compiler/console/log_input.leo.out +++ b/tests/expectations/compiler/compiler/console/log_input.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 0e62d5ba7775423a274c6871ed7aa23143051a1030fa2375b3ac52b4624bed29 - canonicalized_ast: 0e62d5ba7775423a274c6871ed7aa23143051a1030fa2375b3ac52b4624bed29 - type_inferenced_ast: 816f0e99603f81c6fd2e771095de519200e954ce238a76a535cd3f2b5c403c23 + initial_ast: ac8959bcbddd11b5df0b91b4986970098c022785b78391ba7e55386bdab41571 + canonicalized_ast: ac8959bcbddd11b5df0b91b4986970098c022785b78391ba7e55386bdab41571 + type_inferenced_ast: 427a709da8683a8ea6cc21c64d56d77d504b647600813f13c6d29586ee76f33d diff --git a/tests/expectations/compiler/compiler/console/log_parameter.leo.out b/tests/expectations/compiler/compiler/console/log_parameter.leo.out index 11a643fae8..887ba57dc4 100644 --- a/tests/expectations/compiler/compiler/console/log_parameter.leo.out +++ b/tests/expectations/compiler/compiler/console/log_parameter.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 4c513c484e711bef8b4da2bd54e71f3e6bbea22d002155b598c7573ba5b1c747 - canonicalized_ast: 4c513c484e711bef8b4da2bd54e71f3e6bbea22d002155b598c7573ba5b1c747 - type_inferenced_ast: a33edf5d144205f5f5f820c8a95476b677dfcae5a4997c28cd707dcd637cf12a + initial_ast: 84f235f5e82fd83c0d4ac44037b460ab8c4ee985e834f4cbb1cdf7ab0516bc8d + canonicalized_ast: 84f235f5e82fd83c0d4ac44037b460ab8c4ee985e834f4cbb1cdf7ab0516bc8d + type_inferenced_ast: cab71b6db461a948e4ce6de5f49976a50619e84de81e22f26f73b38f30db0e57 diff --git a/tests/expectations/compiler/compiler/console/log_parameter_many.leo.out b/tests/expectations/compiler/compiler/console/log_parameter_many.leo.out index 78b90b9a8c..849ee610be 100644 --- a/tests/expectations/compiler/compiler/console/log_parameter_many.leo.out +++ b/tests/expectations/compiler/compiler/console/log_parameter_many.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 11e5803a91f359a4d9e41f70173072984d8a430ea2e19169c239f9fdd0b81726 - canonicalized_ast: 11e5803a91f359a4d9e41f70173072984d8a430ea2e19169c239f9fdd0b81726 - type_inferenced_ast: 6833ca94c2ee3e7ceecec151709c145ac12b3fc258b6f720bc203d89056852cf + initial_ast: 8826a62285bb93b0aaacfda5ed2ae4cdef50948a7b2472700b72cfb328edc1dc + canonicalized_ast: 8826a62285bb93b0aaacfda5ed2ae4cdef50948a7b2472700b72cfb328edc1dc + type_inferenced_ast: 0c40ac594ca6adf8cf625b3ac63d9d925975be323bf358ca55aaa4f3aa39aa46 diff --git a/tests/expectations/compiler/compiler/definition/out_of_order.leo.out b/tests/expectations/compiler/compiler/definition/out_of_order.leo.out index 8ff57b550a..82156e826e 100644 --- a/tests/expectations/compiler/compiler/definition/out_of_order.leo.out +++ b/tests/expectations/compiler/compiler/definition/out_of_order.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: a60a2c808f9c8b475e8d4917307e483db1742b5baade6e826e56d848520f24a4 - canonicalized_ast: 9845ae56693cf58d9c1283d2bf2d1d5e8f2be7c2d018cbb689a6fb09ba952451 - type_inferenced_ast: aae7a9954e18cf849f41af233cedd6a472cdd59c6dfdfe25a2433f0a6eaf43c8 + initial_ast: 9a3c1d44f1c7e23b08441e6b429e0aaf96b9091a85884a892e046b6213872adf + canonicalized_ast: 52166ba1dada6040b5bb273a3778a719751baf263f27da2ebb43e4fcaff1707e + type_inferenced_ast: 8251d737314510e1f1d4d029dea6d3b529d64bd92714d006f1bfcb08539867f3 diff --git a/tests/expectations/compiler/compiler/definition/out_of_order_with_import.leo.out b/tests/expectations/compiler/compiler/definition/out_of_order_with_import.leo.out index 9ca08a8e76..3911df5905 100644 --- a/tests/expectations/compiler/compiler/definition/out_of_order_with_import.leo.out +++ b/tests/expectations/compiler/compiler/definition/out_of_order_with_import.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: a62620cae9946643df9ed0991a0f5134e786fac8d561fb15a33d710cf546799c - canonicalized_ast: 1dc02f76c11beb5dfadc9b3d1f5423ad2bce40502600a42de066a88f97188ed4 - type_inferenced_ast: 41e32609589c1bcb33e9dcaea9864e8868b5d2028b65924a3145b3aae7c6166a + initial_ast: 1ee4aa8742bab66bd1342ff64083c537ebd3cc0bd2a7c27274129696c04d5523 + canonicalized_ast: 1bbf3438c4ab147d1fb3c76bdbe77fef1787c173376b8677485c30acf27561fb + type_inferenced_ast: 1b1ffd1f7a17e597fc1118606ddf872d363febf800e6d84dfaa7bacfdff63c61 diff --git a/tests/expectations/compiler/compiler/field/add.leo.out b/tests/expectations/compiler/compiler/field/add.leo.out index 66010c18fb..a7a4fa7cb9 100644 --- a/tests/expectations/compiler/compiler/field/add.leo.out +++ b/tests/expectations/compiler/compiler/field/add.leo.out @@ -16,6 +16,6 @@ outputs: r: type: bool value: "true" - initial_ast: 59a25bf44613617124a4aa8ea169751c096fb50c5e3797bfe33705febc4fe10d - canonicalized_ast: 59a25bf44613617124a4aa8ea169751c096fb50c5e3797bfe33705febc4fe10d - type_inferenced_ast: f8e5c1c95937d6f7bd04e009d65f2345281dd68e1669b2ecf740f4b071b106f6 + initial_ast: 41ce88a99d310e57e8e58fed720ecd68fd372944aa309541fb75b5eda51a9f39 + canonicalized_ast: 41ce88a99d310e57e8e58fed720ecd68fd372944aa309541fb75b5eda51a9f39 + type_inferenced_ast: 3047d9e127644a596e0836ebe715098c1bf7dedbd8a4cdbf3443ee91612298f6 diff --git a/tests/expectations/compiler/compiler/field/div.leo.out b/tests/expectations/compiler/compiler/field/div.leo.out index 7556ffbffc..0932fd91ee 100644 --- a/tests/expectations/compiler/compiler/field/div.leo.out +++ b/tests/expectations/compiler/compiler/field/div.leo.out @@ -16,6 +16,6 @@ outputs: r: type: bool value: "true" - initial_ast: 6fe0af537868b537a8e6b410439b669012cd211fdb988d8457ce6d893d579bfe - canonicalized_ast: 6fe0af537868b537a8e6b410439b669012cd211fdb988d8457ce6d893d579bfe - type_inferenced_ast: 8020277aecd403a5edbd722c320f25cdbd5ba5f930ea4e427929ab7373db8894 + initial_ast: ebb9776abaaf0b45d2c83013db7decbf4c71e9844be91a435d9bca6f0956465e + canonicalized_ast: ebb9776abaaf0b45d2c83013db7decbf4c71e9844be91a435d9bca6f0956465e + type_inferenced_ast: 1aab2a3f766a4216073d86ec4c3dd1444459863c16e2db69890f9d7662eea006 diff --git a/tests/expectations/compiler/compiler/field/eq.leo.out b/tests/expectations/compiler/compiler/field/eq.leo.out index 1e99b7fe17..016deb5fe7 100644 --- a/tests/expectations/compiler/compiler/field/eq.leo.out +++ b/tests/expectations/compiler/compiler/field/eq.leo.out @@ -16,6 +16,6 @@ outputs: r: type: bool value: "true" - initial_ast: ed504c4658bfd6d096a4f17fb16bdc8a587b6c91fc669ade95179d8792b1f4ea - canonicalized_ast: ed504c4658bfd6d096a4f17fb16bdc8a587b6c91fc669ade95179d8792b1f4ea - type_inferenced_ast: 920bb42e0ece95f8cd9f343296389f13255b1c3de14f5e13dfd17ff6d82b7137 + initial_ast: a15fced3bedb13d55187bb839abbb5db8ea20e23bb8ceb4e24ee8636a43c22da + canonicalized_ast: a15fced3bedb13d55187bb839abbb5db8ea20e23bb8ceb4e24ee8636a43c22da + type_inferenced_ast: 083d96a04074a68d7cbaba40c460e743e6ff6fcd37994730914d4a1345f524d9 diff --git a/tests/expectations/compiler/compiler/field/field.leo.out b/tests/expectations/compiler/compiler/field/field.leo.out index 30ac9a815a..ee0b350350 100644 --- a/tests/expectations/compiler/compiler/field/field.leo.out +++ b/tests/expectations/compiler/compiler/field/field.leo.out @@ -16,6 +16,6 @@ outputs: r: type: bool value: "true" - initial_ast: 54be6c6fb3a49c107d7933f6d0db4e7f54f7db4afc0a77d1bc052cc1b542c96a - canonicalized_ast: 54be6c6fb3a49c107d7933f6d0db4e7f54f7db4afc0a77d1bc052cc1b542c96a - type_inferenced_ast: 849caf4c6446fd4a2360d48bcaf00af8ae24844e9e1aca30c34e77c0e5470d19 + initial_ast: ac26e1ea6dcfa33791349731ab9cf1481764a0b365feffb261f96f24f92b5534 + canonicalized_ast: ac26e1ea6dcfa33791349731ab9cf1481764a0b365feffb261f96f24f92b5534 + type_inferenced_ast: e4e48995001316d9851878018c999cd5babec0c5396d0eb0136f3e0a7469a4c9 diff --git a/tests/expectations/compiler/compiler/field/mul.leo.out b/tests/expectations/compiler/compiler/field/mul.leo.out index c5073f9fe0..5890df0840 100644 --- a/tests/expectations/compiler/compiler/field/mul.leo.out +++ b/tests/expectations/compiler/compiler/field/mul.leo.out @@ -16,6 +16,6 @@ outputs: r: type: bool value: "false" - initial_ast: d17e4bd13c8e5f3f01cdf41bddde1d8aec876f28b1756b74a78b525d0e97ea09 - canonicalized_ast: d17e4bd13c8e5f3f01cdf41bddde1d8aec876f28b1756b74a78b525d0e97ea09 - type_inferenced_ast: d8db1d4d4fb8b6de4e25a458bfe2cc29d100cf959b294a76086d4cbcb209e4c6 + initial_ast: b0f186baff2a170ec1cc2400380ecf7fc7e9b5ce16765eadc5bde530a9d14a85 + canonicalized_ast: b0f186baff2a170ec1cc2400380ecf7fc7e9b5ce16765eadc5bde530a9d14a85 + type_inferenced_ast: 5bf8ce5327801fc84fe90818827c733f0be2794e2feeaa8dee27ad5e1d9a3cdf diff --git a/tests/expectations/compiler/compiler/field/negate.leo.out b/tests/expectations/compiler/compiler/field/negate.leo.out index e2f7234663..7f240198da 100644 --- a/tests/expectations/compiler/compiler/field/negate.leo.out +++ b/tests/expectations/compiler/compiler/field/negate.leo.out @@ -16,6 +16,6 @@ outputs: r: type: bool value: "true" - initial_ast: 25f48855e80d5d6e0a6fe71d388d7eafd0559bd9b4c320ccb6a2c8af874352fa - canonicalized_ast: 25f48855e80d5d6e0a6fe71d388d7eafd0559bd9b4c320ccb6a2c8af874352fa - type_inferenced_ast: c43f0ac3e0fcb4580dac447b16530ac89d166c95a7a9497a274020c6d4ec75fb + initial_ast: c6944601ce98355c6050683c7efeccca59566b281dc9e33d364ea5eaeeede8aa + canonicalized_ast: c6944601ce98355c6050683c7efeccca59566b281dc9e33d364ea5eaeeede8aa + type_inferenced_ast: a807a5420a071df5a2c1281cf44cf98bd32a3066ad35c1ebd2cf585405e7e044 diff --git a/tests/expectations/compiler/compiler/function/array_input.leo.out b/tests/expectations/compiler/compiler/function/array_input.leo.out index 8204e381f2..0e3f93e6e0 100644 --- a/tests/expectations/compiler/compiler/function/array_input.leo.out +++ b/tests/expectations/compiler/compiler/function/array_input.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: cbf1d3fe0106bda529af2912783d2ea0505b9d3780f5ca6954c1caaf3381543a - canonicalized_ast: 711c249e5b0c1ac7f8e9dd96e13bdf1c7449f2f0afa994b9c6430f91b40072a9 - type_inferenced_ast: a96aab38c2fa75d08da2a17ed91efd8128067f9f8ad96e151d0c27a2a55355c3 + initial_ast: 50cc91a73be6ea74dab65fa196daf6931f84a56896a4a8e398aedba47f4cf005 + canonicalized_ast: e2421a0ffcef3eb9f57640168d92313c9b6b95b5dcf55ccdee6807327b418eed + type_inferenced_ast: 4b0f0827da9e66d8acdc11415820a06dc4fd2ada3ab3b29f1553bfde827565da diff --git a/tests/expectations/compiler/compiler/function/array_params_direct_call.leo.out b/tests/expectations/compiler/compiler/function/array_params_direct_call.leo.out index db9a7a59a9..1462960ab9 100644 --- a/tests/expectations/compiler/compiler/function/array_params_direct_call.leo.out +++ b/tests/expectations/compiler/compiler/function/array_params_direct_call.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 16b635b136d26f8f9b71d9637bd85aa8449d6a93a558669bb44235f969703cba - canonicalized_ast: f46853ed6440686de4f7ed91623575fe2a040e0672580aa06dd2d6fd54dd51b1 - type_inferenced_ast: b36955c7ea4a3894d5857df754e20b6ee2767d84adab7509d50a645cb78af437 + initial_ast: e2001b1f9372ef49090e86f4a1dcaac8e2cc0492f5eaa3650cb9823b809c17e0 + canonicalized_ast: 57c23bdefab42e9a131f70d784df69646dfc4e0c2963981e6bc52223c81db63b + type_inferenced_ast: edcb6ee24685782a3c1fb8fd0eb98ad095288bd7afa87ae4349267a6eb65c7c1 diff --git a/tests/expectations/compiler/compiler/function/conditional_return.leo.out b/tests/expectations/compiler/compiler/function/conditional_return.leo.out index 34b427b34b..1ebc3249bd 100644 --- a/tests/expectations/compiler/compiler/function/conditional_return.leo.out +++ b/tests/expectations/compiler/compiler/function/conditional_return.leo.out @@ -16,6 +16,6 @@ outputs: a: type: u32 value: "4" - initial_ast: 0f75f5cb48d7ef68bc14fad54adc07e94d3ffbe2f3ea9e4c7b3a0720bf51dec6 - canonicalized_ast: 0f75f5cb48d7ef68bc14fad54adc07e94d3ffbe2f3ea9e4c7b3a0720bf51dec6 - type_inferenced_ast: 09c9b20ba2ff94cfca66a5e2e9eda0ce0e5970ca6ebbd111968445f028294cb7 + initial_ast: f26cde6c2a1b4b3a97821353bdbfdc9d56ef657a478e9a25624f66c564cc5eee + canonicalized_ast: f26cde6c2a1b4b3a97821353bdbfdc9d56ef657a478e9a25624f66c564cc5eee + type_inferenced_ast: 84a23e71e8a617ff4446a4183fba5fa8fdb410f876ee6ca97c93cc26085c0884 diff --git a/tests/expectations/compiler/compiler/function/empty.leo.out b/tests/expectations/compiler/compiler/function/empty.leo.out index 844180d720..5b5bab8a81 100644 --- a/tests/expectations/compiler/compiler/function/empty.leo.out +++ b/tests/expectations/compiler/compiler/function/empty.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 2e31236a963bb214beb942fbb0269ec2c08ddf704fd47ce5d0864b1f1fbb2a7a - canonicalized_ast: 186d0d826a29f428034b8782b79d8e3a0cf810f9dde88b5f1062508322c5d7d5 - type_inferenced_ast: 740b33fa80b8d50c88523daf299d79846430a291dd8b034dd5a01a106270610b + initial_ast: 25dcbe87acec22191a60e99bb9abff5d6502b398b2cff423565af816f1e13544 + canonicalized_ast: c6623025e0169b5548d537b9d6bef8fa8aa1d3aa5bf7ede5f90fbf159b511e34 + type_inferenced_ast: 00a616f64800ec97e30df10fedef4993adc14368cad2e4be757e46ff6052d055 diff --git a/tests/expectations/compiler/compiler/function/iteration.leo.out b/tests/expectations/compiler/compiler/function/iteration.leo.out index 16dc886ac5..2c81b753c6 100644 --- a/tests/expectations/compiler/compiler/function/iteration.leo.out +++ b/tests/expectations/compiler/compiler/function/iteration.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 96155896f4993bd97a8e15281e92c4e9352ed02343bccddb9c3cd0f8ca55b408 - canonicalized_ast: ae4a2dfa82f00621192f117bea664e58768d57376b68a90ce0e15c5bc9535e22 - type_inferenced_ast: 2452ad985e23efbc07a94f2945d406a959aca68ec37e9c349a30edcc12839c04 + initial_ast: 3f4e82eda9825e87ed21e40d62213aedaf757134c41a204dad8e81e89341db52 + canonicalized_ast: 509f630dfca7c3b33cad307f42342005c1c0519fdf5ab444dc147ddbfe35a3f2 + type_inferenced_ast: 6358553eed92aa8c1ae4fd2a8712d95bc198a40b96fa6e6ff8ada4a9d98fb453 diff --git a/tests/expectations/compiler/compiler/function/iteration_repeated.leo.out b/tests/expectations/compiler/compiler/function/iteration_repeated.leo.out index 8056fc7df4..354d3d7f1d 100644 --- a/tests/expectations/compiler/compiler/function/iteration_repeated.leo.out +++ b/tests/expectations/compiler/compiler/function/iteration_repeated.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 55bf6a745bd0da1684239dd5f624a5ead1d5644c15f25e3099ff40c71ce23317 - canonicalized_ast: 929e1e876d7dd5d04ae39dd8d4b0b3fa3f0e8783e39056941115fff337a0ef84 - type_inferenced_ast: bc6903d0764db54fd4938835120ab6fa02575b1b896828876153bb30da28a19a + initial_ast: 4ae2929cc0c72fd75f38a87f49b83e37b29e2131f2cf15db7e55a4da5b007f10 + canonicalized_ast: 1a0c36ef1c6108a7a84dc7c43d012d0e9f0bcf3ae15634128a98ea04c4f335ed + type_inferenced_ast: 3c270a3472eb019d1426c8c1a8e184f6b4dda7c88bb8d136cb59bd94120d1ca8 diff --git a/tests/expectations/compiler/compiler/function/multiple_returns.leo.out b/tests/expectations/compiler/compiler/function/multiple_returns.leo.out index 1a0e723993..048bbefff5 100644 --- a/tests/expectations/compiler/compiler/function/multiple_returns.leo.out +++ b/tests/expectations/compiler/compiler/function/multiple_returns.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 4c1138877fd90e6a2728592a085a567f3ba63d4225abedaf517251b8ddce7a6a - canonicalized_ast: 4c1138877fd90e6a2728592a085a567f3ba63d4225abedaf517251b8ddce7a6a - type_inferenced_ast: 7cf351cd0c0dbe9bb2a87397c2273f09482994ca60be8f8044a4e2d074fc7dd4 + initial_ast: c4d98a91631a78bb154e70846486e0ff12472f7cdf0dba1ff706fadafdcc4424 + canonicalized_ast: c4d98a91631a78bb154e70846486e0ff12472f7cdf0dba1ff706fadafdcc4424 + type_inferenced_ast: 0eb7c97884a7b1cd58e40cd51d0707892654c1083819ba1653767876b8b6aa27 diff --git a/tests/expectations/compiler/compiler/function/multiple_returns_main.leo.out b/tests/expectations/compiler/compiler/function/multiple_returns_main.leo.out index da27b1ea91..0a6d8c54cc 100644 --- a/tests/expectations/compiler/compiler/function/multiple_returns_main.leo.out +++ b/tests/expectations/compiler/compiler/function/multiple_returns_main.leo.out @@ -19,6 +19,6 @@ outputs: r1: type: bool value: "true" - initial_ast: 5a3189a6167d84e140e6e8d2dbfcbb35de5b02927733de0c1143ede46f2fbcf2 - canonicalized_ast: 5a3189a6167d84e140e6e8d2dbfcbb35de5b02927733de0c1143ede46f2fbcf2 - type_inferenced_ast: 7bc19e1d45f6cd7d88edb80aa02c5d92021d0cfc6473d9404f513bda95b30b6b + initial_ast: c571bc844b073f4a4c66ab9b0bdcee6745271a80298dc5d871e1036d13213187 + canonicalized_ast: c571bc844b073f4a4c66ab9b0bdcee6745271a80298dc5d871e1036d13213187 + type_inferenced_ast: 89a7dcde1fb148fed4f5bcc6412b4275a1c2b0009e7960b7df8db0217da14e5e diff --git a/tests/expectations/compiler/compiler/function/newlines.leo.out b/tests/expectations/compiler/compiler/function/newlines.leo.out index 1a391adae5..8941d57016 100644 --- a/tests/expectations/compiler/compiler/function/newlines.leo.out +++ b/tests/expectations/compiler/compiler/function/newlines.leo.out @@ -19,6 +19,6 @@ outputs: b: type: u32 value: "0" - initial_ast: 1e4cdf32e452509a2da4d4ef7a49fd51ba4773eb9582693e47f4838a506aa404 - canonicalized_ast: 1e4cdf32e452509a2da4d4ef7a49fd51ba4773eb9582693e47f4838a506aa404 - type_inferenced_ast: 8a61717cc7c59824571deaeb55dfcc499d26ef21617c9e8ef4814752374518eb + initial_ast: 1cd1942f945063ca28425deb842703edaf7c9c41101a06b0b8471ef47fd3ae88 + canonicalized_ast: 1cd1942f945063ca28425deb842703edaf7c9c41101a06b0b8471ef47fd3ae88 + type_inferenced_ast: 865cad30a2aeae6615efb2f4dbaed8c7fd6c6b0a5adc0d0050ee4617ec393866 diff --git a/tests/expectations/compiler/compiler/function/repeated.leo.out b/tests/expectations/compiler/compiler/function/repeated.leo.out index b535091b49..ea5312e1ac 100644 --- a/tests/expectations/compiler/compiler/function/repeated.leo.out +++ b/tests/expectations/compiler/compiler/function/repeated.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 63569735bf4eb8ad55d90df67cf6fefec39579db3326888926142af2cfb26d6f - canonicalized_ast: 63569735bf4eb8ad55d90df67cf6fefec39579db3326888926142af2cfb26d6f - type_inferenced_ast: 542715a7e5c18db26fdadf63bd41e6cb71df4f96bb867eb18ad65c80a965decc + initial_ast: e0ed84f76e2a79b3b784ed989db10d1893968fd0ae07eb3b28eafb45afa3762f + canonicalized_ast: e0ed84f76e2a79b3b784ed989db10d1893968fd0ae07eb3b28eafb45afa3762f + type_inferenced_ast: c9f98a09d0a48fbbaaf43032a7050ea4e01e90595b321ec70b7fdabb4a6322dd diff --git a/tests/expectations/compiler/compiler/function/return.leo.out b/tests/expectations/compiler/compiler/function/return.leo.out index 35f3cb6c2a..4330aeb266 100644 --- a/tests/expectations/compiler/compiler/function/return.leo.out +++ b/tests/expectations/compiler/compiler/function/return.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 7195af24acaba1dbba4c8d8848177e7a82e71320a9381e48a2c176e9886699c5 - canonicalized_ast: 7195af24acaba1dbba4c8d8848177e7a82e71320a9381e48a2c176e9886699c5 - type_inferenced_ast: 92e7397b037f436aee2ccd1fb04e95014ed5f1335681c8357592f6a6076cc76c + initial_ast: 7e9cf69f95600d12d299b37a52a2ba19e1194da8349d2aa4b9d082a0c90c36c8 + canonicalized_ast: 7e9cf69f95600d12d299b37a52a2ba19e1194da8349d2aa4b9d082a0c90c36c8 + type_inferenced_ast: 21ea10f8ab44c8c521ac7216555775d7c8e23439e21ae25a4fe142a39df891fa diff --git a/tests/expectations/compiler/compiler/function/return_array_nested_pass.leo.out b/tests/expectations/compiler/compiler/function/return_array_nested_pass.leo.out index fcca1da90c..3e3df80380 100644 --- a/tests/expectations/compiler/compiler/function/return_array_nested_pass.leo.out +++ b/tests/expectations/compiler/compiler/function/return_array_nested_pass.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: b310827701505fb4e4457a1c55557f1754437cd4a49a02a421f15e9fca038ccb - canonicalized_ast: a33daa0e9d07ce990b2c3ea8b71c7f6a700415012b8d6fe04f9245f8d3308b59 - type_inferenced_ast: 896b72d52b23f48531c18035033b48d7b96539592de086d8ada0cd18a6a56eb4 + initial_ast: 2cb5bb420cacd6ac0012ed38f3081a124842fe7b4ccc37a21a009e2353049b2b + canonicalized_ast: eeb7d6efb45cfffe4d11bf2235fac0c5ad44693aad4935053ad3d964af342d70 + type_inferenced_ast: 643e5e8709c1d8c473a42906fa549d893839506cbc138313d6e3dbdf1299b8a0 diff --git a/tests/expectations/compiler/compiler/function/return_array_tuple_pass.leo.out b/tests/expectations/compiler/compiler/function/return_array_tuple_pass.leo.out index bf5b7f3d89..6bcd7c7b42 100644 --- a/tests/expectations/compiler/compiler/function/return_array_tuple_pass.leo.out +++ b/tests/expectations/compiler/compiler/function/return_array_tuple_pass.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: b9f2f146319a861d734a70b88cafd0c7a5ea8fde1e9e22687b70400c7457c52a - canonicalized_ast: 1453df7ea8e2245ac6103ac84ac47d2d2dd77a64c74503a1e6b91d5434937c2d - type_inferenced_ast: 08f9c08fcac9ef9da68d227a04f49b9be38b6ce72ffc11ea82acea2cf8fe6b5e + initial_ast: 6625f9dae21c9ee661f29e7b22c466f9ed4d7bcd9571e4e8b4d451fb052d4bfa + canonicalized_ast: 15f43abb1cab938d6c93efcfb37774cb40a489aa33f8d40a7bdeaa2e08236876 + type_inferenced_ast: 22bdd3e29298099053079c14ecf002ffd51bb60c8fceca2441b7cf95058c5d02 diff --git a/tests/expectations/compiler/compiler/function/return_tuple.leo.out b/tests/expectations/compiler/compiler/function/return_tuple.leo.out index 25caceeb64..560491c6b3 100644 --- a/tests/expectations/compiler/compiler/function/return_tuple.leo.out +++ b/tests/expectations/compiler/compiler/function/return_tuple.leo.out @@ -19,6 +19,6 @@ outputs: r1: type: u32 value: "103" - initial_ast: d4b008869f1527290e9cd0862e3df4204b32683a96d909dbb6c91fc9489ad0e2 - canonicalized_ast: d4b008869f1527290e9cd0862e3df4204b32683a96d909dbb6c91fc9489ad0e2 - type_inferenced_ast: b8ac5ab2d9383543da885cb474f1e9a237c883a8e9facf60692161d439788f90 + initial_ast: 8f5a723bcf45dfefb932723af97f4aeccfdd8e14ede2011a07b6499c517f87e0 + canonicalized_ast: 8f5a723bcf45dfefb932723af97f4aeccfdd8e14ede2011a07b6499c517f87e0 + type_inferenced_ast: f10f80d86887b764f5177202c36f538eaa7d255216be58fda9804f3bfb370251 diff --git a/tests/expectations/compiler/compiler/function/return_tuple_conditional.leo.out b/tests/expectations/compiler/compiler/function/return_tuple_conditional.leo.out index 758598b22f..eb2d1b1057 100644 --- a/tests/expectations/compiler/compiler/function/return_tuple_conditional.leo.out +++ b/tests/expectations/compiler/compiler/function/return_tuple_conditional.leo.out @@ -19,6 +19,6 @@ outputs: b: type: u32 value: "1" - initial_ast: c429458b4d201fa548eea62e4a2ff8d581f788b7401a03b5f189ae210c3fe132 - canonicalized_ast: c429458b4d201fa548eea62e4a2ff8d581f788b7401a03b5f189ae210c3fe132 - type_inferenced_ast: 1453a4e5252dc0989544abafe9ff5477021ef0f3e8874276e4a989ad23ffaa5a + initial_ast: 3313971add9f81c5da70cdd66fc134e8bab9437d8ca7a50f41721250d5fa0225 + canonicalized_ast: 3313971add9f81c5da70cdd66fc134e8bab9437d8ca7a50f41721250d5fa0225 + type_inferenced_ast: 0a9387bf11f5c88d719463b8b0c3fa1b935a83ef3a382b575de21d3aafa955e6 diff --git a/tests/expectations/compiler/compiler/function/value_unchanged.leo.out b/tests/expectations/compiler/compiler/function/value_unchanged.leo.out index a4e5ddae32..5f341dbb00 100644 --- a/tests/expectations/compiler/compiler/function/value_unchanged.leo.out +++ b/tests/expectations/compiler/compiler/function/value_unchanged.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 089803f7197594aeca82cba9bc2eb70b6fdbbf42c007a0949da4c5b1b4f63508 - canonicalized_ast: 415cdab7ff832a06dc7b01e3134b81d36f0efc0efb3ae092c062419c38f57450 - type_inferenced_ast: 91fb5695f3a2c856d2cde8936aaef4cbb94773a2a71b56c00661c72c8fdee50b + initial_ast: 65b078bf25edb054039cb244fbef0316a865274d6c44a2ceea72d3aefa90626b + canonicalized_ast: 7ec00e4ae76e7ed97f272ef523a462662bb6032cfafeeb9e8f11c266f45835f5 + type_inferenced_ast: 77195eeb9765908133dec5cf01abd1ad744a5a61139d808f91218706487f9fdd diff --git a/tests/expectations/compiler/compiler/global_consts/global_const_types.leo.out b/tests/expectations/compiler/compiler/global_consts/global_const_types.leo.out index 3f2ac74f18..407bbb6de5 100644 --- a/tests/expectations/compiler/compiler/global_consts/global_const_types.leo.out +++ b/tests/expectations/compiler/compiler/global_consts/global_const_types.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "false" - initial_ast: 8b9ad0b83a216048ab6179c6e223f68290059bab1deb72771f72a672ea7a0bf9 - canonicalized_ast: acdf383c635404bccf9612be9c14c96e400496fb231cf3062bce9aa269331c0f - type_inferenced_ast: ab3b8dc3ddfba1affaacf2bc344c658d5b82419544da136e42c810a3f99f3832 + initial_ast: 9347e76e49daae38da61524f6c0ec6c2e4b0384a01c8c7773c6dae9aa75e20dd + canonicalized_ast: c9e8250d4cfe44fcb7f3e836aae5753b9a87a58bf20d13c4d712a6181e486f90 + type_inferenced_ast: 3b8b47a915814590af43fc237a72bfb976ead7485b2b2a901571cbb29be55976 diff --git a/tests/expectations/compiler/compiler/import_dependency/tests/import_dependency_folder.leo.out b/tests/expectations/compiler/compiler/import_dependency/tests/import_dependency_folder.leo.out index eca3cce173..f8592604fc 100644 --- a/tests/expectations/compiler/compiler/import_dependency/tests/import_dependency_folder.leo.out +++ b/tests/expectations/compiler/compiler/import_dependency/tests/import_dependency_folder.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 8c00ae2b8a4f80635ec9277599592828009931229216fb74e49423175a46ebd4 - canonicalized_ast: 99805c27122348834d2a550baccc61771a2234542e4fdd861fc1bf94403e5bc5 - type_inferenced_ast: e5680b8864a5c8edb6c0ea314ca8cfe2e56eaaabfee94fb09702e3b4f538bc24 + initial_ast: 3f359dbec82cacf3b542a67b0e90fa59ae410b9c2eaa2f2e4ce71746176c6049 + canonicalized_ast: 2c036d46e9e8ee9278fdce6c0b11297e1e74f36c320f94eec6c3bc85025a19ef + type_inferenced_ast: e21be9e68e24ccefe83cd5a8ea330fe9931b3fa8b2a9c4298d798c2429c78907 diff --git a/tests/expectations/compiler/compiler/import_local/import_all.leo.out b/tests/expectations/compiler/compiler/import_local/import_all.leo.out index 1420722b1c..60979b84a4 100644 --- a/tests/expectations/compiler/compiler/import_local/import_all.leo.out +++ b/tests/expectations/compiler/compiler/import_local/import_all.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: f1a1c5fb3d3a5d23c30b3eb7f47aeb1211dbcf6f77a3b1ca262b7c231f4488ef - canonicalized_ast: f1a1c5fb3d3a5d23c30b3eb7f47aeb1211dbcf6f77a3b1ca262b7c231f4488ef - type_inferenced_ast: f5189d9b934533ed5225063ffe1adb59508c53e3951a74c03d6c27d41fc7621a + initial_ast: 313c0094a00da55fdda3dade0bfa021056e0469852b9113a46d91d1c831b73e4 + canonicalized_ast: 313c0094a00da55fdda3dade0bfa021056e0469852b9113a46d91d1c831b73e4 + type_inferenced_ast: d94a5e74d7f1d2d467eb221277139efa6ba6983588ab854d84a7868b61f93de9 diff --git a/tests/expectations/compiler/compiler/import_local/import_as.leo.out b/tests/expectations/compiler/compiler/import_local/import_as.leo.out index 349b1d7033..d16688ea2d 100644 --- a/tests/expectations/compiler/compiler/import_local/import_as.leo.out +++ b/tests/expectations/compiler/compiler/import_local/import_as.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 9b093fc03bf985f26e5e57c0b6508bb515535c79a951c9838a5320ba4a702ed8 - canonicalized_ast: d34e1c3c2bbae1f2103e1b5d4058c607dc78af8f62a254947abb991ec6254eeb - type_inferenced_ast: a76a3eef4ef99bcb1ba050e9d3083106082608e838ea94e0ddbb943583c81483 + initial_ast: a5e1be713c8c75cdaa001bc621958e83eec76d9ff25f23e14268eeb973b66d35 + canonicalized_ast: 17f236ac4931259059f7f9470af948691131eb57d76d254e90a678c2e88e79e2 + type_inferenced_ast: 751a6eda60bd0fd88d8fdc6a693ac410b944d449b27b62e9179304df0183baf1 diff --git a/tests/expectations/compiler/compiler/import_local/import_dir.leo.out b/tests/expectations/compiler/compiler/import_local/import_dir.leo.out index 34544231d0..9e1118b449 100644 --- a/tests/expectations/compiler/compiler/import_local/import_dir.leo.out +++ b/tests/expectations/compiler/compiler/import_local/import_dir.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 2b6234a13e1b49f7ac587ea697e113b600bdf8e05437ce0352264234688b00ee - canonicalized_ast: ed79e2c766f81e1d60b6a9a25b59313d8dd3e93cf9dbd7b9cf2ffc7336ecb3ac - type_inferenced_ast: daf4bdd6a544c2f3da08cd7ab67c40688cb52f0eec2c13fa70fa827f42722674 + initial_ast: dc0d2962e432e48bb90aa3a780ca5996fd3ace2345e3050d9c25d920a7a3ccaf + canonicalized_ast: a32ad043e10c6c28e93c35a34190fa2476be891e3eb9c46ba04dd13ebc83c7ca + type_inferenced_ast: d835ff6b3ce1467d70ca008a8d741374ea7b92b99cb5f54061aee7eb1b069b87 diff --git a/tests/expectations/compiler/compiler/import_local/import_files.leo.out b/tests/expectations/compiler/compiler/import_local/import_files.leo.out index 2bb28eef96..f487b27323 100644 --- a/tests/expectations/compiler/compiler/import_local/import_files.leo.out +++ b/tests/expectations/compiler/compiler/import_local/import_files.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 17d120d595b3bd1276d4566a0bef48a90e0d545556d54b83da89d88b17342a1d - canonicalized_ast: 0f9e739ef57e1d870b2c5410f821d14194dd882e315720f207f83933f5c85fda - type_inferenced_ast: 1ecf52246630058f5b4294b015b787ca175c3189660c5f3135d6456fc011a2b5 + initial_ast: 923ff9c192722eef3feee2a5b17f7b7dcea646aa6685bc54297bf1eb974295fb + canonicalized_ast: d0f68c4594e44e7695eab4716cb38a1808921e1265789263f053b91c32a26a38 + type_inferenced_ast: e5ee9ff2838905ca61bfbafe24dfdf726d0da0567ea22bea9436ff9106d764e2 diff --git a/tests/expectations/compiler/compiler/import_local/import_many.leo.out b/tests/expectations/compiler/compiler/import_local/import_many.leo.out index e9356a68bc..e061af4cc7 100644 --- a/tests/expectations/compiler/compiler/import_local/import_many.leo.out +++ b/tests/expectations/compiler/compiler/import_local/import_many.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: b8decf097c42e00f24432d5d72b4c4c53f404089b913330e972f81494b4c4bfb - canonicalized_ast: b8decf097c42e00f24432d5d72b4c4c53f404089b913330e972f81494b4c4bfb - type_inferenced_ast: ebba4df8a81de92d3bf06d07ab611429653b570e1620405d246f3de5921055e0 + initial_ast: db01ccd5aaf375bfe49f9e95cde47adf741353ebb60c0463ea5f8b3477716edd + canonicalized_ast: db01ccd5aaf375bfe49f9e95cde47adf741353ebb60c0463ea5f8b3477716edd + type_inferenced_ast: 0718585fcc9d9b7922abb93e0162461d6e04c5b7fb03f729187443d75f8357af diff --git a/tests/expectations/compiler/compiler/import_local/import_weird_names.leo.out b/tests/expectations/compiler/compiler/import_local/import_weird_names.leo.out index e1b5244d5b..d8403e37d6 100644 --- a/tests/expectations/compiler/compiler/import_local/import_weird_names.leo.out +++ b/tests/expectations/compiler/compiler/import_local/import_weird_names.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 2e52456f9df93f41894195cca7658fc90b2fd91b08b356105a96394ca586c06c - canonicalized_ast: 2e52456f9df93f41894195cca7658fc90b2fd91b08b356105a96394ca586c06c - type_inferenced_ast: 86ef8ab226a58f140de1fcdadc31eb86e4a1930cabf36a8d9a4607233ea6ab80 + initial_ast: ee9ec4ceedf5f1f7326b00e1a74af44fb04faae128ebf01d4517c903f9b827b1 + canonicalized_ast: ee9ec4ceedf5f1f7326b00e1a74af44fb04faae128ebf01d4517c903f9b827b1 + type_inferenced_ast: 0f89a0317173e34f2ca3c65654ac6b5f99108468eb274c3552b9e9829aaf9d4c diff --git a/tests/expectations/compiler/compiler/import_local/import_weird_names_nested.leo.out b/tests/expectations/compiler/compiler/import_local/import_weird_names_nested.leo.out index fdc2a30cc5..41eac9ad44 100644 --- a/tests/expectations/compiler/compiler/import_local/import_weird_names_nested.leo.out +++ b/tests/expectations/compiler/compiler/import_local/import_weird_names_nested.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 9cd9cca5cd79f5db65ebcc4d90cd9c4aedf2310972eb3146b0057352f1164e48 - canonicalized_ast: 9cd9cca5cd79f5db65ebcc4d90cd9c4aedf2310972eb3146b0057352f1164e48 - type_inferenced_ast: dd2d745566c22b0a07d4340563cccf84492707955ac04f910c3a4edfedcbfcef + initial_ast: f786b67e5542f66910d8548c8185197a6d49b4dcbf9c5d9a738b0c94ab6f8b73 + canonicalized_ast: f786b67e5542f66910d8548c8185197a6d49b4dcbf9c5d9a738b0c94ab6f8b73 + type_inferenced_ast: ecda036eab96446fe84286c610eba0297edb6522e0ea1ef724d83013adb41fdc diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main.leo.out index adb443fba9..daa2b626b9 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: c9a0358dec57807c9afbce3bb523f3677a19873b713b16e15b31be9b58e7e938 - canonicalized_ast: c9a0358dec57807c9afbce3bb523f3677a19873b713b16e15b31be9b58e7e938 - type_inferenced_ast: 33c49e9288050147b62513345adee7c22e7326ccef9bcf9b4e6782376a89de8f + initial_ast: 069cfa9c7178060bf3c0230f31d64b9bd22be6a88447568018dec560aa32e500 + canonicalized_ast: 069cfa9c7178060bf3c0230f31d64b9bd22be6a88447568018dec560aa32e500 + type_inferenced_ast: e30a262885a2dbd047409a5f7fd2de81fd9cc91686de88fe39a03e835e3580ea diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_array.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_array.leo.out index 55dafb3426..ba1a8c378e 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_array.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_array.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 49288b2a38f96d3b0d7dfafd780a028815c4f3dc033e9083daa9226ac630e9d2 - canonicalized_ast: 49288b2a38f96d3b0d7dfafd780a028815c4f3dc033e9083daa9226ac630e9d2 - type_inferenced_ast: 1324a840dafe289197021fddf594be6becdf99b195f37596af43ce300f84b023 + initial_ast: d47db8120f5667f5afd0ce44f515bdd2d41f1153b79972fb4d8763b62840324d + canonicalized_ast: d47db8120f5667f5afd0ce44f515bdd2d41f1153b79972fb4d8763b62840324d + type_inferenced_ast: 48192d8f242cdeac6855df7c92d1c60e008314d2e25fb6c33d5963b238a743b6 diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_char.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_char.leo.out index 36a622c2d8..516003f667 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_char.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_char.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 812d646edd6b14d9e27244a9da95ce1dc805fcaac8b654f9e3e962837e776f84 - canonicalized_ast: 812d646edd6b14d9e27244a9da95ce1dc805fcaac8b654f9e3e962837e776f84 - type_inferenced_ast: 249bacf5d583e861e2e8168fdbb3d3a0219d5a00f5b2ba3ca4dcd94f62ef575d + initial_ast: 4ccdfaed84d17ced4a459baea27898dc165cc898f25ba5db9def1faf9aebc9ff + canonicalized_ast: 4ccdfaed84d17ced4a459baea27898dc165cc898f25ba5db9def1faf9aebc9ff + type_inferenced_ast: 00355f5036d0a753fe0b3486dadc06fdacb6f5eedc0d40b9c2f85b26314ac182 diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_field.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_field.leo.out index 1ec1f4e7af..f533a62956 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_field.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_field.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "false" - initial_ast: f3bac684fe095a005d0d4811a3878d9c1ae67df0ad3a6229ac3f098ad413afb2 - canonicalized_ast: f3bac684fe095a005d0d4811a3878d9c1ae67df0ad3a6229ac3f098ad413afb2 - type_inferenced_ast: 0ece5b45cc7f746d06d626cce250e212fbd48eeecc61e972394609494937f7bc + initial_ast: e32fc158d0d4e25d5512f6a407b12ba50a6ea73f9f0598ec8c9e5d1ffc4843d0 + canonicalized_ast: e32fc158d0d4e25d5512f6a407b12ba50a6ea73f9f0598ec8c9e5d1ffc4843d0 + type_inferenced_ast: a3fd6659f4619343eff16cb73005a13c4207412160088b06f9a9d0dd3acd7dd8 diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_group.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_group.leo.out index e1afb82eb9..8805bcb07c 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_group.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_group.leo.out @@ -13,6 +13,6 @@ outputs: - input_file: input/main_group.in output: registers: {} - initial_ast: 80d005d0d277205d4e42029b1257aea9f67301ac8193dd8e595051ebb12ee50e - canonicalized_ast: 89eca89eb1633f9346fed9f868d11326c6d8721b846f49b23cf5c54bc426273a - type_inferenced_ast: 4e592b434fbceb1a1b942a65d8f6e1a2ca21754fd8215584512c0ecf89c03fa7 + initial_ast: 781f09b5cb574e4aebd1eb0c9c2ebc02a81ca52b869ed16f1a451d1dacea4112 + canonicalized_ast: 0c9813c834d335045cf71a6a5b543814ebaaec1be366ef48854b8b6985a7c710 + type_inferenced_ast: c99f3db5fda1e4aed85a5aca1ffa87e7bc4560658736e04d3338091acd3d177d diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_multi_dimension_array.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_multi_dimension_array.leo.out index 26317ab6f0..62a37208eb 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_multi_dimension_array.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_multi_dimension_array.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 5f2fe4c4fae5c53b40a0011389aaba92ed6f61487c4be3938f450d658cae4639 - canonicalized_ast: bada9b141c8740dc1af11c395ac97152ed9ef8796e92ceade5fdcb43354a997d - type_inferenced_ast: 905b29996916de37e498809f39b26520b618d4d6a952156d8406513dda9d4e8a + initial_ast: 4745f2ae8312973d7391eef93452656a16e1f2edabd1a1518da9e644e510dcc3 + canonicalized_ast: d2bccd8f77fcc43c8c4a2431e12ec7cfc9c28bc140d3e8b43b7e40f030aa86d3 + type_inferenced_ast: f88787d3f406ee8822fc36faa0a976d72b6c90b616e006b4bb86a95ddda7c51b diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_multiple.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_multiple.leo.out index f865f6645c..24b63542df 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_multiple.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_multiple.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: aa57c32deb2ca3f69aac1c8d6ab1c9ca787d7539d15dd6ae1d132c4bdf1628f0 - canonicalized_ast: aa57c32deb2ca3f69aac1c8d6ab1c9ca787d7539d15dd6ae1d132c4bdf1628f0 - type_inferenced_ast: 730367497b7b56381f29321e18eade74d70107a6d8c657b47022215015f53801 + initial_ast: c220ba73f75ff1651a98991ee4f5ea021dabdde2a1c08e949deb2aa1ecb65390 + canonicalized_ast: c220ba73f75ff1651a98991ee4f5ea021dabdde2a1c08e949deb2aa1ecb65390 + type_inferenced_ast: 30507ab22a8ebd6bb0f239d34923201b6381a722e11649c0b1ee73acd9317902 diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_string.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_string.leo.out index 12267c22b1..bf86c50e30 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_string.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_string.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 4d78c30ded08f7db4f66f8fb7a2afe70aeb6aa8e6deb904c559497c776147446 - canonicalized_ast: a946a3abb84533a9d3b0ea014355920a058aa37b3fd7025946f35a317e0693e9 - type_inferenced_ast: 0dad4ae7f3f49065239efb989eff41070ad109ae66331c15ae455718ef915563 + initial_ast: cd2766745f0e89484a8699958dfa1d34465a7ae76985581ff5cedb64b1af358d + canonicalized_ast: 1aed123b79d7c26d8d10f05883a5daca1d87c1a5874cf74cf8889fce7b0a448d + type_inferenced_ast: 1ef118bd57f7a113f9cf1f8990fb29ee61b018e0142e33ecf940566b86cd71a2 diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_tuple.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_tuple.leo.out index 5110685fdf..8113b455de 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_tuple.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_tuple.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 0f65ed036cf7ac2bf2d9b1e73406b7f8ea669c3392b24c171697f924a99025b9 - canonicalized_ast: 0f65ed036cf7ac2bf2d9b1e73406b7f8ea669c3392b24c171697f924a99025b9 - type_inferenced_ast: 685758ab99acb9f79da0c0665097d1dc34d821d02502011dee82c5564e5f885a + initial_ast: 89629e72caced78aff784b485cbcce3afaf9fbb3d87031df0c29f06998ae7ed1 + canonicalized_ast: 89629e72caced78aff784b485cbcce3afaf9fbb3d87031df0c29f06998ae7ed1 + type_inferenced_ast: f3b74fe5acc0245c6db719848b4326a59997528e82f149c57890cb66aec3f310 diff --git a/tests/expectations/compiler/compiler/input_files/program_input_and_program_state/basic.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_and_program_state/basic.leo.out index 31fec7b550..1d5f514839 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_and_program_state/basic.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_and_program_state/basic.leo.out @@ -16,6 +16,6 @@ outputs: b: type: bool value: "true" - initial_ast: 1c5370b54401931103a9aee59aadbc05dd747e758a20dcf9665ba181777d76d5 - canonicalized_ast: 1c5370b54401931103a9aee59aadbc05dd747e758a20dcf9665ba181777d76d5 - type_inferenced_ast: 04a1f100613ccf2f49733ecc76c83058d78c14c03fc4817df117eaa9a8296c66 + initial_ast: ec6cdda564d981bedb77ad0180a3d6f32fb5e5f35e50e116de4f2b9337d6f4e1 + canonicalized_ast: ec6cdda564d981bedb77ad0180a3d6f32fb5e5f35e50e116de4f2b9337d6f4e1 + type_inferenced_ast: 57655819a50e4ee7d73fd9ec5dfbd92116d47bc9026beee48ba91c4df416bd15 diff --git a/tests/expectations/compiler/compiler/input_files/program_input_and_program_state/token_withdraw.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_and_program_state/token_withdraw.leo.out index 9996d2ff80..0780b72788 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_and_program_state/token_withdraw.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_and_program_state/token_withdraw.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 1ef884c7c1e9e5a806bc5dce27cd68f33b3cddf5c1ebf930a292fd6adb5762ce - canonicalized_ast: 1ef884c7c1e9e5a806bc5dce27cd68f33b3cddf5c1ebf930a292fd6adb5762ce - type_inferenced_ast: aeedb43de348c034bee08c8df80d0fb2e8f9e7f11989e57cfa4fb8bbf876eb83 + initial_ast: 57c1127a90a478f057ca43c10d8b729c8c61229467ea730da014b678874d3320 + canonicalized_ast: 57c1127a90a478f057ca43c10d8b729c8c61229467ea730da014b678874d3320 + type_inferenced_ast: 910fc1e704a7aa20a5e3b1e6fa316d9e2d52596e1be016e502dd8d50ce9196e9 diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main.leo.out index 23d8f056da..990eee377e 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: cd8b1f60505fc1f2269a587982e3c9cfd08b9f183ede8eadc8a1f00d63360f5c - canonicalized_ast: cd8b1f60505fc1f2269a587982e3c9cfd08b9f183ede8eadc8a1f00d63360f5c - type_inferenced_ast: a1640fb069335b80d27567c56759f0b6610c9ba31cac966a742fa775c3fd0373 + initial_ast: 77097dfd19148cfb6cd04a2dc41f0fbaa87be222facb9e7b3409543257e4c13a + canonicalized_ast: 77097dfd19148cfb6cd04a2dc41f0fbaa87be222facb9e7b3409543257e4c13a + type_inferenced_ast: cd4e2c77e83b9e88b1ed9c68656db0020f78c4cff5762f22eb5bfcd5ae7bfc3b diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array.leo.out index 8fc0faca83..9c8acc2541 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 5cf9f340177e4a476a81c0cbb645ab443dd93551b5e247332e193273b5a42288 - canonicalized_ast: 5cf9f340177e4a476a81c0cbb645ab443dd93551b5e247332e193273b5a42288 - type_inferenced_ast: 9b10865266ad6fa0f46d35a94fe2c052ff0fb46ffca1dbdc2b2294ca9e52217e + initial_ast: 948bb28600521fd994c66f618131a3ed94f65cbe11a0a93a3dc5c5d7a1042827 + canonicalized_ast: 948bb28600521fd994c66f618131a3ed94f65cbe11a0a93a3dc5c5d7a1042827 + type_inferenced_ast: 4e80b126a79870ca02d171ec0af332d0811860e57f16bea68e35fdb348dc157d diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_char.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_char.leo.out index 3ec43c8646..e3d4b19f28 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_char.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_char.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 0fd985182a4a32bc7b983c13e4f7b188902b6ef37ea1fbaa22da867b388990e8 - canonicalized_ast: 0fd985182a4a32bc7b983c13e4f7b188902b6ef37ea1fbaa22da867b388990e8 - type_inferenced_ast: 08864c66bc6890ed6d83cbb214318f7423735533f0146a856a9bdf5b8d48e816 + initial_ast: 09c3ff107f188d9e074cccea5e1d0c0b70e77f3b072e6e2cafbad0bcb926cdd2 + canonicalized_ast: 09c3ff107f188d9e074cccea5e1d0c0b70e77f3b072e6e2cafbad0bcb926cdd2 + type_inferenced_ast: f551e1f4c578a8686d6a2e6b5e018b23974298b10ccbbce6f9be7a74250f7383 diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_field.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_field.leo.out index bbdae9fa2c..503603ee14 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_field.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_field.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "false" - initial_ast: da17f98e5cf8d90b4d73d797493d752c9d519c61cf900509c866a0649c034cad - canonicalized_ast: da17f98e5cf8d90b4d73d797493d752c9d519c61cf900509c866a0649c034cad - type_inferenced_ast: 5842a5364abf56e9a51e69b2ded9fdce009c8851d86beba39ba8ab373394ef66 + initial_ast: 2da9d8687c2f9a42663f5afde33486393b497cf247dfd43441e649a91e41a927 + canonicalized_ast: 2da9d8687c2f9a42663f5afde33486393b497cf247dfd43441e649a91e41a927 + type_inferenced_ast: 5f5a16af0989e4c786a31756509e034f747b9b04431c206d0d079ba097f54ba4 diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_group.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_group.leo.out index 78e7a115fd..ed8d7308a3 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_group.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_group.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 854be098a724cec3bb03249c8fc03aba5d53c2628bad6d45188872d2f67a7f15 - canonicalized_ast: 854be098a724cec3bb03249c8fc03aba5d53c2628bad6d45188872d2f67a7f15 - type_inferenced_ast: 37a8d6e71f2f6e2ffc61ffd29beb07ff04189647a367e21e7d70245bb3d0b280 + initial_ast: 3c34a303e6cd914e00b8f2d89afc9139336d29c44df72bf6e0e3850b7f9d4329 + canonicalized_ast: 3c34a303e6cd914e00b8f2d89afc9139336d29c44df72bf6e0e3850b7f9d4329 + type_inferenced_ast: 5e846f4809259c1a1b17da2ed86beaa849e04dc30a0fb9c3befefd9a530d74b3 diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multi_dimension_array.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multi_dimension_array.leo.out index 9dbacb0ff1..c325f638d9 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multi_dimension_array.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multi_dimension_array.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: a42e650c64317b4ee6145da788ff7348dbe61543e87016c7491854edc7104e3b - canonicalized_ast: ebda82101177805ec323d0cce8325ea29090a7942d6784f074444fdf370c3e2e - type_inferenced_ast: c034b0dec8b1c4b3aa735137d2294514a7014a223565811054fbf7d69b67c9da + initial_ast: dc7f5b9419e039b9c72df637b656a2a040157b3345da403add0f228998314482 + canonicalized_ast: 5f12bde4c55c0e3d90beeb6863bccfeddfd197dc8da962b35c7a296729f65fe8 + type_inferenced_ast: ea3c5083990d249fbe307c4cfa4009f667ba7edc447e17340ee84600b694f36b diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multiple.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multiple.leo.out index a7762a959e..d70ebb5838 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multiple.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multiple.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 5cf468e17290553c60a2cdedcb92c16d8269b07403cffefbe16701bf7e4e3efd - canonicalized_ast: 5cf468e17290553c60a2cdedcb92c16d8269b07403cffefbe16701bf7e4e3efd - type_inferenced_ast: 63f2f49324e5dc7b8aa9c5be7b524c21fb86528c6ca5e9446d0accd2f3c14470 + initial_ast: f9e01e97c1be1bd3991cbc552cefbe185237369cedb02bb69b1ed4bcd115f258 + canonicalized_ast: f9e01e97c1be1bd3991cbc552cefbe185237369cedb02bb69b1ed4bcd115f258 + type_inferenced_ast: 44148dcb760268261352c9f97fa511d4250f9814869073b892bb636f0516a48c diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_string.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_string.leo.out index 0953a7ca5b..844eff4aa3 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_string.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_string.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 54f05a3b9e065ed4a4c9060278ebbfba8c871fc0952928b3247495e3420e6a8f - canonicalized_ast: 5239f39807679614fa177f6da454d51e73348714e680cc51c4587630525a3d1f - type_inferenced_ast: 34dc40266a9c59e43ecbb094edbefbe654d89032e57f75fdcd42f5cd6125896a + initial_ast: 94fc54750aa6600e97e134680399cdd196dd8ff3a52d84598027e4d8a9c73f15 + canonicalized_ast: 463ff0dcd4188c31383c22334d1517c09a9eca308476c91f9c0fd9b2e45d48ec + type_inferenced_ast: 543f04ccfe58b08618cf2d537a76787e0ce4f6d53f0668d54dac8ee63c0d26a1 diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple.leo.out index 673d8e7b70..8575cf1522 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: a5fdbc9ea34c5171ba153bfd9b5078d84d4be9e08c2eb97410082299143ae902 - canonicalized_ast: a5fdbc9ea34c5171ba153bfd9b5078d84d4be9e08c2eb97410082299143ae902 - type_inferenced_ast: 2caf7e798653f694eb868a03899e8316d25f4d35df081a287ca1c764d9f45a33 + initial_ast: c8ea02057486165df1e3cdbea322408b7eb59226d3914effb358fb1d8ab6aa85 + canonicalized_ast: c8ea02057486165df1e3cdbea322408b7eb59226d3914effb358fb1d8ab6aa85 + type_inferenced_ast: 2eabb38706b4136d3c3404107cb20e9e72408a45e97e01f54c79d7d83eee432e diff --git a/tests/expectations/compiler/compiler/input_files/program_registers/registers_array.leo.out b/tests/expectations/compiler/compiler/input_files/program_registers/registers_array.leo.out index 108b936235..c0e3a4dbd8 100644 --- a/tests/expectations/compiler/compiler/input_files/program_registers/registers_array.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_registers/registers_array.leo.out @@ -16,6 +16,6 @@ outputs: r2: type: "[[u8; 4]; 2]" value: "\"[0, 0, 0, 0][0, 0, 0, 0]\"" - initial_ast: fb540ccd0618e433c2181c6dc9b73080e0a23c3f5b5ebe9f1106276aae38d8ef - canonicalized_ast: fb540ccd0618e433c2181c6dc9b73080e0a23c3f5b5ebe9f1106276aae38d8ef - type_inferenced_ast: f6ed6b87a3fb35bf53ef4ba86a9a3e0d2271914a45d773dd7931c6a5d1b83151 + initial_ast: 5327d26979b458288e0e2cf6ce1a4def74216c233e2440f2963ffde9955921a8 + canonicalized_ast: 5327d26979b458288e0e2cf6ce1a4def74216c233e2440f2963ffde9955921a8 + type_inferenced_ast: bd6c9906e9a5c5df4dd141325d91746a09ec87f7daee7d4dce58af968c8803b0 diff --git a/tests/expectations/compiler/compiler/input_files/program_registers/registers_pass.leo.out b/tests/expectations/compiler/compiler/input_files/program_registers/registers_pass.leo.out index 513d80da5e..da5546034d 100644 --- a/tests/expectations/compiler/compiler/input_files/program_registers/registers_pass.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_registers/registers_pass.leo.out @@ -16,6 +16,6 @@ outputs: r: type: u8 value: "101" - initial_ast: 430d76675273bb92e7af55000e710e2f5d1621db50550a5366325779633577bf - canonicalized_ast: 430d76675273bb92e7af55000e710e2f5d1621db50550a5366325779633577bf - type_inferenced_ast: bcde9c109d65d236fb2079bc26490658438c422bc17b09bd0beebe0298feaf03 + initial_ast: 7f4fc74c20ba6f2aefead777b0230cee03af4922a9dbf9e77b90baea3649f3f1 + canonicalized_ast: 7f4fc74c20ba6f2aefead777b0230cee03af4922a9dbf9e77b90baea3649f3f1 + type_inferenced_ast: 871513e8b5723b79065dd4f56aae315854e4798fb26973af95e0a34c415e9b65 diff --git a/tests/expectations/compiler/compiler/input_files/program_state/access_all.leo.out b/tests/expectations/compiler/compiler/input_files/program_state/access_all.leo.out index b77180760f..30fe6e1a0b 100644 --- a/tests/expectations/compiler/compiler/input_files/program_state/access_all.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_state/access_all.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 6f08333f0f602b1ef25d548da7f5f5a611a4409281e3412fe380c367a76bac24 - canonicalized_ast: 6f08333f0f602b1ef25d548da7f5f5a611a4409281e3412fe380c367a76bac24 - type_inferenced_ast: 3a05ae6705cfc5a344631563ed43c3caf73c1762bef0b4a4165ae73e1466e27f + initial_ast: dbafd64b73c9e5c7f9abe597a14c99d53b819cf81fcd02e95936e2559c2fc903 + canonicalized_ast: dbafd64b73c9e5c7f9abe597a14c99d53b819cf81fcd02e95936e2559c2fc903 + type_inferenced_ast: fc41b1ddef2242c578b80e746574cebb208a4b72692136241a1d55f55f825d92 diff --git a/tests/expectations/compiler/compiler/input_files/program_state/access_state.leo.out b/tests/expectations/compiler/compiler/input_files/program_state/access_state.leo.out index b8140088f6..719ce75894 100644 --- a/tests/expectations/compiler/compiler/input_files/program_state/access_state.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_state/access_state.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 0eabec3e7bd9d1b1ca1666329f7bd3ad9d3095d209c94f83a19b60e78857375f - canonicalized_ast: 0eabec3e7bd9d1b1ca1666329f7bd3ad9d3095d209c94f83a19b60e78857375f - type_inferenced_ast: c6fb6168c1089361909edf6d76a9d3cba97a2f907821eb7f71198f1fb6bb1310 + initial_ast: 8dd720153c3f27d9c23174d3a15281819020e58ea02e8996a6db4716087bef82 + canonicalized_ast: 8dd720153c3f27d9c23174d3a15281819020e58ea02e8996a6db4716087bef82 + type_inferenced_ast: 3d9814fb189ffb1699e820ebaf194959654932f061cdfc2052e249433bb3aafb diff --git a/tests/expectations/compiler/compiler/input_files/program_state/basic.leo.out b/tests/expectations/compiler/compiler/input_files/program_state/basic.leo.out index 8859157fd8..00ccad0091 100644 --- a/tests/expectations/compiler/compiler/input_files/program_state/basic.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_state/basic.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: e94f4826afb8405a883b3c3df074507dbd38db45e8fa5e8d984ed5974f521c6a - canonicalized_ast: e94f4826afb8405a883b3c3df074507dbd38db45e8fa5e8d984ed5974f521c6a - type_inferenced_ast: 26596f4778c179462d3365caa87addc607d88bb8f700b6132565b56ff3396dd2 + initial_ast: 31353a3e583defe93fffe28828c3b43de3477006a2dbfbcad230be651e6f31a8 + canonicalized_ast: 31353a3e583defe93fffe28828c3b43de3477006a2dbfbcad230be651e6f31a8 + type_inferenced_ast: 3c989502fc45d58e2356ae71fbe816a24d132f9f6916e9fa91dc16741a9514eb diff --git a/tests/expectations/compiler/compiler/integers/i128/add.leo.out b/tests/expectations/compiler/compiler/integers/i128/add.leo.out index b35d16874e..0956c89cc9 100644 --- a/tests/expectations/compiler/compiler/integers/i128/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/add.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 278b92038c32110995dae24885b81e15d897c16ca4500633b8550557758d76a1 - canonicalized_ast: 278b92038c32110995dae24885b81e15d897c16ca4500633b8550557758d76a1 - type_inferenced_ast: 58f145ea9284607029135a8afd9bb00e05c3ae31836c735aeb2cc0c7628f9e98 + initial_ast: ac462de11506c6dca67eb4f68d1d3ab28212305b9d51019a8ba034678491e430 + canonicalized_ast: ac462de11506c6dca67eb4f68d1d3ab28212305b9d51019a8ba034678491e430 + type_inferenced_ast: 7ab77561ac7c95a290f91b50fc0861511102a9ef640f8af145d0e8b290958c32 diff --git a/tests/expectations/compiler/compiler/integers/i128/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/i128/console_assert.leo.out index 93536c2ff2..25dc663b17 100644 --- a/tests/expectations/compiler/compiler/integers/i128/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/console_assert.leo.out @@ -13,6 +13,6 @@ outputs: - input_file: i128.in output: registers: {} - initial_ast: 069a5439632b91a257c447f7db4278b6ea59ec794ab3ec3e5805757615d9f3a4 - canonicalized_ast: 43ea108e255608c03dea9e4cd6e4ac1ab4dc84a3c974372b9902139c83e4434e - type_inferenced_ast: 3314b8988acb6fa813557f5e87f81b95370a3f15e336b78a1f0575208034d55b + initial_ast: 62a53d49c0d37f9560c418178f61c1d128189b72755c3f742eede96d26ca5130 + canonicalized_ast: 029b66864f067b5b2eff38d6754adf60346502b797eb96ef669f679a2b70421c + type_inferenced_ast: 3c16f03f281e074f0bc8783836b1b757a8daa6f0f224ea8de959ff9168c1ea92 diff --git a/tests/expectations/compiler/compiler/integers/i128/div.leo.out b/tests/expectations/compiler/compiler/integers/i128/div.leo.out index 78542083c6..a198c2aa9e 100644 --- a/tests/expectations/compiler/compiler/integers/i128/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/div.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 4a1bed67b569a4ca5d986533ae623e685c6cb4b5fcab951ce35e6c6833c75f9e - canonicalized_ast: 4a1bed67b569a4ca5d986533ae623e685c6cb4b5fcab951ce35e6c6833c75f9e - type_inferenced_ast: 5327f9c10201daf1c2089780c8d6b03d25ff62ee07c739070c7a50823de4da64 + initial_ast: f1291dcd53d870f53667970ff090bb123ccbf46fc1695e53c9e783404dac680a + canonicalized_ast: f1291dcd53d870f53667970ff090bb123ccbf46fc1695e53c9e783404dac680a + type_inferenced_ast: 2317beb358f489c2de51c7a2ab3ea6564c6043a6cd293e61205c89c2c0d2af5a diff --git a/tests/expectations/compiler/compiler/integers/i128/eq.leo.out b/tests/expectations/compiler/compiler/integers/i128/eq.leo.out index 48a1ad3170..b4b52f098e 100644 --- a/tests/expectations/compiler/compiler/integers/i128/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/eq.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 3b8180fa769e086232eef3bf8462a75275750b60729e2e642d2b4ca96aab9222 - canonicalized_ast: 3b8180fa769e086232eef3bf8462a75275750b60729e2e642d2b4ca96aab9222 - type_inferenced_ast: 96f2ff3c817d3df9ea92e9f5e5100ce8baa8eee1e35b0bfbeb832d4eb2a36c67 + initial_ast: a356099c735cfc2aadee33e79a876df32d77b2eeedd2a5e3114432fc85f250c8 + canonicalized_ast: a356099c735cfc2aadee33e79a876df32d77b2eeedd2a5e3114432fc85f250c8 + type_inferenced_ast: 5f6e79b8b2023fee6377cda103a0c9e115f4043456f5b5b52f43a141b044fcc6 diff --git a/tests/expectations/compiler/compiler/integers/i128/ge.leo.out b/tests/expectations/compiler/compiler/integers/i128/ge.leo.out index f63a5e8909..dd709c20d6 100644 --- a/tests/expectations/compiler/compiler/integers/i128/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/ge.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: bcde5f6ea48309da013de3c4cd2e759f809e8cce72c115f8b5bd2b1272e1c088 - canonicalized_ast: bcde5f6ea48309da013de3c4cd2e759f809e8cce72c115f8b5bd2b1272e1c088 - type_inferenced_ast: 0aa48e18e8b7b7857f9ca9808d0eac7ded70cd617e65e527fdb93fa07ff5336b + initial_ast: e23e1934b9dd1e6eb4f5ab61a38aa2b8b08fd611dce862b964c7d2c9276e5d27 + canonicalized_ast: e23e1934b9dd1e6eb4f5ab61a38aa2b8b08fd611dce862b964c7d2c9276e5d27 + type_inferenced_ast: cd1420b2695d013f43bd78a5c2310b1399bb03831019b8f65598c453801fb43e diff --git a/tests/expectations/compiler/compiler/integers/i128/gt.leo.out b/tests/expectations/compiler/compiler/integers/i128/gt.leo.out index 57fb36b2d9..ffc6e2e597 100644 --- a/tests/expectations/compiler/compiler/integers/i128/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/gt.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 59236105dd9e8340d9348c60d9b7cd51e615dd4ec6a645b09573a22678e74470 - canonicalized_ast: 59236105dd9e8340d9348c60d9b7cd51e615dd4ec6a645b09573a22678e74470 - type_inferenced_ast: 4b84f0d2fd2d0bebcffce6bdb30919e230a5e7f6f0b31f2772efedf4f6fd3c94 + initial_ast: 83d601d1b35665b459726420ecbe77108b9ff2e2c9213c5160e77b7d3065a5e8 + canonicalized_ast: 83d601d1b35665b459726420ecbe77108b9ff2e2c9213c5160e77b7d3065a5e8 + type_inferenced_ast: 9d7a01a5dd805625f7d8f32718ff0e4657a3e2453d64ec72de3c05ca0df4a7b3 diff --git a/tests/expectations/compiler/compiler/integers/i128/le.leo.out b/tests/expectations/compiler/compiler/integers/i128/le.leo.out index a5e1d57415..eda04f2526 100644 --- a/tests/expectations/compiler/compiler/integers/i128/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/le.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 3f8f56d5c17a96d015b50f804dababd4e15d1d2ebf54bd239fe362befc49f98c - canonicalized_ast: 3f8f56d5c17a96d015b50f804dababd4e15d1d2ebf54bd239fe362befc49f98c - type_inferenced_ast: 74e997c5107955a418b7e658b649f10bac760ab497a69925642db4e372f8fff7 + initial_ast: b42ac7802bbd024bce3cdeab0fc177910f4a02f719fd820c4e98623b07c4a0eb + canonicalized_ast: b42ac7802bbd024bce3cdeab0fc177910f4a02f719fd820c4e98623b07c4a0eb + type_inferenced_ast: 858f318b38f76968d917f163fb49e7695916390ebe04f8b91230ca39656feb7a diff --git a/tests/expectations/compiler/compiler/integers/i128/lt.leo.out b/tests/expectations/compiler/compiler/integers/i128/lt.leo.out index ffd95309fd..bdcfe4f15e 100644 --- a/tests/expectations/compiler/compiler/integers/i128/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/lt.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: d6025ab5243349142231d66100fe3e6001606095303d39aaf28663c6f0984369 - canonicalized_ast: d6025ab5243349142231d66100fe3e6001606095303d39aaf28663c6f0984369 - type_inferenced_ast: 06ff7de0309de0c4e88adc23d837363f0951bf96859c1dc18076d2deff17474f + initial_ast: d2e54559c35ba0233d44d6ee1e298325c669513272423537181b86ce4233e7cb + canonicalized_ast: d2e54559c35ba0233d44d6ee1e298325c669513272423537181b86ce4233e7cb + type_inferenced_ast: d56adb188c2c3df0b8f2e97116c13808e1308abb1c1aee1bbfdf3168662b4bf8 diff --git a/tests/expectations/compiler/compiler/integers/i128/max.leo.out b/tests/expectations/compiler/compiler/integers/i128/max.leo.out index 666913438d..599b11f873 100644 --- a/tests/expectations/compiler/compiler/integers/i128/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/max.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: fbe3d891245219b62b7444a1a2d145e6aa77ef5a5bb768b0fb058f1b243dd894 - canonicalized_ast: fbe3d891245219b62b7444a1a2d145e6aa77ef5a5bb768b0fb058f1b243dd894 - type_inferenced_ast: 926fdd740dd000b2155e292ac0fb4c51ea2c6ca6a1a8dc88addf83b35b07ca94 + initial_ast: bcaa1e94d6d9f6cc6e30076890e8cf3426d514859decc3a63aa7296e88c5a53e + canonicalized_ast: bcaa1e94d6d9f6cc6e30076890e8cf3426d514859decc3a63aa7296e88c5a53e + type_inferenced_ast: d9e1540c6e87be7a291866eb9dc27a4faa88ccb74c061ccaa03b3cecb64b3ad6 diff --git a/tests/expectations/compiler/compiler/integers/i128/min.leo.out b/tests/expectations/compiler/compiler/integers/i128/min.leo.out index a762f4c140..5a3ed9a6b2 100644 --- a/tests/expectations/compiler/compiler/integers/i128/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/min.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 12baf68b32dd0cc27e6c695e4373c68e789a0b7da1e30392ca84dd237602df20 - canonicalized_ast: 12baf68b32dd0cc27e6c695e4373c68e789a0b7da1e30392ca84dd237602df20 - type_inferenced_ast: 7b3cd17b290d7c46f014ae424adc4f526e770925fa8ff678c35f0f4283c591d7 + initial_ast: 81f19c70aa243402136cb83389766503933b4a16af54eb267e3beca47b39c3fd + canonicalized_ast: 81f19c70aa243402136cb83389766503933b4a16af54eb267e3beca47b39c3fd + type_inferenced_ast: 68075edede17cbaaac7f6a13d690a8c387c39883aaee642e91f7b79f0c399a93 diff --git a/tests/expectations/compiler/compiler/integers/i128/mul.leo.out b/tests/expectations/compiler/compiler/integers/i128/mul.leo.out index 1659834146..f7528c303f 100644 --- a/tests/expectations/compiler/compiler/integers/i128/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/mul.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 749f276238221a67ee7cc724f2925f47ee72e2de8ce28135f0090ddc70843896 - canonicalized_ast: 749f276238221a67ee7cc724f2925f47ee72e2de8ce28135f0090ddc70843896 - type_inferenced_ast: 2e262184d0acfd77343ea357565d5c460b002637df8c1e1d30832373cd4bb348 + initial_ast: 186ffdd352b08c5c49d88c75c33aa7c11ef19d378025b30e7c90e415244fe167 + canonicalized_ast: 186ffdd352b08c5c49d88c75c33aa7c11ef19d378025b30e7c90e415244fe167 + type_inferenced_ast: 713e660370a3ccd00762874b730882ac8f4057b489a6a187f5408a3ccad150af diff --git a/tests/expectations/compiler/compiler/integers/i128/ne.leo.out b/tests/expectations/compiler/compiler/integers/i128/ne.leo.out index 7c5e698cf6..67798c24c7 100644 --- a/tests/expectations/compiler/compiler/integers/i128/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/ne.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 6abbf856d68ddf5dab6e0e28efd4edcf0b8c77a73ec3cc71b342672737487925 - canonicalized_ast: 6abbf856d68ddf5dab6e0e28efd4edcf0b8c77a73ec3cc71b342672737487925 - type_inferenced_ast: 2be2d42dd129f782b0393284108e22368823857f66a338406159b30c2953c486 + initial_ast: 7fab027642da486a2f3ea3dd8556179e75568a61144b5662dd260493852eeba3 + canonicalized_ast: 7fab027642da486a2f3ea3dd8556179e75568a61144b5662dd260493852eeba3 + type_inferenced_ast: 6ecdad348f6f23553bbabe8b30835e9c898d9d97f0a5aa1366f5acb94d8f6b3a diff --git a/tests/expectations/compiler/compiler/integers/i128/negate.leo.out b/tests/expectations/compiler/compiler/integers/i128/negate.leo.out index 7e4374c184..e0611ad1bc 100644 --- a/tests/expectations/compiler/compiler/integers/i128/negate.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/negate.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 77b18a83d019f104049c3d1c6bf7b3a159e56024184304d42508d1be58a12e4a - canonicalized_ast: 77b18a83d019f104049c3d1c6bf7b3a159e56024184304d42508d1be58a12e4a - type_inferenced_ast: e08006c78ca1dfede635303eeab1b764d86c25d1e64c9f1584e67b2903cbbcc6 + initial_ast: fa78dc309cc81c6c96b9fac180fad7870e5262f79fda6cee57290154ea48f7ac + canonicalized_ast: fa78dc309cc81c6c96b9fac180fad7870e5262f79fda6cee57290154ea48f7ac + type_inferenced_ast: 086c21d92666126135c7800554648b1edfa596262878fb3ee3ccdbd3a4d67493 diff --git a/tests/expectations/compiler/compiler/integers/i128/negate_min.leo.out b/tests/expectations/compiler/compiler/integers/i128/negate_min.leo.out index 33b2e3eef5..f47709e3dd 100644 --- a/tests/expectations/compiler/compiler/integers/i128/negate_min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/negate_min.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 7caf7d58784d0fde99b9041c2de7013c5171d8b77d12fadedc1a7f254736d5db - canonicalized_ast: 7caf7d58784d0fde99b9041c2de7013c5171d8b77d12fadedc1a7f254736d5db - type_inferenced_ast: 7b7e03ea46695e6190bc4731e5091f6f7524c21b6b2659cd100d872f6c8dbc51 + initial_ast: 1b6248de2bf261e167aac374a03f0d4457a72b1db5a0ea82bcded1ef35d15228 + canonicalized_ast: 1b6248de2bf261e167aac374a03f0d4457a72b1db5a0ea82bcded1ef35d15228 + type_inferenced_ast: c088d9226acf93203adb5f50e2eaa04df39804ab0d07ecf8c79d95637ac6c079 diff --git a/tests/expectations/compiler/compiler/integers/i128/negate_zero.leo.out b/tests/expectations/compiler/compiler/integers/i128/negate_zero.leo.out index 8be89f4fee..bff2338f7e 100644 --- a/tests/expectations/compiler/compiler/integers/i128/negate_zero.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/negate_zero.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 8938763585750f00e3af22fbe607925515c738649e25ef536926d4c26bc4987e - canonicalized_ast: 8938763585750f00e3af22fbe607925515c738649e25ef536926d4c26bc4987e - type_inferenced_ast: 7e5da98c82d7a3c8fd7ebc80e54289ae1c5bd7f7febd7943a2a376e65f925df6 + initial_ast: d1750fe6b12ccdce3369a1d4731ee246d03dc1bde628373d549bc5f3381d8930 + canonicalized_ast: d1750fe6b12ccdce3369a1d4731ee246d03dc1bde628373d549bc5f3381d8930 + type_inferenced_ast: 26b0d2e0de90d256c74ad90d9a1953a62c08d27e7213eca59563774114efc142 diff --git a/tests/expectations/compiler/compiler/integers/i128/sub.leo.out b/tests/expectations/compiler/compiler/integers/i128/sub.leo.out index 3191d89ca4..6d450e56c3 100644 --- a/tests/expectations/compiler/compiler/integers/i128/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/sub.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: cbc3426682d111bcc624772a9e331194e91afe090c7fad60b6a26f7bbfc80c52 - canonicalized_ast: cbc3426682d111bcc624772a9e331194e91afe090c7fad60b6a26f7bbfc80c52 - type_inferenced_ast: 6590ef64c4fea22ae40610713fd9ab9c8099db62dfa03dbb4b52544745add887 + initial_ast: 084ac84295a8f4fda5e3511fee4068a96934fe4521aea5540f9e0a40ae1a7d60 + canonicalized_ast: 084ac84295a8f4fda5e3511fee4068a96934fe4521aea5540f9e0a40ae1a7d60 + type_inferenced_ast: a6d6b276dda67099e6cbb7d5188befb863cf61d15073dc1730112c858fe31276 diff --git a/tests/expectations/compiler/compiler/integers/i128/ternary.leo.out b/tests/expectations/compiler/compiler/integers/i128/ternary.leo.out index b147f39f98..4d9ad31975 100644 --- a/tests/expectations/compiler/compiler/integers/i128/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/ternary.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: ba1d5d680a9efb9ec10633ea657d4671b3e68bf496ae75a9f6a21c39572ab928 - canonicalized_ast: ba1d5d680a9efb9ec10633ea657d4671b3e68bf496ae75a9f6a21c39572ab928 - type_inferenced_ast: 24933918f7ad7589c86ee29dcb310034c6061ac0f30447cd90e1909812388494 + initial_ast: 3e8596a265aa5e71ae65161316ed3d789fec123d775f2d40a4c1311b224d1561 + canonicalized_ast: 3e8596a265aa5e71ae65161316ed3d789fec123d775f2d40a4c1311b224d1561 + type_inferenced_ast: 4e3d21eb9358220080cc24ed3bafe3873e41713cf543e375b29cf3ef779837ad diff --git a/tests/expectations/compiler/compiler/integers/i16/add.leo.out b/tests/expectations/compiler/compiler/integers/i16/add.leo.out index 9d7f2683fc..d572444b26 100644 --- a/tests/expectations/compiler/compiler/integers/i16/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/add.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: c6e60e90f02eedaf8209c76aaf12e2fe10ae13dc6061c36f5e49b72bf6b0a65a - canonicalized_ast: c6e60e90f02eedaf8209c76aaf12e2fe10ae13dc6061c36f5e49b72bf6b0a65a - type_inferenced_ast: cbd5e50cfc56419e9406f490d626035c8337a1bdaf35bc62a4600fcf76c391b9 + initial_ast: ae4527e4325ed14332c6ccf66f317d048b042e3b81c3f3e91d639ab1509b72f9 + canonicalized_ast: ae4527e4325ed14332c6ccf66f317d048b042e3b81c3f3e91d639ab1509b72f9 + type_inferenced_ast: 3fb4bd89f41f243b8bcf0961a9c5993520dcc1bd0c66fd71388b99b462dd0e71 diff --git a/tests/expectations/compiler/compiler/integers/i16/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/i16/console_assert.leo.out index fe1d0245f0..506271fa0b 100644 --- a/tests/expectations/compiler/compiler/integers/i16/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/console_assert.leo.out @@ -13,6 +13,6 @@ outputs: - input_file: i16.in output: registers: {} - initial_ast: dc4639a138bd4abe35fdb62f4276a1dd7d9fff035da9e307f3522ebcd0d85242 - canonicalized_ast: 11c7e7171c6ae7c1cbb12c7e27dee4786d5689c83d4e60c1c1860f78372e9ae7 - type_inferenced_ast: 8d5f15f30bfa9b61498011cd4c66e7980a6a30d43112fb54f80247764f5ccaca + initial_ast: 9fd06d094a4c40e018572aa89322695cc5a6d04f0e5ab496b6b53b3dc9584f6b + canonicalized_ast: b3a66c2d4b7e3784731a43e42c32e77a7823b13b0426b3dbf368e465cd56fdda + type_inferenced_ast: 3cb58466b051cebe768038210691299387219dad2616af6063515c20aad6a996 diff --git a/tests/expectations/compiler/compiler/integers/i16/div.leo.out b/tests/expectations/compiler/compiler/integers/i16/div.leo.out index d645fdebfc..58c1256bf4 100644 --- a/tests/expectations/compiler/compiler/integers/i16/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/div.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 9ba56478095b7f7ed43019d532d9b21817ecb729458843de0ee84f64ccbeaad5 - canonicalized_ast: 9ba56478095b7f7ed43019d532d9b21817ecb729458843de0ee84f64ccbeaad5 - type_inferenced_ast: 0313c0eb6ab4ee2bf5c8a0b2e5936a6ee62e73897fb2da20f4278f0627f1c9db + initial_ast: 9fea4fb63e9c60ae1090363860ba64d29159064580aa750920d2369e047c3760 + canonicalized_ast: 9fea4fb63e9c60ae1090363860ba64d29159064580aa750920d2369e047c3760 + type_inferenced_ast: 8d19db9384105c6aa8dd86de7443dbb7926928847094049fee40088404ed5fda diff --git a/tests/expectations/compiler/compiler/integers/i16/eq.leo.out b/tests/expectations/compiler/compiler/integers/i16/eq.leo.out index 364d88b526..b48fee5c60 100644 --- a/tests/expectations/compiler/compiler/integers/i16/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/eq.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 9b7aa4b35a464c120a2fbbcc5f64e94224bd5a83a4178f41f522b8c3f4103eed - canonicalized_ast: 9b7aa4b35a464c120a2fbbcc5f64e94224bd5a83a4178f41f522b8c3f4103eed - type_inferenced_ast: fa332a69d255172b4ab1f07fcab1b6cd4ba2b29ef86f488b006a6d728a53c21d + initial_ast: e459cff3f061bfcaf69f5d7e9079a12b00a7f8a5ded25f90419846daa1d4b087 + canonicalized_ast: e459cff3f061bfcaf69f5d7e9079a12b00a7f8a5ded25f90419846daa1d4b087 + type_inferenced_ast: dec3a94ef9e82ae84e93a20ca17a4b3dfddf69f475d8e104bcb8d6ab05ab50a3 diff --git a/tests/expectations/compiler/compiler/integers/i16/ge.leo.out b/tests/expectations/compiler/compiler/integers/i16/ge.leo.out index 306ebd0fcf..da6c631d5d 100644 --- a/tests/expectations/compiler/compiler/integers/i16/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/ge.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: acbe69247b7e93d134e08bb50b235fb0fdcedc5aaf0d064dd32d1955eb7530f1 - canonicalized_ast: acbe69247b7e93d134e08bb50b235fb0fdcedc5aaf0d064dd32d1955eb7530f1 - type_inferenced_ast: 8c762e804e44a6ec7aee1106bc0742266f34f7136a35878675ac239ffb4e2f9c + initial_ast: 5345c5b3e64e283ec690a7c8fb8d83f1233447a9bf00d75abb66e5c2bacd75ca + canonicalized_ast: 5345c5b3e64e283ec690a7c8fb8d83f1233447a9bf00d75abb66e5c2bacd75ca + type_inferenced_ast: c7ecefa4bbcb107758fcc016ec46eff5b63faea2cb0f4c7312f6883db29075e7 diff --git a/tests/expectations/compiler/compiler/integers/i16/gt.leo.out b/tests/expectations/compiler/compiler/integers/i16/gt.leo.out index abaf5d0480..d09ee34a5a 100644 --- a/tests/expectations/compiler/compiler/integers/i16/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/gt.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 79c5123b8d5fdde1e774ce298e69fec5a6ac561d42f2cff1620ee90868a1a788 - canonicalized_ast: 79c5123b8d5fdde1e774ce298e69fec5a6ac561d42f2cff1620ee90868a1a788 - type_inferenced_ast: 2f5c103f24367e1b7d38073a41b039c94fd2d4138ed6ededd1f1a526ed741653 + initial_ast: 0c681b6733c860b010e2022e7513c62d1a8ff0fe767410650c4974cea18b0329 + canonicalized_ast: 0c681b6733c860b010e2022e7513c62d1a8ff0fe767410650c4974cea18b0329 + type_inferenced_ast: d0e9ec10e9ebf832d7654ff0d78fb72db7b24833bbc56eed92efb82dacda154f diff --git a/tests/expectations/compiler/compiler/integers/i16/le.leo.out b/tests/expectations/compiler/compiler/integers/i16/le.leo.out index a1d3093d45..dda445625c 100644 --- a/tests/expectations/compiler/compiler/integers/i16/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/le.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 0ec2096fbd8fdfa796b104aef9e28458e18a25951bb610f61f4ea4fbaae9757f - canonicalized_ast: 0ec2096fbd8fdfa796b104aef9e28458e18a25951bb610f61f4ea4fbaae9757f - type_inferenced_ast: 7ddd6341403c131f721540b6cb1a7e3daaff0ec9615f8c35e4c07f32591f9eaf + initial_ast: cab9fabdb4694c4c07a5d9a3479071e05f94947fdaab130aba71fa15c225fb36 + canonicalized_ast: cab9fabdb4694c4c07a5d9a3479071e05f94947fdaab130aba71fa15c225fb36 + type_inferenced_ast: 850e28561df02d13dfa38c6a92febde2484ad8cc4b3cba8fc8f84df52eb40b67 diff --git a/tests/expectations/compiler/compiler/integers/i16/lt.leo.out b/tests/expectations/compiler/compiler/integers/i16/lt.leo.out index ef870cb29a..456a6e9676 100644 --- a/tests/expectations/compiler/compiler/integers/i16/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/lt.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 4fd8570e10354fb6f8fe19d8d822ed3d8d9149f464c0bbdcc5967d903875234e - canonicalized_ast: 4fd8570e10354fb6f8fe19d8d822ed3d8d9149f464c0bbdcc5967d903875234e - type_inferenced_ast: 0cd72ea5eaf563bfc2a2ba82ad6e2e9d65df60730c8cf87aa9d09848448cbdca + initial_ast: e33908f5fd9f81857edc0e304476592aaee18dc36464e9b6200b41f13133c21c + canonicalized_ast: e33908f5fd9f81857edc0e304476592aaee18dc36464e9b6200b41f13133c21c + type_inferenced_ast: 2cbe62e95746f6ca3d4edcd58cfa8f58454d05e2df0d9082202e6170560775a7 diff --git a/tests/expectations/compiler/compiler/integers/i16/max.leo.out b/tests/expectations/compiler/compiler/integers/i16/max.leo.out index 5d469b4f44..029cbed454 100644 --- a/tests/expectations/compiler/compiler/integers/i16/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/max.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 8cc319fae5a195cc91c1b906a4945d60fe8f4a2649ecae5910523f20ab29a80e - canonicalized_ast: 8cc319fae5a195cc91c1b906a4945d60fe8f4a2649ecae5910523f20ab29a80e - type_inferenced_ast: 79c7c35ea8546567ff0faef52f0a90e945a3cd835859b96f5e25d457eac51212 + initial_ast: 2c75f41bf231656d8c5e37856218ec865072a6c2ef6127f7129a8bc902c4e561 + canonicalized_ast: 2c75f41bf231656d8c5e37856218ec865072a6c2ef6127f7129a8bc902c4e561 + type_inferenced_ast: d75251e96176eddced5662c52107b01a7546757e39061a4af85063a5ac6f8f90 diff --git a/tests/expectations/compiler/compiler/integers/i16/min.leo.out b/tests/expectations/compiler/compiler/integers/i16/min.leo.out index 2cf8d929d0..7e00f95861 100644 --- a/tests/expectations/compiler/compiler/integers/i16/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/min.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 01194f1d3e40d631c4b4f2d57d7c6d9906a2dd53299f0246fe259d49a81aaf1e - canonicalized_ast: 01194f1d3e40d631c4b4f2d57d7c6d9906a2dd53299f0246fe259d49a81aaf1e - type_inferenced_ast: 384165664aac2ff844fb06836db88f9e92de2aff6bf9745a56c6924e1f5ed63a + initial_ast: 9d8422ea1b1b3b958945accea6123bc08195e5142554c22d84593efc6a122eb4 + canonicalized_ast: 9d8422ea1b1b3b958945accea6123bc08195e5142554c22d84593efc6a122eb4 + type_inferenced_ast: c75cbfa758ad820de51cf36b88a7090c6d96c8ed7c9f9ddc8a40cde8680499b6 diff --git a/tests/expectations/compiler/compiler/integers/i16/mul.leo.out b/tests/expectations/compiler/compiler/integers/i16/mul.leo.out index e69cf863fe..b2b7d3c9fb 100644 --- a/tests/expectations/compiler/compiler/integers/i16/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/mul.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: e4d59a5cf7736b6fe993c348eb71c77e19339f9f48c71288858ee57f8afea1a2 - canonicalized_ast: e4d59a5cf7736b6fe993c348eb71c77e19339f9f48c71288858ee57f8afea1a2 - type_inferenced_ast: fdbdf403033c6317a5767b06b27454c40055dfb3f58893021e6abd7325b0eba7 + initial_ast: c8d52b9372a99a546d481f6c4591c271f93b866d0ab52f476e78bb504759298a + canonicalized_ast: c8d52b9372a99a546d481f6c4591c271f93b866d0ab52f476e78bb504759298a + type_inferenced_ast: 44225cf9afb1fb954fe022c8a1522149c39272af12e56ce3c93fa147c2495460 diff --git a/tests/expectations/compiler/compiler/integers/i16/ne.leo.out b/tests/expectations/compiler/compiler/integers/i16/ne.leo.out index 5d0dda3d2d..0b9387375e 100644 --- a/tests/expectations/compiler/compiler/integers/i16/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/ne.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 7aa0502683430c1eb3b692497b4d0a58eb463229a4e2dc112fe9065478bfb614 - canonicalized_ast: 7aa0502683430c1eb3b692497b4d0a58eb463229a4e2dc112fe9065478bfb614 - type_inferenced_ast: ce82a4fd386bbb70d200402189572063eeb71308be4ab30988e95952144be3b8 + initial_ast: 94b4015d8da05386aa665ec4b08ac25fa233d5f1ea0077f9d365ccd61963e3b5 + canonicalized_ast: 94b4015d8da05386aa665ec4b08ac25fa233d5f1ea0077f9d365ccd61963e3b5 + type_inferenced_ast: 1cd8bc86facc3512ce1dbc3fdb9cc9ef247523546ac99d39b3e9d14edad585b2 diff --git a/tests/expectations/compiler/compiler/integers/i16/negate.leo.out b/tests/expectations/compiler/compiler/integers/i16/negate.leo.out index 2ec74aaf6c..505c09c9f8 100644 --- a/tests/expectations/compiler/compiler/integers/i16/negate.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/negate.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 3d30aa34b4b8c3dc2e1e63c4e82f829562c037e9ce1025e157e84fbc445e5b8d - canonicalized_ast: 3d30aa34b4b8c3dc2e1e63c4e82f829562c037e9ce1025e157e84fbc445e5b8d - type_inferenced_ast: 0f85cf3686a22da3196600a5f511095ad54a892716001eb3970ab128eed84908 + initial_ast: d3769cf2fe2c68d0d3d6efa85eb78227470f321fff28a1fb09eecd887f1d9377 + canonicalized_ast: d3769cf2fe2c68d0d3d6efa85eb78227470f321fff28a1fb09eecd887f1d9377 + type_inferenced_ast: 4b73146b8f8a1a663122fda1b28610e66a37cae020eb3e4a714c58e6e906bbb5 diff --git a/tests/expectations/compiler/compiler/integers/i16/negate_min.leo.out b/tests/expectations/compiler/compiler/integers/i16/negate_min.leo.out index 6ec1b1e5ef..edb3d47847 100644 --- a/tests/expectations/compiler/compiler/integers/i16/negate_min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/negate_min.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 064db7790a5fe7507c1f56c3d4bfac3b184da1f4e9de9792950d016cc331b2d7 - canonicalized_ast: 064db7790a5fe7507c1f56c3d4bfac3b184da1f4e9de9792950d016cc331b2d7 - type_inferenced_ast: 6e8dae083b61d225f4982fa6f9b0530ecc63b365af0782e00384077e176303ab + initial_ast: 6cf050d7488737deb6ac639e9d35ed7237d951318330ff2843c8f5bc8dced47e + canonicalized_ast: 6cf050d7488737deb6ac639e9d35ed7237d951318330ff2843c8f5bc8dced47e + type_inferenced_ast: 0f53280293d48fd77a456e4824dd3c7cc9fddef7848cef1fcddebe57957f984e diff --git a/tests/expectations/compiler/compiler/integers/i16/negate_zero.leo.out b/tests/expectations/compiler/compiler/integers/i16/negate_zero.leo.out index 480c5a8fdb..cb76c33eaf 100644 --- a/tests/expectations/compiler/compiler/integers/i16/negate_zero.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/negate_zero.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 1d284ab53df47bd68057717ea9ea338f4c77cd7fa9d2d8850d47cb34cea62f6b - canonicalized_ast: 1d284ab53df47bd68057717ea9ea338f4c77cd7fa9d2d8850d47cb34cea62f6b - type_inferenced_ast: 46256ea5632485212fda4dd534ddc0c8b6fe7439ca65ca1ff4d843ad47f92fbc + initial_ast: dae33b99995f0c9a93f013ff9e86b32147ceca3aacf46b98e0b2bef8f3b9737d + canonicalized_ast: dae33b99995f0c9a93f013ff9e86b32147ceca3aacf46b98e0b2bef8f3b9737d + type_inferenced_ast: 18fdbd89358b33dde12e670258801b963366a931028228c7f2ad1b08ee200638 diff --git a/tests/expectations/compiler/compiler/integers/i16/sub.leo.out b/tests/expectations/compiler/compiler/integers/i16/sub.leo.out index 82752349cc..19b54f7e66 100644 --- a/tests/expectations/compiler/compiler/integers/i16/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/sub.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 0ed8af4e184becf59423bef3f18a8282e14797fa65605cde3ec662b3495c17b6 - canonicalized_ast: 0ed8af4e184becf59423bef3f18a8282e14797fa65605cde3ec662b3495c17b6 - type_inferenced_ast: 692c5aa63291373cd59ace973c18581c08e1713a80a07d4e49a94384e00f5b4d + initial_ast: b99849ab9fda79207a1d127b21832deb2519516e289bc662fbcc310af3865c88 + canonicalized_ast: b99849ab9fda79207a1d127b21832deb2519516e289bc662fbcc310af3865c88 + type_inferenced_ast: fdbce14f1e4d7392b6113638a35c3fea10c731061661cf29cc7c435cd935491d diff --git a/tests/expectations/compiler/compiler/integers/i16/ternary.leo.out b/tests/expectations/compiler/compiler/integers/i16/ternary.leo.out index 742b78acff..0b9f2eeb4a 100644 --- a/tests/expectations/compiler/compiler/integers/i16/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/ternary.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 9bcb3368b7c5c54401805a92c0a38a5e2790ce1404928ce53c5f11fc91facda6 - canonicalized_ast: 9bcb3368b7c5c54401805a92c0a38a5e2790ce1404928ce53c5f11fc91facda6 - type_inferenced_ast: 24a9f154beda36f615d7b8eb20d82d2302f5a98e530ec5d6f7178248c54fc485 + initial_ast: cf779aa13cc10a2d75005bc9e00f2bc7f05e6ce36bea5811866da0d87d4c51ad + canonicalized_ast: cf779aa13cc10a2d75005bc9e00f2bc7f05e6ce36bea5811866da0d87d4c51ad + type_inferenced_ast: c05c5c84b6a83abb65aaf4c089737a1ebd86a6486083bf2128c2bca12958d33a diff --git a/tests/expectations/compiler/compiler/integers/i32/add.leo.out b/tests/expectations/compiler/compiler/integers/i32/add.leo.out index 54ba1d7251..2a77444462 100644 --- a/tests/expectations/compiler/compiler/integers/i32/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/add.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: f42260573fe4d4c93a3ef5d4ce6178361696d80a6d59c29bbc45c2f91372524d - canonicalized_ast: f42260573fe4d4c93a3ef5d4ce6178361696d80a6d59c29bbc45c2f91372524d - type_inferenced_ast: 53a55ce50552159c54febcc31f2f02f3b2b60264dfc53fece8b6cb12c80774f6 + initial_ast: ed7931aecce4acc246c5fcc70e0264b5b573e0a3c73aac23bad0db0cdefd6f7c + canonicalized_ast: ed7931aecce4acc246c5fcc70e0264b5b573e0a3c73aac23bad0db0cdefd6f7c + type_inferenced_ast: 9d835982907623f63204f1b181f14baf4d8b51bf2a274b1035fcc7d100d80f9c diff --git a/tests/expectations/compiler/compiler/integers/i32/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/i32/console_assert.leo.out index 800a1bd630..8f5275b762 100644 --- a/tests/expectations/compiler/compiler/integers/i32/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/console_assert.leo.out @@ -13,6 +13,6 @@ outputs: - input_file: i32.in output: registers: {} - initial_ast: 0827f6332d1efc21bf2d0875dbe60a00ca0af5b8fac88831402c1289d5cb561a - canonicalized_ast: 2744510f89a25b5b0cac8cdd335cfaad65f6df030b01b3bbf543d1766c7392b4 - type_inferenced_ast: 03dfb3c4eabf1f32ffc24ef5cd2f682346a9b9aa03a081dae718954070ac4460 + initial_ast: b09faa2b600e664eca4d5ebcb1365ee0c71c814755ecefe0f13b39400cab881f + canonicalized_ast: dec0b5748739766befb71f405fb73d5bcb6cddc693bde5c92976c48aa291ff72 + type_inferenced_ast: 224d5e773b39805a5f4f7cee153ac46af1a1c4793774eb9cab0f921131a3447f diff --git a/tests/expectations/compiler/compiler/integers/i32/div.leo.out b/tests/expectations/compiler/compiler/integers/i32/div.leo.out index 994bd4d0bb..a720017153 100644 --- a/tests/expectations/compiler/compiler/integers/i32/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/div.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: a86f5aafe6577bb0be490afcc9e0837c068aab15ad2d130d47c1eda9dd754515 - canonicalized_ast: a86f5aafe6577bb0be490afcc9e0837c068aab15ad2d130d47c1eda9dd754515 - type_inferenced_ast: f25c7ba9ed10a4ad8e102f0af326a396b94169721251986531ba68313af8a40a + initial_ast: d5d18e03b5cfafc01eced52338728703c4e0f3a8ead4ecd879c7d7656b3e1f1a + canonicalized_ast: d5d18e03b5cfafc01eced52338728703c4e0f3a8ead4ecd879c7d7656b3e1f1a + type_inferenced_ast: 3a5000a6619cd8f5a55da7cab198e3bf26989c4767d6897c59df5b92ca2008ff diff --git a/tests/expectations/compiler/compiler/integers/i32/eq.leo.out b/tests/expectations/compiler/compiler/integers/i32/eq.leo.out index 77c3598529..98a9432ca6 100644 --- a/tests/expectations/compiler/compiler/integers/i32/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/eq.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: c698e127258e1e60652ddb897be0a4638bc263a6c50b7dece797c60b30fe1373 - canonicalized_ast: c698e127258e1e60652ddb897be0a4638bc263a6c50b7dece797c60b30fe1373 - type_inferenced_ast: 45a9d197ff995eb43cad8f5dd0cdb906d5e0d0bef0b4f3459acc07cb5541edaf + initial_ast: 24e9d0ebbf651ed584519189bfe7aee59199997204c58cfd3c4f14cea0f7f628 + canonicalized_ast: 24e9d0ebbf651ed584519189bfe7aee59199997204c58cfd3c4f14cea0f7f628 + type_inferenced_ast: 8536be9c3a56f295d1d8cf9c5c034b5ea8c51f384245f222f6809336e96d4324 diff --git a/tests/expectations/compiler/compiler/integers/i32/ge.leo.out b/tests/expectations/compiler/compiler/integers/i32/ge.leo.out index df84e1b17f..f4ffb50e81 100644 --- a/tests/expectations/compiler/compiler/integers/i32/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/ge.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: cf1aa79b2597a82e8347b093417a2281829e3c07fd74973b42bf7cc2018c7cb1 - canonicalized_ast: cf1aa79b2597a82e8347b093417a2281829e3c07fd74973b42bf7cc2018c7cb1 - type_inferenced_ast: 0810a1676362bcd258b306296590dc9ffa325dd3150b7e241a0c755979fa0b48 + initial_ast: 64d73d49eb1fcb14180456031975ca5eced3950c1ce187a1c031308d9f15faa7 + canonicalized_ast: 64d73d49eb1fcb14180456031975ca5eced3950c1ce187a1c031308d9f15faa7 + type_inferenced_ast: 147f1c62f5fa78d12dad891ebaebb13f8a72466f360531eba7c06a4c64ae86e7 diff --git a/tests/expectations/compiler/compiler/integers/i32/gt.leo.out b/tests/expectations/compiler/compiler/integers/i32/gt.leo.out index da1462579f..b65b2c3ac7 100644 --- a/tests/expectations/compiler/compiler/integers/i32/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/gt.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: aa75c9b492684e06ea45996ac25a23ee47617312b986e9ce6756ff76f22be3b0 - canonicalized_ast: aa75c9b492684e06ea45996ac25a23ee47617312b986e9ce6756ff76f22be3b0 - type_inferenced_ast: b84a67583559c2d8794b0c4bee5038864b54649134deb088a4a72309b664e0a5 + initial_ast: ab52dcf22b3b470626bf2ddf4f37671d64a889ad4f4d59e7d919a89c0dbfc2e3 + canonicalized_ast: ab52dcf22b3b470626bf2ddf4f37671d64a889ad4f4d59e7d919a89c0dbfc2e3 + type_inferenced_ast: 0f5bd273b878011c7faa012bfe0f52103b1b46fcb3b95f9179b564f0c8b083f4 diff --git a/tests/expectations/compiler/compiler/integers/i32/le.leo.out b/tests/expectations/compiler/compiler/integers/i32/le.leo.out index 3f06095739..538cc5ff58 100644 --- a/tests/expectations/compiler/compiler/integers/i32/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/le.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 496c0f9332973aeac3f7f10a663d7449dfb5ee3bb800dde47eda82f1e61beea3 - canonicalized_ast: 496c0f9332973aeac3f7f10a663d7449dfb5ee3bb800dde47eda82f1e61beea3 - type_inferenced_ast: 9e9611c48ffd078fdb36febf75b0294f2adad7e43e044f0fa80791a2a49f1b35 + initial_ast: 75bfd668757f4cecc7332c3b838e0f5ff9ef2096ae697877f1bc2eddbdfdb956 + canonicalized_ast: 75bfd668757f4cecc7332c3b838e0f5ff9ef2096ae697877f1bc2eddbdfdb956 + type_inferenced_ast: fa14d06e8d288439bf48b1345b2dfc294012d927624466331b152f6d90d4717e diff --git a/tests/expectations/compiler/compiler/integers/i32/lt.leo.out b/tests/expectations/compiler/compiler/integers/i32/lt.leo.out index 7621bd18aa..64769c6a5a 100644 --- a/tests/expectations/compiler/compiler/integers/i32/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/lt.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: aba1dbe634cb3a7ff87cfff3af689a49807d98b7068c6a8500f305d8cdc7d9a5 - canonicalized_ast: aba1dbe634cb3a7ff87cfff3af689a49807d98b7068c6a8500f305d8cdc7d9a5 - type_inferenced_ast: c0d77512c6581e6998277754ce5abf3acf4864a5f6d7440de3525e207b67e401 + initial_ast: 311be6e4af216210e43dbee415bd65fc2cf1b16cfc91a7f6037fa0ed91356a0d + canonicalized_ast: 311be6e4af216210e43dbee415bd65fc2cf1b16cfc91a7f6037fa0ed91356a0d + type_inferenced_ast: d77aa422e72ba19be49de7aeba1445b6e335edb7f76731f57fc95558aff9793c diff --git a/tests/expectations/compiler/compiler/integers/i32/max.leo.out b/tests/expectations/compiler/compiler/integers/i32/max.leo.out index 5bb9d85e93..099495f33c 100644 --- a/tests/expectations/compiler/compiler/integers/i32/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/max.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: bc6011a5b62f3a74a2279d10e8cc2a80309b7a72717fc6a3f21f3ef3dcdfd561 - canonicalized_ast: bc6011a5b62f3a74a2279d10e8cc2a80309b7a72717fc6a3f21f3ef3dcdfd561 - type_inferenced_ast: 000c069c25da11a48ed3d7e4a0a806a7cc482e62830e52bdc36f21843c855b8b + initial_ast: 5ffa08f1bd05a2f9fccb47a59ab3156ea74052976dd53757b6264b4183bfe1e9 + canonicalized_ast: 5ffa08f1bd05a2f9fccb47a59ab3156ea74052976dd53757b6264b4183bfe1e9 + type_inferenced_ast: 30cb87c5b554a4e2a60702a7e5931a2a421dcf3b47a08d21cb79e164377f3c31 diff --git a/tests/expectations/compiler/compiler/integers/i32/min.leo.out b/tests/expectations/compiler/compiler/integers/i32/min.leo.out index 5418513b1f..c02fee0f9d 100644 --- a/tests/expectations/compiler/compiler/integers/i32/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/min.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: fca7ee4eba546b4b481f1686b3db4c82c863b7aa122c3d38ff435672271dd609 - canonicalized_ast: fca7ee4eba546b4b481f1686b3db4c82c863b7aa122c3d38ff435672271dd609 - type_inferenced_ast: dab4b2cd49c1a69873fa82bb37f61013cdaf8d04e65023cd670514ca93ff9081 + initial_ast: 96905722f145d9ca26364477885f5a02ba6f610b3cd704ca458ad30affcd1099 + canonicalized_ast: 96905722f145d9ca26364477885f5a02ba6f610b3cd704ca458ad30affcd1099 + type_inferenced_ast: 3393f70f2cad4ad7793a732d29a46006c60a53e33bd651aa4475fa1423436c0e diff --git a/tests/expectations/compiler/compiler/integers/i32/mul.leo.out b/tests/expectations/compiler/compiler/integers/i32/mul.leo.out index 9ae88132ce..7d83874237 100644 --- a/tests/expectations/compiler/compiler/integers/i32/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/mul.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 2db6f04149f1e4f57186156a57f6a03acba8c67d1fba6a1b1014e1f1b7a13aa8 - canonicalized_ast: 2db6f04149f1e4f57186156a57f6a03acba8c67d1fba6a1b1014e1f1b7a13aa8 - type_inferenced_ast: 3813b4f84021ed964cb335c399de9d5baacb695f0c881d6c15fdb557c3cb0ba4 + initial_ast: 7ff114251124c9ab97133a9adf375c1d8ce4365399ac95776aec0cb336b66857 + canonicalized_ast: 7ff114251124c9ab97133a9adf375c1d8ce4365399ac95776aec0cb336b66857 + type_inferenced_ast: 748f269f5eb1f5a0d278c122d810151a662dae5bc175ff0f33f203b5a72dc16e diff --git a/tests/expectations/compiler/compiler/integers/i32/ne.leo.out b/tests/expectations/compiler/compiler/integers/i32/ne.leo.out index 4281dcda96..c8dcac7d7d 100644 --- a/tests/expectations/compiler/compiler/integers/i32/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/ne.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 2d4a443c29c71a57919c04ef3fd46b2905a369029d8d9c9f550ddfba7d9f4412 - canonicalized_ast: 2d4a443c29c71a57919c04ef3fd46b2905a369029d8d9c9f550ddfba7d9f4412 - type_inferenced_ast: 57567697c6a41eecc0ae2cd4f48e451b6f04da28aff5d9017dadce44fafddfb9 + initial_ast: a09ebf839675ddc42a32b7f2fa4ea2d7e0d343c2c572259a5127015bf233ba3c + canonicalized_ast: a09ebf839675ddc42a32b7f2fa4ea2d7e0d343c2c572259a5127015bf233ba3c + type_inferenced_ast: e5fceb3e11ffb4e44578e1dc7ce0f84fb75f8c1167ddb2229355dc5348d6230e diff --git a/tests/expectations/compiler/compiler/integers/i32/negate.leo.out b/tests/expectations/compiler/compiler/integers/i32/negate.leo.out index ff6e862e5b..e4fb159445 100644 --- a/tests/expectations/compiler/compiler/integers/i32/negate.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/negate.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 2ae478eb637f8e59b53f6750c726e728aa6bcdc702a9434f290a15ce091c2fd8 - canonicalized_ast: 2ae478eb637f8e59b53f6750c726e728aa6bcdc702a9434f290a15ce091c2fd8 - type_inferenced_ast: 0fe0731c61c040d0221066408c5bb64204db82b9521fb8bc6ebd0e9d7fb8e46c + initial_ast: bcf180202292e16413e1a74fdecec6cf0e94aba79f6ca27f7be198ee34def8b4 + canonicalized_ast: bcf180202292e16413e1a74fdecec6cf0e94aba79f6ca27f7be198ee34def8b4 + type_inferenced_ast: 32ed0dbf2810896e4d9c0d2708fb35a1624a1422af814619cd93e613e2d2a3bf diff --git a/tests/expectations/compiler/compiler/integers/i32/negate_min.leo.out b/tests/expectations/compiler/compiler/integers/i32/negate_min.leo.out index f154160065..cf4aadd6f1 100644 --- a/tests/expectations/compiler/compiler/integers/i32/negate_min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/negate_min.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 055a3effe6dab326bc05efb4e705b975b8b5b9a476fcc51c1031cc0ad7bb579f - canonicalized_ast: 055a3effe6dab326bc05efb4e705b975b8b5b9a476fcc51c1031cc0ad7bb579f - type_inferenced_ast: de723bb30e595a20606a520588af8ba6042ab5206a02c13f184b7a72cd21ce00 + initial_ast: a09954841faa5b5bf932a11ce8f7cfe70ed071d142f84d739097af575e37ebc7 + canonicalized_ast: a09954841faa5b5bf932a11ce8f7cfe70ed071d142f84d739097af575e37ebc7 + type_inferenced_ast: 25d96687492f697cc03d2e33ea72e9002dc2a2f8883bae8c2b860059ed5f096c diff --git a/tests/expectations/compiler/compiler/integers/i32/negate_zero.leo.out b/tests/expectations/compiler/compiler/integers/i32/negate_zero.leo.out index c355e353ba..771f4234a3 100644 --- a/tests/expectations/compiler/compiler/integers/i32/negate_zero.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/negate_zero.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: a136febecbdc7a15151f62688ed248422281c2555bebae831c815be512377356 - canonicalized_ast: a136febecbdc7a15151f62688ed248422281c2555bebae831c815be512377356 - type_inferenced_ast: bea5396c3c0a772fcbf20c39d2700a62663f48eaeb84c67e5f202a14812a6cc8 + initial_ast: 72cdb12999123312de44506f69f9af9ed7b3ef81e45a95e250d8f2789ac5cc00 + canonicalized_ast: 72cdb12999123312de44506f69f9af9ed7b3ef81e45a95e250d8f2789ac5cc00 + type_inferenced_ast: 6243dd13bbba533d36f4e229665e4f3d1b1dbac9a937d97b128128ec61020093 diff --git a/tests/expectations/compiler/compiler/integers/i32/sub.leo.out b/tests/expectations/compiler/compiler/integers/i32/sub.leo.out index 87b0c99def..ac620bcb46 100644 --- a/tests/expectations/compiler/compiler/integers/i32/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/sub.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: ccb65cb15b43a9dc74925cca1128198439de34c4208a8ca6674cc11d775f4a6c - canonicalized_ast: ccb65cb15b43a9dc74925cca1128198439de34c4208a8ca6674cc11d775f4a6c - type_inferenced_ast: 53f17f158869f377d8feb3d63b4f8885d0a1e826d0e4d4faaa770a47fb2bea4d + initial_ast: 4f93499d651e663a396044e2b971aaeefb824f6f828ad0512d027bab667c4b51 + canonicalized_ast: 4f93499d651e663a396044e2b971aaeefb824f6f828ad0512d027bab667c4b51 + type_inferenced_ast: 67e4684b11d2ca84c5227b9cf691c7f0a8f1697a5bd9b0b1430fcc3176d6f19d diff --git a/tests/expectations/compiler/compiler/integers/i32/ternary.leo.out b/tests/expectations/compiler/compiler/integers/i32/ternary.leo.out index 2adbd0b653..c29a29d1af 100644 --- a/tests/expectations/compiler/compiler/integers/i32/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/ternary.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: d9f544c8d3c1f2b5f75e43aaa6ad136262668bb8f52961b0890d6e417f1b7cd4 - canonicalized_ast: d9f544c8d3c1f2b5f75e43aaa6ad136262668bb8f52961b0890d6e417f1b7cd4 - type_inferenced_ast: 7f557bec0085efc8317c8061c4bb8b1d31d898e5d0d75e07b0ebc3bb958de770 + initial_ast: e3eab05143c98c60086cf18f88916a24ff216a432ce8f6d4066bee7fcbb122f4 + canonicalized_ast: e3eab05143c98c60086cf18f88916a24ff216a432ce8f6d4066bee7fcbb122f4 + type_inferenced_ast: c4dac1a181bc4434de50d58b486d070462828381a70e47d1ea89362e1a6b6368 diff --git a/tests/expectations/compiler/compiler/integers/i64/add.leo.out b/tests/expectations/compiler/compiler/integers/i64/add.leo.out index 4289fbc21e..efee455256 100644 --- a/tests/expectations/compiler/compiler/integers/i64/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/add.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 95021c02880a3b85d58be6a8f0ddba2732ba35322af9c767c232a47c9a9e66a8 - canonicalized_ast: 95021c02880a3b85d58be6a8f0ddba2732ba35322af9c767c232a47c9a9e66a8 - type_inferenced_ast: f6befcf4a7ebde46dd5434464cb0ead1900294e5704000350667d1763d614c72 + initial_ast: a19d8f1eac8720b384e8e665854dd581c6e5965fc3e1134ca0deec3d8b92e270 + canonicalized_ast: a19d8f1eac8720b384e8e665854dd581c6e5965fc3e1134ca0deec3d8b92e270 + type_inferenced_ast: 4d1f7ccc44cc7a660a526b217896b37eaa419a3c7bba3be4d480472632fc5169 diff --git a/tests/expectations/compiler/compiler/integers/i64/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/i64/console_assert.leo.out index 60bdae93b5..455faacdae 100644 --- a/tests/expectations/compiler/compiler/integers/i64/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/console_assert.leo.out @@ -13,6 +13,6 @@ outputs: - input_file: i64.in output: registers: {} - initial_ast: e602573b4419a65c310de826337dc34bfc1dc2e215546d27c84be8f958f2fbe7 - canonicalized_ast: 66e33af7b62390b864dc4d488ecffaa3fbc1673788394ea87a94e650b6a4fcd2 - type_inferenced_ast: 1d22b0a31160d820841f5c8b5b85a683e878d35c237f45d0e5cf0f98151a7577 + initial_ast: 7ba4c48f6d8235115072db500e4cb0b597ab7e70e351dce7e52af13deb62441d + canonicalized_ast: 8cd5a43be85a978ece3350162fb6e641d2751ca2deb5907df0721e43fa77930c + type_inferenced_ast: ae2673cc191cdf939bc04e83416ad1c00f145e811a38a2ed04929ff4bcccfcda diff --git a/tests/expectations/compiler/compiler/integers/i64/div.leo.out b/tests/expectations/compiler/compiler/integers/i64/div.leo.out index 1e38674d57..b99b261785 100644 --- a/tests/expectations/compiler/compiler/integers/i64/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/div.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 9cbb95349371703905da55fff0b264d4ef85d754ac942d4e3f6e8079bb903c28 - canonicalized_ast: 9cbb95349371703905da55fff0b264d4ef85d754ac942d4e3f6e8079bb903c28 - type_inferenced_ast: 00e413b039c152dff6d27afb5c8ac135debc9774f9cb4bb3c58c56de3368552b + initial_ast: a0adad68f7569e1150bd68f7d7f0b3324abbc5aee347224da28bf506cebeef6f + canonicalized_ast: a0adad68f7569e1150bd68f7d7f0b3324abbc5aee347224da28bf506cebeef6f + type_inferenced_ast: f79424932fe13d4fc5f1a8ff596baca4f203a879b44a8da07972d916c6d49642 diff --git a/tests/expectations/compiler/compiler/integers/i64/eq.leo.out b/tests/expectations/compiler/compiler/integers/i64/eq.leo.out index 5ffc4620ba..354a5da6fc 100644 --- a/tests/expectations/compiler/compiler/integers/i64/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/eq.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: c8bbd0ab8eafe688d3abd30ae78ed816ac3f4664274171871b26905af03f10df - canonicalized_ast: c8bbd0ab8eafe688d3abd30ae78ed816ac3f4664274171871b26905af03f10df - type_inferenced_ast: 75a421a5808194cd352e6166b4785dad5f9e70d02f5025594f2cc230f0456277 + initial_ast: 6143bf42f68598d1ae4c6c10bec3c788589702de33f33363b4a85d204e8c2977 + canonicalized_ast: 6143bf42f68598d1ae4c6c10bec3c788589702de33f33363b4a85d204e8c2977 + type_inferenced_ast: a45fb0563c20062943b0d3fe9bb5a8f24d598b5b0c05c01faa34440c3ff526e2 diff --git a/tests/expectations/compiler/compiler/integers/i64/ge.leo.out b/tests/expectations/compiler/compiler/integers/i64/ge.leo.out index afc6bc7604..86446744dd 100644 --- a/tests/expectations/compiler/compiler/integers/i64/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/ge.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 2bcccde7177cfd914485ebdaee98cdedccad44284d9bdcea03f17d6d20c57270 - canonicalized_ast: 2bcccde7177cfd914485ebdaee98cdedccad44284d9bdcea03f17d6d20c57270 - type_inferenced_ast: a6d083260a3b5596c2dc24424f95a5ccaf6e46998e3cea8d998416888e0b95b6 + initial_ast: 3b96e46e730d9a2fc0d95818b8f35af66eeb84fcd08cb328ff47d6b6f77455fb + canonicalized_ast: 3b96e46e730d9a2fc0d95818b8f35af66eeb84fcd08cb328ff47d6b6f77455fb + type_inferenced_ast: 6f50970ff4132830a9f55e31bd8293459bbc1859869325f3c8d69eb15e92f579 diff --git a/tests/expectations/compiler/compiler/integers/i64/gt.leo.out b/tests/expectations/compiler/compiler/integers/i64/gt.leo.out index c05baefc04..0369121a94 100644 --- a/tests/expectations/compiler/compiler/integers/i64/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/gt.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 55fd60c9cf7fef6cafa09678da081f9eedf33af39a7d04ec6ba9da4bbf4d3dd7 - canonicalized_ast: 55fd60c9cf7fef6cafa09678da081f9eedf33af39a7d04ec6ba9da4bbf4d3dd7 - type_inferenced_ast: 816b7aa988cbfc5fa868facbce6533c4a721ff7e8a6123c83329a1effd65f1c3 + initial_ast: 172a1c3edcc6927668e1c5f38528b1f78c728874440adccd8c87f4b6a7ccc6af + canonicalized_ast: 172a1c3edcc6927668e1c5f38528b1f78c728874440adccd8c87f4b6a7ccc6af + type_inferenced_ast: 42573daadf62d4df3a9974a97edcd921d593cfb680723b4932c4bfe5baf1b432 diff --git a/tests/expectations/compiler/compiler/integers/i64/le.leo.out b/tests/expectations/compiler/compiler/integers/i64/le.leo.out index c271ce463d..cdc58215c4 100644 --- a/tests/expectations/compiler/compiler/integers/i64/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/le.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 109dd9e920a3e1bd6cddad99ead2f7061810a22e1f5d0dc624c23a4f73058788 - canonicalized_ast: 109dd9e920a3e1bd6cddad99ead2f7061810a22e1f5d0dc624c23a4f73058788 - type_inferenced_ast: 242bb938c88a667b0591a25633163be323767851bbbc2867340742d5314d9a1e + initial_ast: 0cc8b97a18efb078bd2b7c2bee2e7631d0a083ece45daa941329ec19763b8181 + canonicalized_ast: 0cc8b97a18efb078bd2b7c2bee2e7631d0a083ece45daa941329ec19763b8181 + type_inferenced_ast: eba243640565380ffe415b2cfe4a2abdcdb19c0d0d1f403751850d2e058eb2fc diff --git a/tests/expectations/compiler/compiler/integers/i64/lt.leo.out b/tests/expectations/compiler/compiler/integers/i64/lt.leo.out index 79ec4271b8..ce06fd1d10 100644 --- a/tests/expectations/compiler/compiler/integers/i64/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/lt.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 027c84f3937e34053a8f35500c77fb58f751b974b73d1fa569aa935be1b25968 - canonicalized_ast: 027c84f3937e34053a8f35500c77fb58f751b974b73d1fa569aa935be1b25968 - type_inferenced_ast: 38992b9114c318fe9740fa924107c6aa52b8ca956815a4aaaf6d47e151414434 + initial_ast: 9e3ed2af071e49a800025960397ae2d5333fee559f0000af9ee0b4419a6f920c + canonicalized_ast: 9e3ed2af071e49a800025960397ae2d5333fee559f0000af9ee0b4419a6f920c + type_inferenced_ast: 5e14fe658cd961cd01024f00b47600963130f734511c28ac2a88e2433284096e diff --git a/tests/expectations/compiler/compiler/integers/i64/max.leo.out b/tests/expectations/compiler/compiler/integers/i64/max.leo.out index d29514b8f6..8eb7c50d12 100644 --- a/tests/expectations/compiler/compiler/integers/i64/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/max.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 698a82d44fbb01e2c3c65df9190bac740af75cd5425cdff9e4bbf34b1eb928c7 - canonicalized_ast: 698a82d44fbb01e2c3c65df9190bac740af75cd5425cdff9e4bbf34b1eb928c7 - type_inferenced_ast: af2a509e627e3ee3ab2f4d3a47c4c97162c510a27e4aa30bbe0ff2461f9942af + initial_ast: e2d6aeb825b3874930df4869f06158fa083e579e993eb763501b9697baf1f357 + canonicalized_ast: e2d6aeb825b3874930df4869f06158fa083e579e993eb763501b9697baf1f357 + type_inferenced_ast: f710ae7aa8fcfd5d24a8308b12f43d6cd026766019195d6b6c2a1a59ab967253 diff --git a/tests/expectations/compiler/compiler/integers/i64/min.leo.out b/tests/expectations/compiler/compiler/integers/i64/min.leo.out index bf3f3fcc4c..66ecb017a3 100644 --- a/tests/expectations/compiler/compiler/integers/i64/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/min.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 662b9ccc5756661ad9a5433665c235452e5602af433d5174a9a7d35575d58e50 - canonicalized_ast: 662b9ccc5756661ad9a5433665c235452e5602af433d5174a9a7d35575d58e50 - type_inferenced_ast: 1cca602cda64194082da2aeda13e806abfd1dec6f2f6e33b8f59e684a7f8a9f6 + initial_ast: 4e494a93f55d05a995e91a89ccfc91fad59fdec2591a450c86ccef6be8bbe8c2 + canonicalized_ast: 4e494a93f55d05a995e91a89ccfc91fad59fdec2591a450c86ccef6be8bbe8c2 + type_inferenced_ast: f83643f132cef898952fd3881dbebd34bdc6bc985c8c51c21444786185850dda diff --git a/tests/expectations/compiler/compiler/integers/i64/mul.leo.out b/tests/expectations/compiler/compiler/integers/i64/mul.leo.out index 15a2dcf5e2..cd32086493 100644 --- a/tests/expectations/compiler/compiler/integers/i64/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/mul.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 56e7098f4df6632cd2182397b87055079912107712b141e5752c733fd205ea5d - canonicalized_ast: 56e7098f4df6632cd2182397b87055079912107712b141e5752c733fd205ea5d - type_inferenced_ast: 46df0d390bd68d1309e24be5d7a442884a6d7b1f001649d0ebc529c31d4850b6 + initial_ast: 3bbc44a1b7f01881acadbcd6d894866fa9ed3c59396a57a00daf5cba1ba876ef + canonicalized_ast: 3bbc44a1b7f01881acadbcd6d894866fa9ed3c59396a57a00daf5cba1ba876ef + type_inferenced_ast: 5e5a00fe1293154a9fe59b4e9cd5aa3f534ba8ee0ea6a008af3c4d1581ec55ef diff --git a/tests/expectations/compiler/compiler/integers/i64/ne.leo.out b/tests/expectations/compiler/compiler/integers/i64/ne.leo.out index 005bee81b4..e97c90e28c 100644 --- a/tests/expectations/compiler/compiler/integers/i64/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/ne.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 2779d7555674b1de843b11ac9833276fb3e0de2bae1f8274b4a99a0266c19503 - canonicalized_ast: 2779d7555674b1de843b11ac9833276fb3e0de2bae1f8274b4a99a0266c19503 - type_inferenced_ast: c3ea20c697a684a34398cba8339ea16083aac06fbf780864301053e4f9b4b6ae + initial_ast: fd372935c57e3b86ed7129f416049611bfd61aab5a1e758e2ad822900d707f20 + canonicalized_ast: fd372935c57e3b86ed7129f416049611bfd61aab5a1e758e2ad822900d707f20 + type_inferenced_ast: a0a016da3010338983bec3d55e4c94235b086f95ef0b56d26590c6f5ed960786 diff --git a/tests/expectations/compiler/compiler/integers/i64/negate.leo.out b/tests/expectations/compiler/compiler/integers/i64/negate.leo.out index 7be1dbf0cb..fd435b1852 100644 --- a/tests/expectations/compiler/compiler/integers/i64/negate.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/negate.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 928bb21b0da55474b51aa036c31fabe00ba68f3ff051159871a99493503edcb8 - canonicalized_ast: 928bb21b0da55474b51aa036c31fabe00ba68f3ff051159871a99493503edcb8 - type_inferenced_ast: 5e9aea6325f193622ecd68c7c7c7c05864d05b37b0b122432119243939153f49 + initial_ast: 8ee56c3231d8e560ab6f6a3dae0171574e19ec5216cf30d0cda89f3a0cab90d9 + canonicalized_ast: 8ee56c3231d8e560ab6f6a3dae0171574e19ec5216cf30d0cda89f3a0cab90d9 + type_inferenced_ast: 1c15a351f8c97ddcea85e4c801bdf1d404fec0c7ffc33418d91a281386a644df diff --git a/tests/expectations/compiler/compiler/integers/i64/negate_min.leo.out b/tests/expectations/compiler/compiler/integers/i64/negate_min.leo.out index 0668d81c84..d8734bb928 100644 --- a/tests/expectations/compiler/compiler/integers/i64/negate_min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/negate_min.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: ee7f236b8d5e51c8c5556c877e94997c90a7ba0f0a0924a6786392b6a22973b6 - canonicalized_ast: ee7f236b8d5e51c8c5556c877e94997c90a7ba0f0a0924a6786392b6a22973b6 - type_inferenced_ast: 0bc182c9db0fbccb9c54bf5ec2a6c3f423337ea005d34473fb86b66cd99e468e + initial_ast: 6deec000571afa23c066c2a3931468d7ed3e9bcb69e5322a8b99cd523beac2a2 + canonicalized_ast: 6deec000571afa23c066c2a3931468d7ed3e9bcb69e5322a8b99cd523beac2a2 + type_inferenced_ast: 806d1130f86aca58a3fe5b9cf34ebb901c54f358c70543cd50bc6e084f17c877 diff --git a/tests/expectations/compiler/compiler/integers/i64/negate_zero.leo.out b/tests/expectations/compiler/compiler/integers/i64/negate_zero.leo.out index bb918efa64..f86b09048a 100644 --- a/tests/expectations/compiler/compiler/integers/i64/negate_zero.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/negate_zero.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 6f0d090c229a40a04a66af7d209216fd828b723e1ffc030e213a3e15e8994833 - canonicalized_ast: 6f0d090c229a40a04a66af7d209216fd828b723e1ffc030e213a3e15e8994833 - type_inferenced_ast: 1b3b58589e816ac7a563f0c1b64cd890f2074440fb82a15240c1dac4a4f1ebfc + initial_ast: 5679ed50a7a7ed7f1ab6a1d942ce24191fd29a6030daa5edf945e83879fdd6d9 + canonicalized_ast: 5679ed50a7a7ed7f1ab6a1d942ce24191fd29a6030daa5edf945e83879fdd6d9 + type_inferenced_ast: c93b0a2aa90366daf46f8fee9c13e8d83962222e14ac4aa844b229c5f467e12c diff --git a/tests/expectations/compiler/compiler/integers/i64/sub.leo.out b/tests/expectations/compiler/compiler/integers/i64/sub.leo.out index 154c393b2e..621938508a 100644 --- a/tests/expectations/compiler/compiler/integers/i64/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/sub.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 5912057d08a97f306a50eee0b5fc41b703ac08625a2a52948f2efe1fd88e9e22 - canonicalized_ast: 5912057d08a97f306a50eee0b5fc41b703ac08625a2a52948f2efe1fd88e9e22 - type_inferenced_ast: a8402fdcd9a7806c0abb5a5f251d843cbdaa78a9c8b3a4732caff52e91ebb405 + initial_ast: 9037d67a80b33da1f5ae77c7a29d0af5c8db3b5e7bcfac6793166acb65c500dc + canonicalized_ast: 9037d67a80b33da1f5ae77c7a29d0af5c8db3b5e7bcfac6793166acb65c500dc + type_inferenced_ast: 6deffd2dc3870849f06ffc0e2475931663d37e5137e4f41f4b0654b752c7e19f diff --git a/tests/expectations/compiler/compiler/integers/i64/ternary.leo.out b/tests/expectations/compiler/compiler/integers/i64/ternary.leo.out index 9161f1403d..5732e45ebe 100644 --- a/tests/expectations/compiler/compiler/integers/i64/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/ternary.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 855c17c617a81e8c5b10eba1f7eecd695209bf976a80eea338263afa18916800 - canonicalized_ast: 855c17c617a81e8c5b10eba1f7eecd695209bf976a80eea338263afa18916800 - type_inferenced_ast: 4fa3ab3a8fc73e4d758fa6cfbe3417a71135b5073328d1227bcd8695d61880a3 + initial_ast: e14c37158974d8f108e5fd14e798ad1932f9f5c2996dc0179423ce32b7e87aac + canonicalized_ast: e14c37158974d8f108e5fd14e798ad1932f9f5c2996dc0179423ce32b7e87aac + type_inferenced_ast: 40d390225e762348d072fb46f81a57f35e117a0827701f83e52ef14bf4edbd00 diff --git a/tests/expectations/compiler/compiler/integers/i8/add.leo.out b/tests/expectations/compiler/compiler/integers/i8/add.leo.out index 54f2b7ab59..536c64ce09 100644 --- a/tests/expectations/compiler/compiler/integers/i8/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/add.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 24eace7d2b0f99fb7a1a0d1d5089047c0805945d98d55e27fe2794cf68b46a9a - canonicalized_ast: 24eace7d2b0f99fb7a1a0d1d5089047c0805945d98d55e27fe2794cf68b46a9a - type_inferenced_ast: f3aa44fe027d17b02b2751d91483ed27a14039fdf523952236b89c345d2359fa + initial_ast: 03abb91b9b5fd679775bb9898ffc6fdd80db136c1cf61e3676760a90c673691d + canonicalized_ast: 03abb91b9b5fd679775bb9898ffc6fdd80db136c1cf61e3676760a90c673691d + type_inferenced_ast: f1defb3b6cedd0f81a7b7b95cfeab974445db3e9c6667864293e7cd0f42919e1 diff --git a/tests/expectations/compiler/compiler/integers/i8/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/i8/console_assert.leo.out index ce2b929fbd..924579e3c9 100644 --- a/tests/expectations/compiler/compiler/integers/i8/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/console_assert.leo.out @@ -13,6 +13,6 @@ outputs: - input_file: i8.in output: registers: {} - initial_ast: a579aa5a1bc5185d4dc4e8d463edc176d1fbf8d2761f64f276c2bc89ea57a8e7 - canonicalized_ast: 852adf503c72cc27c6555b37f6742c195f9c5b9dc837734954caec31b519a85d - type_inferenced_ast: 9a3ebea7ab65abf6dc23811657dbdae791bf72cc5b28ccbc7dc4e89515d97463 + initial_ast: 563e73d37eb34f862f8a2ba022712de63ce4b128f11a1ca95190e12406d9a691 + canonicalized_ast: dcd71e3aa1d17917027474135e3063600603963ffae4b67c2ea19f29f7e82a04 + type_inferenced_ast: 77dd4a7149f281d27dabf27255eb448c8230ed3beffeb21d30420ad8a5a66d63 diff --git a/tests/expectations/compiler/compiler/integers/i8/div.leo.out b/tests/expectations/compiler/compiler/integers/i8/div.leo.out index 30061983a5..d685eae49e 100644 --- a/tests/expectations/compiler/compiler/integers/i8/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/div.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 2ad50f87d6336c8436def71a47ed317220eadf07ef90717be8ef2567c60913f9 - canonicalized_ast: 2ad50f87d6336c8436def71a47ed317220eadf07ef90717be8ef2567c60913f9 - type_inferenced_ast: a818fdc8b79bc6b68364a686a6b17b6167fcbdd5d4a80123419cabfa526f46aa + initial_ast: 8f8dedc9afb8ccf7cc795b498debab5e8d91f0f843e42fd879d41d69ef34f761 + canonicalized_ast: 8f8dedc9afb8ccf7cc795b498debab5e8d91f0f843e42fd879d41d69ef34f761 + type_inferenced_ast: 2ed36192a93a23d1a2902d0f81c157ee52f6743da7c857e8ca823ca853de7bd6 diff --git a/tests/expectations/compiler/compiler/integers/i8/eq.leo.out b/tests/expectations/compiler/compiler/integers/i8/eq.leo.out index 06cc6873e4..e70100770c 100644 --- a/tests/expectations/compiler/compiler/integers/i8/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/eq.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 0bbca11747587a18929d2c86d2539ae9d8d8abf7763fec5588e86c36e0108cec - canonicalized_ast: 0bbca11747587a18929d2c86d2539ae9d8d8abf7763fec5588e86c36e0108cec - type_inferenced_ast: 970b354c05d483629a9127d4499eebcec400b1dd6eced44eb07fceabcb51a42a + initial_ast: 00436aa2bdee5663abd3f9725ac5a67fd79aa302a84f4fe4e26d2c476e743aee + canonicalized_ast: 00436aa2bdee5663abd3f9725ac5a67fd79aa302a84f4fe4e26d2c476e743aee + type_inferenced_ast: 2b76542525989ed3b4ac13c4b38d987b99a050ee7540b202c5916964f722f39f diff --git a/tests/expectations/compiler/compiler/integers/i8/ge.leo.out b/tests/expectations/compiler/compiler/integers/i8/ge.leo.out index 80468ae674..6585a2b939 100644 --- a/tests/expectations/compiler/compiler/integers/i8/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/ge.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: be98a456d3f1a866fbb1793db4a6da15b6c23e5bcfe1ea820808c50df523d269 - canonicalized_ast: be98a456d3f1a866fbb1793db4a6da15b6c23e5bcfe1ea820808c50df523d269 - type_inferenced_ast: 6291f19c100f11c11cee46c98a7ed78de16f2bd8527bdb2926cc7c0e7212b084 + initial_ast: 990b0a7a061f5432965367871993fa98cdf83373a69682fa2444cc52d7327069 + canonicalized_ast: 990b0a7a061f5432965367871993fa98cdf83373a69682fa2444cc52d7327069 + type_inferenced_ast: 4920f0e45b73d43529d067fd2f2c0b3ee5713a9360f58d4f8ef68efde17613db diff --git a/tests/expectations/compiler/compiler/integers/i8/gt.leo.out b/tests/expectations/compiler/compiler/integers/i8/gt.leo.out index 7622e185fb..b854fc9b27 100644 --- a/tests/expectations/compiler/compiler/integers/i8/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/gt.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 7f40bef3810a98a6069ee9f27d91902b8c21779e27790fd44d80e6b798e26214 - canonicalized_ast: 7f40bef3810a98a6069ee9f27d91902b8c21779e27790fd44d80e6b798e26214 - type_inferenced_ast: c83944355f670629d6cefc4e35dc52b86d5f42a6b6f4b20e0e6b712b661d5261 + initial_ast: 6580d2762f944bbcf73e69c371ee05a96e69e708a6397dce07cf68dbe984e1ff + canonicalized_ast: 6580d2762f944bbcf73e69c371ee05a96e69e708a6397dce07cf68dbe984e1ff + type_inferenced_ast: 79aada4a751c922cde858c31664deb51420e7236770729a6b954f436fe6518ba diff --git a/tests/expectations/compiler/compiler/integers/i8/le.leo.out b/tests/expectations/compiler/compiler/integers/i8/le.leo.out index 6a040c562f..e8adb81228 100644 --- a/tests/expectations/compiler/compiler/integers/i8/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/le.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 57bdf9ca35c48812e16a9d4cb6531c96a625ed9995804ed4b8b31edc1837c124 - canonicalized_ast: 57bdf9ca35c48812e16a9d4cb6531c96a625ed9995804ed4b8b31edc1837c124 - type_inferenced_ast: 6fe044c68d21ad1379c1a74967a420cf0ffa182785d294bdabe75b624b9dad6d + initial_ast: 227a6821696967ec327032ca376e2a1535513c264f6cdc77935da9082b3ae829 + canonicalized_ast: 227a6821696967ec327032ca376e2a1535513c264f6cdc77935da9082b3ae829 + type_inferenced_ast: a0db98f872904d19812e1dea13b1fa545fdaaf62fdfd55dc61eba543b1528de5 diff --git a/tests/expectations/compiler/compiler/integers/i8/lt.leo.out b/tests/expectations/compiler/compiler/integers/i8/lt.leo.out index 03bab656d2..d9b903c42c 100644 --- a/tests/expectations/compiler/compiler/integers/i8/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/lt.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: bb0cf928abcdf4b3492dd75699a6726f11600b55021bc56b4fd45f6fd3df4b54 - canonicalized_ast: bb0cf928abcdf4b3492dd75699a6726f11600b55021bc56b4fd45f6fd3df4b54 - type_inferenced_ast: 5b41154e37f1f4976f75493b49cef9b8d0b2b2ca1a7f42b586e1390c0767bb5e + initial_ast: 0a92bdd56f315cf3e5bd49ba178995f2408f6ac26ec8389acbff79f75ec9987f + canonicalized_ast: 0a92bdd56f315cf3e5bd49ba178995f2408f6ac26ec8389acbff79f75ec9987f + type_inferenced_ast: 5575f689ce5d3e63ea05c159232a48b180b073ea9a1624191d65bf5fa5524dce diff --git a/tests/expectations/compiler/compiler/integers/i8/max.leo.out b/tests/expectations/compiler/compiler/integers/i8/max.leo.out index 83bb3b0bf9..f50c3bbde6 100644 --- a/tests/expectations/compiler/compiler/integers/i8/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/max.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 5b36c3f9e174c3e003993e13992f35b1b2b381bb600999205fcb6099b56b521e - canonicalized_ast: 5b36c3f9e174c3e003993e13992f35b1b2b381bb600999205fcb6099b56b521e - type_inferenced_ast: 8175e64b383fb53a548b58cc463e2edd55a87d133fa60246b794dde5b9119ef6 + initial_ast: 25e7d0d30e781463bb5b95c3161cc6305fdb5bfe421489988a7cef76c27f9937 + canonicalized_ast: 25e7d0d30e781463bb5b95c3161cc6305fdb5bfe421489988a7cef76c27f9937 + type_inferenced_ast: 62efb6a42bea2b21af94c1bd9f16c0dacbb3d94d62964b18b92cd41fa0bd83df diff --git a/tests/expectations/compiler/compiler/integers/i8/min.leo.out b/tests/expectations/compiler/compiler/integers/i8/min.leo.out index ac027570ba..c34b18b7fa 100644 --- a/tests/expectations/compiler/compiler/integers/i8/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/min.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 09df9882f6b902d6148316917e8ed9e62408e85c2248e111f87cbb505f7705fd - canonicalized_ast: 09df9882f6b902d6148316917e8ed9e62408e85c2248e111f87cbb505f7705fd - type_inferenced_ast: dbe09fecd41cbf9d4027140464ce6e87e57f4ee32f60dd1272a5cec82d088a1c + initial_ast: d9d99a5a68f5a5d514408205bc6e605e1426e554fc2e7dc2fe58a628284495b2 + canonicalized_ast: d9d99a5a68f5a5d514408205bc6e605e1426e554fc2e7dc2fe58a628284495b2 + type_inferenced_ast: eeb312bfef9e872c6b4507dcfb1cc4a9768b98e1242f72688e542cdb211671fb diff --git a/tests/expectations/compiler/compiler/integers/i8/mul.leo.out b/tests/expectations/compiler/compiler/integers/i8/mul.leo.out index 920fc6a184..f5b0ae431a 100644 --- a/tests/expectations/compiler/compiler/integers/i8/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/mul.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: ad9b97cdc654da8d5c850e7d79b38f26dae3fcb90711c18a0c3b34df60349c7e - canonicalized_ast: ad9b97cdc654da8d5c850e7d79b38f26dae3fcb90711c18a0c3b34df60349c7e - type_inferenced_ast: de1670f9a5fc69c24fdd5607d6789af9d5a59e6f87f170857d8c29f3414013e5 + initial_ast: af68b638aa0a1d52ca6e81445822106602c1257045abe1141c547849c8bce988 + canonicalized_ast: af68b638aa0a1d52ca6e81445822106602c1257045abe1141c547849c8bce988 + type_inferenced_ast: 0aa3e4958301c364370a1fe5ea519a6b60689c8d5d76a5cfecb013a9a00deca3 diff --git a/tests/expectations/compiler/compiler/integers/i8/ne.leo.out b/tests/expectations/compiler/compiler/integers/i8/ne.leo.out index 0ebf7ad3d3..2501744a22 100644 --- a/tests/expectations/compiler/compiler/integers/i8/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/ne.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 3c2884711728384eb34c61e005682c6480d1b3b67454e4e02f0619c48b7917cf - canonicalized_ast: 3c2884711728384eb34c61e005682c6480d1b3b67454e4e02f0619c48b7917cf - type_inferenced_ast: 87d9a9b58227a323ea9a5989da2432756fc77766e1515896bea03fe7a504f54d + initial_ast: 17fc07482f194dad40e690f5530568186aaef49e968a94ee4b9852e11e60072d + canonicalized_ast: 17fc07482f194dad40e690f5530568186aaef49e968a94ee4b9852e11e60072d + type_inferenced_ast: 7c7c88bdbe33f1697af94d955e89b2e33147f7d90cab39781c2a6de61a7b7ca1 diff --git a/tests/expectations/compiler/compiler/integers/i8/negate.leo.out b/tests/expectations/compiler/compiler/integers/i8/negate.leo.out index 2da8a458dd..981dddd021 100644 --- a/tests/expectations/compiler/compiler/integers/i8/negate.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/negate.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 2698a8d7153a02a13dfb9450652465cae7b807f53ed1b1429eaecfb888300334 - canonicalized_ast: 2698a8d7153a02a13dfb9450652465cae7b807f53ed1b1429eaecfb888300334 - type_inferenced_ast: fe061e3467bfcabc7a36ea290be2f04aff27efa6dae8e1164bd03ce1af8664c1 + initial_ast: f86abf581e24bd0b1bda4e24718e3a9da7d17c4e8248ee9be1ca1e71bd05855a + canonicalized_ast: f86abf581e24bd0b1bda4e24718e3a9da7d17c4e8248ee9be1ca1e71bd05855a + type_inferenced_ast: 1cb290d220e8d58a4f5b4f2122ad8684ae7ecf78314cbb8755fea46aa6a158b2 diff --git a/tests/expectations/compiler/compiler/integers/i8/negate_zero.leo.out b/tests/expectations/compiler/compiler/integers/i8/negate_zero.leo.out index d531809f95..4f519f59d3 100644 --- a/tests/expectations/compiler/compiler/integers/i8/negate_zero.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/negate_zero.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: da89fb90b63ff44da71f20bd1a95b5a14385f254e267463b9ecb17ccc5d8e643 - canonicalized_ast: da89fb90b63ff44da71f20bd1a95b5a14385f254e267463b9ecb17ccc5d8e643 - type_inferenced_ast: 077f62f984727186f23fdcbb13bc800ba6e6aaf667ebb578e014c2971b1f0389 + initial_ast: 23002c8eab7438ce4a9a35d388536767e8ed8b83b019d756a4065e8f9e90090c + canonicalized_ast: 23002c8eab7438ce4a9a35d388536767e8ed8b83b019d756a4065e8f9e90090c + type_inferenced_ast: 875a3b4d1f341aab98aac5acba238576242129c69479c6a4c4c24485e690e5d8 diff --git a/tests/expectations/compiler/compiler/integers/i8/sub.leo.out b/tests/expectations/compiler/compiler/integers/i8/sub.leo.out index d34883de25..93942ccd19 100644 --- a/tests/expectations/compiler/compiler/integers/i8/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/sub.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 59c47c65fa77729fdb64f325d9498a52b13e57f92e57f64c0b65f32a81b5d0b5 - canonicalized_ast: 59c47c65fa77729fdb64f325d9498a52b13e57f92e57f64c0b65f32a81b5d0b5 - type_inferenced_ast: 46fbeb4b3b044958e67d0ae0b89a149729a982b9c02fc9e0892bc907c93b3b5b + initial_ast: b48b706ace1cdb4e11fd9297d062646ea06eed8ae53fd8ce6e7a52d5f28a9a1e + canonicalized_ast: b48b706ace1cdb4e11fd9297d062646ea06eed8ae53fd8ce6e7a52d5f28a9a1e + type_inferenced_ast: 568f43a697e38a57740ae0b851641fe7db2ca8c7bd1a3306abb3f911bf8b9baf diff --git a/tests/expectations/compiler/compiler/integers/i8/ternary.leo.out b/tests/expectations/compiler/compiler/integers/i8/ternary.leo.out index d8f0274229..b278447991 100644 --- a/tests/expectations/compiler/compiler/integers/i8/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/ternary.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 807f6d204c511da0de8677fec27d64b461d505be3f756a5cf2430c4e5fe16d6d - canonicalized_ast: 807f6d204c511da0de8677fec27d64b461d505be3f756a5cf2430c4e5fe16d6d - type_inferenced_ast: 90970cdd4a45182dac1861ed3cd4ce397f3d0117c596b8ed388b98a28e4718ca + initial_ast: 7ece294857f694a972ec04ad5bff2442b29d1fae512dfed73ffe3f7ae3318869 + canonicalized_ast: 7ece294857f694a972ec04ad5bff2442b29d1fae512dfed73ffe3f7ae3318869 + type_inferenced_ast: 528359e44c48a02b8b81b91e805ae47a8b18e323e71cbc87408e62b255ca5e8d diff --git a/tests/expectations/compiler/compiler/integers/u128/add.leo.out b/tests/expectations/compiler/compiler/integers/u128/add.leo.out index 661fd1b9a7..e49f57c943 100644 --- a/tests/expectations/compiler/compiler/integers/u128/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/add.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: d45e6866a79c28636a5333b057f577ddb9af3528c72cfb0292d6cb30e9a84c34 - canonicalized_ast: d45e6866a79c28636a5333b057f577ddb9af3528c72cfb0292d6cb30e9a84c34 - type_inferenced_ast: d5500f11415075486f76f4f88a98f48f89ba30b9c7829527481004f05563be56 + initial_ast: fe567609ec0ee635d21cd1a1ba79fa2375f5e621c5ba2bbe9a1d80a84d2b8958 + canonicalized_ast: fe567609ec0ee635d21cd1a1ba79fa2375f5e621c5ba2bbe9a1d80a84d2b8958 + type_inferenced_ast: 020e42ad9c63628d0ef78d6d9dfdc1d700515b794d7166ae837833a4f8c48fd0 diff --git a/tests/expectations/compiler/compiler/integers/u128/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/u128/console_assert.leo.out index ffdc4b659c..d5443bdaef 100644 --- a/tests/expectations/compiler/compiler/integers/u128/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/console_assert.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: a50e90edf35c1c2d69c6ab04a5024c951caf54e37677cba8aed3e5f653ffcf5e - canonicalized_ast: a50e90edf35c1c2d69c6ab04a5024c951caf54e37677cba8aed3e5f653ffcf5e - type_inferenced_ast: 62efd6e15269c60fd45fbd873fc2a120ea98ba0a9bf96d774eb85847c36d482e + initial_ast: b2bd9e6bc99154e37c1eee5e8f4c13dddfcd427410a286ae9e100ea77eba9cf7 + canonicalized_ast: b2bd9e6bc99154e37c1eee5e8f4c13dddfcd427410a286ae9e100ea77eba9cf7 + type_inferenced_ast: 6a075c36725495700c1fdc78fab877419a3ebc1ec470e2b11d6138ffaf626e0b diff --git a/tests/expectations/compiler/compiler/integers/u128/div.leo.out b/tests/expectations/compiler/compiler/integers/u128/div.leo.out index 28ed9ea4e8..dabdbf2a84 100644 --- a/tests/expectations/compiler/compiler/integers/u128/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/div.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: f50f65ba74e0e2c2cf146d66f83beb18023692e90b664e0217a19486b9b5fd67 - canonicalized_ast: f50f65ba74e0e2c2cf146d66f83beb18023692e90b664e0217a19486b9b5fd67 - type_inferenced_ast: d851da0f7cf5b7dacc0186f963b33564fde73427d10b84d13635923d12998963 + initial_ast: aba286166cd3b380bdbb4ca3b10f8fed86b6a8bcfa0dc2a5d098d0e2b654cdd6 + canonicalized_ast: aba286166cd3b380bdbb4ca3b10f8fed86b6a8bcfa0dc2a5d098d0e2b654cdd6 + type_inferenced_ast: 6b652bb32bbb2eaf78d118683a51a5fcf7efb1da857347ae653e7d6032ba43b8 diff --git a/tests/expectations/compiler/compiler/integers/u128/eq.leo.out b/tests/expectations/compiler/compiler/integers/u128/eq.leo.out index 6cf593d4e7..a0b3b7384a 100644 --- a/tests/expectations/compiler/compiler/integers/u128/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/eq.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 36db0f375d215a56d167d6c59144fd514489118b82f59b7811a2afcea361443d - canonicalized_ast: 36db0f375d215a56d167d6c59144fd514489118b82f59b7811a2afcea361443d - type_inferenced_ast: 56e5d5ba650e0c0f4faad326e60c727b6af636ca72d15f949df28cd1966b1a6e + initial_ast: e8c09b425ef479076a22b423ce8fa547ad6829174f4c88ad86112f272164dc01 + canonicalized_ast: e8c09b425ef479076a22b423ce8fa547ad6829174f4c88ad86112f272164dc01 + type_inferenced_ast: 1aad0e51263bcac3073431b7c045592e2955b3c8331f1903bb2ce44553c280a2 diff --git a/tests/expectations/compiler/compiler/integers/u128/ge.leo.out b/tests/expectations/compiler/compiler/integers/u128/ge.leo.out index 852abf0857..892eeb96b1 100644 --- a/tests/expectations/compiler/compiler/integers/u128/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/ge.leo.out @@ -28,6 +28,6 @@ outputs: r0: type: bool value: "true" - initial_ast: c398a4f1f04fc9ebe97c65cb33c26ac5faf161417493db8bd8c50f0c0da7fad6 - canonicalized_ast: c398a4f1f04fc9ebe97c65cb33c26ac5faf161417493db8bd8c50f0c0da7fad6 - type_inferenced_ast: f5052bd40c74aee7da886eb480ccbb24136ee7d2fed1c70d5e8d38e819a9a697 + initial_ast: 6b79b1e4adea96ee82d19853a98f39c3e7b5cdbd043457e7cfba88c7c4fb47b1 + canonicalized_ast: 6b79b1e4adea96ee82d19853a98f39c3e7b5cdbd043457e7cfba88c7c4fb47b1 + type_inferenced_ast: 3fb57a72a3d0d62abf08d9aee73652c7e264a69e36812b2dc741370b53e386eb diff --git a/tests/expectations/compiler/compiler/integers/u128/gt.leo.out b/tests/expectations/compiler/compiler/integers/u128/gt.leo.out index 2d45d8a801..ad566d770f 100644 --- a/tests/expectations/compiler/compiler/integers/u128/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/gt.leo.out @@ -16,6 +16,6 @@ outputs: - input_file: u128_f.in output: registers: {} - initial_ast: 8c2309bdacd6b025d2462e08376db93e25406d164abc8955e039a338a0a58c00 - canonicalized_ast: 7bec6018459ad543c408f4f911200b81dc05f855ef680a3b12c6b8f58558f216 - type_inferenced_ast: d495e9868687b702dc07201da22b59dfd91212f2d6632e67f0a967b0fc748995 + initial_ast: dcd89e09aa062ee35b00b58bb51e23c8d0316737e9c54fcd5e07d81414f1bafe + canonicalized_ast: 099ace0a1b90c06fceb549acea884d3b0bc4426ff1fe5c926d7018c7b5399713 + type_inferenced_ast: 1b885f2c6093c3f22216f8d718d9cd1ed7ad1883140623917344520558de08b7 diff --git a/tests/expectations/compiler/compiler/integers/u128/input.leo.out b/tests/expectations/compiler/compiler/integers/u128/input.leo.out index fa5c449606..d1241ea29a 100644 --- a/tests/expectations/compiler/compiler/integers/u128/input.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/input.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 564026493df81fbcbea34b98737e3aade0b3a0a410f19534c61b8132b2796a58 - canonicalized_ast: 564026493df81fbcbea34b98737e3aade0b3a0a410f19534c61b8132b2796a58 - type_inferenced_ast: c64ae9e0e4aefcc4897de172b9107ab0a824b49dbd1e678d88ae15a33c85ce41 + initial_ast: e2d09b206478dd800312afca22ff247abb8ea46014aac2bfd6e4761ffd4f8d9b + canonicalized_ast: e2d09b206478dd800312afca22ff247abb8ea46014aac2bfd6e4761ffd4f8d9b + type_inferenced_ast: 9ea1c092a8ddced73f80cdf4aa8743e4cfd632291921e9b8ccacc12041127763 diff --git a/tests/expectations/compiler/compiler/integers/u128/le.leo.out b/tests/expectations/compiler/compiler/integers/u128/le.leo.out index 173211016b..06384bc0b6 100644 --- a/tests/expectations/compiler/compiler/integers/u128/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/le.leo.out @@ -28,6 +28,6 @@ outputs: r0: type: bool value: "false" - initial_ast: 07514fbeb1b81b4c2c99555ab2b7402b71997838ab48cf8a00c859441a93bfaa - canonicalized_ast: 07514fbeb1b81b4c2c99555ab2b7402b71997838ab48cf8a00c859441a93bfaa - type_inferenced_ast: b3aad22da78779bbc4982cc8ee42b1d68ffc77cdea0000d31f8ec23710f088b5 + initial_ast: ebf9b66f8d0bb28e5da8d9abc664f49750ce7be8b8602bff34abd2f7637e84bc + canonicalized_ast: ebf9b66f8d0bb28e5da8d9abc664f49750ce7be8b8602bff34abd2f7637e84bc + type_inferenced_ast: 67e6bfa690f71aa50956375169cafd0cd9de325e6a48a25255b5c7ac6e7c8bf4 diff --git a/tests/expectations/compiler/compiler/integers/u128/lt.leo.out b/tests/expectations/compiler/compiler/integers/u128/lt.leo.out index d5da5718d7..eaa00972ed 100644 --- a/tests/expectations/compiler/compiler/integers/u128/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/lt.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "false" - initial_ast: 6cc9a99c85b53360a020faa95b45beda98089442160343df3c0b5705430a8d0d - canonicalized_ast: 6cc9a99c85b53360a020faa95b45beda98089442160343df3c0b5705430a8d0d - type_inferenced_ast: 63fcd7cf6ba3b36bbeed4bd7a234502a427b93289f0253693226692fe7dd457b + initial_ast: 666249d417516ecca2153f4d6ca2ff6abfb842542920e899cf8e435f7c6da73a + canonicalized_ast: 666249d417516ecca2153f4d6ca2ff6abfb842542920e899cf8e435f7c6da73a + type_inferenced_ast: a8c70e3d1db9b8cd3cd0de5fc0d042ccf9800878c43bfdff0bc05c16d91b2462 diff --git a/tests/expectations/compiler/compiler/integers/u128/max.leo.out b/tests/expectations/compiler/compiler/integers/u128/max.leo.out index a7a86662e4..cf0b0e393a 100644 --- a/tests/expectations/compiler/compiler/integers/u128/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/max.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 22e031b9484b25549efe77735034b7868fe15cb482fb2b9866c4eb6a97d66a9b - canonicalized_ast: 22e031b9484b25549efe77735034b7868fe15cb482fb2b9866c4eb6a97d66a9b - type_inferenced_ast: 1a18559f37943d7863243f97f204a7967bd5ca421cf614db3a454eb62570fa55 + initial_ast: 61b3183a8f258e9803da2549ecb69c68044b89b761eccc039a04570db7e1ed91 + canonicalized_ast: 61b3183a8f258e9803da2549ecb69c68044b89b761eccc039a04570db7e1ed91 + type_inferenced_ast: 10130f28b069d75d40df1c0cf198139aa86c7b6187cd9aa2326f9e7c40ab8a0f diff --git a/tests/expectations/compiler/compiler/integers/u128/min.leo.out b/tests/expectations/compiler/compiler/integers/u128/min.leo.out index 954a505ee5..5828836c24 100644 --- a/tests/expectations/compiler/compiler/integers/u128/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/min.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 2e69e9af36727a547e5494e3c77f80a55c18daf0d13398df6c2101a76264d695 - canonicalized_ast: 2e69e9af36727a547e5494e3c77f80a55c18daf0d13398df6c2101a76264d695 - type_inferenced_ast: 4586f887e2d6d10833c6f556c1e6a0a3c53d3da89f1e0659967e6da60692106f + initial_ast: 880411caefc9b28a124fe351589e5ce4fb33536869cbe7ef452adc710f199fa8 + canonicalized_ast: 880411caefc9b28a124fe351589e5ce4fb33536869cbe7ef452adc710f199fa8 + type_inferenced_ast: d1b01670488ba52d693f049ba422c64ca332f32b6941840c322db2ab1515d93d diff --git a/tests/expectations/compiler/compiler/integers/u128/mul.leo.out b/tests/expectations/compiler/compiler/integers/u128/mul.leo.out index a081b7d925..d74fd91081 100644 --- a/tests/expectations/compiler/compiler/integers/u128/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/mul.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "false" - initial_ast: 21a49e719d3cf8ef9c34775b584b8ef46213f5c4df384f0780d8233eb9f8c09c - canonicalized_ast: 21a49e719d3cf8ef9c34775b584b8ef46213f5c4df384f0780d8233eb9f8c09c - type_inferenced_ast: af6b3537bf7508bd97b7049bb76df13456dac4d4bdb526cba43aba952f9da9ae + initial_ast: a440dd468128a87613b72eba073c62aab90fd57a4341d01435ae64bcb80b7a69 + canonicalized_ast: a440dd468128a87613b72eba073c62aab90fd57a4341d01435ae64bcb80b7a69 + type_inferenced_ast: 744fe06d570fe2961da52b3cf7bab14c0698478012e01ecc130414b1b00edb1f diff --git a/tests/expectations/compiler/compiler/integers/u128/ne.leo.out b/tests/expectations/compiler/compiler/integers/u128/ne.leo.out index 8cefcf3a09..25a5f225ee 100644 --- a/tests/expectations/compiler/compiler/integers/u128/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/ne.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: a4b0739663c4139b5c69cb65fa2ee4128018162fa2cdb6e3c32e1a72077a0bfb - canonicalized_ast: a4b0739663c4139b5c69cb65fa2ee4128018162fa2cdb6e3c32e1a72077a0bfb - type_inferenced_ast: a71ceabdc2095ad95f9ad70d5272e2d3909774b7f72c1cef5f5ad15013f0763d + initial_ast: 0c784a865d913f926dabc2d843d7268dbf8b8f1a3ed110dfdcab986e2c0755ca + canonicalized_ast: 0c784a865d913f926dabc2d843d7268dbf8b8f1a3ed110dfdcab986e2c0755ca + type_inferenced_ast: f8aa6597e9bd71db4aa5c12c4cca6225339b769f0296ca4bd94be94fccb43502 diff --git a/tests/expectations/compiler/compiler/integers/u128/sub.leo.out b/tests/expectations/compiler/compiler/integers/u128/sub.leo.out index 9d816dc7ad..5a4e130b53 100644 --- a/tests/expectations/compiler/compiler/integers/u128/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/sub.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: ab2437dbf56e0d28c7b0d370e95fa38d326cdcff9f8cc1f016c8b5ad317d38ce - canonicalized_ast: ab2437dbf56e0d28c7b0d370e95fa38d326cdcff9f8cc1f016c8b5ad317d38ce - type_inferenced_ast: 46fab75c453ebe6ce6ba360a8b5d82e1d6d89799b4a280a27772d66a450bde9f + initial_ast: 243f793f61ca54672961816f4d771108cdd5dc2db37a555f28b12e40ca4fb72a + canonicalized_ast: 243f793f61ca54672961816f4d771108cdd5dc2db37a555f28b12e40ca4fb72a + type_inferenced_ast: 1f781a44e5883f5b455f4ea2eade31c8fcdd8e7db7437ead2963779457678f97 diff --git a/tests/expectations/compiler/compiler/integers/u128/ternary.leo.out b/tests/expectations/compiler/compiler/integers/u128/ternary.leo.out index 87ec61f49e..cbe675dab0 100644 --- a/tests/expectations/compiler/compiler/integers/u128/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/ternary.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 35127d5f289d7f1dd3e1c79c919ceafaff778ea857b4035d6d90d0abc6804533 - canonicalized_ast: 35127d5f289d7f1dd3e1c79c919ceafaff778ea857b4035d6d90d0abc6804533 - type_inferenced_ast: 257c366629f72e71847216b24d14bb81d6125b75c7ade6b0335c82370c3e8550 + initial_ast: f33e65c7ad580d9405880c08a744f20db103d859b79fe7e3310737e083597820 + canonicalized_ast: f33e65c7ad580d9405880c08a744f20db103d859b79fe7e3310737e083597820 + type_inferenced_ast: ee9b2f9b84de4498f6d484d879a24111ad8a0bc5ed321f6c21adf89e1761df21 diff --git a/tests/expectations/compiler/compiler/integers/u16/add.leo.out b/tests/expectations/compiler/compiler/integers/u16/add.leo.out index a13f6ef6bc..0adc7c1436 100644 --- a/tests/expectations/compiler/compiler/integers/u16/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/add.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 41be1c43cd89daed5f9d28b5a5a9788989f2618cb157259329be41ae06b89e7c - canonicalized_ast: 41be1c43cd89daed5f9d28b5a5a9788989f2618cb157259329be41ae06b89e7c - type_inferenced_ast: 9a775f976c931eca2318f74c0dde3e4b207d10ed1e8398e64533b7870d73e98a + initial_ast: dbeb70f3b7bf7c602ee46098e75eedb0cc993c03eb8082043cb8c19ed877e707 + canonicalized_ast: dbeb70f3b7bf7c602ee46098e75eedb0cc993c03eb8082043cb8c19ed877e707 + type_inferenced_ast: 8c9c392f5b837b5048ed7e101aff3aacef235353501229e05acfacccbf57e213 diff --git a/tests/expectations/compiler/compiler/integers/u16/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/u16/console_assert.leo.out index 7a8e41ab92..229e5fe457 100644 --- a/tests/expectations/compiler/compiler/integers/u16/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/console_assert.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: c19ce080448a618611bb810bc73339a31e6f4be3afd3ed782ef848d448105ff4 - canonicalized_ast: c19ce080448a618611bb810bc73339a31e6f4be3afd3ed782ef848d448105ff4 - type_inferenced_ast: 5cedb974c91a3131d6c74d6ad59df8c02c365a0f3bc2717f19020125507354ea + initial_ast: c74459109699fa5955e779a43d07d1ad6ce7781d89df58494a3b9bc1924d131b + canonicalized_ast: c74459109699fa5955e779a43d07d1ad6ce7781d89df58494a3b9bc1924d131b + type_inferenced_ast: 7e41b516a0a67492806b160982c162169a2df8e087f130a7b12103b0ea304851 diff --git a/tests/expectations/compiler/compiler/integers/u16/div.leo.out b/tests/expectations/compiler/compiler/integers/u16/div.leo.out index 9cc0f249f8..341eb581af 100644 --- a/tests/expectations/compiler/compiler/integers/u16/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/div.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 9951c318a725992029658c3a45ba687e51b9025bd7e209471e1dac83fda7ae00 - canonicalized_ast: 9951c318a725992029658c3a45ba687e51b9025bd7e209471e1dac83fda7ae00 - type_inferenced_ast: e85bde99e42c696418bb61214dfdc22d0481f413e81ac5890ef63bf4c29a3f6e + initial_ast: 4b431ad0fab5435693eb0248c0afe99bdb1c6967b499f2ce4aa9ba39e826679a + canonicalized_ast: 4b431ad0fab5435693eb0248c0afe99bdb1c6967b499f2ce4aa9ba39e826679a + type_inferenced_ast: 753f51cd6e1ab4f49d30a4183c93604b7d96c5474eb7533dbddc38b91eeaf882 diff --git a/tests/expectations/compiler/compiler/integers/u16/eq.leo.out b/tests/expectations/compiler/compiler/integers/u16/eq.leo.out index 7e8be96bd9..dd464fde09 100644 --- a/tests/expectations/compiler/compiler/integers/u16/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/eq.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: ee65643024461631489070d2e450bbacdd33b94bf3b3c4a465c3aa2c621d1cfc - canonicalized_ast: ee65643024461631489070d2e450bbacdd33b94bf3b3c4a465c3aa2c621d1cfc - type_inferenced_ast: 0d88202e763c4b1dbaa47150aed77abc511ebe2cd1352ccc0926e7e2ac5a874d + initial_ast: 59b976b8e20a63533044f18a1c7fd2388711d116853f497bb17b92c4926d6c28 + canonicalized_ast: 59b976b8e20a63533044f18a1c7fd2388711d116853f497bb17b92c4926d6c28 + type_inferenced_ast: 455417a0db81ae36be8fce9d119c91ef937f934268e4abaf5d980d571dfe10af diff --git a/tests/expectations/compiler/compiler/integers/u16/ge.leo.out b/tests/expectations/compiler/compiler/integers/u16/ge.leo.out index 9e2988d080..b078dc9c90 100644 --- a/tests/expectations/compiler/compiler/integers/u16/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/ge.leo.out @@ -28,6 +28,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 55b790c06884aa8e3b3c90d14020080ef8f80e87ecb56bc0b3cf98d522906e91 - canonicalized_ast: 55b790c06884aa8e3b3c90d14020080ef8f80e87ecb56bc0b3cf98d522906e91 - type_inferenced_ast: fcfdcd073d22c15e7018e171c82efc6dc8aa2a77df8557f51991b2265ec39fea + initial_ast: 7eb3e99636c3d1887e756e274c2ef7444949413c0a3b538de691a2dfd72bf44a + canonicalized_ast: 7eb3e99636c3d1887e756e274c2ef7444949413c0a3b538de691a2dfd72bf44a + type_inferenced_ast: 9db0a393fbe80b0a1f8c3023a50dbd58102c983708fe8e486c4db5860255c3bb diff --git a/tests/expectations/compiler/compiler/integers/u16/gt.leo.out b/tests/expectations/compiler/compiler/integers/u16/gt.leo.out index 81ff5179cd..0e0c57ec02 100644 --- a/tests/expectations/compiler/compiler/integers/u16/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/gt.leo.out @@ -16,6 +16,6 @@ outputs: - input_file: u16_f.in output: registers: {} - initial_ast: 475f4077b47b7cb63c07bab29c7acc6781e7c5693484c36c982951c0e1850ac7 - canonicalized_ast: 0808701df629a9df6b534097d0e87536c93c8ccd693747085d1f5254214212a4 - type_inferenced_ast: 810d18f1fdbd7769db52937df22f1f27ea1be7923e74fbe2cd2a645cb4d27f1e + initial_ast: 2eef468c77bb445336fdb1c2cf1039ea163f79a209fe90dc68d8d8e79f6f098c + canonicalized_ast: 53950c5ddba3a4ab20a27c1eb0f667edf43fb8bd976dd13f9bbb8d6acc0658f2 + type_inferenced_ast: 0353a321ea76026c6ba7ff8894f2b1aa0313a76de9d7e2f64e766e772b91624b diff --git a/tests/expectations/compiler/compiler/integers/u16/input.leo.out b/tests/expectations/compiler/compiler/integers/u16/input.leo.out index 2856ff4a5b..9b9e9e995b 100644 --- a/tests/expectations/compiler/compiler/integers/u16/input.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/input.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: d3aaf23c5b1383351acd6c0696e70e14c84e9cae56019730a35818fd142b9204 - canonicalized_ast: d3aaf23c5b1383351acd6c0696e70e14c84e9cae56019730a35818fd142b9204 - type_inferenced_ast: 62f1318f2117ce10ca73d902572e8af6d3f97d37fce108403877f50f277e9963 + initial_ast: 25a98772dac7dd54e8ccc1f0a42782d1fff42800388dad29176483d8972af586 + canonicalized_ast: 25a98772dac7dd54e8ccc1f0a42782d1fff42800388dad29176483d8972af586 + type_inferenced_ast: fa2197e6e6ba2544f769b83ee098f4c07f47e5ada53081c9c055834c76473f12 diff --git a/tests/expectations/compiler/compiler/integers/u16/le.leo.out b/tests/expectations/compiler/compiler/integers/u16/le.leo.out index 692df5267f..89cd8354cf 100644 --- a/tests/expectations/compiler/compiler/integers/u16/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/le.leo.out @@ -28,6 +28,6 @@ outputs: r0: type: bool value: "false" - initial_ast: 34fc9cb86dd1d3ace79e57d9ba989cc2f995d3b61c18f55c2aae502b0fb51ea4 - canonicalized_ast: 34fc9cb86dd1d3ace79e57d9ba989cc2f995d3b61c18f55c2aae502b0fb51ea4 - type_inferenced_ast: 089d93f92c53431f63aabc1d113c1f6dcd6562228d1c2dd3761c937aa91d88ee + initial_ast: dbf11e2743c493f58c608e22c3685bb4ad9edbda72521c6c4f288faf0188f5e6 + canonicalized_ast: dbf11e2743c493f58c608e22c3685bb4ad9edbda72521c6c4f288faf0188f5e6 + type_inferenced_ast: 21dd413a29bc3eb5973b235ff3fac74f5f5a71c95dce0b961002b3ecd24fe86f diff --git a/tests/expectations/compiler/compiler/integers/u16/lt.leo.out b/tests/expectations/compiler/compiler/integers/u16/lt.leo.out index 232b0e0a61..16502c6b1f 100644 --- a/tests/expectations/compiler/compiler/integers/u16/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/lt.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "false" - initial_ast: dccf5d8cd58b2dbf1680f04107dfe9ab1644ecced22a6256f0d6f1d5ff2d2270 - canonicalized_ast: dccf5d8cd58b2dbf1680f04107dfe9ab1644ecced22a6256f0d6f1d5ff2d2270 - type_inferenced_ast: 66b374f00e25551d6b8f613c65c3cdfca98819252c7b76677837cadb0159eda0 + initial_ast: 70744f6edd0cdabceeaee3db5dd1d3c47be5ee41d6677225a28f234a11f2b6d2 + canonicalized_ast: 70744f6edd0cdabceeaee3db5dd1d3c47be5ee41d6677225a28f234a11f2b6d2 + type_inferenced_ast: afcf35c2c73786a005391d8546fdc24573593997076052ebdbc1c305f2d22012 diff --git a/tests/expectations/compiler/compiler/integers/u16/max.leo.out b/tests/expectations/compiler/compiler/integers/u16/max.leo.out index bb67ba07be..1632b67a3f 100644 --- a/tests/expectations/compiler/compiler/integers/u16/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/max.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: baa6d3c3d700d25eba38c74347a712dc94d47fd44283437649601e60173c0d74 - canonicalized_ast: baa6d3c3d700d25eba38c74347a712dc94d47fd44283437649601e60173c0d74 - type_inferenced_ast: ae44c093359df948b236fd0db5bbfb38c8a793af7bb4ad0491d9ed71f9cd5f5b + initial_ast: 5a54d9671bf46db1449c140807e9f88fcecdb3f2656a5c231119663c24d10f1c + canonicalized_ast: 5a54d9671bf46db1449c140807e9f88fcecdb3f2656a5c231119663c24d10f1c + type_inferenced_ast: aa7ffec6855e0a3c9cfa17ec7cf35cdf3e60fb547e8655c254ced9df7a8bd5c9 diff --git a/tests/expectations/compiler/compiler/integers/u16/min.leo.out b/tests/expectations/compiler/compiler/integers/u16/min.leo.out index ec6c1482a7..0dc9b54457 100644 --- a/tests/expectations/compiler/compiler/integers/u16/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/min.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: cde26bef80f68049390ccde167fa99e92595c4f28049540922710fcd5c848c03 - canonicalized_ast: cde26bef80f68049390ccde167fa99e92595c4f28049540922710fcd5c848c03 - type_inferenced_ast: 22350cdbf4a782784b7d68022fda1db95e089d3f548517a34fbce0beb7189682 + initial_ast: 92782e1cf3fceb2a3859abb64e0f520ee139612904757ab74b1258fd9f705ceb + canonicalized_ast: 92782e1cf3fceb2a3859abb64e0f520ee139612904757ab74b1258fd9f705ceb + type_inferenced_ast: 4bd0d3b5fe5f5396db4e5a0a9f4cf3a4fabd061ff4f33dcaf8be098d41be594f diff --git a/tests/expectations/compiler/compiler/integers/u16/mul.leo.out b/tests/expectations/compiler/compiler/integers/u16/mul.leo.out index 1239a88cee..acd358c36c 100644 --- a/tests/expectations/compiler/compiler/integers/u16/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/mul.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "false" - initial_ast: 2eefc41f982ec20bc145b7a5dd34d87aad66e0852abf44a9415ee4e0401aca04 - canonicalized_ast: 2eefc41f982ec20bc145b7a5dd34d87aad66e0852abf44a9415ee4e0401aca04 - type_inferenced_ast: e8898c8abc5eea0b22fc9f8eb61b6b37f79351f1fed4c490a83256da66a84b58 + initial_ast: 73789d280de5b73d9a0137d330590e0886ce768e6f260ca50d4a7af9d6a0d3c8 + canonicalized_ast: 73789d280de5b73d9a0137d330590e0886ce768e6f260ca50d4a7af9d6a0d3c8 + type_inferenced_ast: 09669befc9ccf54752cdced15d4a619bac4ac2c2fdde47a135d858375d1f2ee7 diff --git a/tests/expectations/compiler/compiler/integers/u16/ne.leo.out b/tests/expectations/compiler/compiler/integers/u16/ne.leo.out index 6956cac42f..70650185e7 100644 --- a/tests/expectations/compiler/compiler/integers/u16/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/ne.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: ac5862d330de9916c7c9f7ed0110adaad26a887d3cd82d8c1b736d595e6445ae - canonicalized_ast: ac5862d330de9916c7c9f7ed0110adaad26a887d3cd82d8c1b736d595e6445ae - type_inferenced_ast: a9618c9c126d8391bcf375f87c3a6a2aa100af711603779fdfb0dad4768d3276 + initial_ast: 9eb8bb18c17ed1572677d922d47497aad8ff73d477de9955e4970c2453537e14 + canonicalized_ast: 9eb8bb18c17ed1572677d922d47497aad8ff73d477de9955e4970c2453537e14 + type_inferenced_ast: 1a7da1e44bcd6750d5d1212bb5d105dbf51fa5c133013919b728e9feb016d7f8 diff --git a/tests/expectations/compiler/compiler/integers/u16/sub.leo.out b/tests/expectations/compiler/compiler/integers/u16/sub.leo.out index 5a34c65a38..0450c95270 100644 --- a/tests/expectations/compiler/compiler/integers/u16/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/sub.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 7f4ed5b88303c057d83ac580c857cca2fa3a38ab7e8d381bc0efc1fb280edc85 - canonicalized_ast: 7f4ed5b88303c057d83ac580c857cca2fa3a38ab7e8d381bc0efc1fb280edc85 - type_inferenced_ast: 8afc96f5b6a18bb7677735c62e478e49cf801ca9832311ebe95c89f6df422f88 + initial_ast: dc90daedac67b5f69d3b2881a4f31039b4d2214199c07c86bb80fae9f4759afb + canonicalized_ast: dc90daedac67b5f69d3b2881a4f31039b4d2214199c07c86bb80fae9f4759afb + type_inferenced_ast: a068b733628016d3ae9d98a7ca6e6d4ce513543f5324b8ae5d42f9a05a60d7d0 diff --git a/tests/expectations/compiler/compiler/integers/u16/ternary.leo.out b/tests/expectations/compiler/compiler/integers/u16/ternary.leo.out index 45a5ddd8f7..581d7231b6 100644 --- a/tests/expectations/compiler/compiler/integers/u16/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/ternary.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: f927dbe131a6f1be4cfc941aebdd4670591edd75215d54e2dc98a86f8dcfc3de - canonicalized_ast: f927dbe131a6f1be4cfc941aebdd4670591edd75215d54e2dc98a86f8dcfc3de - type_inferenced_ast: e4ca23e9cbea206e5c32d057ec7a93f5ef36d5745314f44f9467fa173fb7bf6f + initial_ast: fb84b0f1790b33d4b739f72640977dbc975b86e2f55cec95320836805ba1aea8 + canonicalized_ast: fb84b0f1790b33d4b739f72640977dbc975b86e2f55cec95320836805ba1aea8 + type_inferenced_ast: 8c8286872318a8d18411f34942b03debb7f2c50a653260cd12b9ad44fffeee20 diff --git a/tests/expectations/compiler/compiler/integers/u32/add.leo.out b/tests/expectations/compiler/compiler/integers/u32/add.leo.out index d327d27a52..78a330eeec 100644 --- a/tests/expectations/compiler/compiler/integers/u32/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/add.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 3cdca25e10098f45cf439da379aed56b4fe78e35632cb1bac655c8478f51d9cd - canonicalized_ast: 3cdca25e10098f45cf439da379aed56b4fe78e35632cb1bac655c8478f51d9cd - type_inferenced_ast: 84e885f56b08587f875e94a570bf977844b511fb85f7689df660e6ce69b2706e + initial_ast: 2d519bd1754db4a0cb0470f0ad905bc9cf703baa104b5d484e4fde38adab53ea + canonicalized_ast: 2d519bd1754db4a0cb0470f0ad905bc9cf703baa104b5d484e4fde38adab53ea + type_inferenced_ast: 371cd54fb4f7bde322f21b098f9e97d494ef7a64b8d6d326aadaff0ca5ab2dec diff --git a/tests/expectations/compiler/compiler/integers/u32/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/u32/console_assert.leo.out index 0bf7ff83ec..3b18dd87ef 100644 --- a/tests/expectations/compiler/compiler/integers/u32/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/console_assert.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 76b7c73c53d4e59406ba165352d155bf05d5c3615c89ef53ddc2b8ae931bfb85 - canonicalized_ast: 76b7c73c53d4e59406ba165352d155bf05d5c3615c89ef53ddc2b8ae931bfb85 - type_inferenced_ast: ea4d79e6a2877efdc838d54fb7112dfef314b8e82369e91ebf102db9b393ab76 + initial_ast: 1482da89f4793474ab4f940664b3ef5bac212ddbeda85203bb7166eca83387f7 + canonicalized_ast: 1482da89f4793474ab4f940664b3ef5bac212ddbeda85203bb7166eca83387f7 + type_inferenced_ast: e6965184cd858e73e3dc103228503e9935fcb5608a7b46a26044fe4a06d40fb0 diff --git a/tests/expectations/compiler/compiler/integers/u32/div.leo.out b/tests/expectations/compiler/compiler/integers/u32/div.leo.out index 4ec97fc037..d93a1894c5 100644 --- a/tests/expectations/compiler/compiler/integers/u32/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/div.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 0023392b04189309efb4fc89df4887595d3824e51cb2bf33c3159a88bcd3f7b5 - canonicalized_ast: 0023392b04189309efb4fc89df4887595d3824e51cb2bf33c3159a88bcd3f7b5 - type_inferenced_ast: 50641a3a2bd7b33c4ff6698b185066cd3ecfcf52497ea39151c3d7d34ce12510 + initial_ast: f240ea6127d832612096ee79cc3cf50476be0f022dc05976801784a89a8c1070 + canonicalized_ast: f240ea6127d832612096ee79cc3cf50476be0f022dc05976801784a89a8c1070 + type_inferenced_ast: 5b8938ae4ea7c64d8ef2c069047271b9e28cbe29893e029e69f922525e339109 diff --git a/tests/expectations/compiler/compiler/integers/u32/eq.leo.out b/tests/expectations/compiler/compiler/integers/u32/eq.leo.out index b2c643d155..0eb8c32d4e 100644 --- a/tests/expectations/compiler/compiler/integers/u32/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/eq.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 371541762c95ceedd6735521918ca19a2c1ff9b5ac7fc03ca932a18576977f50 - canonicalized_ast: 371541762c95ceedd6735521918ca19a2c1ff9b5ac7fc03ca932a18576977f50 - type_inferenced_ast: 265d8fd8db8983f9398efe61fd36176ee4449ee632ea9219b7e1ee6a1b1edda5 + initial_ast: 0a775de041dad61c1a1cd248a03b85f269737c4dbf0a7f2af51f6e56c2c3d5d8 + canonicalized_ast: 0a775de041dad61c1a1cd248a03b85f269737c4dbf0a7f2af51f6e56c2c3d5d8 + type_inferenced_ast: fba47a79c600f4641e675368ff9ee647601e4f9dda0831992d588a9168d7c421 diff --git a/tests/expectations/compiler/compiler/integers/u32/ge.leo.out b/tests/expectations/compiler/compiler/integers/u32/ge.leo.out index 03ede53117..6f92e43121 100644 --- a/tests/expectations/compiler/compiler/integers/u32/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/ge.leo.out @@ -28,6 +28,6 @@ outputs: r0: type: bool value: "true" - initial_ast: d53d5822cea427e9892561559b8a7fe3a3a4ee92f5dfc07e52dd554bec2e0812 - canonicalized_ast: d53d5822cea427e9892561559b8a7fe3a3a4ee92f5dfc07e52dd554bec2e0812 - type_inferenced_ast: 89b7a155fdf0333d66156431437983de4d818b754a18ed00693697e7dc71277a + initial_ast: 26d459f12f63580de5afe9f1d44622be8e61907cd85771084517a015c72eccdb + canonicalized_ast: 26d459f12f63580de5afe9f1d44622be8e61907cd85771084517a015c72eccdb + type_inferenced_ast: 166f31eef197184851db7780c9e5d46d810398a9efd0586c28e0f6beff5455f4 diff --git a/tests/expectations/compiler/compiler/integers/u32/gt.leo.out b/tests/expectations/compiler/compiler/integers/u32/gt.leo.out index 215e301f1a..6c1c8bb7ee 100644 --- a/tests/expectations/compiler/compiler/integers/u32/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/gt.leo.out @@ -16,6 +16,6 @@ outputs: - input_file: u32_f.in output: registers: {} - initial_ast: f6b0f84faf3d622d320ea867bf9bd76485633dfae6a41158e0e265880b5fb750 - canonicalized_ast: 5e63641393a51590ce9940712bd01ddb445cf3af3b5c5ffa02d9ca1dddccf03e - type_inferenced_ast: 79dc9917db6925b4d5a1f5aaa15362b55172133be5d088eb73cd7e8029ff710c + initial_ast: 46369ff45f2a685122ba2af387cb95cc7c25d5a4575b0ef24e25a620dabe9a87 + canonicalized_ast: ca7847ff8f13024b51b623c394aeeb6ec61abd6b4bf8f0f295044ef36c72eab6 + type_inferenced_ast: 8055d5c155301f0bcef11d75d902f8469641e9467de9386812cd6b6d27a303b1 diff --git a/tests/expectations/compiler/compiler/integers/u32/input.leo.out b/tests/expectations/compiler/compiler/integers/u32/input.leo.out index cd14f2e972..67f3f3cffc 100644 --- a/tests/expectations/compiler/compiler/integers/u32/input.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/input.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 7f3c18f7e6aa4bf261d1778234a885ff1da3627e74e45498f059c4e616847f5b - canonicalized_ast: 7f3c18f7e6aa4bf261d1778234a885ff1da3627e74e45498f059c4e616847f5b - type_inferenced_ast: 8db8e90395fff2d51dbe280f9aa1825129eeaa45bd84d228017927d2f6bea467 + initial_ast: 7f820d31196b8c2d03bd0947593bb474375ec8d84c10f76ef050f07ad3e17ec2 + canonicalized_ast: 7f820d31196b8c2d03bd0947593bb474375ec8d84c10f76ef050f07ad3e17ec2 + type_inferenced_ast: d87f2d54e9b9bdfe20ef6d7ab202c596555986a391be48060676d203058105e1 diff --git a/tests/expectations/compiler/compiler/integers/u32/le.leo.out b/tests/expectations/compiler/compiler/integers/u32/le.leo.out index 75b54b5fb6..54d8751aef 100644 --- a/tests/expectations/compiler/compiler/integers/u32/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/le.leo.out @@ -28,6 +28,6 @@ outputs: r0: type: bool value: "false" - initial_ast: 18af75f75099b7ed0d8337cbc39602d0276d9be538b27f07931e3310e6b674a0 - canonicalized_ast: 18af75f75099b7ed0d8337cbc39602d0276d9be538b27f07931e3310e6b674a0 - type_inferenced_ast: 9da02a49544ec4496d6189199c628b313d4b3d2b792627a71bf11015380cae38 + initial_ast: ae892c06154d9f48a36358c7fdeaa0dd0f4bdbc2ee89deb89d2c7f7050acae98 + canonicalized_ast: ae892c06154d9f48a36358c7fdeaa0dd0f4bdbc2ee89deb89d2c7f7050acae98 + type_inferenced_ast: 541ac177e769d46f361b0dc5e0543ffcbfa1e42ed7a5e3f42ef328b8723837e2 diff --git a/tests/expectations/compiler/compiler/integers/u32/lt.leo.out b/tests/expectations/compiler/compiler/integers/u32/lt.leo.out index 69996e84f0..cb3dde5410 100644 --- a/tests/expectations/compiler/compiler/integers/u32/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/lt.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "false" - initial_ast: 75eaf809a1c09171ebc028382936ee07c942774f2b20c143590049afe7474c4f - canonicalized_ast: 75eaf809a1c09171ebc028382936ee07c942774f2b20c143590049afe7474c4f - type_inferenced_ast: ac0f96eae8db0d2820c9fa737a9a5571fda10507f3f5f7a50cf989c797d181c3 + initial_ast: 0c7cf26ac46d09b65ad19ea51c972281a7e5db71cba2724e69ab1ab1ba59ea86 + canonicalized_ast: 0c7cf26ac46d09b65ad19ea51c972281a7e5db71cba2724e69ab1ab1ba59ea86 + type_inferenced_ast: cec211d394cc6ae0b95189332c89acbebd6c0a7421bdff5c797e757c5251e802 diff --git a/tests/expectations/compiler/compiler/integers/u32/max.leo.out b/tests/expectations/compiler/compiler/integers/u32/max.leo.out index 63325d2dbb..3dfa14a592 100644 --- a/tests/expectations/compiler/compiler/integers/u32/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/max.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 86fb7cf305725e7fe097d418ce22135a3e5385bfc6b8d31701aef7d5dad25282 - canonicalized_ast: 86fb7cf305725e7fe097d418ce22135a3e5385bfc6b8d31701aef7d5dad25282 - type_inferenced_ast: b369199bcd968cc175d6f634bc2de4cb8c73b0addc64ac7b457216bfc955e8fa + initial_ast: 0c99fd8ada0a44dd6bf589736d091b1f197c2b19a0c077e9f51dfefebb53c7cf + canonicalized_ast: 0c99fd8ada0a44dd6bf589736d091b1f197c2b19a0c077e9f51dfefebb53c7cf + type_inferenced_ast: a924a7713d2ab905403d3b83dd3613c9d54271d3aa798c18b472a1eb79de4078 diff --git a/tests/expectations/compiler/compiler/integers/u32/min.leo.out b/tests/expectations/compiler/compiler/integers/u32/min.leo.out index 78f5fd210e..2833e959b7 100644 --- a/tests/expectations/compiler/compiler/integers/u32/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/min.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 0f47e2dde68637ea7d0c54a8fcbd2b0cd767e4c35c646154e5519287d3f015ef - canonicalized_ast: 0f47e2dde68637ea7d0c54a8fcbd2b0cd767e4c35c646154e5519287d3f015ef - type_inferenced_ast: a94c8bd9f0535c2c705cb6124179a9106c9e75d2a29ef5b704096e37e58b0878 + initial_ast: bab8be36b2fde5dd6972b0690d4a62ab19852729228a0b87c316e638ea85e583 + canonicalized_ast: bab8be36b2fde5dd6972b0690d4a62ab19852729228a0b87c316e638ea85e583 + type_inferenced_ast: 8b3e5c9c47063e3d3e48df8a8dab81b32af1afa3e90481692063533f3b9a966b diff --git a/tests/expectations/compiler/compiler/integers/u32/mul.leo.out b/tests/expectations/compiler/compiler/integers/u32/mul.leo.out index 4da19d0cd6..f328ce7bb6 100644 --- a/tests/expectations/compiler/compiler/integers/u32/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/mul.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "false" - initial_ast: ac19676e4ebd9d5aefb5d5baa0fa477a6b4783efc6b1a599c8128259fa7aa55f - canonicalized_ast: ac19676e4ebd9d5aefb5d5baa0fa477a6b4783efc6b1a599c8128259fa7aa55f - type_inferenced_ast: 34d947a7132f4fd5693babadabb9c05cab523a6d2bce9dbd7da41ad435ac9702 + initial_ast: bc2a52c86f9c54151e95ab2fd8cc64e0df657924f813e6c3069422d544aaa3ce + canonicalized_ast: bc2a52c86f9c54151e95ab2fd8cc64e0df657924f813e6c3069422d544aaa3ce + type_inferenced_ast: 4a84eb2502cdbbbede712f2d9b404c49b769a25b4800b40c33f1f7eac87c2bbb diff --git a/tests/expectations/compiler/compiler/integers/u32/ne.leo.out b/tests/expectations/compiler/compiler/integers/u32/ne.leo.out index 7697ba7bd8..d8f923c177 100644 --- a/tests/expectations/compiler/compiler/integers/u32/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/ne.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 9ed438102f8938306421dce802d9af7f11366e91d2c6acc840dae1f3f9950e54 - canonicalized_ast: 9ed438102f8938306421dce802d9af7f11366e91d2c6acc840dae1f3f9950e54 - type_inferenced_ast: 3132b80f6e14eb276fed053ce4ad86376599df2568e85b54f53e3dd55ef1ac4b + initial_ast: b40043966d8d3db9a7e505a77241fc57394cb58df1da123282d66256a844a5a0 + canonicalized_ast: b40043966d8d3db9a7e505a77241fc57394cb58df1da123282d66256a844a5a0 + type_inferenced_ast: 77f17401240baeba8d17d1d750b54b0eec7dbc1a41761c0375ffa0a8f5d1ab3c diff --git a/tests/expectations/compiler/compiler/integers/u32/sub.leo.out b/tests/expectations/compiler/compiler/integers/u32/sub.leo.out index 9c227add1c..3a5f714402 100644 --- a/tests/expectations/compiler/compiler/integers/u32/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/sub.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: f55fe0801c2e593e2599fffd34a89073ff85f9aa462cbfbcd20c0e38e42eaa4d - canonicalized_ast: f55fe0801c2e593e2599fffd34a89073ff85f9aa462cbfbcd20c0e38e42eaa4d - type_inferenced_ast: 8640b596fc3d7e4b3999808a51eff9a72422fc02f2ea3b690b62a6ec56e215c0 + initial_ast: c51728b8c0193bf27571d7ca9d97c2bef7acd86f026ded5d729fd596f892f499 + canonicalized_ast: c51728b8c0193bf27571d7ca9d97c2bef7acd86f026ded5d729fd596f892f499 + type_inferenced_ast: b868b0c6673817781f4d44040e1be98585904dd6995a0d55c1ccc8753c795d5c diff --git a/tests/expectations/compiler/compiler/integers/u32/ternary.leo.out b/tests/expectations/compiler/compiler/integers/u32/ternary.leo.out index b3d0e27ea5..e33b2f2ac1 100644 --- a/tests/expectations/compiler/compiler/integers/u32/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/ternary.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 348ad049a3930eb4f477d98447b8172cca5d163e320e9774111d739d95017c83 - canonicalized_ast: 348ad049a3930eb4f477d98447b8172cca5d163e320e9774111d739d95017c83 - type_inferenced_ast: 7daa91267c1c26560e7e557d7f14d473283c40bf86ffcbff6944d251fb0e1fc5 + initial_ast: 406cd139beeca292853b57e2677f3ca9caf0995482d64e9f0ea45c78a09dd374 + canonicalized_ast: 406cd139beeca292853b57e2677f3ca9caf0995482d64e9f0ea45c78a09dd374 + type_inferenced_ast: 6223cf0231143cbddb83eabaa72e4a12222be88a22f77e6920367b6db3367836 diff --git a/tests/expectations/compiler/compiler/integers/u64/add.leo.out b/tests/expectations/compiler/compiler/integers/u64/add.leo.out index 61f673a7f2..c843b0c85a 100644 --- a/tests/expectations/compiler/compiler/integers/u64/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/add.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: d95c70849974223610dd12a4f9f19e2bb8f5c4e1420cae873a6c49043b7cc9ae - canonicalized_ast: d95c70849974223610dd12a4f9f19e2bb8f5c4e1420cae873a6c49043b7cc9ae - type_inferenced_ast: e8eaafd43cafab1cb14addae2196b1d21fc66ce46bedd84580f4654d646bd5de + initial_ast: 0c0e16e52f66b4d5a90408eef1b6e5d7dcdc0c992306524624f3c2beb96bebe2 + canonicalized_ast: 0c0e16e52f66b4d5a90408eef1b6e5d7dcdc0c992306524624f3c2beb96bebe2 + type_inferenced_ast: a2508e316b68aa7f001e34d65a7723efdfa2b02848dc0bd81dfe7c9f265b636d diff --git a/tests/expectations/compiler/compiler/integers/u64/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/u64/console_assert.leo.out index 52a21b85fb..204e574c8a 100644 --- a/tests/expectations/compiler/compiler/integers/u64/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/console_assert.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 1253b2000d11aaa4395514ee30cefe4027f5cda72bf58cc45a4f873ef4832ea3 - canonicalized_ast: 1253b2000d11aaa4395514ee30cefe4027f5cda72bf58cc45a4f873ef4832ea3 - type_inferenced_ast: 778f30fa8a0cf65b670c1365a71090c4360bad18d4d7f4e65d60d014c9bf6f44 + initial_ast: d2aaf9fa46481d0d0d7291e692c3a0f86f3e629664afd0e9e6efb0335fda7e8c + canonicalized_ast: d2aaf9fa46481d0d0d7291e692c3a0f86f3e629664afd0e9e6efb0335fda7e8c + type_inferenced_ast: 0a48472881b2d7b4680e0f8023dcce19e59a13aacfef6c9929779313d6edef72 diff --git a/tests/expectations/compiler/compiler/integers/u64/div.leo.out b/tests/expectations/compiler/compiler/integers/u64/div.leo.out index 2cd3058503..cb59a37515 100644 --- a/tests/expectations/compiler/compiler/integers/u64/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/div.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: e303c8ef226f3d7681188a7b97762123b0a4e6bb420a6b26cd4edba8ba068538 - canonicalized_ast: e303c8ef226f3d7681188a7b97762123b0a4e6bb420a6b26cd4edba8ba068538 - type_inferenced_ast: 5f16462ba03f7c86f94bc47e8b0f6996cd72e22a538ac2adc5db52f68162aa40 + initial_ast: 1ccae10c849bdba01024286582cdfa3c3c6176675d26b550f0f9a2cce4b6c393 + canonicalized_ast: 1ccae10c849bdba01024286582cdfa3c3c6176675d26b550f0f9a2cce4b6c393 + type_inferenced_ast: f61c02608fcf3ac5e6000d0f140f6e7cd895e17f27481e1db0e26666cc6d8464 diff --git a/tests/expectations/compiler/compiler/integers/u64/eq.leo.out b/tests/expectations/compiler/compiler/integers/u64/eq.leo.out index c30519eba9..53ae460c20 100644 --- a/tests/expectations/compiler/compiler/integers/u64/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/eq.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 222fd1d5b29034866f229ad755a6bdbfc2e7f917208e682ce0ff77d88866008d - canonicalized_ast: 222fd1d5b29034866f229ad755a6bdbfc2e7f917208e682ce0ff77d88866008d - type_inferenced_ast: 794c731afca4579f619aba3379f12bbe71fb4ebc5d256858534ba04b90855e03 + initial_ast: 0ab7e622869b60a383e3cab939244c22f10ec8fc11e603ce2bb6d8ebd69abc1f + canonicalized_ast: 0ab7e622869b60a383e3cab939244c22f10ec8fc11e603ce2bb6d8ebd69abc1f + type_inferenced_ast: 268372bc0a392e6ae2478f9a6790ea1c6d38230f8a228fde60345ebc5f34140d diff --git a/tests/expectations/compiler/compiler/integers/u64/ge.leo.out b/tests/expectations/compiler/compiler/integers/u64/ge.leo.out index 888845a32b..d59b7d1155 100644 --- a/tests/expectations/compiler/compiler/integers/u64/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/ge.leo.out @@ -28,6 +28,6 @@ outputs: r0: type: bool value: "true" - initial_ast: c6293b8d2605a06f84a32975756d8a7ae7ad6537fc6ed0dedf01c9046f159331 - canonicalized_ast: c6293b8d2605a06f84a32975756d8a7ae7ad6537fc6ed0dedf01c9046f159331 - type_inferenced_ast: b594f5f48db0a85abdf9fd0b0f76ca69b5405558e1382dfdaa24fce91513c744 + initial_ast: e63406cde78c9b3ab82462fc9b3e2bf2ebb740c9052aa08d5a07db521ff447e9 + canonicalized_ast: e63406cde78c9b3ab82462fc9b3e2bf2ebb740c9052aa08d5a07db521ff447e9 + type_inferenced_ast: 9cb61e96972f963bbfa5db20f0f7d57c2235db4aff62421cdeeabeb00552589a diff --git a/tests/expectations/compiler/compiler/integers/u64/gt.leo.out b/tests/expectations/compiler/compiler/integers/u64/gt.leo.out index 98c227889f..ef48bf0900 100644 --- a/tests/expectations/compiler/compiler/integers/u64/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/gt.leo.out @@ -16,6 +16,6 @@ outputs: - input_file: u64_f.in output: registers: {} - initial_ast: 524f0311db9ed25bfbd275b2b8432619759d34e1e7d3fcdee179fbb6748a03e1 - canonicalized_ast: cd942d4aa34b649b89e03c308dc28d17e6fbae052382b6e50989b4c6ce600c96 - type_inferenced_ast: f61e2cdef40c057d782467f2b9ad84e7b2163de25af72c6ed2498e5d4b9517cd + initial_ast: e322befdec803036a054560f3a342cec2f619d6a112cef46a642959564e9c573 + canonicalized_ast: 2dcd2aa3225e4426040fa610e5dfc340c4f22fbb686a5243101c038a53c1fb86 + type_inferenced_ast: b417887c713a50ae745031234ee5d12ef1c408b08cc921df7203fde12500d387 diff --git a/tests/expectations/compiler/compiler/integers/u64/input.leo.out b/tests/expectations/compiler/compiler/integers/u64/input.leo.out index 2c1b6bd0b6..f9a75e2dba 100644 --- a/tests/expectations/compiler/compiler/integers/u64/input.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/input.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: f2efb64bbf451e4e1c7c1e9b24ceb40894b72f1769604c62314b729a9fc75a6e - canonicalized_ast: f2efb64bbf451e4e1c7c1e9b24ceb40894b72f1769604c62314b729a9fc75a6e - type_inferenced_ast: bf576998fff80ab652bbcc2aaba9f374650d94c9327d19bc436957360505024b + initial_ast: e64a301f3ad6d2c06a0819ab92f7588ade4f9d2302dfc91b01df47b337e63733 + canonicalized_ast: e64a301f3ad6d2c06a0819ab92f7588ade4f9d2302dfc91b01df47b337e63733 + type_inferenced_ast: c14ff2200ef60d38e3b15ad7c31d2a308be388b0c287f794ffca3f049ca498bc diff --git a/tests/expectations/compiler/compiler/integers/u64/le.leo.out b/tests/expectations/compiler/compiler/integers/u64/le.leo.out index 13bd185de7..c7b704b672 100644 --- a/tests/expectations/compiler/compiler/integers/u64/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/le.leo.out @@ -28,6 +28,6 @@ outputs: r0: type: bool value: "false" - initial_ast: 3b6aa21f4293ef2b0557303f8ba98a62a72afda56be36f9feff58ede48c87aae - canonicalized_ast: 3b6aa21f4293ef2b0557303f8ba98a62a72afda56be36f9feff58ede48c87aae - type_inferenced_ast: 854beacb056af4a0e44c2f824467105a8ac4334efd0d2b51e7e09b44ff300d79 + initial_ast: 6a33a9ff988b31eef42228b68625f1e8a97516615fe8380d98eeff85969834a9 + canonicalized_ast: 6a33a9ff988b31eef42228b68625f1e8a97516615fe8380d98eeff85969834a9 + type_inferenced_ast: fb7052e33efbef5dff337f921217f32fc51935d747ab9549061814a7c97e499a diff --git a/tests/expectations/compiler/compiler/integers/u64/lt.leo.out b/tests/expectations/compiler/compiler/integers/u64/lt.leo.out index cbedd2cda9..d56834a50a 100644 --- a/tests/expectations/compiler/compiler/integers/u64/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/lt.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "false" - initial_ast: 1ed483794437131fc09605e7032fecb72d3e3f9534ff26cd4e5b8ac3017609fe - canonicalized_ast: 1ed483794437131fc09605e7032fecb72d3e3f9534ff26cd4e5b8ac3017609fe - type_inferenced_ast: eb1c5645868ccde01d29ac0c07986cbb95e021879228d8e14330851de369090c + initial_ast: 3eed4192151567524d2c0c9e3002bedbb992e9b4195afedcf08c7315fbf86628 + canonicalized_ast: 3eed4192151567524d2c0c9e3002bedbb992e9b4195afedcf08c7315fbf86628 + type_inferenced_ast: 7b19c51fc009c5fc66c336b4d511ce02f9c99596ce78a999f5d5e14f4d53a548 diff --git a/tests/expectations/compiler/compiler/integers/u64/max.leo.out b/tests/expectations/compiler/compiler/integers/u64/max.leo.out index 7ad47d005d..da6b45c35f 100644 --- a/tests/expectations/compiler/compiler/integers/u64/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/max.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: b49c4593620c14da622903ba513c21a1d6111c001fb424b7d96be11b354917eb - canonicalized_ast: b49c4593620c14da622903ba513c21a1d6111c001fb424b7d96be11b354917eb - type_inferenced_ast: 8b3f84f71975ef760fe9d6eeff136fd8512472ad3abc996adf690d3878b74648 + initial_ast: 1d39069e0c4dc73a6c8176092ab4738e7c8d89cb7bc7821b2be9a88c25e5df56 + canonicalized_ast: 1d39069e0c4dc73a6c8176092ab4738e7c8d89cb7bc7821b2be9a88c25e5df56 + type_inferenced_ast: 279d5a452c5525321a74c992ede7d2c50731b81bf186c7c3f953fdcba8a8aab1 diff --git a/tests/expectations/compiler/compiler/integers/u64/min.leo.out b/tests/expectations/compiler/compiler/integers/u64/min.leo.out index a3fccfd66c..e7afbb4507 100644 --- a/tests/expectations/compiler/compiler/integers/u64/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/min.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: e47e8d39fbf56125e94cd55a805a9bbe8c9fbc5098703f4996cd98e693fccd1e - canonicalized_ast: e47e8d39fbf56125e94cd55a805a9bbe8c9fbc5098703f4996cd98e693fccd1e - type_inferenced_ast: 6231c1ee6ec45f84e45f21b304beadc0cff11ef5865609e0d495cc6f4bf674df + initial_ast: bacf1be9937eae3e8cf7950483e942bc534d7d22759dd95a80325ad1de679380 + canonicalized_ast: bacf1be9937eae3e8cf7950483e942bc534d7d22759dd95a80325ad1de679380 + type_inferenced_ast: ab087e5fb0a831a6854912d7092e49961cab6b2ad96cf571af61e277254a03a2 diff --git a/tests/expectations/compiler/compiler/integers/u64/mul.leo.out b/tests/expectations/compiler/compiler/integers/u64/mul.leo.out index 95b772863a..efc021cfed 100644 --- a/tests/expectations/compiler/compiler/integers/u64/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/mul.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "false" - initial_ast: 065d2d9b6131ac01f764c77939c52ee25cd43f3d770d99662bb02c534ecb4bab - canonicalized_ast: 065d2d9b6131ac01f764c77939c52ee25cd43f3d770d99662bb02c534ecb4bab - type_inferenced_ast: aad04434079abde88be6fa0e2cd2426a66f75c2f3c25d6805bb229ab9f94319e + initial_ast: ca99df266c5790f8cda429674c08e860553206e92b86f199d0c96284791cd65d + canonicalized_ast: ca99df266c5790f8cda429674c08e860553206e92b86f199d0c96284791cd65d + type_inferenced_ast: 4f67ecbe147319f147980d7e7e6009acca7dd64b816905de0ae8a9236ccd7892 diff --git a/tests/expectations/compiler/compiler/integers/u64/ne.leo.out b/tests/expectations/compiler/compiler/integers/u64/ne.leo.out index a66f8aeb34..b4fadf3c32 100644 --- a/tests/expectations/compiler/compiler/integers/u64/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/ne.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 21675ef772779316b4a0cba63284251d69eabf581d65d7780b77988fecd500c8 - canonicalized_ast: 21675ef772779316b4a0cba63284251d69eabf581d65d7780b77988fecd500c8 - type_inferenced_ast: 8d8f881dfd748d28eb47082e945d7e28147a79afd4c346dc718b07f5068f3064 + initial_ast: 8886fef054b4cac1edd6a33d239299d43f6ac400e12008179121e4ea0ee94147 + canonicalized_ast: 8886fef054b4cac1edd6a33d239299d43f6ac400e12008179121e4ea0ee94147 + type_inferenced_ast: 94d957c091c065a8e79d6f5d2b3855d6e06abe4d12f197fe164165ebdf1bb153 diff --git a/tests/expectations/compiler/compiler/integers/u64/sub.leo.out b/tests/expectations/compiler/compiler/integers/u64/sub.leo.out index 7153642a30..452a624c4c 100644 --- a/tests/expectations/compiler/compiler/integers/u64/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/sub.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 51ea52d83e589316bb16309f9422ad9949832077bd036c61ac1f3de873bb2b62 - canonicalized_ast: 51ea52d83e589316bb16309f9422ad9949832077bd036c61ac1f3de873bb2b62 - type_inferenced_ast: 3409439c9ba061104e4aa8df5d70283bc7f87fa92076f8a0459660dc8f7f1aed + initial_ast: f0c0d33e8d540c5e86751de9b2277756eb1e23692d6493ed14772fd2fb6dfcd8 + canonicalized_ast: f0c0d33e8d540c5e86751de9b2277756eb1e23692d6493ed14772fd2fb6dfcd8 + type_inferenced_ast: cfe146004d2b0ee005eb43d3d0ccc0d220004b6bfc2ad57bf85cef4b00bea822 diff --git a/tests/expectations/compiler/compiler/integers/u64/ternary.leo.out b/tests/expectations/compiler/compiler/integers/u64/ternary.leo.out index f092d03536..97924efdc7 100644 --- a/tests/expectations/compiler/compiler/integers/u64/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/ternary.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 9522a94841df58a5171753bc8ca01db576432511995dc5841107314293af41e1 - canonicalized_ast: 9522a94841df58a5171753bc8ca01db576432511995dc5841107314293af41e1 - type_inferenced_ast: 8759d4926622054977f1171605a87ff6a1b42fd9ff04c4154f01251bb928834e + initial_ast: 4d198dc2eadde9ee692f73b4a168e81ee53afb6d8e87516d7b80b8f83ce5d700 + canonicalized_ast: 4d198dc2eadde9ee692f73b4a168e81ee53afb6d8e87516d7b80b8f83ce5d700 + type_inferenced_ast: aa8a249857023d1abec61d807ba3eec677428fd7b17eee256455bb388792473c diff --git a/tests/expectations/compiler/compiler/integers/u8/add.leo.out b/tests/expectations/compiler/compiler/integers/u8/add.leo.out index e28e85c6b3..4f9f8eda4b 100644 --- a/tests/expectations/compiler/compiler/integers/u8/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/add.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 46143561de12f971f373f582a5d89ab12cbf3b2e4f05c1f748f9b42a004cd783 - canonicalized_ast: 46143561de12f971f373f582a5d89ab12cbf3b2e4f05c1f748f9b42a004cd783 - type_inferenced_ast: e18f8efbb8b287363a35743db48e443093c3e8528da6bdb59769d93272bce295 + initial_ast: d53c9a614e6526855cf93a203ddfc3c57bf71373facbbe12e26ce01b8cc5e62a + canonicalized_ast: d53c9a614e6526855cf93a203ddfc3c57bf71373facbbe12e26ce01b8cc5e62a + type_inferenced_ast: 47ed01052c149963c7895068e5fb25d190d36ba2e7b26e67620da6e4647bddcf diff --git a/tests/expectations/compiler/compiler/integers/u8/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/u8/console_assert.leo.out index 190629c870..b65c5ed5a1 100644 --- a/tests/expectations/compiler/compiler/integers/u8/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/console_assert.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 0fd5c6b2d0a72defe0e73199cc66c2602cecb5bab6432afb11a5cff0da574fac - canonicalized_ast: 0fd5c6b2d0a72defe0e73199cc66c2602cecb5bab6432afb11a5cff0da574fac - type_inferenced_ast: 35cd62b7d5e5848a87a7702ca3574b1e525ec44b57a203042ebf2371f6577eb5 + initial_ast: f3b07f0e3421f20b94732dbf4303444f642c4b9c9e333426aa9576cc423a69e7 + canonicalized_ast: f3b07f0e3421f20b94732dbf4303444f642c4b9c9e333426aa9576cc423a69e7 + type_inferenced_ast: 04e635a435e144bca1a442bbbfe9a37feb83239d7c18f564d5dd5aef4c5b5430 diff --git a/tests/expectations/compiler/compiler/integers/u8/div.leo.out b/tests/expectations/compiler/compiler/integers/u8/div.leo.out index bdbb6b2fde..ebc70777c2 100644 --- a/tests/expectations/compiler/compiler/integers/u8/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/div.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 14e39ff28ecd780e1cac8d6f6b4d1225837f014233130ad709550fc7771a3191 - canonicalized_ast: 14e39ff28ecd780e1cac8d6f6b4d1225837f014233130ad709550fc7771a3191 - type_inferenced_ast: 9773336c82e254fc8bb0df35b41d06ce3cc112dc625bb1f913a2ab712d50336c + initial_ast: 234e75c599118d8348a795f453d72a0edc2366473aa108616862ba95d15e4d40 + canonicalized_ast: 234e75c599118d8348a795f453d72a0edc2366473aa108616862ba95d15e4d40 + type_inferenced_ast: dc38b28d319513687def3402ffea1b66fe736ea883341f98f793d9dd32f99392 diff --git a/tests/expectations/compiler/compiler/integers/u8/eq.leo.out b/tests/expectations/compiler/compiler/integers/u8/eq.leo.out index 46de525dd4..248f080e0b 100644 --- a/tests/expectations/compiler/compiler/integers/u8/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/eq.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: aa2459e6aec917b685a32cd008c7809684f9e08e446a9acb28835d03ee5909d0 - canonicalized_ast: aa2459e6aec917b685a32cd008c7809684f9e08e446a9acb28835d03ee5909d0 - type_inferenced_ast: bb373474343191ea738914a4f15373373ee3b387bd14a2e7ccbeb3b78e83edb6 + initial_ast: 3cf870e5df71d351108f466e6f08e1f57f3a4629e3d63cc0c8d329637351ffd5 + canonicalized_ast: 3cf870e5df71d351108f466e6f08e1f57f3a4629e3d63cc0c8d329637351ffd5 + type_inferenced_ast: d11bae54b9eae60af1c4edf986b76406d7ea076ade6125850a128218c85bbdf0 diff --git a/tests/expectations/compiler/compiler/integers/u8/ge.leo.out b/tests/expectations/compiler/compiler/integers/u8/ge.leo.out index 5d0cf91b89..5557bb66b6 100644 --- a/tests/expectations/compiler/compiler/integers/u8/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/ge.leo.out @@ -28,6 +28,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 2fbb4f0e49def7c8576b9201a8b0880cdbc7a84cb101ad717b69b49d0cdd69a9 - canonicalized_ast: 2fbb4f0e49def7c8576b9201a8b0880cdbc7a84cb101ad717b69b49d0cdd69a9 - type_inferenced_ast: 820a374b48ec40e6c7b27321007465fc235c679dc49c01e383acecb1b64d2574 + initial_ast: b48e11d86e676e24af8601694a5c4d30c3b4fdbfb1f81edd418c43f860685ad9 + canonicalized_ast: b48e11d86e676e24af8601694a5c4d30c3b4fdbfb1f81edd418c43f860685ad9 + type_inferenced_ast: 03f30c07a95050083325fe8745a3872509a9f753ac36afc40375624ef119bab6 diff --git a/tests/expectations/compiler/compiler/integers/u8/gt.leo.out b/tests/expectations/compiler/compiler/integers/u8/gt.leo.out index 1cd2419f25..ae1da1d538 100644 --- a/tests/expectations/compiler/compiler/integers/u8/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/gt.leo.out @@ -16,6 +16,6 @@ outputs: - input_file: u8_f.in output: registers: {} - initial_ast: c5690d672e1ed1d36f698ee7f2cdd39d3dbb190c899435de7b4a71eb2f3d125c - canonicalized_ast: 6eb02fba96f74190b7aacdea8da5eb00964cb25d93e89aff4b0f047d7239a704 - type_inferenced_ast: 446a1de27bf2d3927b4bfcfcd65817cecf8a95c9e09b17901fb283e05ce9a82f + initial_ast: cc6c8863fef25605109d3ba3a8068102df07e66bf786e777c60f78d685dca8ed + canonicalized_ast: d2221d06c782fb9e312722bd29b778b92a859b61d69f1a0026a75554f9f13b8e + type_inferenced_ast: c685412a9dd2c684134cd21084cada1ad4140a153a27bd562c15b8739c5700d6 diff --git a/tests/expectations/compiler/compiler/integers/u8/input.leo.out b/tests/expectations/compiler/compiler/integers/u8/input.leo.out index 5d774835b4..6cd836f14d 100644 --- a/tests/expectations/compiler/compiler/integers/u8/input.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/input.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 41cd9d639298b0dd1c84b8fdcb624a12b6fabade022c97738d19e8cdd4796956 - canonicalized_ast: 41cd9d639298b0dd1c84b8fdcb624a12b6fabade022c97738d19e8cdd4796956 - type_inferenced_ast: ed93dbc932db00cbbf765f2908bc27860780102a3a884c6684c91abc3d1ca4d0 + initial_ast: 0ecf577b271c6170017f61b86a6b7788dfefe2b80cdf9c06eff54b0d8c6182c8 + canonicalized_ast: 0ecf577b271c6170017f61b86a6b7788dfefe2b80cdf9c06eff54b0d8c6182c8 + type_inferenced_ast: 6dfe6118b1c0efac72eb0716cedb8208df836f760ead632752b071e0833ad1e9 diff --git a/tests/expectations/compiler/compiler/integers/u8/le.leo.out b/tests/expectations/compiler/compiler/integers/u8/le.leo.out index 14ac84b05f..b2da7f0464 100644 --- a/tests/expectations/compiler/compiler/integers/u8/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/le.leo.out @@ -28,6 +28,6 @@ outputs: r0: type: bool value: "false" - initial_ast: aeaa0daf3457c8c5425b98f0ee5ce1818062b3e319237a1a2f3060f5f76593d9 - canonicalized_ast: aeaa0daf3457c8c5425b98f0ee5ce1818062b3e319237a1a2f3060f5f76593d9 - type_inferenced_ast: 670d28a03f291083985c74c5f5e6aab6dff9e481443ceae2fce033dc9df03c83 + initial_ast: 0a29783034e0298e8c0d26c92bbc72eda04124f49ab636208d8448fb80a19462 + canonicalized_ast: 0a29783034e0298e8c0d26c92bbc72eda04124f49ab636208d8448fb80a19462 + type_inferenced_ast: ed636957ef1a7920d8d1071f93cc463ae51dda0c5bbde1e77336b556e2a3e436 diff --git a/tests/expectations/compiler/compiler/integers/u8/lt.leo.out b/tests/expectations/compiler/compiler/integers/u8/lt.leo.out index 175ef6b0b4..1cbfeb4117 100644 --- a/tests/expectations/compiler/compiler/integers/u8/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/lt.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "false" - initial_ast: 6053db7befe79c361e783fdf841d7955b78b0b5cea6aa82de8ba15de73943927 - canonicalized_ast: 6053db7befe79c361e783fdf841d7955b78b0b5cea6aa82de8ba15de73943927 - type_inferenced_ast: 097e4cc4579f4298a73e5f65283dc92792b75c4c1a542456523d949344cb17f6 + initial_ast: 4b4f8d0a77d3ccf56596af66ae7611ebe996ad3f46878c1858ce40e0190390a4 + canonicalized_ast: 4b4f8d0a77d3ccf56596af66ae7611ebe996ad3f46878c1858ce40e0190390a4 + type_inferenced_ast: be01b71586f5bd0158c5df8ddd2b1c31984a38252e73d16181dc5529f7532b22 diff --git a/tests/expectations/compiler/compiler/integers/u8/max.leo.out b/tests/expectations/compiler/compiler/integers/u8/max.leo.out index 0fe0295311..ee46afe0e7 100644 --- a/tests/expectations/compiler/compiler/integers/u8/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/max.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: c76876fb75e6a86c9f75dee04598fd43dc6ab73e62c92fd4ae8cb0f58d4eaf35 - canonicalized_ast: c76876fb75e6a86c9f75dee04598fd43dc6ab73e62c92fd4ae8cb0f58d4eaf35 - type_inferenced_ast: 3bd166f8a614dca66a55c11e8a88e45c8ec836746fdb18c2b28cd8c19a98fd6f + initial_ast: 88c4d3735a0b8415c10ec173efb4777410d202ae6bb2264aacbf9e4633c9b548 + canonicalized_ast: 88c4d3735a0b8415c10ec173efb4777410d202ae6bb2264aacbf9e4633c9b548 + type_inferenced_ast: 5aba842dcded3dcba755c2804ab26be94e1077f549bfe59aef5a3cabe6abcc62 diff --git a/tests/expectations/compiler/compiler/integers/u8/min.leo.out b/tests/expectations/compiler/compiler/integers/u8/min.leo.out index 51d92ce45c..ae74474b54 100644 --- a/tests/expectations/compiler/compiler/integers/u8/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/min.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 88343847b6fce997c39196a99ea382fdd560e804a04363efa75fff7aa9632550 - canonicalized_ast: 88343847b6fce997c39196a99ea382fdd560e804a04363efa75fff7aa9632550 - type_inferenced_ast: 2ab03d470fda1fb7747fd1868113bf107f90ad4a5e578763475d08d0127df37f + initial_ast: 2278587c13e7154a718aac3621073ace474d3d9d896aefd7d59de753dd294b7d + canonicalized_ast: 2278587c13e7154a718aac3621073ace474d3d9d896aefd7d59de753dd294b7d + type_inferenced_ast: 6b04630df2ab8c3aa55229faf594feb3e1217122ef0ce4caa1e1f3236f46183c diff --git a/tests/expectations/compiler/compiler/integers/u8/mul.leo.out b/tests/expectations/compiler/compiler/integers/u8/mul.leo.out index 4928a6fcd0..851e22672c 100644 --- a/tests/expectations/compiler/compiler/integers/u8/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/mul.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "false" - initial_ast: bd3039edc007709bcb436aa637183ad209cfe911e664630a51164fb816e0457c - canonicalized_ast: bd3039edc007709bcb436aa637183ad209cfe911e664630a51164fb816e0457c - type_inferenced_ast: bd4154abb8f63cc329ca278d8d1d881396439f9fc0e0b1824b453b648a9a95a8 + initial_ast: 3eaec0cbc660ca46f281a8bc7eab93cfd24069398498f25ee98b16d9f29b5aac + canonicalized_ast: 3eaec0cbc660ca46f281a8bc7eab93cfd24069398498f25ee98b16d9f29b5aac + type_inferenced_ast: 1c69cac9522b266de322a52070cb342ab322c366997c7b9ce21ca6d28f73c413 diff --git a/tests/expectations/compiler/compiler/integers/u8/ne.leo.out b/tests/expectations/compiler/compiler/integers/u8/ne.leo.out index e178ae3184..d4a9957d25 100644 --- a/tests/expectations/compiler/compiler/integers/u8/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/ne.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 13331b76c5f4087e7a47ac31b43ae9465b4df33ffc3a785ed997a3694921338b - canonicalized_ast: 13331b76c5f4087e7a47ac31b43ae9465b4df33ffc3a785ed997a3694921338b - type_inferenced_ast: 8269c7b9114fa31276f9398a51c8642cadf59c68979fdc680bd900ca3aeea73b + initial_ast: 6f017c906c07634ec46321c2d1c74512f5524533c433511ae41a6adb3d2e5645 + canonicalized_ast: 6f017c906c07634ec46321c2d1c74512f5524533c433511ae41a6adb3d2e5645 + type_inferenced_ast: b3c0792ab0be67554511d9849c1165da800afc23ffedce35b2e8adbcd9fd2f9b diff --git a/tests/expectations/compiler/compiler/integers/u8/sub.leo.out b/tests/expectations/compiler/compiler/integers/u8/sub.leo.out index e2f9e50e16..dcd55bd33f 100644 --- a/tests/expectations/compiler/compiler/integers/u8/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/sub.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 8ff67855790ac3e64c77531a999f06a2546567754204428dfb3d8519f9575678 - canonicalized_ast: 8ff67855790ac3e64c77531a999f06a2546567754204428dfb3d8519f9575678 - type_inferenced_ast: 6ad282b40daaae8a4b96531c8a467f189157270bffb31ed07f7ba786b5543ab9 + initial_ast: 116e9f1d4cc0924eb66f7b41baf832fbe184289d49d724bc033184fabb032233 + canonicalized_ast: 116e9f1d4cc0924eb66f7b41baf832fbe184289d49d724bc033184fabb032233 + type_inferenced_ast: 6eab8576e793f71d3881be971921315f1950b5da913aee290adc3a792bd9cd15 diff --git a/tests/expectations/compiler/compiler/integers/u8/ternary.leo.out b/tests/expectations/compiler/compiler/integers/u8/ternary.leo.out index 7e9a221f24..63524a0159 100644 --- a/tests/expectations/compiler/compiler/integers/u8/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/ternary.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 3a52d53376039a10517157e2c8f25287b85b50f9c46b59b914e417186e8fb245 - canonicalized_ast: 3a52d53376039a10517157e2c8f25287b85b50f9c46b59b914e417186e8fb245 - type_inferenced_ast: 643e93414412b4d6a5b20cc6490f119d277ce6afaedb948247ce028cf9f9b68b + initial_ast: d4f8e4e36924eb918382114af6c9685fc3468889ad4441c1f319e92f27472683 + canonicalized_ast: d4f8e4e36924eb918382114af6c9685fc3468889ad4441c1f319e92f27472683 + type_inferenced_ast: 2fdd7be19e953011c14ac5d646d37d1a4c6d0897ff84b62e953e5053596e8131 diff --git a/tests/expectations/compiler/compiler/mutability/array_dyn_mut.leo.out b/tests/expectations/compiler/compiler/mutability/array_dyn_mut.leo.out index 4345fe734b..f34cae6da4 100644 --- a/tests/expectations/compiler/compiler/mutability/array_dyn_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/array_dyn_mut.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: "[u32; 3]" value: "\"150\"" - initial_ast: e040115f45af0248976ed3dfbf9c3440d73005c2fa62ee12199298f5e375c14f - canonicalized_ast: 9b095b10f8f9c8538cfa8a371cd23e1abbac7385df1ef3ef9b4d0a13ae122335 - type_inferenced_ast: eb4f4325a50b1c5a5e3ab7b89ec2a19a6dd9e3cab55005540ed61206e439b737 + initial_ast: 14716b7665f37b1f24d1fa17a63d40f5b5530177ba3d46c978760f9780a80634 + canonicalized_ast: 7cd7637f36b946909847129cbbbf55bb918a71496175580945965fb97b51f00b + type_inferenced_ast: 2b74a553d28c57a943f392ffc0331ab7dd8fe7ce18a3a9778346ac8b39fc8836 diff --git a/tests/expectations/compiler/compiler/mutability/array_dyn_mut_indirect.leo.out b/tests/expectations/compiler/compiler/mutability/array_dyn_mut_indirect.leo.out index abb56b0a4f..8205e3d502 100644 --- a/tests/expectations/compiler/compiler/mutability/array_dyn_mut_indirect.leo.out +++ b/tests/expectations/compiler/compiler/mutability/array_dyn_mut_indirect.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: "[(u32, u32); 3]" value: "\"(1, 1)(2, 2)(0, 1)\"" - initial_ast: fb18710f2c196b07de8bf83e68dfe03d41241ddf7c407bc10780dd1fa19c4cc2 - canonicalized_ast: fb18710f2c196b07de8bf83e68dfe03d41241ddf7c407bc10780dd1fa19c4cc2 - type_inferenced_ast: 65df378f0e3f7b77b83d197dd2d8bfc78b9091a2f1d92629e6956d0f4e96ef06 + initial_ast: eb582af3ced3976038599fbc9f2f24e79704e72c1ef57954134dce9e40f99d00 + canonicalized_ast: eb582af3ced3976038599fbc9f2f24e79704e72c1ef57954134dce9e40f99d00 + type_inferenced_ast: c64b4a21fbb3085952141dcd7d1239cbdb7dcda5169832de724dbab9f7a1ac9b diff --git a/tests/expectations/compiler/compiler/mutability/array_mut.leo.out b/tests/expectations/compiler/compiler/mutability/array_mut.leo.out index 4c9bc1ac1e..09d058b480 100644 --- a/tests/expectations/compiler/compiler/mutability/array_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/array_mut.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: ceb1057896de34c17443d478a2e8bc0934c5bd9fb536ae210b148578f25f5465 - canonicalized_ast: ceb1057896de34c17443d478a2e8bc0934c5bd9fb536ae210b148578f25f5465 - type_inferenced_ast: 4037c97f4f464afcd6c34fa293f4b6a0c434d0e21193b82ccf4189da280e7721 + initial_ast: a16958d522d28eaf7afc55a5f44ed2c49511e50e58aa8d32b9eb6620a0e5ee55 + canonicalized_ast: a16958d522d28eaf7afc55a5f44ed2c49511e50e58aa8d32b9eb6620a0e5ee55 + type_inferenced_ast: 8a2d6cad8ed06b84a38478d024c9577b14398b04705484ecd3662b1fc7d6b174 diff --git a/tests/expectations/compiler/compiler/mutability/array_splice_mut.leo.out b/tests/expectations/compiler/compiler/mutability/array_splice_mut.leo.out index e7799a32f1..ac9836c789 100644 --- a/tests/expectations/compiler/compiler/mutability/array_splice_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/array_splice_mut.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 87d5f27ec3dd5c4f9a338186e40021725b7b55b70447164dcb85452b06e2afdb - canonicalized_ast: 87d5f27ec3dd5c4f9a338186e40021725b7b55b70447164dcb85452b06e2afdb - type_inferenced_ast: 257f0fe5d7f985ed49cbc0e8b7501d71433d4dbc401cf746d30e7fde337771a2 + initial_ast: 722145cd544cd78e7fe71e1ddfc3e760c4f59aee292321f88c9f00833d2fce11 + canonicalized_ast: 722145cd544cd78e7fe71e1ddfc3e760c4f59aee292321f88c9f00833d2fce11 + type_inferenced_ast: b5f94d881dfe06f9ed969e2f5764ddc7be2078926283580425fbbe516d27f119 diff --git a/tests/expectations/compiler/compiler/mutability/array_tuple_mut.leo.out b/tests/expectations/compiler/compiler/mutability/array_tuple_mut.leo.out index 9d3bf1ac13..9d06c1e290 100644 --- a/tests/expectations/compiler/compiler/mutability/array_tuple_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/array_tuple_mut.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: a0bdf5a95e0938c0493418f2280d7d9a6c7f484f8c0a16bb262d06364ecedcf6 - canonicalized_ast: a0bdf5a95e0938c0493418f2280d7d9a6c7f484f8c0a16bb262d06364ecedcf6 - type_inferenced_ast: 463c1646c892aadb9b851fb8d73a749183a404ff74c4c7470718b9a4fb95e1a4 + initial_ast: 1df058bb963cf38b415c8b39484070d90fcbf0f97e2527c10e4c48aacb1968e5 + canonicalized_ast: 1df058bb963cf38b415c8b39484070d90fcbf0f97e2527c10e4c48aacb1968e5 + type_inferenced_ast: ba6c50a419d25aa6e21161ab194da0f2867363c1808b182ed70abd3e230b3767 diff --git a/tests/expectations/compiler/compiler/mutability/circuit_function_mut.leo.out b/tests/expectations/compiler/compiler/mutability/circuit_function_mut.leo.out index 154b3ce4df..f304799cf3 100644 --- a/tests/expectations/compiler/compiler/mutability/circuit_function_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/circuit_function_mut.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 8db095ba3755c4c0a5c661f82acea4d5088fcc7a1f21445d8f6a76aa349be14c - canonicalized_ast: db2825ad023eb01f420686f407d0411e99d06be1f13116ffce5b18d7e9ceffd6 - type_inferenced_ast: 2afc66cedc72641dbae33927247993fa9b03402889e3a71005888d0e26f34114 + initial_ast: a761274f02370204ee81f13ec53e70e546a3af708f2c4dbd57301d83ad943921 + canonicalized_ast: 684b991ce89ec7a9b0a3ff9a69928f4fce8f1f7311e64e39bf628f0d6d74cc70 + type_inferenced_ast: 740e913caef569001b77d13319647af4b4449375349dc186621152825f3f1b3f diff --git a/tests/expectations/compiler/compiler/mutability/circuit_variable_mut.leo.out b/tests/expectations/compiler/compiler/mutability/circuit_variable_mut.leo.out index a780c83f31..e05be96986 100644 --- a/tests/expectations/compiler/compiler/mutability/circuit_variable_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/circuit_variable_mut.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 7671936b5d58627c508151bd0a851661e929424791064674180e651e5f9d7f8b - canonicalized_ast: 7671936b5d58627c508151bd0a851661e929424791064674180e651e5f9d7f8b - type_inferenced_ast: 08ccc60dc31ebf449c8a359dca037f99b22cd971fe4c5b5606310fa0fe9cd1a9 + initial_ast: 873238c253123be620267b8fdd74d9412fbbdd6796f7d32be76a3a72c47b6050 + canonicalized_ast: 873238c253123be620267b8fdd74d9412fbbdd6796f7d32be76a3a72c47b6050 + type_inferenced_ast: b46d7dcca53a2ea800751e5458ec69252c16b7a55190da89d40d548973782b8b diff --git a/tests/expectations/compiler/compiler/mutability/cond_mut.leo.out b/tests/expectations/compiler/compiler/mutability/cond_mut.leo.out index 925b0913c2..9bb7092c9c 100644 --- a/tests/expectations/compiler/compiler/mutability/cond_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/cond_mut.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 06f04842fb542f8864eb122d2f28acf86913b1ad2ea77d9b2a138c65d9186ef0 - canonicalized_ast: 2ed31baa6f3faa866cdde220e7066a652c68dfc40eae0215dc32ea38c34c7ac1 - type_inferenced_ast: be031b12e5045a61467348896d88e71017818365692e50201a64e08c2c5be833 + initial_ast: 75d40f30a5bee2f28540b9741ac13501a0e78052dc3940492316b98355c88300 + canonicalized_ast: b43e5e2155e81c0de944ce44e7f0019fc5459bc132dd559567e3fe72058a6778 + type_inferenced_ast: 249d5ef9db2e4764dc27ce4c327e34b36852cfc96375db80aed1bb1364beabc5 diff --git a/tests/expectations/compiler/compiler/mutability/function_input_mut.leo.out b/tests/expectations/compiler/compiler/mutability/function_input_mut.leo.out index 3918a78e16..5c6952b579 100644 --- a/tests/expectations/compiler/compiler/mutability/function_input_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/function_input_mut.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: e56a274a8a6081b07198b7562c14249df37e45aac1ed6c122da737325282b8ff - canonicalized_ast: e56a274a8a6081b07198b7562c14249df37e45aac1ed6c122da737325282b8ff - type_inferenced_ast: 6777bfacec09af0204e90fc2a071172451ff22dfbdadbf0854c593f18adb04f7 + initial_ast: df85a5635f1dd8a74a62dbdab2c14d287541854ff27eb85c236576dcdc3e998f + canonicalized_ast: df85a5635f1dd8a74a62dbdab2c14d287541854ff27eb85c236576dcdc3e998f + type_inferenced_ast: 4491ad6b2e1875671bc35e62917044ac9eb6e82a7f042a83eaab63a79b552c48 diff --git a/tests/expectations/compiler/compiler/mutability/let_mut.leo.out b/tests/expectations/compiler/compiler/mutability/let_mut.leo.out index 08c94c67cc..a13754c8fa 100644 --- a/tests/expectations/compiler/compiler/mutability/let_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/let_mut.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 32fa7d2711aa772281f70ad9c81a3a8d3eab4d0844438849de4998c65ee12237 - canonicalized_ast: 32fa7d2711aa772281f70ad9c81a3a8d3eab4d0844438849de4998c65ee12237 - type_inferenced_ast: 4bde7f50f7488cbf37c29a95ad7699aa1d8ae5d20fdb773ddab63293bd89d6c5 + initial_ast: 820a5f784b2654fda078f6c456830e270c0596f3e4e5a9502a3d3b55909bb696 + canonicalized_ast: 820a5f784b2654fda078f6c456830e270c0596f3e4e5a9502a3d3b55909bb696 + type_inferenced_ast: 307f4fb80f5f7753972056c6e88caa399cf4ca9cbb3e70b77dc925f5951e8f45 diff --git a/tests/expectations/compiler/compiler/mutability/let_mut_nested.leo.out b/tests/expectations/compiler/compiler/mutability/let_mut_nested.leo.out index 63fb0ba5d9..2497d4073c 100644 --- a/tests/expectations/compiler/compiler/mutability/let_mut_nested.leo.out +++ b/tests/expectations/compiler/compiler/mutability/let_mut_nested.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 68348f81454aaabba9ad9d6eb16be88eb4692e7600840a97b8ceb8296e30b890 - canonicalized_ast: 68348f81454aaabba9ad9d6eb16be88eb4692e7600840a97b8ceb8296e30b890 - type_inferenced_ast: f10f9a4988d9c815bf4a2bfa0c28d5b2913a99bed96825729b08433fe3178145 + initial_ast: 6040f153585cfa3c3a1d3f6adf7f99689ed815374d3df0a3cc6d7390e60fd5ec + canonicalized_ast: 6040f153585cfa3c3a1d3f6adf7f99689ed815374d3df0a3cc6d7390e60fd5ec + type_inferenced_ast: b377d1df3d92d9ee05907088ae131454b48bbc7f36f9b6f1a17ceb3b53f25f64 diff --git a/tests/expectations/compiler/compiler/mutability/swap.leo.out b/tests/expectations/compiler/compiler/mutability/swap.leo.out index 49d15ca400..06cde2a2d7 100644 --- a/tests/expectations/compiler/compiler/mutability/swap.leo.out +++ b/tests/expectations/compiler/compiler/mutability/swap.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "false" - initial_ast: 17828ff8ffc7902cfe67b7816477cf3099c248f7fde312a9792dd311814340c6 - canonicalized_ast: 17828ff8ffc7902cfe67b7816477cf3099c248f7fde312a9792dd311814340c6 - type_inferenced_ast: be55144bf090bcfc6d49170844c89b067b224b241fd953b0b683c70b91baaad4 + initial_ast: 7ebc13e9db4a339cbfb42c90ba4b642ef0aae43741f13309f6388ec3da9a7404 + canonicalized_ast: 7ebc13e9db4a339cbfb42c90ba4b642ef0aae43741f13309f6388ec3da9a7404 + type_inferenced_ast: 6e8bc8c404188408836a85f7a0342857c321c80cc199da5d9d66e26e06644d14 diff --git a/tests/expectations/compiler/compiler/statements/all_loops.leo.out b/tests/expectations/compiler/compiler/statements/all_loops.leo.out index 392b2542c0..4e1594057f 100644 --- a/tests/expectations/compiler/compiler/statements/all_loops.leo.out +++ b/tests/expectations/compiler/compiler/statements/all_loops.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 280277fb32e4eece0eab1f72338a9b60b6792d7f11124e8c4a5678ef3fc4a04e - canonicalized_ast: 84769d3580d79825fef6fd00dd9ab88dc6eaf16bf2e3f3c46feae654f8f1f746 - type_inferenced_ast: 078070bc5df73c49f8de0ca37ac624c93a67551e0221dc1c65a84588507a2a6f + initial_ast: ef03a9e7eeed0a80db7460f7f20472bfd001e456242d1abc746a02ea75d524fa + canonicalized_ast: 540da0a1cad9e3d08f8b4db729452fd65a057fde6a3e2bad7cbe4470ba1d8570 + type_inferenced_ast: 7934657497349fe137be1f4b3afd8933028718c28f9ab6ebcbe7a6d831ec75e0 diff --git a/tests/expectations/compiler/compiler/statements/block.leo.out b/tests/expectations/compiler/compiler/statements/block.leo.out index 4f83d727c2..0afd92c39f 100644 --- a/tests/expectations/compiler/compiler/statements/block.leo.out +++ b/tests/expectations/compiler/compiler/statements/block.leo.out @@ -16,6 +16,6 @@ outputs: a: type: bool value: "true" - initial_ast: e5ab0d37ae2e0839f9f513f018e8f05fe6f6141962724fb0d84768abb4f155f2 - canonicalized_ast: 931832fc13e7bbb57ce4a867681cd5c746a5d6bec1eea051e1464b4030f746f4 - type_inferenced_ast: 932fe676b3460ab2a209d0b5e40359f8fd5e1d603bac1de5a2254eb83b2e1b39 + initial_ast: 4ac2ff62513f6a6fd4e7c241a46c8392778d49837983372e93629e98a4611ee8 + canonicalized_ast: 2954fd2f74fe8eca3cb6d1f50fbf664649831eb042a514eee72f98a8d29d3b81 + type_inferenced_ast: 19815ae04b63a15c84151aeecb658534923ef87749ecc7d6b031be21f4da9eac diff --git a/tests/expectations/compiler/compiler/statements/chain.leo.out b/tests/expectations/compiler/compiler/statements/chain.leo.out index 96f9d6fee1..40213ebf81 100644 --- a/tests/expectations/compiler/compiler/statements/chain.leo.out +++ b/tests/expectations/compiler/compiler/statements/chain.leo.out @@ -28,6 +28,6 @@ outputs: a: type: bool value: "false" - initial_ast: 2f84a632ff69e9e18a46b5b8f82b9b3fa66d63c5ceab6edbf034c9388ea0f787 - canonicalized_ast: 2f84a632ff69e9e18a46b5b8f82b9b3fa66d63c5ceab6edbf034c9388ea0f787 - type_inferenced_ast: feaa875ce4b50aa1d73b92c9bbada7f048bf5db7e0653f46507baacea68a7e30 + initial_ast: b39f1f2b4c314bb3dde18560288d2aff8db93c0e13f1fb429260bac821eea521 + canonicalized_ast: b39f1f2b4c314bb3dde18560288d2aff8db93c0e13f1fb429260bac821eea521 + type_inferenced_ast: 272d80f0d95469b8b0d304eb59c062d8df55793ea175f97fe09da9e6b495c2f3 diff --git a/tests/expectations/compiler/compiler/statements/compound_assignment.leo.out b/tests/expectations/compiler/compiler/statements/compound_assignment.leo.out index a791a74ca9..3497d6802f 100644 --- a/tests/expectations/compiler/compiler/statements/compound_assignment.leo.out +++ b/tests/expectations/compiler/compiler/statements/compound_assignment.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: cac8070caf7819b61e0f1d5fc3557c76957acb69e958b6cdfc793c416f0b9fd0 - canonicalized_ast: e678afe5d42eb07b14965803f080cbda55b8c01f65ddf417367a75949223a27f - type_inferenced_ast: c100f9c558b94b2c89b78da4867e2ed5e6bc4de8ec6f3218d64c26ba9c73b428 + initial_ast: 6ed63ca447d6b2929e4fcda22f691c0c28b4370b98ea7cad2c2c7c2906f0a931 + canonicalized_ast: 29a6c2fa33aa9163c17c8a607b0e7e560d91288360023f45400f442e4d14653d + type_inferenced_ast: 07d7177148120b72e4c1ba53feddc4d52124cc8a2e5252afd759b0cf3c7c321a diff --git a/tests/expectations/compiler/compiler/statements/for_loop.leo.out b/tests/expectations/compiler/compiler/statements/for_loop.leo.out index 3f9284533d..b88dd41663 100644 --- a/tests/expectations/compiler/compiler/statements/for_loop.leo.out +++ b/tests/expectations/compiler/compiler/statements/for_loop.leo.out @@ -16,6 +16,6 @@ outputs: a: type: bool value: "true" - initial_ast: cce56dc8d678cd645e8fb3043aeb95bd24f94640e08219f00b7b9db66498ec29 - canonicalized_ast: 914f4ba5fc0c5148f1e105af4f857b8b12d29a609d47a366c73fd3d2f8eda3bf - type_inferenced_ast: 02b16a3b3a7e7c7ca4803292ea1f5410f293f2000f21c0a5245f2e5273561f06 + initial_ast: a890e3e551566e2cdd795853886d77b6f2c51aba81a29a632a30f53db42e5681 + canonicalized_ast: 7d6c6159c6616e37524747ce2f286f676d1414bd6afae0593ab48541b4a51454 + type_inferenced_ast: ef79ca5cb8dee89b6df046cb15fb5bdc82ad22b7f3450aff1376178f46731dbd diff --git a/tests/expectations/compiler/compiler/statements/iteration_basic.leo.out b/tests/expectations/compiler/compiler/statements/iteration_basic.leo.out index 34b078aed4..b32b9446e2 100644 --- a/tests/expectations/compiler/compiler/statements/iteration_basic.leo.out +++ b/tests/expectations/compiler/compiler/statements/iteration_basic.leo.out @@ -16,6 +16,6 @@ outputs: a: type: bool value: "true" - initial_ast: 1c9abdc059f6649b381be12d435129702a048f941b5766212105d9f20c6479cf - canonicalized_ast: 5a8d9b146b28300345c3f0878f712ccc7a545534dc820d22180ec7bff8b96713 - type_inferenced_ast: 259654bcec24b6110db951fef9ee504455219c9e1860cc96b30d18ecf8fc2ead + initial_ast: 84dd73f4b7a624d7dc4decd0c5d8d700a117d47202ea1fe306baf8eb1539bebb + canonicalized_ast: 2dc3cfabebd95eee40315bc8d5235bee1972453be6f95e722fb109e0740ec946 + type_inferenced_ast: 07e46085a75fb8660fe12b9f01b26455f09cda3f0ef809c90e0b51e8b4fd3550 diff --git a/tests/expectations/compiler/compiler/statements/iteration_variable.leo.out b/tests/expectations/compiler/compiler/statements/iteration_variable.leo.out index 74a9d729cf..caa8f9ffee 100644 --- a/tests/expectations/compiler/compiler/statements/iteration_variable.leo.out +++ b/tests/expectations/compiler/compiler/statements/iteration_variable.leo.out @@ -16,6 +16,6 @@ outputs: a: type: bool value: "true" - initial_ast: 3ac3ba48fb628fff67489c5d1502c3e0aaf9e197bf54d8c544fc79d9c83e3e16 - canonicalized_ast: c081654e7bd5edbfc1653444e73bc2f5e5b4e887f3e99dbb54f26cbfa37d84e1 - type_inferenced_ast: 23cddd23376a87be6e293bb4eae4470c9e450984bace87dc7386a5bf37081af0 + initial_ast: 7cc6d6722d1660082ac6becc9f67c7b1cfd3f62a9fdfe38e2ddbe92c194588d5 + canonicalized_ast: ad5b7a770161132b7c6908d9fabc6722bb8bee73c33a970712d55f35b75aa017 + type_inferenced_ast: 1385fa17eb53b0ba18f9afde2d338a86d10955011da087e75f5e3a27edeb9d5b diff --git a/tests/expectations/compiler/compiler/statements/multiple_returns.leo.out b/tests/expectations/compiler/compiler/statements/multiple_returns.leo.out index 4522880b93..afb4279519 100644 --- a/tests/expectations/compiler/compiler/statements/multiple_returns.leo.out +++ b/tests/expectations/compiler/compiler/statements/multiple_returns.leo.out @@ -22,6 +22,6 @@ outputs: a: type: bool value: "false" - initial_ast: e4b9f8c53d1d5cce1f00b2674448d42cd5bfb229a2544df0f2e996da2847e27e - canonicalized_ast: e4b9f8c53d1d5cce1f00b2674448d42cd5bfb229a2544df0f2e996da2847e27e - type_inferenced_ast: 3d4a4e67e5ad7adcd189537ed085a4d894115cfaa0f0afb0cd764f2d28355f81 + initial_ast: ce2d4c3eed6d94b96094e3adcf736b38630e99733effb290b6f67b9a9f4bcc45 + canonicalized_ast: ce2d4c3eed6d94b96094e3adcf736b38630e99733effb290b6f67b9a9f4bcc45 + type_inferenced_ast: 75cf948d34c6d4b4ccff5489c0f86f6cffcaf949b89bd445e70dbe47e8dfce3a diff --git a/tests/expectations/compiler/compiler/statements/mutate.leo.out b/tests/expectations/compiler/compiler/statements/mutate.leo.out index 43c1e52419..8bc7ac5893 100644 --- a/tests/expectations/compiler/compiler/statements/mutate.leo.out +++ b/tests/expectations/compiler/compiler/statements/mutate.leo.out @@ -22,6 +22,6 @@ outputs: a: type: bool value: "true" - initial_ast: 5bc9151ccd030d4ae8248850c22ba9abef2d3b0c77c8b4658b595ce63a0e3461 - canonicalized_ast: 5bc9151ccd030d4ae8248850c22ba9abef2d3b0c77c8b4658b595ce63a0e3461 - type_inferenced_ast: 0aedd29433a0d5f90ec29a5b8571bf124d2cf98687e7ef11e0ae2576508540f3 + initial_ast: af885844f2423d9694fc10c0ced30fa121e5c829ff6a47bee110b20e9d6a0109 + canonicalized_ast: af885844f2423d9694fc10c0ced30fa121e5c829ff6a47bee110b20e9d6a0109 + type_inferenced_ast: ecaa5694f982748c5ec885ce21cff5c67bb64b1683797b2818749f0cb09dc4ef diff --git a/tests/expectations/compiler/compiler/statements/nested_mutate.leo.out b/tests/expectations/compiler/compiler/statements/nested_mutate.leo.out index 0e56fe14c8..c042238389 100644 --- a/tests/expectations/compiler/compiler/statements/nested_mutate.leo.out +++ b/tests/expectations/compiler/compiler/statements/nested_mutate.leo.out @@ -28,6 +28,6 @@ outputs: a: type: bool value: "false" - initial_ast: 72f7d405df7dc1f8a399bac21756cac5bad2bfa74d4cf508f385f6e6427cdc7e - canonicalized_ast: 674f7e3c3389d726c338b9af92d7e9492a69573573a7e890e92a35696d7fd6da - type_inferenced_ast: eb4035f253dd5c6f3d49aa6cf329d65e8cf7cee52bb12d673bae89fbd8e38dfa + initial_ast: 376b076978ab1dc197db1e883eb303af4f54e4c5da42f3f70b813689a7020de1 + canonicalized_ast: 57f161fb0212d024f63298577379f57ad88a91677106c282c2bd2073a3ba1b06 + type_inferenced_ast: 78a0a8ade96e6d1e1e20668b5f78884f108c956ae717890d442ea0e723aaf502 diff --git a/tests/expectations/compiler/compiler/statements/reverse_loops.leo.out b/tests/expectations/compiler/compiler/statements/reverse_loops.leo.out index 315612b6fe..59b218a195 100644 --- a/tests/expectations/compiler/compiler/statements/reverse_loops.leo.out +++ b/tests/expectations/compiler/compiler/statements/reverse_loops.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 41a0c534538a94dc81b72250c2fc9f4119c6b8d3f3e99e47e239365284bd0084 - canonicalized_ast: 6c3f732c92874e90be8cab55ac665c6f6d4292d76fce147ae89ed9dbdfe685ea - type_inferenced_ast: 2258791abdb7bde2e3f28a12ff8b5d593985c42d78e3750d6b5f44d88d0560ed + initial_ast: 172cb3ca8dadc4f2f7a67e77a00e8d3e832ed15f8996a6b57352d9e98fd11d36 + canonicalized_ast: 64bd366c390e2837d2c739cbd4175fa71846ddd228fb1e0a612ae80539d50b89 + type_inferenced_ast: 2d4a666a45c4c6ecccd922bf5166c8db2eb49a600519fca68e751d4b763ab1ab diff --git a/tests/expectations/compiler/compiler/statements/reverse_one.leo.out b/tests/expectations/compiler/compiler/statements/reverse_one.leo.out index 2efc997d1c..2f76e5c829 100644 --- a/tests/expectations/compiler/compiler/statements/reverse_one.leo.out +++ b/tests/expectations/compiler/compiler/statements/reverse_one.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 55d64e1ef9318084a66cee912987308a21c5779cdad1f0103d6b3fb195f74d8a - canonicalized_ast: 467824b3c4be8e0d10d6008a036f40bed2659a18ab7eb2ea2a5c7124146d9b06 - type_inferenced_ast: b0908f46546647877409194ca817072d02f157b720236c7f58b5d3b0b7cfb81f + initial_ast: 0314ac2650bd7cad7f90f929a21a643e895de24da72829a22c2d481e3fe16bcc + canonicalized_ast: 7cb323958fb7b3e91f8b0c7da7b6354a85ab9ea0123b32a34d389f03883fc457 + type_inferenced_ast: 01dfade707b4f836382f40f3fba760a96febfde52b26931508eede793aed28f9 diff --git a/tests/expectations/compiler/compiler/string/circuit.leo.out b/tests/expectations/compiler/compiler/string/circuit.leo.out index b607e80f47..93de89e7f8 100644 --- a/tests/expectations/compiler/compiler/string/circuit.leo.out +++ b/tests/expectations/compiler/compiler/string/circuit.leo.out @@ -16,6 +16,6 @@ outputs: out: type: "[char; 13]" value: "\"Hello, World!\"" - initial_ast: 69219c995852ced5fe06a4009c4d58a8b59cc23ed7144ab4f08d4e0d4a6c5798 - canonicalized_ast: c099eab8cd118203aa297b200be1fd331f6e20ed1f19ff87efe16d406f5a0ce0 - type_inferenced_ast: acef5428f299c6cdbd9ac4b644123cf17a379efe025656122e359abe06da7eb8 + initial_ast: de12485742001f61c8b7cf50385def19389159ce135576a9249244cb10e28af5 + canonicalized_ast: 93e31f5eb6d4d5f74895f649c4f2fca337000548860f395ec2b1ab5f2a75a815 + type_inferenced_ast: bdab7de3392691c4193c83543cb7290c191830164b6007038a798110306d0ceb diff --git a/tests/expectations/compiler/compiler/string/equality.leo.out b/tests/expectations/compiler/compiler/string/equality.leo.out index 2795b2d234..b1d5215766 100644 --- a/tests/expectations/compiler/compiler/string/equality.leo.out +++ b/tests/expectations/compiler/compiler/string/equality.leo.out @@ -22,6 +22,6 @@ outputs: out: type: bool value: "false" - initial_ast: 62916b502a7017356bd5fbb6527ff51d6a5a57aeb55ed87754157ce8cad41341 - canonicalized_ast: b0299b9f1ec6927a101d4385a49b69ca9ab542699a9ab6c56024e75e5b034277 - type_inferenced_ast: 3643e1338fdf04fa531a63b596b26a0225c7a19f67eb600a787918e9fee30db0 + initial_ast: 1f5b8fda209b42fc4a299a77e5184a4929b8a1d734e60ad459a167e5446f53b0 + canonicalized_ast: c30505d9da2a178268c2d4ff45816a90bfa487266bb6f68a660cb6ccf9c91863 + type_inferenced_ast: 3fd2d61cfd97263dc8dc0476d42be3d897a0d201b61ed602e8aaad1ec56827bf diff --git a/tests/expectations/compiler/compiler/string/replace.leo.out b/tests/expectations/compiler/compiler/string/replace.leo.out index 4ffc21ed0c..bc62d1e934 100644 --- a/tests/expectations/compiler/compiler/string/replace.leo.out +++ b/tests/expectations/compiler/compiler/string/replace.leo.out @@ -22,6 +22,6 @@ outputs: out: type: bool value: "true" - initial_ast: 6c161515e03a95ab1eba6e94a0de9bdd6f85750a99000f66a2c6c518179c6dc0 - canonicalized_ast: c3d2fe2a37ba42e8423d571232ddc1c745c934f3772e3abf4a317816497c73f2 - type_inferenced_ast: 80cfa7238e4a4ed1f05cc5a5c97a00f5c7db1eee377107d4f92830d41e17233d + initial_ast: 62f1928217809d9ad03b4a7b33e57f958a94e2ae8fd30e651528d859aa3555b5 + canonicalized_ast: 837f6eac27b9b50729f94095b3bc3d3529b3362834fa7769b228a8ea0bcde0d2 + type_inferenced_ast: 623248c36159cba2b448fdf1fde3b17f0c6e6ffd5e6dbd60ef1509bbb4571b33 diff --git a/tests/expectations/compiler/compiler/string/string_transformation.leo.out b/tests/expectations/compiler/compiler/string/string_transformation.leo.out index 2bb9dc0ad1..b2ecc72e58 100644 --- a/tests/expectations/compiler/compiler/string/string_transformation.leo.out +++ b/tests/expectations/compiler/compiler/string/string_transformation.leo.out @@ -16,6 +16,6 @@ outputs: out: type: bool value: "true" - initial_ast: 1dc757170332a649227f9b9af6dbfa0c2ecce9040ea6502fb71ee686c956cea5 - canonicalized_ast: 141842a220878194dd91d273691f940685bd44366a8cedb21dfbd67770eb13c9 - type_inferenced_ast: e8c7b68d6db9eb8dd9884f381fac90fe4da9bcbce255f8159a80028fec0c1297 + initial_ast: 31a98820f6b162317a3fa69924df8b8d784a9d5ded3c790622f64f0dfa438997 + canonicalized_ast: 0bc86b996359a0767253e1ec18c09ffc83da3d71b1dadbde9e22846751f8e0bc + type_inferenced_ast: 142e9fd6e7009bf840f0bb08365cad239008b66510eb2c1015ca0afc8455be60 diff --git a/tests/expectations/compiler/compiler/tuples/access.leo.out b/tests/expectations/compiler/compiler/tuples/access.leo.out index e063d68ab0..682a7ca359 100644 --- a/tests/expectations/compiler/compiler/tuples/access.leo.out +++ b/tests/expectations/compiler/compiler/tuples/access.leo.out @@ -19,6 +19,6 @@ outputs: c: type: bool value: "false" - initial_ast: 8e04cd62dc27e5486f82216b68bb9aa8ff996757da01988b8b23f38b090c1645 - canonicalized_ast: 8e04cd62dc27e5486f82216b68bb9aa8ff996757da01988b8b23f38b090c1645 - type_inferenced_ast: 79754b8b299f9c09d99eed04c343ef68da05b3fdd40f0d6885a48c108177fe72 + initial_ast: 4a7cf5f45f1dd0ed886ade721c89a238da47f2387069de9d0557aad4b9a1b75b + canonicalized_ast: 4a7cf5f45f1dd0ed886ade721c89a238da47f2387069de9d0557aad4b9a1b75b + type_inferenced_ast: 20cec96ebfe04679ebb9f3082316d13bfea9b58ae966f9d89b3706d523f63068 diff --git a/tests/expectations/compiler/compiler/tuples/basic.leo.out b/tests/expectations/compiler/compiler/tuples/basic.leo.out index 8dd37d0083..3e5e39622d 100644 --- a/tests/expectations/compiler/compiler/tuples/basic.leo.out +++ b/tests/expectations/compiler/compiler/tuples/basic.leo.out @@ -19,6 +19,6 @@ outputs: c: type: bool value: "false" - initial_ast: af436e46b9e39a856338f4b88de25b7a1fa350de7dc9278479163dcc08b8323e - canonicalized_ast: af436e46b9e39a856338f4b88de25b7a1fa350de7dc9278479163dcc08b8323e - type_inferenced_ast: 6a2c7905e8e8c79d318dde7e4c803e1b2b5b9755e480f0a9c3152ea9ae9240e6 + initial_ast: 16df9dc4ece6b3514b5c61a4b6a28a8a679e1746cc8f74cd34cedd276568a640 + canonicalized_ast: 16df9dc4ece6b3514b5c61a4b6a28a8a679e1746cc8f74cd34cedd276568a640 + type_inferenced_ast: 94ab82dfdc57d744e56bcc405e94449a6702f22045a8bcd3f1b20da312655bce diff --git a/tests/expectations/compiler/compiler/tuples/dependent.leo.out b/tests/expectations/compiler/compiler/tuples/dependent.leo.out index 0fef685159..9b8f204ff1 100644 --- a/tests/expectations/compiler/compiler/tuples/dependent.leo.out +++ b/tests/expectations/compiler/compiler/tuples/dependent.leo.out @@ -19,6 +19,6 @@ outputs: c: type: bool value: "false" - initial_ast: 8d3a5cc77cf14db7140dace16fc2f590f6ddc73ed98932021bad4f90b5e99824 - canonicalized_ast: 8d3a5cc77cf14db7140dace16fc2f590f6ddc73ed98932021bad4f90b5e99824 - type_inferenced_ast: 7cd799d02f04c5426c8a316c9654db286bbab879e8ced2505152f6264764ba63 + initial_ast: 153f83411b21a2696171a6eab83c81b40643fe9608ae61291858fbc0e256ea93 + canonicalized_ast: 153f83411b21a2696171a6eab83c81b40643fe9608ae61291858fbc0e256ea93 + type_inferenced_ast: 075b22f579fb7bebf6ed9af1e0cfddf27756d78ae5f39205b34898359658359c diff --git a/tests/expectations/compiler/compiler/tuples/destructured.leo.out b/tests/expectations/compiler/compiler/tuples/destructured.leo.out index 106dd0d95d..eabdddda6e 100644 --- a/tests/expectations/compiler/compiler/tuples/destructured.leo.out +++ b/tests/expectations/compiler/compiler/tuples/destructured.leo.out @@ -19,6 +19,6 @@ outputs: c: type: bool value: "true" - initial_ast: 6d6d745c5cfeeb6963cdc1f91b133b7a1526ed4ab3b979416b26a276146d8409 - canonicalized_ast: 6d6d745c5cfeeb6963cdc1f91b133b7a1526ed4ab3b979416b26a276146d8409 - type_inferenced_ast: d3762f581f0bf814fae646c47016e6a809bf1aab564ecc7f2d34a0c54965972b + initial_ast: c39e1fc8bfa14ea666318da537826586eb930b9e9d97ee66742023eb2ff9ad4c + canonicalized_ast: c39e1fc8bfa14ea666318da537826586eb930b9e9d97ee66742023eb2ff9ad4c + type_inferenced_ast: db258d6cb1ddd585f603830905284d2a5c24d716116ce12c861b1a7f8e292ec7 diff --git a/tests/expectations/compiler/compiler/tuples/nested_access.leo.out b/tests/expectations/compiler/compiler/tuples/nested_access.leo.out index f88ab1e6e2..a611960f44 100644 --- a/tests/expectations/compiler/compiler/tuples/nested_access.leo.out +++ b/tests/expectations/compiler/compiler/tuples/nested_access.leo.out @@ -19,6 +19,6 @@ outputs: c: type: bool value: "false" - initial_ast: 972a1898ed642a83e5a49f4fd385d6a65a5021669cd28235dcc47e68cec836f7 - canonicalized_ast: 972a1898ed642a83e5a49f4fd385d6a65a5021669cd28235dcc47e68cec836f7 - type_inferenced_ast: a89fb16b36f7e1389f143ae7d15fe535982cfa1a8eb8e0a1e7a49a81d53d1c9c + initial_ast: f7a51cb79dbcebfecf8ae6fac14031ca7e6b72d7fa15281b9a0cc71500f02507 + canonicalized_ast: f7a51cb79dbcebfecf8ae6fac14031ca7e6b72d7fa15281b9a0cc71500f02507 + type_inferenced_ast: 837c32d828eb32b08e0378113a06d7c7483bfe6f40ee8322a3900749aa80d012 diff --git a/tests/expectations/parser/parser/circuits/big_self.leo.out b/tests/expectations/parser/parser/circuits/big_self.leo.out index abdced08ca..4d67804a46 100644 --- a/tests/expectations/parser/parser/circuits/big_self.leo.out +++ b/tests/expectations/parser/parser/circuits/big_self.leo.out @@ -6,12 +6,12 @@ outputs: expected_input: [] imports: [] circuits: - "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}": - circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}" + "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}": + circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}" members: - CircuitFunction: annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function x() -> Self {\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function x() -> Self {\\\"}\"}" input: [] output: SelfType block: @@ -19,35 +19,35 @@ outputs: - Return: expression: CircuitInit: - name: "{\"name\":\"Self\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" return Self {};\\\"}\"}" + name: "{\"name\":\"Self\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" return Self {};\\\"}\"}" members: [] span: line_start: 5 line_stop: 5 col_start: 16 col_stop: 23 - path: test + path: "" content: " return Self {};" span: line_start: 5 line_stop: 5 col_start: 9 col_stop: 23 - path: test + path: "" content: " return Self {};" span: line_start: 4 line_stop: 6 col_start: 26 col_stop: 6 - path: test + path: "" content: " function x() -> Self {\n...\n }" span: line_start: 4 line_stop: 6 col_start: 5 col_stop: 6 - path: test + path: "" content: " function x() -> Self {\n...\n }" global_consts: {} functions: {} diff --git a/tests/expectations/parser/parser/circuits/empty.leo.out b/tests/expectations/parser/parser/circuits/empty.leo.out index e826c4097d..c49cb7535e 100644 --- a/tests/expectations/parser/parser/circuits/empty.leo.out +++ b/tests/expectations/parser/parser/circuits/empty.leo.out @@ -6,8 +6,8 @@ outputs: expected_input: [] imports: [] circuits: - "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}": - circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}" + "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}": + circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}" members: [] global_consts: {} functions: {} diff --git a/tests/expectations/parser/parser/circuits/field_and_functions.leo.out b/tests/expectations/parser/parser/circuits/field_and_functions.leo.out index a13e5be7fb..0a8efde0b0 100644 --- a/tests/expectations/parser/parser/circuits/field_and_functions.leo.out +++ b/tests/expectations/parser/parser/circuits/field_and_functions.leo.out @@ -6,18 +6,18 @@ outputs: expected_input: [] imports: [] circuits: - "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}": - circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}" + "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}": + circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}" members: - CircuitVariable: - - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" x: u32,\\\"}\"}" + - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x: u32,\\\"}\"}" - IntegerType: U32 - CircuitVariable: - - "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" y: u32\\\"}\"}" + - "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" y: u32\\\"}\"}" - IntegerType: U32 - CircuitFunction: annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function x() {\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function x() {\\\"}\"}" input: [] output: ~ block: @@ -31,32 +31,32 @@ outputs: line_stop: 7 col_start: 16 col_stop: 18 - path: test + path: "" content: " return ();" span: line_start: 7 line_stop: 7 col_start: 9 col_stop: 18 - path: test + path: "" content: " return ();" span: line_start: 6 line_stop: 8 col_start: 18 col_stop: 6 - path: test + path: "" content: " function x() {\n...\n }" span: line_start: 6 line_stop: 8 col_start: 5 col_stop: 6 - path: test + path: "" content: " function x() {\n...\n }" - CircuitFunction: annotations: [] - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function y() {\\\"}\"}" + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function y() {\\\"}\"}" input: [] output: ~ block: @@ -70,28 +70,28 @@ outputs: line_stop: 10 col_start: 16 col_stop: 18 - path: test + path: "" content: " return ();" span: line_start: 10 line_stop: 10 col_start: 9 col_stop: 18 - path: test + path: "" content: " return ();" span: line_start: 9 line_stop: 11 col_start: 18 col_stop: 6 - path: test + path: "" content: " function y() {\n...\n }" span: line_start: 9 line_stop: 11 col_start: 5 col_stop: 6 - path: test + path: "" content: " function y() {\n...\n }" global_consts: {} functions: {} diff --git a/tests/expectations/parser/parser/circuits/fields.leo.out b/tests/expectations/parser/parser/circuits/fields.leo.out index 041cc13554..544e12e553 100644 --- a/tests/expectations/parser/parser/circuits/fields.leo.out +++ b/tests/expectations/parser/parser/circuits/fields.leo.out @@ -6,14 +6,14 @@ outputs: expected_input: [] imports: [] circuits: - "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}": - circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}" + "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}": + circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}" members: - CircuitVariable: - - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" x: u32;\\\"}\"}" + - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x: u32;\\\"}\"}" - IntegerType: U32 - CircuitVariable: - - "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" y: u32;\\\"}\"}" + - "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" y: u32;\\\"}\"}" - IntegerType: U32 global_consts: {} functions: {} diff --git a/tests/expectations/parser/parser/circuits/functions.leo.out b/tests/expectations/parser/parser/circuits/functions.leo.out index aebda6c4e5..de67732577 100644 --- a/tests/expectations/parser/parser/circuits/functions.leo.out +++ b/tests/expectations/parser/parser/circuits/functions.leo.out @@ -6,12 +6,12 @@ outputs: expected_input: [] imports: [] circuits: - "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}": - circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}" + "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}": + circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}" members: - CircuitFunction: annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function x() {\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function x() {\\\"}\"}" input: [] output: ~ block: @@ -25,32 +25,32 @@ outputs: line_stop: 5 col_start: 16 col_stop: 18 - path: test + path: "" content: " return ();" span: line_start: 5 line_stop: 5 col_start: 9 col_stop: 18 - path: test + path: "" content: " return ();" span: line_start: 4 line_stop: 6 col_start: 18 col_stop: 6 - path: test + path: "" content: " function x() {\n...\n }" span: line_start: 4 line_stop: 6 col_start: 5 col_stop: 6 - path: test + path: "" content: " function x() {\n...\n }" - CircuitFunction: annotations: [] - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function y() {\\\"}\"}" + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function y() {\\\"}\"}" input: [] output: ~ block: @@ -64,28 +64,28 @@ outputs: line_stop: 8 col_start: 16 col_stop: 18 - path: test + path: "" content: " return ();" span: line_start: 8 line_stop: 8 col_start: 9 col_stop: 18 - path: test + path: "" content: " return ();" span: line_start: 7 line_stop: 9 col_start: 18 col_stop: 6 - path: test + path: "" content: " function y() {\n...\n }" span: line_start: 7 line_stop: 9 col_start: 5 col_stop: 6 - path: test + path: "" content: " function y() {\n...\n }" global_consts: {} functions: {} diff --git a/tests/expectations/parser/parser/circuits/mut_self.leo.out b/tests/expectations/parser/parser/circuits/mut_self.leo.out index 03997801dc..bbd0410f66 100644 --- a/tests/expectations/parser/parser/circuits/mut_self.leo.out +++ b/tests/expectations/parser/parser/circuits/mut_self.leo.out @@ -6,14 +6,14 @@ outputs: expected_input: [] imports: [] circuits: - "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}": - circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}" + "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}": + circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}" members: - CircuitFunction: annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function x(mut self) {\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function x(mut self) {\\\"}\"}" input: - - MutSelfKeyword: "{\"name\":\"mut self\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":16,\\\"col_stop\\\":24,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function x(mut self) {\\\"}\"}" + - MutSelfKeyword: "{\"name\":\"mut self\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":16,\\\"col_stop\\\":24,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function x(mut self) {\\\"}\"}" output: ~ block: statements: @@ -26,28 +26,28 @@ outputs: line_stop: 5 col_start: 16 col_stop: 18 - path: test + path: "" content: " return ();" span: line_start: 5 line_stop: 5 col_start: 9 col_stop: 18 - path: test + path: "" content: " return ();" span: line_start: 4 line_stop: 6 col_start: 26 col_stop: 6 - path: test + path: "" content: " function x(mut self) {\n...\n }" span: line_start: 4 line_stop: 6 col_start: 5 col_stop: 6 - path: test + path: "" content: " function x(mut self) {\n...\n }" global_consts: {} functions: {} diff --git a/tests/expectations/parser/parser/circuits/self.leo.out b/tests/expectations/parser/parser/circuits/self.leo.out index 65785a36b6..bf8a1bfaf7 100644 --- a/tests/expectations/parser/parser/circuits/self.leo.out +++ b/tests/expectations/parser/parser/circuits/self.leo.out @@ -6,14 +6,14 @@ outputs: expected_input: [] imports: [] circuits: - "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}": - circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}" + "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}": + circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}" members: - CircuitFunction: annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function x(self) {\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function x(self) {\\\"}\"}" input: - - SelfKeyword: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function x(self) {\\\"}\"}" + - SelfKeyword: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function x(self) {\\\"}\"}" output: ~ block: statements: @@ -26,28 +26,28 @@ outputs: line_stop: 5 col_start: 16 col_stop: 18 - path: test + path: "" content: " return ();" span: line_start: 5 line_stop: 5 col_start: 9 col_stop: 18 - path: test + path: "" content: " return ();" span: line_start: 4 line_stop: 6 col_start: 22 col_stop: 6 - path: test + path: "" content: " function x(self) {\n...\n }" span: line_start: 4 line_stop: 6 col_start: 5 col_stop: 6 - path: test + path: "" content: " function x(self) {\n...\n }" global_consts: {} functions: {} diff --git a/tests/expectations/parser/parser/expression/access/array_access.leo.out b/tests/expectations/parser/parser/expression/access/array_access.leo.out index 5c820cc814..b430ed4d75 100644 --- a/tests/expectations/parser/parser/expression/access/array_access.leo.out +++ b/tests/expectations/parser/parser/expression/access/array_access.leo.out @@ -4,7 +4,7 @@ expectation: Pass outputs: - ArrayAccess: array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0]\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[0]\\\"}\"}" index: Value: Implicit: @@ -13,18 +13,18 @@ outputs: line_stop: 1 col_start: 3 col_stop: 4 - path: test + path: "" content: "x[0]" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 5 - path: test + path: "" content: "x[0]" - ArrayAccess: array: - Identifier: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"X[1]\\\"}\"}" + Identifier: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"X[1]\\\"}\"}" index: Value: Implicit: @@ -33,18 +33,18 @@ outputs: line_stop: 1 col_start: 3 col_stop: 4 - path: test + path: "" content: "X[1]" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 5 - path: test + path: "" content: "X[1]" - ArrayAccess: array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0u8]\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[0u8]\\\"}\"}" index: Value: Integer: @@ -54,20 +54,20 @@ outputs: line_stop: 1 col_start: 3 col_stop: 6 - path: test + path: "" content: "x[0u8]" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "x[0u8]" - ArrayAccess: array: ArrayAccess: array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[1u8][2u8]\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[1u8][2u8]\\\"}\"}" index: Value: Integer: @@ -77,14 +77,14 @@ outputs: line_stop: 1 col_start: 3 col_stop: 6 - path: test + path: "" content: "x[1u8][2u8]" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "x[1u8][2u8]" index: Value: @@ -95,14 +95,14 @@ outputs: line_stop: 1 col_start: 8 col_stop: 11 - path: test + path: "" content: "x[1u8][2u8]" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: "x[1u8][2u8]" - ArrayAccess: array: @@ -110,39 +110,39 @@ outputs: array: ArrayAccess: array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x][y][z]\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x][y][z]\\\"}\"}" index: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x][y][z]\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x][y][z]\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 5 - path: test + path: "" content: "x[x][y][z]" index: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x][y][z]\\\"}\"}" + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x][y][z]\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 8 - path: test + path: "" content: "x[x][y][z]" index: - Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x][y][z]\\\"}\"}" + Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x][y][z]\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 11 - path: test + path: "" content: "x[x][y][z]" - Call: function: ArrayAccess: array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0]()\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[0]()\\\"}\"}" index: Value: Implicit: @@ -151,14 +151,14 @@ outputs: line_stop: 1 col_start: 3 col_stop: 4 - path: test + path: "" content: "x[0]()" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 5 - path: test + path: "" content: "x[0]()" arguments: [] span: @@ -166,20 +166,20 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "x[0]()" - ArrayAccess: array: Call: function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x()[0]\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x()[0]\\\"}\"}" arguments: [] span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: "x()[0]" index: Value: @@ -189,14 +189,14 @@ outputs: line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: "x()[0]" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "x()[0]" - Call: function: @@ -204,32 +204,32 @@ outputs: circuit: Call: function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(y)::y(x)\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x(y)::y(x)\\\"}\"}" arguments: - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(y)::y(x)\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x(y)::y(x)\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 5 - path: test + path: "" content: "x(y)::y(x)" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(y)::y(x)\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x(y)::y(x)\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 8 - path: test + path: "" content: "x(y)::y(x)" arguments: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(y)::y(x)\\\"}\"}" + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x(y)::y(x)\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 11 - path: test + path: "" content: "x(y)::y(x)" - ArrayAccess: array: @@ -237,15 +237,15 @@ outputs: tuple: ArrayAccess: array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x].0[x]\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x].0[x]\\\"}\"}" index: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x].0[x]\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x].0[x]\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 5 - path: test + path: "" content: "x[x].0[x]" index: value: "0" @@ -254,14 +254,14 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "x[x].0[x]" index: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x].0[x]\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x].0[x]\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "x[x].0[x]" diff --git a/tests/expectations/parser/parser/expression/access/array_range_access.leo.out b/tests/expectations/parser/parser/expression/access/array_range_access.leo.out index 10b02e133d..01765075b3 100644 --- a/tests/expectations/parser/parser/expression/access/array_range_access.leo.out +++ b/tests/expectations/parser/parser/expression/access/array_range_access.leo.out @@ -4,7 +4,7 @@ expectation: Pass outputs: - ArrayRangeAccess: array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..]\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[..]\\\"}\"}" left: ~ right: ~ span: @@ -12,11 +12,11 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: "x[..]" - ArrayRangeAccess: array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[1..]\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[1..]\\\"}\"}" left: Value: Implicit: @@ -25,7 +25,7 @@ outputs: line_stop: 1 col_start: 3 col_stop: 4 - path: test + path: "" content: "x[1..]" right: ~ span: @@ -33,11 +33,11 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "x[1..]" - ArrayRangeAccess: array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..1]\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[..1]\\\"}\"}" left: ~ right: Value: @@ -47,18 +47,18 @@ outputs: line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: "x[..1]" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "x[..1]" - ArrayRangeAccess: array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[1..1]\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[1..1]\\\"}\"}" left: Value: Implicit: @@ -67,7 +67,7 @@ outputs: line_stop: 1 col_start: 3 col_stop: 4 - path: test + path: "" content: "x[1..1]" right: Value: @@ -77,18 +77,18 @@ outputs: line_stop: 1 col_start: 6 col_stop: 7 - path: test + path: "" content: "x[1..1]" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 8 - path: test + path: "" content: "x[1..1]" - ArrayRangeAccess: array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0..100]\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[0..100]\\\"}\"}" left: Value: Implicit: @@ -97,7 +97,7 @@ outputs: line_stop: 1 col_start: 3 col_stop: 4 - path: test + path: "" content: "x[0..100]" right: Value: @@ -107,20 +107,20 @@ outputs: line_stop: 1 col_start: 6 col_stop: 9 - path: test + path: "" content: "x[0..100]" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "x[0..100]" - ArrayAccess: array: ArrayAccess: array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[323452345.2345234523453453][323452345.2345234523453453]\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[323452345.2345234523453453][323452345.2345234523453453]\\\"}\"}" index: TupleAccess: tuple: @@ -131,7 +131,7 @@ outputs: line_stop: 1 col_start: 3 col_stop: 12 - path: test + path: "" content: "x[323452345.2345234523453453][323452345.2345234523453453]" index: value: "2345234523453453" @@ -140,14 +140,14 @@ outputs: line_stop: 1 col_start: 3 col_stop: 29 - path: test + path: "" content: "x[323452345.2345234523453453][323452345.2345234523453453]" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 30 - path: test + path: "" content: "x[323452345.2345234523453453][323452345.2345234523453453]" index: TupleAccess: @@ -159,7 +159,7 @@ outputs: line_stop: 1 col_start: 31 col_stop: 40 - path: test + path: "" content: "x[323452345.2345234523453453][323452345.2345234523453453]" index: value: "2345234523453453" @@ -168,18 +168,18 @@ outputs: line_stop: 1 col_start: 31 col_stop: 57 - path: test + path: "" content: "x[323452345.2345234523453453][323452345.2345234523453453]" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 58 - path: test + path: "" content: "x[323452345.2345234523453453][323452345.2345234523453453]" - ArrayRangeAccess: array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0u8..1u8]\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[0u8..1u8]\\\"}\"}" left: Value: Integer: @@ -189,7 +189,7 @@ outputs: line_stop: 1 col_start: 3 col_stop: 6 - path: test + path: "" content: "x[0u8..1u8]" right: Value: @@ -200,18 +200,18 @@ outputs: line_stop: 1 col_start: 8 col_stop: 11 - path: test + path: "" content: "x[0u8..1u8]" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: "x[0u8..1u8]" - ArrayRangeAccess: array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0u8..]\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[0u8..]\\\"}\"}" left: Value: Integer: @@ -221,7 +221,7 @@ outputs: line_stop: 1 col_start: 3 col_stop: 6 - path: test + path: "" content: "x[0u8..]" right: ~ span: @@ -229,11 +229,11 @@ outputs: line_stop: 1 col_start: 1 col_stop: 9 - path: test + path: "" content: "x[0u8..]" - ArrayRangeAccess: array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..0u8]\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[..0u8]\\\"}\"}" left: ~ right: Value: @@ -244,18 +244,18 @@ outputs: line_stop: 1 col_start: 5 col_stop: 8 - path: test + path: "" content: "x[..0u8]" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 9 - path: test + path: "" content: "x[..0u8]" - ArrayRangeAccess: array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..]\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[..]\\\"}\"}" left: ~ right: ~ span: @@ -263,22 +263,22 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: "x[..]" - ArrayRangeAccess: array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y..]\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x.y..]\\\"}\"}" left: CircuitMemberAccess: circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y..]\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y..]\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x.y..]\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x.y..]\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 3 col_stop: 6 - path: test + path: "" content: "x[x.y..]" right: ~ span: @@ -286,116 +286,116 @@ outputs: line_stop: 1 col_start: 1 col_stop: 9 - path: test + path: "" content: "x[x.y..]" - ArrayRangeAccess: array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..y.x]\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[..y.x]\\\"}\"}" left: ~ right: CircuitMemberAccess: circuit: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..y.x]\\\"}\"}" - name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..y.x]\\\"}\"}" + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[..y.x]\\\"}\"}" + name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[..y.x]\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 5 col_stop: 8 - path: test + path: "" content: "x[..y.x]" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 9 - path: test + path: "" content: "x[..y.x]" - ArrayRangeAccess: array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y..y.x]\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x.y..y.x]\\\"}\"}" left: CircuitMemberAccess: circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y..y.x]\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y..y.x]\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x.y..y.x]\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x.y..y.x]\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 3 col_stop: 6 - path: test + path: "" content: "x[x.y..y.x]" right: CircuitMemberAccess: circuit: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y..y.x]\\\"}\"}" - name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y..y.x]\\\"}\"}" + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x.y..y.x]\\\"}\"}" + name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x.y..y.x]\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 8 col_stop: 11 - path: test + path: "" content: "x[x.y..y.x]" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: "x[x.y..y.x]" - ArrayRangeAccess: array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}" left: CircuitMemberAccess: circuit: CircuitMemberAccess: circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 3 col_stop: 6 - path: test + path: "" content: "x[x.y.x..y.x.y]" - name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}" + name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 3 col_stop: 8 - path: test + path: "" content: "x[x.y.x..y.x.y]" right: CircuitMemberAccess: circuit: CircuitMemberAccess: circuit: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}" - name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}" + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}" + name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 10 col_stop: 13 - path: test + path: "" content: "x[x.y.x..y.x.y]" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 10 col_stop: 15 - path: test + path: "" content: "x[x.y.x..y.x.y]" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 16 - path: test + path: "" content: "x[x.y.x..y.x.y]" diff --git a/tests/expectations/parser/parser/expression/access/call.leo.out b/tests/expectations/parser/parser/expression/access/call.leo.out index ed9e9058da..922d67dd47 100644 --- a/tests/expectations/parser/parser/expression/access/call.leo.out +++ b/tests/expectations/parser/parser/expression/access/call.leo.out @@ -4,77 +4,77 @@ expectation: Pass outputs: - Call: function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x()\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x()\\\"}\"}" arguments: [] span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: x() - Call: function: - Identifier: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"X()\\\"}\"}" + Identifier: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"X()\\\"}\"}" arguments: [] span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: X() - Call: function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(y)\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x(y)\\\"}\"}" arguments: - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(y)\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x(y)\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 5 - path: test + path: "" content: x(y) - Call: function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(y, z)\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x(y, z)\\\"}\"}" arguments: - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(y, z)\\\"}\"}" - - Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(y, z)\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x(y, z)\\\"}\"}" + - Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x(y, z)\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 8 - path: test + path: "" content: "x(y, z)" - Call: function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(x, y, z)\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x(x, y, z)\\\"}\"}" arguments: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(x, y, z)\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(x, y, z)\\\"}\"}" - - Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(x, y, z)\\\"}\"}" + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x(x, y, z)\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x(x, y, z)\\\"}\"}" + - Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x(x, y, z)\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 11 - path: test + path: "" content: "x(x, y, z)" - Call: function: CircuitStaticFunctionAccess: circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y()\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y()\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y()\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y()\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 5 - path: test + path: "" content: "x::y()" arguments: [] span: @@ -82,35 +82,35 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "x::y()" - Call: function: CircuitStaticFunctionAccess: circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y(x)\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y(x)\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y(x)\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y(x)\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 5 - path: test + path: "" content: "x::y(x)" arguments: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y(x)\\\"}\"}" + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y(x)\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 8 - path: test + path: "" content: "x::y(x)" - Call: function: TupleAccess: tuple: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.0(x)\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.0(x)\\\"}\"}" index: value: "0" span: @@ -118,22 +118,22 @@ outputs: line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: x.0(x) arguments: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.0(x)\\\"}\"}" + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.0(x)\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: x.0(x) - Call: function: ArrayAccess: array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0](x)\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[0](x)\\\"}\"}" index: Value: Implicit: @@ -142,21 +142,21 @@ outputs: line_stop: 1 col_start: 3 col_stop: 4 - path: test + path: "" content: "x[0](x)" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 5 - path: test + path: "" content: "x[0](x)" arguments: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0](x)\\\"}\"}" + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[0](x)\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 8 - path: test + path: "" content: "x[0](x)" diff --git a/tests/expectations/parser/parser/expression/access/circuit.leo.out b/tests/expectations/parser/parser/expression/access/circuit.leo.out index e10176179c..8498601d1e 100644 --- a/tests/expectations/parser/parser/expression/access/circuit.leo.out +++ b/tests/expectations/parser/parser/expression/access/circuit.leo.out @@ -4,59 +4,59 @@ expectation: Pass outputs: - CircuitMemberAccess: circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.y\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.y\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: x.y - CircuitMemberAccess: circuit: - Identifier: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"X.Y\\\"}\"}" - name: "{\"name\":\"Y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"X.Y\\\"}\"}" + Identifier: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"X.Y\\\"}\"}" + name: "{\"name\":\"Y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"X.Y\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: X.Y - CircuitMemberAccess: circuit: CircuitMemberAccess: circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y.z\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y.z\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.y.z\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.y.z\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: x.y.z - name: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y.z\\\"}\"}" + name: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.y.z\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: x.y.z - Call: function: CircuitMemberAccess: circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y()\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y()\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.y()\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.y()\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: x.y() arguments: [] span: @@ -64,20 +64,20 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: x.y() - TupleAccess: tuple: CircuitMemberAccess: circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y.0\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y.0\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.y.0\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.y.0\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: x.y.0 index: value: "0" @@ -86,20 +86,20 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: x.y.0 - ArrayAccess: array: CircuitMemberAccess: circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y[1]\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y[1]\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.y[1]\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.y[1]\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: "x.y[1]" index: Value: @@ -109,12 +109,12 @@ outputs: line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: "x.y[1]" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "x.y[1]" diff --git a/tests/expectations/parser/parser/expression/access/circuit_static.leo.out b/tests/expectations/parser/parser/expression/access/circuit_static.leo.out index eed96329a1..d4bc568323 100644 --- a/tests/expectations/parser/parser/expression/access/circuit_static.leo.out +++ b/tests/expectations/parser/parser/expression/access/circuit_static.leo.out @@ -4,59 +4,59 @@ expectation: Pass outputs: - CircuitStaticFunctionAccess: circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 5 - path: test + path: "" content: "x::y" - CircuitStaticFunctionAccess: circuit: - Identifier: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"X::Y\\\"}\"}" - name: "{\"name\":\"Y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"X::Y\\\"}\"}" + Identifier: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"X::Y\\\"}\"}" + name: "{\"name\":\"Y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"X::Y\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 5 - path: test + path: "" content: "X::Y" - CircuitStaticFunctionAccess: circuit: CircuitStaticFunctionAccess: circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y::z\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y::z\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y::z\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y::z\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 5 - path: test + path: "" content: "x::y::z" - name: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y::z\\\"}\"}" + name: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y::z\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 8 - path: test + path: "" content: "x::y::z" - Call: function: CircuitStaticFunctionAccess: circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y()\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y()\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y()\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y()\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 5 - path: test + path: "" content: "x::y()" arguments: [] span: @@ -64,20 +64,20 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "x::y()" - TupleAccess: tuple: CircuitStaticFunctionAccess: circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y.0\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y.0\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y.0\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y.0\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 5 - path: test + path: "" content: "x::y.0" index: value: "0" @@ -86,20 +86,20 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "x::y.0" - ArrayAccess: array: CircuitStaticFunctionAccess: circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y[1]\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y[1]\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y[1]\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y[1]\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 5 - path: test + path: "" content: "x::y[1]" index: Value: @@ -109,12 +109,12 @@ outputs: line_stop: 1 col_start: 6 col_stop: 7 - path: test + path: "" content: "x::y[1]" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 8 - path: test + path: "" content: "x::y[1]" diff --git a/tests/expectations/parser/parser/expression/access/tuple.leo.out b/tests/expectations/parser/parser/expression/access/tuple.leo.out index c4089a4522..5a9b570777 100644 --- a/tests/expectations/parser/parser/expression/access/tuple.leo.out +++ b/tests/expectations/parser/parser/expression/access/tuple.leo.out @@ -4,7 +4,7 @@ expectation: Pass outputs: - TupleAccess: tuple: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.0\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.0\\\"}\"}" index: value: "0" span: @@ -12,11 +12,11 @@ outputs: line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: x.0 - TupleAccess: tuple: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.1\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.1\\\"}\"}" index: value: "1" span: @@ -24,11 +24,11 @@ outputs: line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: x.1 - TupleAccess: tuple: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.2\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.2\\\"}\"}" index: value: "2" span: @@ -36,13 +36,13 @@ outputs: line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: x.2 - TupleAccess: tuple: TupleAccess: tuple: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.0.0\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.0.0\\\"}\"}" index: value: "0" span: @@ -50,7 +50,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: x.0.0 index: value: "0" @@ -59,13 +59,13 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: x.0.0 - TupleAccess: tuple: TupleAccess: tuple: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.1.1\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.1.1\\\"}\"}" index: value: "1" span: @@ -73,7 +73,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: x.1.1 index: value: "1" @@ -82,13 +82,13 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: x.1.1 - TupleAccess: tuple: TupleAccess: tuple: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.2.2\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.2.2\\\"}\"}" index: value: "2" span: @@ -96,7 +96,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: x.2.2 index: value: "2" @@ -105,5 +105,5 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: x.2.2 diff --git a/tests/expectations/parser/parser/expression/array_init.leo.out b/tests/expectations/parser/parser/expression/array_init.leo.out index c8ee3bfb32..a85d5bacea 100644 --- a/tests/expectations/parser/parser/expression/array_init.leo.out +++ b/tests/expectations/parser/parser/expression/array_init.leo.out @@ -12,7 +12,7 @@ outputs: line_stop: 1 col_start: 2 col_stop: 5 - path: test + path: "" content: "[0u8; 1]" dimensions: - value: "1" @@ -21,7 +21,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 9 - path: test + path: "" content: "[0u8; 1]" - ArrayInit: element: @@ -32,7 +32,7 @@ outputs: line_stop: 1 col_start: 2 col_stop: 3 - path: test + path: "" content: "[0; 1]" dimensions: - value: "1" @@ -41,7 +41,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "[0; 1]" - ArrayInit: element: @@ -52,7 +52,7 @@ outputs: line_stop: 1 col_start: 2 col_stop: 3 - path: test + path: "" content: "[0; (1)]" dimensions: - value: "1" @@ -61,7 +61,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 9 - path: test + path: "" content: "[0; (1)]" - ArrayInit: element: @@ -72,7 +72,7 @@ outputs: line_stop: 1 col_start: 2 col_stop: 3 - path: test + path: "" content: "[0; (1, 2)]" dimensions: - value: "1" @@ -82,7 +82,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: "[0; (1, 2)]" - ArrayInit: element: @@ -93,7 +93,7 @@ outputs: line_stop: 1 col_start: 2 col_stop: 3 - path: test + path: "" content: "[0; (1, 2, 3)]" dimensions: - value: "1" @@ -104,7 +104,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: "[0; (1, 2, 3)]" - ArrayInit: element: @@ -119,7 +119,7 @@ outputs: line_stop: 1 col_start: 4 col_stop: 5 - path: test + path: "" content: "[[[0; 3]; 2]; 1]" dimensions: - value: "3" @@ -128,7 +128,7 @@ outputs: line_stop: 1 col_start: 3 col_stop: 9 - path: test + path: "" content: "[[[0; 3]; 2]; 1]" dimensions: - value: "2" @@ -137,7 +137,7 @@ outputs: line_stop: 1 col_start: 2 col_stop: 13 - path: test + path: "" content: "[[[0; 3]; 2]; 1]" dimensions: - value: "1" @@ -146,5 +146,5 @@ outputs: line_stop: 1 col_start: 1 col_stop: 17 - path: test + path: "" content: "[[[0; 3]; 2]; 1]" diff --git a/tests/expectations/parser/parser/expression/array_inline.leo.out b/tests/expectations/parser/parser/expression/array_inline.leo.out index ae4ccf624f..0d8b1911cf 100644 --- a/tests/expectations/parser/parser/expression/array_inline.leo.out +++ b/tests/expectations/parser/parser/expression/array_inline.leo.out @@ -13,7 +13,7 @@ outputs: line_stop: 1 col_start: 2 col_stop: 5 - path: test + path: "" content: "[0u8, 1, 2, 3]" - Expression: Value: @@ -23,7 +23,7 @@ outputs: line_stop: 1 col_start: 7 col_stop: 8 - path: test + path: "" content: "[0u8, 1, 2, 3]" - Expression: Value: @@ -33,7 +33,7 @@ outputs: line_stop: 1 col_start: 10 col_stop: 11 - path: test + path: "" content: "[0u8, 1, 2, 3]" - Expression: Value: @@ -43,14 +43,14 @@ outputs: line_stop: 1 col_start: 13 col_stop: 14 - path: test + path: "" content: "[0u8, 1, 2, 3]" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: "[0u8, 1, 2, 3]" - ArrayInline: elements: @@ -62,14 +62,14 @@ outputs: line_stop: 1 col_start: 2 col_stop: 3 - path: test + path: "" content: "[1]" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: "[1]" - ArrayInline: elements: @@ -82,14 +82,14 @@ outputs: line_stop: 1 col_start: 2 col_stop: 5 - path: test + path: "" content: "[1u8]" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: "[1u8]" - ArrayInline: elements: @@ -102,14 +102,14 @@ outputs: line_stop: 1 col_start: 2 col_stop: 5 - path: test + path: "" content: "[1u8,]" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "[1u8,]" - ArrayInline: elements: @@ -121,7 +121,7 @@ outputs: line_stop: 1 col_start: 2 col_stop: 3 - path: test + path: "" content: "[0, 1,]" - Expression: Value: @@ -131,14 +131,14 @@ outputs: line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: "[0, 1,]" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 8 - path: test + path: "" content: "[0, 1,]" - ArrayInline: elements: @@ -150,7 +150,7 @@ outputs: line_stop: 1 col_start: 2 col_stop: 3 - path: test + path: "" content: "[0,1,]" - Expression: Value: @@ -160,14 +160,14 @@ outputs: line_stop: 1 col_start: 4 col_stop: 5 - path: test + path: "" content: "[0,1,]" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "[0,1,]" - ArrayInline: elements: [] @@ -176,7 +176,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 3 - path: test + path: "" content: "[]" - ArrayInline: elements: @@ -191,7 +191,7 @@ outputs: line_stop: 1 col_start: 3 col_stop: 4 - path: test + path: "" content: "[[1,2,3],[1,2,3]]" - Expression: Value: @@ -201,7 +201,7 @@ outputs: line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: "[[1,2,3],[1,2,3]]" - Expression: Value: @@ -211,14 +211,14 @@ outputs: line_stop: 1 col_start: 7 col_stop: 8 - path: test + path: "" content: "[[1,2,3],[1,2,3]]" span: line_start: 1 line_stop: 1 col_start: 2 col_stop: 9 - path: test + path: "" content: "[[1,2,3],[1,2,3]]" - Expression: ArrayInline: @@ -231,7 +231,7 @@ outputs: line_stop: 1 col_start: 11 col_stop: 12 - path: test + path: "" content: "[[1,2,3],[1,2,3]]" - Expression: Value: @@ -241,7 +241,7 @@ outputs: line_stop: 1 col_start: 13 col_stop: 14 - path: test + path: "" content: "[[1,2,3],[1,2,3]]" - Expression: Value: @@ -251,21 +251,21 @@ outputs: line_stop: 1 col_start: 15 col_stop: 16 - path: test + path: "" content: "[[1,2,3],[1,2,3]]" span: line_start: 1 line_stop: 1 col_start: 10 col_stop: 17 - path: test + path: "" content: "[[1,2,3],[1,2,3]]" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 18 - path: test + path: "" content: "[[1,2,3],[1,2,3]]" - ArrayInline: elements: @@ -277,14 +277,14 @@ outputs: line_stop: 1 col_start: 2 col_stop: 4 - path: test + path: "" content: "[[]]" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 5 - path: test + path: "" content: "[[]]" - ArrayInline: elements: @@ -296,7 +296,7 @@ outputs: line_stop: 1 col_start: 2 col_stop: 4 - path: test + path: "" content: "[[], []]" - Expression: ArrayInline: @@ -306,12 +306,12 @@ outputs: line_stop: 1 col_start: 6 col_stop: 8 - path: test + path: "" content: "[[], []]" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 9 - path: test + path: "" content: "[[], []]" diff --git a/tests/expectations/parser/parser/expression/binary/add.leo.out b/tests/expectations/parser/parser/expression/binary/add.leo.out index 72d244dd8d..9648060da3 100644 --- a/tests/expectations/parser/parser/expression/binary/add.leo.out +++ b/tests/expectations/parser/parser/expression/binary/add.leo.out @@ -11,7 +11,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 + 1 right: Value: @@ -21,7 +21,7 @@ outputs: line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: 1 + 1 op: Add span: @@ -29,7 +29,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: 1 + 1 - Binary: left: @@ -40,7 +40,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 2+3 right: Value: @@ -50,7 +50,7 @@ outputs: line_stop: 1 col_start: 3 col_stop: 4 - path: test + path: "" content: 2+3 op: Add span: @@ -58,7 +58,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: 2+3 - Binary: left: @@ -71,7 +71,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 + 2 + 3 right: Value: @@ -81,7 +81,7 @@ outputs: line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: 1 + 2 + 3 op: Add span: @@ -89,7 +89,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: 1 + 2 + 3 right: Value: @@ -99,7 +99,7 @@ outputs: line_stop: 1 col_start: 9 col_stop: 10 - path: test + path: "" content: 1 + 2 + 3 op: Add span: @@ -107,7 +107,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: 1 + 2 + 3 - Binary: left: @@ -120,7 +120,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 * 2 + 3 * 4 right: Value: @@ -130,7 +130,7 @@ outputs: line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: 1 * 2 + 3 * 4 op: Mul span: @@ -138,7 +138,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: 1 * 2 + 3 * 4 right: Binary: @@ -150,7 +150,7 @@ outputs: line_stop: 1 col_start: 9 col_stop: 10 - path: test + path: "" content: 1 * 2 + 3 * 4 right: Value: @@ -160,7 +160,7 @@ outputs: line_stop: 1 col_start: 13 col_stop: 14 - path: test + path: "" content: 1 * 2 + 3 * 4 op: Mul span: @@ -168,7 +168,7 @@ outputs: line_stop: 1 col_start: 9 col_stop: 14 - path: test + path: "" content: 1 * 2 + 3 * 4 op: Add span: @@ -176,7 +176,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 1 * 2 + 3 * 4 - Binary: left: @@ -189,7 +189,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 + 2 - 3 right: Value: @@ -199,7 +199,7 @@ outputs: line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: 1 + 2 - 3 op: Add span: @@ -207,7 +207,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: 1 + 2 - 3 right: Value: @@ -217,7 +217,7 @@ outputs: line_stop: 1 col_start: 9 col_stop: 10 - path: test + path: "" content: 1 + 2 - 3 op: Sub span: @@ -225,7 +225,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: 1 + 2 - 3 - Binary: left: @@ -240,7 +240,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 * 2 + 3 * 4 - 5 * 6 right: Value: @@ -250,7 +250,7 @@ outputs: line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: 1 * 2 + 3 * 4 - 5 * 6 op: Mul span: @@ -258,7 +258,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: 1 * 2 + 3 * 4 - 5 * 6 right: Binary: @@ -270,7 +270,7 @@ outputs: line_stop: 1 col_start: 9 col_stop: 10 - path: test + path: "" content: 1 * 2 + 3 * 4 - 5 * 6 right: Value: @@ -280,7 +280,7 @@ outputs: line_stop: 1 col_start: 13 col_stop: 14 - path: test + path: "" content: 1 * 2 + 3 * 4 - 5 * 6 op: Mul span: @@ -288,7 +288,7 @@ outputs: line_stop: 1 col_start: 9 col_stop: 14 - path: test + path: "" content: 1 * 2 + 3 * 4 - 5 * 6 op: Add span: @@ -296,7 +296,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 1 * 2 + 3 * 4 - 5 * 6 right: Binary: @@ -308,7 +308,7 @@ outputs: line_stop: 1 col_start: 17 col_stop: 18 - path: test + path: "" content: 1 * 2 + 3 * 4 - 5 * 6 right: Value: @@ -318,7 +318,7 @@ outputs: line_stop: 1 col_start: 21 col_stop: 22 - path: test + path: "" content: 1 * 2 + 3 * 4 - 5 * 6 op: Mul span: @@ -326,7 +326,7 @@ outputs: line_stop: 1 col_start: 17 col_stop: 22 - path: test + path: "" content: 1 * 2 + 3 * 4 - 5 * 6 op: Sub span: @@ -334,5 +334,5 @@ outputs: line_stop: 1 col_start: 1 col_stop: 22 - path: test + path: "" content: 1 * 2 + 3 * 4 - 5 * 6 diff --git a/tests/expectations/parser/parser/expression/binary/and.leo.out b/tests/expectations/parser/parser/expression/binary/and.leo.out index b6f8de5d72..b78bdf05ec 100644 --- a/tests/expectations/parser/parser/expression/binary/and.leo.out +++ b/tests/expectations/parser/parser/expression/binary/and.leo.out @@ -11,7 +11,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 5 - path: test + path: "" content: true && false right: Value: @@ -21,7 +21,7 @@ outputs: line_stop: 1 col_start: 9 col_stop: 14 - path: test + path: "" content: true && false op: And span: @@ -29,7 +29,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: true && false - Binary: left: @@ -40,7 +40,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: false&&true right: Value: @@ -50,7 +50,7 @@ outputs: line_stop: 1 col_start: 8 col_stop: 12 - path: test + path: "" content: false&&true op: And span: @@ -58,7 +58,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: false&&true - Binary: left: @@ -71,7 +71,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 5 - path: test + path: "" content: true&&false&&true right: Value: @@ -81,7 +81,7 @@ outputs: line_stop: 1 col_start: 7 col_stop: 12 - path: test + path: "" content: true&&false&&true op: And span: @@ -89,7 +89,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: true&&false&&true right: Value: @@ -99,7 +99,7 @@ outputs: line_stop: 1 col_start: 14 col_stop: 18 - path: test + path: "" content: true&&false&&true op: And span: @@ -107,5 +107,5 @@ outputs: line_stop: 1 col_start: 1 col_stop: 18 - path: test + path: "" content: true&&false&&true diff --git a/tests/expectations/parser/parser/expression/binary/div.leo.out b/tests/expectations/parser/parser/expression/binary/div.leo.out index 45684cd859..b247975db9 100644 --- a/tests/expectations/parser/parser/expression/binary/div.leo.out +++ b/tests/expectations/parser/parser/expression/binary/div.leo.out @@ -11,7 +11,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 / 1 right: Value: @@ -21,7 +21,7 @@ outputs: line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: 1 / 1 op: Div span: @@ -29,7 +29,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: 1 / 1 - Binary: left: @@ -40,7 +40,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 2/3 right: Value: @@ -50,7 +50,7 @@ outputs: line_stop: 1 col_start: 3 col_stop: 4 - path: test + path: "" content: 2/3 op: Div span: @@ -58,7 +58,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: 2/3 - Binary: left: @@ -71,7 +71,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 / 2 / 3 right: Value: @@ -81,7 +81,7 @@ outputs: line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: 1 / 2 / 3 op: Div span: @@ -89,7 +89,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: 1 / 2 / 3 right: Value: @@ -99,7 +99,7 @@ outputs: line_stop: 1 col_start: 9 col_stop: 10 - path: test + path: "" content: 1 / 2 / 3 op: Div span: @@ -107,7 +107,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: 1 / 2 / 3 - Binary: left: @@ -120,7 +120,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 ** 2 / 3 ** 4 right: Value: @@ -130,7 +130,7 @@ outputs: line_stop: 1 col_start: 6 col_stop: 7 - path: test + path: "" content: 1 ** 2 / 3 ** 4 op: Pow span: @@ -138,7 +138,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: 1 ** 2 / 3 ** 4 right: Binary: @@ -150,7 +150,7 @@ outputs: line_stop: 1 col_start: 10 col_stop: 11 - path: test + path: "" content: 1 ** 2 / 3 ** 4 right: Value: @@ -160,7 +160,7 @@ outputs: line_stop: 1 col_start: 15 col_stop: 16 - path: test + path: "" content: 1 ** 2 / 3 ** 4 op: Pow span: @@ -168,7 +168,7 @@ outputs: line_stop: 1 col_start: 10 col_stop: 16 - path: test + path: "" content: 1 ** 2 / 3 ** 4 op: Div span: @@ -176,5 +176,5 @@ outputs: line_stop: 1 col_start: 1 col_stop: 16 - path: test + path: "" content: 1 ** 2 / 3 ** 4 diff --git a/tests/expectations/parser/parser/expression/binary/eq.leo.out b/tests/expectations/parser/parser/expression/binary/eq.leo.out index a467a62bae..4d6341f2d8 100644 --- a/tests/expectations/parser/parser/expression/binary/eq.leo.out +++ b/tests/expectations/parser/parser/expression/binary/eq.leo.out @@ -11,7 +11,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 == 1 right: Value: @@ -21,7 +21,7 @@ outputs: line_stop: 1 col_start: 6 col_stop: 7 - path: test + path: "" content: 1 == 1 op: Eq span: @@ -29,7 +29,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: 1 == 1 - Binary: left: @@ -40,7 +40,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 2==3 right: Value: @@ -50,7 +50,7 @@ outputs: line_stop: 1 col_start: 4 col_stop: 5 - path: test + path: "" content: 2==3 op: Eq span: @@ -58,7 +58,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 5 - path: test + path: "" content: 2==3 - Binary: left: @@ -71,7 +71,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 < 2 == 3 < 4 right: Value: @@ -81,7 +81,7 @@ outputs: line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: 1 < 2 == 3 < 4 op: Lt span: @@ -89,7 +89,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: 1 < 2 == 3 < 4 right: Binary: @@ -101,7 +101,7 @@ outputs: line_stop: 1 col_start: 10 col_stop: 11 - path: test + path: "" content: 1 < 2 == 3 < 4 right: Value: @@ -111,7 +111,7 @@ outputs: line_stop: 1 col_start: 14 col_stop: 15 - path: test + path: "" content: 1 < 2 == 3 < 4 op: Lt span: @@ -119,7 +119,7 @@ outputs: line_stop: 1 col_start: 10 col_stop: 15 - path: test + path: "" content: 1 < 2 == 3 < 4 op: Eq span: @@ -127,7 +127,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 1 < 2 == 3 < 4 - Binary: left: @@ -142,7 +142,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 < 2 == 3 < 4 && 3 < 4 == 5 < 6 right: Value: @@ -152,7 +152,7 @@ outputs: line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: 1 < 2 == 3 < 4 && 3 < 4 == 5 < 6 op: Lt span: @@ -160,7 +160,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: 1 < 2 == 3 < 4 && 3 < 4 == 5 < 6 right: Binary: @@ -172,7 +172,7 @@ outputs: line_stop: 1 col_start: 10 col_stop: 11 - path: test + path: "" content: 1 < 2 == 3 < 4 && 3 < 4 == 5 < 6 right: Value: @@ -182,7 +182,7 @@ outputs: line_stop: 1 col_start: 14 col_stop: 15 - path: test + path: "" content: 1 < 2 == 3 < 4 && 3 < 4 == 5 < 6 op: Lt span: @@ -190,7 +190,7 @@ outputs: line_stop: 1 col_start: 10 col_stop: 15 - path: test + path: "" content: 1 < 2 == 3 < 4 && 3 < 4 == 5 < 6 op: Eq span: @@ -198,7 +198,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 1 < 2 == 3 < 4 && 3 < 4 == 5 < 6 right: Binary: @@ -212,7 +212,7 @@ outputs: line_stop: 1 col_start: 19 col_stop: 20 - path: test + path: "" content: 1 < 2 == 3 < 4 && 3 < 4 == 5 < 6 right: Value: @@ -222,7 +222,7 @@ outputs: line_stop: 1 col_start: 23 col_stop: 24 - path: test + path: "" content: 1 < 2 == 3 < 4 && 3 < 4 == 5 < 6 op: Lt span: @@ -230,7 +230,7 @@ outputs: line_stop: 1 col_start: 19 col_stop: 24 - path: test + path: "" content: 1 < 2 == 3 < 4 && 3 < 4 == 5 < 6 right: Binary: @@ -242,7 +242,7 @@ outputs: line_stop: 1 col_start: 28 col_stop: 29 - path: test + path: "" content: 1 < 2 == 3 < 4 && 3 < 4 == 5 < 6 right: Value: @@ -252,7 +252,7 @@ outputs: line_stop: 1 col_start: 32 col_stop: 33 - path: test + path: "" content: 1 < 2 == 3 < 4 && 3 < 4 == 5 < 6 op: Lt span: @@ -260,7 +260,7 @@ outputs: line_stop: 1 col_start: 28 col_stop: 33 - path: test + path: "" content: 1 < 2 == 3 < 4 && 3 < 4 == 5 < 6 op: Eq span: @@ -268,7 +268,7 @@ outputs: line_stop: 1 col_start: 19 col_stop: 33 - path: test + path: "" content: 1 < 2 == 3 < 4 && 3 < 4 == 5 < 6 op: And span: @@ -276,5 +276,5 @@ outputs: line_stop: 1 col_start: 1 col_stop: 33 - path: test + path: "" content: 1 < 2 == 3 < 4 && 3 < 4 == 5 < 6 diff --git a/tests/expectations/parser/parser/expression/binary/exp.leo.out b/tests/expectations/parser/parser/expression/binary/exp.leo.out index b0c39a877f..cbac3279a1 100644 --- a/tests/expectations/parser/parser/expression/binary/exp.leo.out +++ b/tests/expectations/parser/parser/expression/binary/exp.leo.out @@ -11,7 +11,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 ** 1 right: Value: @@ -21,7 +21,7 @@ outputs: line_stop: 1 col_start: 6 col_stop: 7 - path: test + path: "" content: 1 ** 1 op: Pow span: @@ -29,7 +29,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: 1 ** 1 - Binary: left: @@ -40,7 +40,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 2**3 right: Value: @@ -50,7 +50,7 @@ outputs: line_stop: 1 col_start: 4 col_stop: 5 - path: test + path: "" content: 2**3 op: Pow span: @@ -58,7 +58,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 5 - path: test + path: "" content: 2**3 - Binary: left: @@ -69,7 +69,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 ** 2 ** 3 right: Binary: @@ -81,7 +81,7 @@ outputs: line_stop: 1 col_start: 6 col_stop: 7 - path: test + path: "" content: 1 ** 2 ** 3 right: Value: @@ -91,7 +91,7 @@ outputs: line_stop: 1 col_start: 11 col_stop: 12 - path: test + path: "" content: 1 ** 2 ** 3 op: Pow span: @@ -99,7 +99,7 @@ outputs: line_stop: 1 col_start: 6 col_stop: 12 - path: test + path: "" content: 1 ** 2 ** 3 op: Pow span: @@ -107,7 +107,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 1 ** 2 ** 3 - Binary: left: @@ -120,7 +120,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 as i8 ** 3 as i8 target_type: IntegerType: I8 @@ -129,7 +129,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 8 - path: test + path: "" content: 1 as i8 ** 3 as i8 right: Cast: @@ -141,7 +141,7 @@ outputs: line_stop: 1 col_start: 12 col_stop: 13 - path: test + path: "" content: 1 as i8 ** 3 as i8 target_type: IntegerType: I8 @@ -150,7 +150,7 @@ outputs: line_stop: 1 col_start: 12 col_stop: 19 - path: test + path: "" content: 1 as i8 ** 3 as i8 op: Pow span: @@ -158,7 +158,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 19 - path: test + path: "" content: 1 as i8 ** 3 as i8 - Binary: left: @@ -171,7 +171,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 as i8 ** 3 as i8 ** 5 as i8 target_type: IntegerType: I8 @@ -180,7 +180,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 8 - path: test + path: "" content: 1 as i8 ** 3 as i8 ** 5 as i8 right: Binary: @@ -194,7 +194,7 @@ outputs: line_stop: 1 col_start: 12 col_stop: 13 - path: test + path: "" content: 1 as i8 ** 3 as i8 ** 5 as i8 target_type: IntegerType: I8 @@ -203,7 +203,7 @@ outputs: line_stop: 1 col_start: 12 col_stop: 19 - path: test + path: "" content: 1 as i8 ** 3 as i8 ** 5 as i8 right: Cast: @@ -215,7 +215,7 @@ outputs: line_stop: 1 col_start: 23 col_stop: 24 - path: test + path: "" content: 1 as i8 ** 3 as i8 ** 5 as i8 target_type: IntegerType: I8 @@ -224,7 +224,7 @@ outputs: line_stop: 1 col_start: 23 col_stop: 30 - path: test + path: "" content: 1 as i8 ** 3 as i8 ** 5 as i8 op: Pow span: @@ -232,7 +232,7 @@ outputs: line_stop: 1 col_start: 12 col_stop: 30 - path: test + path: "" content: 1 as i8 ** 3 as i8 ** 5 as i8 op: Pow span: @@ -240,5 +240,5 @@ outputs: line_stop: 1 col_start: 1 col_stop: 30 - path: test + path: "" content: 1 as i8 ** 3 as i8 ** 5 as i8 diff --git a/tests/expectations/parser/parser/expression/binary/gt.leo.out b/tests/expectations/parser/parser/expression/binary/gt.leo.out index b9d5cfd72d..186db57773 100644 --- a/tests/expectations/parser/parser/expression/binary/gt.leo.out +++ b/tests/expectations/parser/parser/expression/binary/gt.leo.out @@ -11,7 +11,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 > 1 right: Value: @@ -21,7 +21,7 @@ outputs: line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: 1 > 1 op: Gt span: @@ -29,7 +29,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: 1 > 1 - Binary: left: @@ -40,7 +40,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 2>3 right: Value: @@ -50,7 +50,7 @@ outputs: line_stop: 1 col_start: 3 col_stop: 4 - path: test + path: "" content: 2>3 op: Gt span: @@ -58,7 +58,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: 2>3 - Binary: left: @@ -71,7 +71,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 > 2 > 3 right: Value: @@ -81,7 +81,7 @@ outputs: line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: 1 > 2 > 3 op: Gt span: @@ -89,7 +89,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: 1 > 2 > 3 right: Value: @@ -99,7 +99,7 @@ outputs: line_stop: 1 col_start: 9 col_stop: 10 - path: test + path: "" content: 1 > 2 > 3 op: Gt span: @@ -107,7 +107,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: 1 > 2 > 3 - Binary: left: @@ -120,7 +120,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 + 2 > 3 + 4 right: Value: @@ -130,7 +130,7 @@ outputs: line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: 1 + 2 > 3 + 4 op: Add span: @@ -138,7 +138,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: 1 + 2 > 3 + 4 right: Binary: @@ -150,7 +150,7 @@ outputs: line_stop: 1 col_start: 9 col_stop: 10 - path: test + path: "" content: 1 + 2 > 3 + 4 right: Value: @@ -160,7 +160,7 @@ outputs: line_stop: 1 col_start: 13 col_stop: 14 - path: test + path: "" content: 1 + 2 > 3 + 4 op: Add span: @@ -168,7 +168,7 @@ outputs: line_stop: 1 col_start: 9 col_stop: 14 - path: test + path: "" content: 1 + 2 > 3 + 4 op: Gt span: @@ -176,7 +176,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 1 + 2 > 3 + 4 - Binary: left: @@ -189,7 +189,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 > 2 > 3 right: Value: @@ -199,7 +199,7 @@ outputs: line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: 1 > 2 > 3 op: Gt span: @@ -207,7 +207,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: 1 > 2 > 3 right: Value: @@ -217,7 +217,7 @@ outputs: line_stop: 1 col_start: 9 col_stop: 10 - path: test + path: "" content: 1 > 2 > 3 op: Gt span: @@ -225,7 +225,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: 1 > 2 > 3 - Binary: left: @@ -240,7 +240,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 + 2 > 3 + 4 > 5 + 6 right: Value: @@ -250,7 +250,7 @@ outputs: line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: 1 + 2 > 3 + 4 > 5 + 6 op: Add span: @@ -258,7 +258,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: 1 + 2 > 3 + 4 > 5 + 6 right: Binary: @@ -270,7 +270,7 @@ outputs: line_stop: 1 col_start: 9 col_stop: 10 - path: test + path: "" content: 1 + 2 > 3 + 4 > 5 + 6 right: Value: @@ -280,7 +280,7 @@ outputs: line_stop: 1 col_start: 13 col_stop: 14 - path: test + path: "" content: 1 + 2 > 3 + 4 > 5 + 6 op: Add span: @@ -288,7 +288,7 @@ outputs: line_stop: 1 col_start: 9 col_stop: 14 - path: test + path: "" content: 1 + 2 > 3 + 4 > 5 + 6 op: Gt span: @@ -296,7 +296,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 1 + 2 > 3 + 4 > 5 + 6 right: Binary: @@ -308,7 +308,7 @@ outputs: line_stop: 1 col_start: 17 col_stop: 18 - path: test + path: "" content: 1 + 2 > 3 + 4 > 5 + 6 right: Value: @@ -318,7 +318,7 @@ outputs: line_stop: 1 col_start: 21 col_stop: 22 - path: test + path: "" content: 1 + 2 > 3 + 4 > 5 + 6 op: Add span: @@ -326,7 +326,7 @@ outputs: line_stop: 1 col_start: 17 col_stop: 22 - path: test + path: "" content: 1 + 2 > 3 + 4 > 5 + 6 op: Gt span: @@ -334,5 +334,5 @@ outputs: line_stop: 1 col_start: 1 col_stop: 22 - path: test + path: "" content: 1 + 2 > 3 + 4 > 5 + 6 diff --git a/tests/expectations/parser/parser/expression/binary/gte.leo.out b/tests/expectations/parser/parser/expression/binary/gte.leo.out index 9ab526f71c..a7fd2f15c9 100644 --- a/tests/expectations/parser/parser/expression/binary/gte.leo.out +++ b/tests/expectations/parser/parser/expression/binary/gte.leo.out @@ -11,7 +11,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 >= 1 right: Value: @@ -21,7 +21,7 @@ outputs: line_stop: 1 col_start: 6 col_stop: 7 - path: test + path: "" content: 1 >= 1 op: Ge span: @@ -29,7 +29,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: 1 >= 1 - Binary: left: @@ -40,7 +40,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 2 >= 3 right: Value: @@ -50,7 +50,7 @@ outputs: line_stop: 1 col_start: 6 col_stop: 7 - path: test + path: "" content: 2 >= 3 op: Ge span: @@ -58,7 +58,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: 2 >= 3 - Binary: left: @@ -71,7 +71,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 >= 2 >= 3 right: Value: @@ -81,7 +81,7 @@ outputs: line_stop: 1 col_start: 6 col_stop: 7 - path: test + path: "" content: 1 >= 2 >= 3 op: Ge span: @@ -89,7 +89,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: 1 >= 2 >= 3 right: Value: @@ -99,7 +99,7 @@ outputs: line_stop: 1 col_start: 11 col_stop: 12 - path: test + path: "" content: 1 >= 2 >= 3 op: Ge span: @@ -107,7 +107,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 1 >= 2 >= 3 - Binary: left: @@ -120,7 +120,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 + 2 >= 3 + 4 right: Value: @@ -130,7 +130,7 @@ outputs: line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: 1 + 2 >= 3 + 4 op: Add span: @@ -138,7 +138,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: 1 + 2 >= 3 + 4 right: Binary: @@ -150,7 +150,7 @@ outputs: line_stop: 1 col_start: 10 col_stop: 11 - path: test + path: "" content: 1 + 2 >= 3 + 4 right: Value: @@ -160,7 +160,7 @@ outputs: line_stop: 1 col_start: 14 col_stop: 15 - path: test + path: "" content: 1 + 2 >= 3 + 4 op: Add span: @@ -168,7 +168,7 @@ outputs: line_stop: 1 col_start: 10 col_stop: 15 - path: test + path: "" content: 1 + 2 >= 3 + 4 op: Ge span: @@ -176,7 +176,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 1 + 2 >= 3 + 4 - Binary: left: @@ -189,7 +189,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 >= 2 >= 3 right: Value: @@ -199,7 +199,7 @@ outputs: line_stop: 1 col_start: 6 col_stop: 7 - path: test + path: "" content: 1 >= 2 >= 3 op: Ge span: @@ -207,7 +207,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: 1 >= 2 >= 3 right: Value: @@ -217,7 +217,7 @@ outputs: line_stop: 1 col_start: 11 col_stop: 12 - path: test + path: "" content: 1 >= 2 >= 3 op: Ge span: @@ -225,7 +225,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 1 >= 2 >= 3 - Binary: left: @@ -240,7 +240,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 + 2 >= 3 + 4 >= 5 + 6 right: Value: @@ -250,7 +250,7 @@ outputs: line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: 1 + 2 >= 3 + 4 >= 5 + 6 op: Add span: @@ -258,7 +258,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: 1 + 2 >= 3 + 4 >= 5 + 6 right: Binary: @@ -270,7 +270,7 @@ outputs: line_stop: 1 col_start: 10 col_stop: 11 - path: test + path: "" content: 1 + 2 >= 3 + 4 >= 5 + 6 right: Value: @@ -280,7 +280,7 @@ outputs: line_stop: 1 col_start: 14 col_stop: 15 - path: test + path: "" content: 1 + 2 >= 3 + 4 >= 5 + 6 op: Add span: @@ -288,7 +288,7 @@ outputs: line_stop: 1 col_start: 10 col_stop: 15 - path: test + path: "" content: 1 + 2 >= 3 + 4 >= 5 + 6 op: Ge span: @@ -296,7 +296,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 1 + 2 >= 3 + 4 >= 5 + 6 right: Binary: @@ -308,7 +308,7 @@ outputs: line_stop: 1 col_start: 19 col_stop: 20 - path: test + path: "" content: 1 + 2 >= 3 + 4 >= 5 + 6 right: Value: @@ -318,7 +318,7 @@ outputs: line_stop: 1 col_start: 23 col_stop: 24 - path: test + path: "" content: 1 + 2 >= 3 + 4 >= 5 + 6 op: Add span: @@ -326,7 +326,7 @@ outputs: line_stop: 1 col_start: 19 col_stop: 24 - path: test + path: "" content: 1 + 2 >= 3 + 4 >= 5 + 6 op: Ge span: @@ -334,5 +334,5 @@ outputs: line_stop: 1 col_start: 1 col_stop: 24 - path: test + path: "" content: 1 + 2 >= 3 + 4 >= 5 + 6 diff --git a/tests/expectations/parser/parser/expression/binary/lt.leo.out b/tests/expectations/parser/parser/expression/binary/lt.leo.out index 9879afc9d3..d0b27b53c0 100644 --- a/tests/expectations/parser/parser/expression/binary/lt.leo.out +++ b/tests/expectations/parser/parser/expression/binary/lt.leo.out @@ -11,7 +11,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 < 1 right: Value: @@ -21,7 +21,7 @@ outputs: line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: 1 < 1 op: Lt span: @@ -29,7 +29,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: 1 < 1 - Binary: left: @@ -40,7 +40,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 2<3 right: Value: @@ -50,7 +50,7 @@ outputs: line_stop: 1 col_start: 3 col_stop: 4 - path: test + path: "" content: 2<3 op: Lt span: @@ -58,7 +58,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: 2<3 - Binary: left: @@ -71,7 +71,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 < 2 < 3 right: Value: @@ -81,7 +81,7 @@ outputs: line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: 1 < 2 < 3 op: Lt span: @@ -89,7 +89,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: 1 < 2 < 3 right: Value: @@ -99,7 +99,7 @@ outputs: line_stop: 1 col_start: 9 col_stop: 10 - path: test + path: "" content: 1 < 2 < 3 op: Lt span: @@ -107,7 +107,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: 1 < 2 < 3 - Binary: left: @@ -120,7 +120,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 + 2 < 3 + 4 right: Value: @@ -130,7 +130,7 @@ outputs: line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: 1 + 2 < 3 + 4 op: Add span: @@ -138,7 +138,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: 1 + 2 < 3 + 4 right: Binary: @@ -150,7 +150,7 @@ outputs: line_stop: 1 col_start: 9 col_stop: 10 - path: test + path: "" content: 1 + 2 < 3 + 4 right: Value: @@ -160,7 +160,7 @@ outputs: line_stop: 1 col_start: 13 col_stop: 14 - path: test + path: "" content: 1 + 2 < 3 + 4 op: Add span: @@ -168,7 +168,7 @@ outputs: line_stop: 1 col_start: 9 col_stop: 14 - path: test + path: "" content: 1 + 2 < 3 + 4 op: Lt span: @@ -176,7 +176,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 1 + 2 < 3 + 4 - Binary: left: @@ -189,7 +189,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 < 2 < 3 right: Value: @@ -199,7 +199,7 @@ outputs: line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: 1 < 2 < 3 op: Lt span: @@ -207,7 +207,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: 1 < 2 < 3 right: Value: @@ -217,7 +217,7 @@ outputs: line_stop: 1 col_start: 9 col_stop: 10 - path: test + path: "" content: 1 < 2 < 3 op: Lt span: @@ -225,7 +225,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: 1 < 2 < 3 - Binary: left: @@ -240,7 +240,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 + 2 < 3 + 4 < 5 + 6 right: Value: @@ -250,7 +250,7 @@ outputs: line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: 1 + 2 < 3 + 4 < 5 + 6 op: Add span: @@ -258,7 +258,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: 1 + 2 < 3 + 4 < 5 + 6 right: Binary: @@ -270,7 +270,7 @@ outputs: line_stop: 1 col_start: 9 col_stop: 10 - path: test + path: "" content: 1 + 2 < 3 + 4 < 5 + 6 right: Value: @@ -280,7 +280,7 @@ outputs: line_stop: 1 col_start: 13 col_stop: 14 - path: test + path: "" content: 1 + 2 < 3 + 4 < 5 + 6 op: Add span: @@ -288,7 +288,7 @@ outputs: line_stop: 1 col_start: 9 col_stop: 14 - path: test + path: "" content: 1 + 2 < 3 + 4 < 5 + 6 op: Lt span: @@ -296,7 +296,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 1 + 2 < 3 + 4 < 5 + 6 right: Binary: @@ -308,7 +308,7 @@ outputs: line_stop: 1 col_start: 17 col_stop: 18 - path: test + path: "" content: 1 + 2 < 3 + 4 < 5 + 6 right: Value: @@ -318,7 +318,7 @@ outputs: line_stop: 1 col_start: 21 col_stop: 22 - path: test + path: "" content: 1 + 2 < 3 + 4 < 5 + 6 op: Add span: @@ -326,7 +326,7 @@ outputs: line_stop: 1 col_start: 17 col_stop: 22 - path: test + path: "" content: 1 + 2 < 3 + 4 < 5 + 6 op: Lt span: @@ -334,5 +334,5 @@ outputs: line_stop: 1 col_start: 1 col_stop: 22 - path: test + path: "" content: 1 + 2 < 3 + 4 < 5 + 6 diff --git a/tests/expectations/parser/parser/expression/binary/lte.leo.out b/tests/expectations/parser/parser/expression/binary/lte.leo.out index f40df4bddb..334172f47c 100644 --- a/tests/expectations/parser/parser/expression/binary/lte.leo.out +++ b/tests/expectations/parser/parser/expression/binary/lte.leo.out @@ -11,7 +11,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 <= 1 right: Value: @@ -21,7 +21,7 @@ outputs: line_stop: 1 col_start: 6 col_stop: 7 - path: test + path: "" content: 1 <= 1 op: Le span: @@ -29,7 +29,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: 1 <= 1 - Binary: left: @@ -40,7 +40,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 2 <= 3 right: Value: @@ -50,7 +50,7 @@ outputs: line_stop: 1 col_start: 6 col_stop: 7 - path: test + path: "" content: 2 <= 3 op: Le span: @@ -58,7 +58,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: 2 <= 3 - Binary: left: @@ -71,7 +71,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 <= 2 <= 3 right: Value: @@ -81,7 +81,7 @@ outputs: line_stop: 1 col_start: 6 col_stop: 7 - path: test + path: "" content: 1 <= 2 <= 3 op: Le span: @@ -89,7 +89,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: 1 <= 2 <= 3 right: Value: @@ -99,7 +99,7 @@ outputs: line_stop: 1 col_start: 11 col_stop: 12 - path: test + path: "" content: 1 <= 2 <= 3 op: Le span: @@ -107,7 +107,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 1 <= 2 <= 3 - Binary: left: @@ -120,7 +120,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 + 2 <= 3 + 4 right: Value: @@ -130,7 +130,7 @@ outputs: line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: 1 + 2 <= 3 + 4 op: Add span: @@ -138,7 +138,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: 1 + 2 <= 3 + 4 right: Binary: @@ -150,7 +150,7 @@ outputs: line_stop: 1 col_start: 10 col_stop: 11 - path: test + path: "" content: 1 + 2 <= 3 + 4 right: Value: @@ -160,7 +160,7 @@ outputs: line_stop: 1 col_start: 14 col_stop: 15 - path: test + path: "" content: 1 + 2 <= 3 + 4 op: Add span: @@ -168,7 +168,7 @@ outputs: line_stop: 1 col_start: 10 col_stop: 15 - path: test + path: "" content: 1 + 2 <= 3 + 4 op: Le span: @@ -176,7 +176,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 1 + 2 <= 3 + 4 - Binary: left: @@ -189,7 +189,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 <= 2 <= 3 right: Value: @@ -199,7 +199,7 @@ outputs: line_stop: 1 col_start: 6 col_stop: 7 - path: test + path: "" content: 1 <= 2 <= 3 op: Le span: @@ -207,7 +207,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: 1 <= 2 <= 3 right: Value: @@ -217,7 +217,7 @@ outputs: line_stop: 1 col_start: 11 col_stop: 12 - path: test + path: "" content: 1 <= 2 <= 3 op: Le span: @@ -225,7 +225,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 1 <= 2 <= 3 - Binary: left: @@ -240,7 +240,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 + 2 <= 3 + 4 <= 5 + 6 right: Value: @@ -250,7 +250,7 @@ outputs: line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: 1 + 2 <= 3 + 4 <= 5 + 6 op: Add span: @@ -258,7 +258,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: 1 + 2 <= 3 + 4 <= 5 + 6 right: Binary: @@ -270,7 +270,7 @@ outputs: line_stop: 1 col_start: 10 col_stop: 11 - path: test + path: "" content: 1 + 2 <= 3 + 4 <= 5 + 6 right: Value: @@ -280,7 +280,7 @@ outputs: line_stop: 1 col_start: 14 col_stop: 15 - path: test + path: "" content: 1 + 2 <= 3 + 4 <= 5 + 6 op: Add span: @@ -288,7 +288,7 @@ outputs: line_stop: 1 col_start: 10 col_stop: 15 - path: test + path: "" content: 1 + 2 <= 3 + 4 <= 5 + 6 op: Le span: @@ -296,7 +296,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 1 + 2 <= 3 + 4 <= 5 + 6 right: Binary: @@ -308,7 +308,7 @@ outputs: line_stop: 1 col_start: 19 col_stop: 20 - path: test + path: "" content: 1 + 2 <= 3 + 4 <= 5 + 6 right: Value: @@ -318,7 +318,7 @@ outputs: line_stop: 1 col_start: 23 col_stop: 24 - path: test + path: "" content: 1 + 2 <= 3 + 4 <= 5 + 6 op: Add span: @@ -326,7 +326,7 @@ outputs: line_stop: 1 col_start: 19 col_stop: 24 - path: test + path: "" content: 1 + 2 <= 3 + 4 <= 5 + 6 op: Le span: @@ -334,5 +334,5 @@ outputs: line_stop: 1 col_start: 1 col_stop: 24 - path: test + path: "" content: 1 + 2 <= 3 + 4 <= 5 + 6 diff --git a/tests/expectations/parser/parser/expression/binary/mul.leo.out b/tests/expectations/parser/parser/expression/binary/mul.leo.out index c146eeee15..4108b91e3e 100644 --- a/tests/expectations/parser/parser/expression/binary/mul.leo.out +++ b/tests/expectations/parser/parser/expression/binary/mul.leo.out @@ -11,7 +11,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 * 1 right: Value: @@ -21,7 +21,7 @@ outputs: line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: 1 * 1 op: Mul span: @@ -29,7 +29,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: 1 * 1 - Binary: left: @@ -40,7 +40,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 2*3 right: Value: @@ -50,7 +50,7 @@ outputs: line_stop: 1 col_start: 3 col_stop: 4 - path: test + path: "" content: 2*3 op: Mul span: @@ -58,7 +58,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: 2*3 - Binary: left: @@ -71,7 +71,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 * 2 * 3 right: Value: @@ -81,7 +81,7 @@ outputs: line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: 1 * 2 * 3 op: Mul span: @@ -89,7 +89,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: 1 * 2 * 3 right: Value: @@ -99,7 +99,7 @@ outputs: line_stop: 1 col_start: 9 col_stop: 10 - path: test + path: "" content: 1 * 2 * 3 op: Mul span: @@ -107,7 +107,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: 1 * 2 * 3 - Binary: left: @@ -120,7 +120,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 ** 2 * 3 ** 4 right: Value: @@ -130,7 +130,7 @@ outputs: line_stop: 1 col_start: 6 col_stop: 7 - path: test + path: "" content: 1 ** 2 * 3 ** 4 op: Pow span: @@ -138,7 +138,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: 1 ** 2 * 3 ** 4 right: Binary: @@ -150,7 +150,7 @@ outputs: line_stop: 1 col_start: 10 col_stop: 11 - path: test + path: "" content: 1 ** 2 * 3 ** 4 right: Value: @@ -160,7 +160,7 @@ outputs: line_stop: 1 col_start: 15 col_stop: 16 - path: test + path: "" content: 1 ** 2 * 3 ** 4 op: Pow span: @@ -168,7 +168,7 @@ outputs: line_stop: 1 col_start: 10 col_stop: 16 - path: test + path: "" content: 1 ** 2 * 3 ** 4 op: Mul span: @@ -176,7 +176,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 16 - path: test + path: "" content: 1 ** 2 * 3 ** 4 - Binary: left: @@ -191,7 +191,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 ** 2 * 3 ** 4 / 5 ** 6 right: Value: @@ -201,7 +201,7 @@ outputs: line_stop: 1 col_start: 6 col_stop: 7 - path: test + path: "" content: 1 ** 2 * 3 ** 4 / 5 ** 6 op: Pow span: @@ -209,7 +209,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: 1 ** 2 * 3 ** 4 / 5 ** 6 right: Binary: @@ -221,7 +221,7 @@ outputs: line_stop: 1 col_start: 10 col_stop: 11 - path: test + path: "" content: 1 ** 2 * 3 ** 4 / 5 ** 6 right: Value: @@ -231,7 +231,7 @@ outputs: line_stop: 1 col_start: 15 col_stop: 16 - path: test + path: "" content: 1 ** 2 * 3 ** 4 / 5 ** 6 op: Pow span: @@ -239,7 +239,7 @@ outputs: line_stop: 1 col_start: 10 col_stop: 16 - path: test + path: "" content: 1 ** 2 * 3 ** 4 / 5 ** 6 op: Mul span: @@ -247,7 +247,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 16 - path: test + path: "" content: 1 ** 2 * 3 ** 4 / 5 ** 6 right: Binary: @@ -259,7 +259,7 @@ outputs: line_stop: 1 col_start: 19 col_stop: 20 - path: test + path: "" content: 1 ** 2 * 3 ** 4 / 5 ** 6 right: Value: @@ -269,7 +269,7 @@ outputs: line_stop: 1 col_start: 24 col_stop: 25 - path: test + path: "" content: 1 ** 2 * 3 ** 4 / 5 ** 6 op: Pow span: @@ -277,7 +277,7 @@ outputs: line_stop: 1 col_start: 19 col_stop: 25 - path: test + path: "" content: 1 ** 2 * 3 ** 4 / 5 ** 6 op: Div span: @@ -285,5 +285,5 @@ outputs: line_stop: 1 col_start: 1 col_stop: 25 - path: test + path: "" content: 1 ** 2 * 3 ** 4 / 5 ** 6 diff --git a/tests/expectations/parser/parser/expression/binary/ne.leo.out b/tests/expectations/parser/parser/expression/binary/ne.leo.out index 9e1db5c244..de659ddaf6 100644 --- a/tests/expectations/parser/parser/expression/binary/ne.leo.out +++ b/tests/expectations/parser/parser/expression/binary/ne.leo.out @@ -11,7 +11,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 != 1 right: Value: @@ -21,7 +21,7 @@ outputs: line_stop: 1 col_start: 6 col_stop: 7 - path: test + path: "" content: 1 != 1 op: Ne span: @@ -29,7 +29,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: 1 != 1 - Binary: left: @@ -40,7 +40,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 2!=3 right: Value: @@ -50,7 +50,7 @@ outputs: line_stop: 1 col_start: 4 col_stop: 5 - path: test + path: "" content: 2!=3 op: Ne span: @@ -58,7 +58,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 5 - path: test + path: "" content: 2!=3 - Binary: left: @@ -71,7 +71,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 < 2 != 3 < 4 right: Value: @@ -81,7 +81,7 @@ outputs: line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: 1 < 2 != 3 < 4 op: Lt span: @@ -89,7 +89,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: 1 < 2 != 3 < 4 right: Binary: @@ -101,7 +101,7 @@ outputs: line_stop: 1 col_start: 10 col_stop: 11 - path: test + path: "" content: 1 < 2 != 3 < 4 right: Value: @@ -111,7 +111,7 @@ outputs: line_stop: 1 col_start: 14 col_stop: 15 - path: test + path: "" content: 1 < 2 != 3 < 4 op: Lt span: @@ -119,7 +119,7 @@ outputs: line_stop: 1 col_start: 10 col_stop: 15 - path: test + path: "" content: 1 < 2 != 3 < 4 op: Ne span: @@ -127,7 +127,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 1 < 2 != 3 < 4 - Binary: left: @@ -142,7 +142,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 < 2 != 3 < 4 || 3 < 4 != 5 < 6 right: Value: @@ -152,7 +152,7 @@ outputs: line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: 1 < 2 != 3 < 4 || 3 < 4 != 5 < 6 op: Lt span: @@ -160,7 +160,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: 1 < 2 != 3 < 4 || 3 < 4 != 5 < 6 right: Binary: @@ -172,7 +172,7 @@ outputs: line_stop: 1 col_start: 10 col_stop: 11 - path: test + path: "" content: 1 < 2 != 3 < 4 || 3 < 4 != 5 < 6 right: Value: @@ -182,7 +182,7 @@ outputs: line_stop: 1 col_start: 14 col_stop: 15 - path: test + path: "" content: 1 < 2 != 3 < 4 || 3 < 4 != 5 < 6 op: Lt span: @@ -190,7 +190,7 @@ outputs: line_stop: 1 col_start: 10 col_stop: 15 - path: test + path: "" content: 1 < 2 != 3 < 4 || 3 < 4 != 5 < 6 op: Ne span: @@ -198,7 +198,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 1 < 2 != 3 < 4 || 3 < 4 != 5 < 6 right: Binary: @@ -212,7 +212,7 @@ outputs: line_stop: 1 col_start: 19 col_stop: 20 - path: test + path: "" content: 1 < 2 != 3 < 4 || 3 < 4 != 5 < 6 right: Value: @@ -222,7 +222,7 @@ outputs: line_stop: 1 col_start: 23 col_stop: 24 - path: test + path: "" content: 1 < 2 != 3 < 4 || 3 < 4 != 5 < 6 op: Lt span: @@ -230,7 +230,7 @@ outputs: line_stop: 1 col_start: 19 col_stop: 24 - path: test + path: "" content: 1 < 2 != 3 < 4 || 3 < 4 != 5 < 6 right: Binary: @@ -242,7 +242,7 @@ outputs: line_stop: 1 col_start: 28 col_stop: 29 - path: test + path: "" content: 1 < 2 != 3 < 4 || 3 < 4 != 5 < 6 right: Value: @@ -252,7 +252,7 @@ outputs: line_stop: 1 col_start: 32 col_stop: 33 - path: test + path: "" content: 1 < 2 != 3 < 4 || 3 < 4 != 5 < 6 op: Lt span: @@ -260,7 +260,7 @@ outputs: line_stop: 1 col_start: 28 col_stop: 33 - path: test + path: "" content: 1 < 2 != 3 < 4 || 3 < 4 != 5 < 6 op: Ne span: @@ -268,7 +268,7 @@ outputs: line_stop: 1 col_start: 19 col_stop: 33 - path: test + path: "" content: 1 < 2 != 3 < 4 || 3 < 4 != 5 < 6 op: Or span: @@ -276,5 +276,5 @@ outputs: line_stop: 1 col_start: 1 col_stop: 33 - path: test + path: "" content: 1 < 2 != 3 < 4 || 3 < 4 != 5 < 6 diff --git a/tests/expectations/parser/parser/expression/binary/or.leo.out b/tests/expectations/parser/parser/expression/binary/or.leo.out index 72d244dd8d..9648060da3 100644 --- a/tests/expectations/parser/parser/expression/binary/or.leo.out +++ b/tests/expectations/parser/parser/expression/binary/or.leo.out @@ -11,7 +11,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 + 1 right: Value: @@ -21,7 +21,7 @@ outputs: line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: 1 + 1 op: Add span: @@ -29,7 +29,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: 1 + 1 - Binary: left: @@ -40,7 +40,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 2+3 right: Value: @@ -50,7 +50,7 @@ outputs: line_stop: 1 col_start: 3 col_stop: 4 - path: test + path: "" content: 2+3 op: Add span: @@ -58,7 +58,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: 2+3 - Binary: left: @@ -71,7 +71,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 + 2 + 3 right: Value: @@ -81,7 +81,7 @@ outputs: line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: 1 + 2 + 3 op: Add span: @@ -89,7 +89,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: 1 + 2 + 3 right: Value: @@ -99,7 +99,7 @@ outputs: line_stop: 1 col_start: 9 col_stop: 10 - path: test + path: "" content: 1 + 2 + 3 op: Add span: @@ -107,7 +107,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: 1 + 2 + 3 - Binary: left: @@ -120,7 +120,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 * 2 + 3 * 4 right: Value: @@ -130,7 +130,7 @@ outputs: line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: 1 * 2 + 3 * 4 op: Mul span: @@ -138,7 +138,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: 1 * 2 + 3 * 4 right: Binary: @@ -150,7 +150,7 @@ outputs: line_stop: 1 col_start: 9 col_stop: 10 - path: test + path: "" content: 1 * 2 + 3 * 4 right: Value: @@ -160,7 +160,7 @@ outputs: line_stop: 1 col_start: 13 col_stop: 14 - path: test + path: "" content: 1 * 2 + 3 * 4 op: Mul span: @@ -168,7 +168,7 @@ outputs: line_stop: 1 col_start: 9 col_stop: 14 - path: test + path: "" content: 1 * 2 + 3 * 4 op: Add span: @@ -176,7 +176,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 1 * 2 + 3 * 4 - Binary: left: @@ -189,7 +189,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 + 2 - 3 right: Value: @@ -199,7 +199,7 @@ outputs: line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: 1 + 2 - 3 op: Add span: @@ -207,7 +207,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: 1 + 2 - 3 right: Value: @@ -217,7 +217,7 @@ outputs: line_stop: 1 col_start: 9 col_stop: 10 - path: test + path: "" content: 1 + 2 - 3 op: Sub span: @@ -225,7 +225,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: 1 + 2 - 3 - Binary: left: @@ -240,7 +240,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 * 2 + 3 * 4 - 5 * 6 right: Value: @@ -250,7 +250,7 @@ outputs: line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: 1 * 2 + 3 * 4 - 5 * 6 op: Mul span: @@ -258,7 +258,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: 1 * 2 + 3 * 4 - 5 * 6 right: Binary: @@ -270,7 +270,7 @@ outputs: line_stop: 1 col_start: 9 col_stop: 10 - path: test + path: "" content: 1 * 2 + 3 * 4 - 5 * 6 right: Value: @@ -280,7 +280,7 @@ outputs: line_stop: 1 col_start: 13 col_stop: 14 - path: test + path: "" content: 1 * 2 + 3 * 4 - 5 * 6 op: Mul span: @@ -288,7 +288,7 @@ outputs: line_stop: 1 col_start: 9 col_stop: 14 - path: test + path: "" content: 1 * 2 + 3 * 4 - 5 * 6 op: Add span: @@ -296,7 +296,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 1 * 2 + 3 * 4 - 5 * 6 right: Binary: @@ -308,7 +308,7 @@ outputs: line_stop: 1 col_start: 17 col_stop: 18 - path: test + path: "" content: 1 * 2 + 3 * 4 - 5 * 6 right: Value: @@ -318,7 +318,7 @@ outputs: line_stop: 1 col_start: 21 col_stop: 22 - path: test + path: "" content: 1 * 2 + 3 * 4 - 5 * 6 op: Mul span: @@ -326,7 +326,7 @@ outputs: line_stop: 1 col_start: 17 col_stop: 22 - path: test + path: "" content: 1 * 2 + 3 * 4 - 5 * 6 op: Sub span: @@ -334,5 +334,5 @@ outputs: line_stop: 1 col_start: 1 col_stop: 22 - path: test + path: "" content: 1 * 2 + 3 * 4 - 5 * 6 diff --git a/tests/expectations/parser/parser/expression/binary/sub.leo.out b/tests/expectations/parser/parser/expression/binary/sub.leo.out index 4e39639fe2..85cf6da268 100644 --- a/tests/expectations/parser/parser/expression/binary/sub.leo.out +++ b/tests/expectations/parser/parser/expression/binary/sub.leo.out @@ -11,7 +11,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 - 1 right: Value: @@ -21,7 +21,7 @@ outputs: line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: 1 - 1 op: Sub span: @@ -29,7 +29,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: 1 - 1 - Binary: left: @@ -40,7 +40,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 2-3 right: Value: @@ -50,7 +50,7 @@ outputs: line_stop: 1 col_start: 3 col_stop: 4 - path: test + path: "" content: 2-3 op: Sub span: @@ -58,7 +58,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: 2-3 - Binary: left: @@ -71,7 +71,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 - 2 - 3 right: Value: @@ -81,7 +81,7 @@ outputs: line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: 1 - 2 - 3 op: Sub span: @@ -89,7 +89,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: 1 - 2 - 3 right: Value: @@ -99,7 +99,7 @@ outputs: line_stop: 1 col_start: 9 col_stop: 10 - path: test + path: "" content: 1 - 2 - 3 op: Sub span: @@ -107,7 +107,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: 1 - 2 - 3 - Binary: left: @@ -120,7 +120,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: 1 * 2 - 3 * 4 right: Value: @@ -130,7 +130,7 @@ outputs: line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: 1 * 2 - 3 * 4 op: Mul span: @@ -138,7 +138,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: 1 * 2 - 3 * 4 right: Binary: @@ -150,7 +150,7 @@ outputs: line_stop: 1 col_start: 9 col_stop: 10 - path: test + path: "" content: 1 * 2 - 3 * 4 right: Value: @@ -160,7 +160,7 @@ outputs: line_stop: 1 col_start: 13 col_stop: 14 - path: test + path: "" content: 1 * 2 - 3 * 4 op: Mul span: @@ -168,7 +168,7 @@ outputs: line_stop: 1 col_start: 9 col_stop: 14 - path: test + path: "" content: 1 * 2 - 3 * 4 op: Sub span: @@ -176,5 +176,5 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 1 * 2 - 3 * 4 diff --git a/tests/expectations/parser/parser/expression/cast.leo.out b/tests/expectations/parser/parser/expression/cast.leo.out index 25ace32c14..b610e43264 100644 --- a/tests/expectations/parser/parser/expression/cast.leo.out +++ b/tests/expectations/parser/parser/expression/cast.leo.out @@ -4,7 +4,7 @@ expectation: Pass outputs: - Cast: inner: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x as u8\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x as u8\\\"}\"}" target_type: IntegerType: U8 span: @@ -12,23 +12,23 @@ outputs: line_stop: 1 col_start: 1 col_stop: 8 - path: test + path: "" content: x as u8 - Cast: inner: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"y as id\\\"}\"}" + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"y as id\\\"}\"}" target_type: - Circuit: "{\"name\":\"id\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"y as id\\\"}\"}" + Circuit: "{\"name\":\"id\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"y as id\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 8 - path: test + path: "" content: y as id - Cast: inner: - Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"z as u32\\\"}\"}" + Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"z as u32\\\"}\"}" target_type: IntegerType: U32 span: @@ -36,11 +36,11 @@ outputs: line_stop: 1 col_start: 1 col_stop: 9 - path: test + path: "" content: z as u32 - Cast: inner: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x as i128\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x as i128\\\"}\"}" target_type: IntegerType: I128 span: @@ -48,13 +48,13 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: x as i128 - Cast: inner: Cast: inner: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x as u8 as u128\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x as u8 as u128\\\"}\"}" target_type: IntegerType: U8 span: @@ -62,7 +62,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 8 - path: test + path: "" content: x as u8 as u128 target_type: IntegerType: U128 @@ -71,39 +71,39 @@ outputs: line_stop: 1 col_start: 1 col_stop: 16 - path: test + path: "" content: x as u8 as u128 - Cast: inner: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x as field\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x as field\\\"}\"}" target_type: Field span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 11 - path: test + path: "" content: x as field - Cast: inner: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x as group\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x as group\\\"}\"}" target_type: Group span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 11 - path: test + path: "" content: x as group - Binary: left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ** y as u32 ** z\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x ** y as u32 ** z\\\"}\"}" right: Binary: left: Cast: inner: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ** y as u32 ** z\\\"}\"}" + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x ** y as u32 ** z\\\"}\"}" target_type: IntegerType: U32 span: @@ -111,17 +111,17 @@ outputs: line_stop: 1 col_start: 6 col_stop: 14 - path: test + path: "" content: x ** y as u32 ** z right: - Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ** y as u32 ** z\\\"}\"}" + Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x ** y as u32 ** z\\\"}\"}" op: Pow span: line_start: 1 line_stop: 1 col_start: 6 col_stop: 19 - path: test + path: "" content: x ** y as u32 ** z op: Pow span: @@ -129,7 +129,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 19 - path: test + path: "" content: x ** y as u32 ** z - Value: Implicit: @@ -144,14 +144,14 @@ outputs: inner: Unary: inner: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"!x as u32\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"!x as u32\\\"}\"}" op: Not span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 3 - path: test + path: "" content: "!x as u32" target_type: IntegerType: U32 @@ -160,20 +160,20 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "!x as u32" - Cast: inner: Unary: inner: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"-x as u32\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"-x as u32\\\"}\"}" op: Negate span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 3 - path: test + path: "" content: "-x as u32" target_type: IntegerType: U32 @@ -182,5 +182,5 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "-x as u32" diff --git a/tests/expectations/parser/parser/expression/circuit_init.leo.out b/tests/expectations/parser/parser/expression/circuit_init.leo.out index 4295420d95..8290a7825b 100644 --- a/tests/expectations/parser/parser/expression/circuit_init.leo.out +++ b/tests/expectations/parser/parser/expression/circuit_init.leo.out @@ -3,111 +3,111 @@ namespace: ParseExpression expectation: Pass outputs: - CircuitInit: - name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x {}\\\"}\"}" + name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x {}\\\"}\"}" members: [] span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 5 - path: test + path: "" content: "x {}" - CircuitInit: - name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x {y}\\\"}\"}" + name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x {y}\\\"}\"}" members: - - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x {y}\\\"}\"}" + - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x {y}\\\"}\"}" expression: ~ span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: "x {y}" - CircuitInit: - name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y}\\\"}\"}" + name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x{y}\\\"}\"}" members: - - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y}\\\"}\"}" + - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x{y}\\\"}\"}" expression: ~ span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 5 - path: test + path: "" content: "x{y}" - CircuitInit: - name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{}\\\"}\"}" + name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x{}\\\"}\"}" members: [] span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: "x{}" - CircuitInit: - name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y: y}\\\"}\"}" + name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x{y: y}\\\"}\"}" members: - - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y: y}\\\"}\"}" + - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x{y: y}\\\"}\"}" expression: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y: y}\\\"}\"}" + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x{y: y}\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 8 - path: test + path: "" content: "x{y: y}" - CircuitInit: - name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y: x}\\\"}\"}" + name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x{y: x}\\\"}\"}" members: - - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y: x}\\\"}\"}" + - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x{y: x}\\\"}\"}" expression: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y: x}\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x{y: x}\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 8 - path: test + path: "" content: "x{y: x}" - CircuitInit: - name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y: x,}\\\"}\"}" + name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x{y: x,}\\\"}\"}" members: - - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y: x,}\\\"}\"}" + - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x{y: x,}\\\"}\"}" expression: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y: x,}\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x{y: x,}\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 9 - path: test + path: "" content: "x{y: x,}" - CircuitInit: - name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y:x, x:y,}\\\"}\"}" + name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x{y:x, x:y,}\\\"}\"}" members: - - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y:x, x:y,}\\\"}\"}" + - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x{y:x, x:y,}\\\"}\"}" expression: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y:x, x:y,}\\\"}\"}" - - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y:x, x:y,}\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x{y:x, x:y,}\\\"}\"}" + - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x{y:x, x:y,}\\\"}\"}" expression: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y:x, x:y,}\\\"}\"}" + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x{y:x, x:y,}\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: "x{y:x, x:y,}" - CircuitInit: - name: "{\"name\":\"Self\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"Self {}\\\"}\"}" + name: "{\"name\":\"Self\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"Self {}\\\"}\"}" members: [] span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 8 - path: test + path: "" content: "Self {}" diff --git a/tests/expectations/parser/parser/expression/ident.leo.out b/tests/expectations/parser/parser/expression/ident.leo.out index a92fc0c1c8..329ca97a73 100644 --- a/tests/expectations/parser/parser/expression/ident.leo.out +++ b/tests/expectations/parser/parser/expression/ident.leo.out @@ -2,22 +2,22 @@ namespace: ParseExpression expectation: Pass outputs: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x\\\"}\"}" - - Identifier: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"X\\\"}\"}" - - Identifier: "{\"name\":\"xxx\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"xxx\\\"}\"}" - - Identifier: "{\"name\":\"XXX\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"XXX\\\"}\"}" - - Identifier: "{\"name\":\"x1\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x1\\\"}\"}" - - Identifier: "{\"name\":\"xu32\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"xu32\\\"}\"}" - - Identifier: "{\"name\":\"testx\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"testx\\\"}\"}" - - Identifier: "{\"name\":\"truex\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"truex\\\"}\"}" - - Identifier: "{\"name\":\"TRUE\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"TRUE\\\"}\"}" - - Identifier: "{\"name\":\"testX\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"testX\\\"}\"}" - - Identifier: "{\"name\":\"letX\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"letX\\\"}\"}" - - Identifier: "{\"name\":\"constX\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"constX\\\"}\"}" - - Identifier: "{\"name\":\"test_test\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"test_test\\\"}\"}" - - Identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"self\\\"}\"}" - - Identifier: "{\"name\":\"Self\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"Self\\\"}\"}" - - Identifier: "{\"name\":\"input\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"input\\\"}\"}" - - Identifier: "{\"name\":\"selfX\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"selfX\\\"}\"}" - - Identifier: "{\"name\":\"SelfX\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"SelfX\\\"}\"}" - - Identifier: "{\"name\":\"inputX\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"inputX\\\"}\"}" + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x\\\"}\"}" + - Identifier: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"X\\\"}\"}" + - Identifier: "{\"name\":\"xxx\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"xxx\\\"}\"}" + - Identifier: "{\"name\":\"XXX\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"XXX\\\"}\"}" + - Identifier: "{\"name\":\"x1\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x1\\\"}\"}" + - Identifier: "{\"name\":\"xu32\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"xu32\\\"}\"}" + - Identifier: "{\"name\":\"testx\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"testx\\\"}\"}" + - Identifier: "{\"name\":\"truex\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"truex\\\"}\"}" + - Identifier: "{\"name\":\"TRUE\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"TRUE\\\"}\"}" + - Identifier: "{\"name\":\"testX\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"testX\\\"}\"}" + - Identifier: "{\"name\":\"letX\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"letX\\\"}\"}" + - Identifier: "{\"name\":\"constX\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"constX\\\"}\"}" + - Identifier: "{\"name\":\"test_test\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"test_test\\\"}\"}" + - Identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"self\\\"}\"}" + - Identifier: "{\"name\":\"Self\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"Self\\\"}\"}" + - Identifier: "{\"name\":\"input\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"input\\\"}\"}" + - Identifier: "{\"name\":\"selfX\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"selfX\\\"}\"}" + - Identifier: "{\"name\":\"SelfX\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"SelfX\\\"}\"}" + - Identifier: "{\"name\":\"inputX\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"inputX\\\"}\"}" diff --git a/tests/expectations/parser/parser/expression/literal/address_parse.leo.out b/tests/expectations/parser/parser/expression/literal/address_parse.leo.out index ce2e019189..61bf7c9359 100644 --- a/tests/expectations/parser/parser/expression/literal/address_parse.leo.out +++ b/tests/expectations/parser/parser/expression/literal/address_parse.leo.out @@ -9,7 +9,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 64 - path: test + path: "" content: aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8 - Value: Address: @@ -18,7 +18,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 64 - path: test + path: "" content: aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j9 - Value: Address: @@ -27,7 +27,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 64 - path: test + path: "" content: aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d9 - Value: Address: @@ -36,5 +36,5 @@ outputs: line_stop: 1 col_start: 1 col_stop: 64 - path: test + path: "" content: aleo1aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st diff --git a/tests/expectations/parser/parser/expression/literal/bool_parse.leo.out b/tests/expectations/parser/parser/expression/literal/bool_parse.leo.out index 85b9453e0b..ba8cfcd0bf 100644 --- a/tests/expectations/parser/parser/expression/literal/bool_parse.leo.out +++ b/tests/expectations/parser/parser/expression/literal/bool_parse.leo.out @@ -9,7 +9,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 5 - path: test + path: "" content: "true" - Value: Boolean: @@ -18,5 +18,5 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: "false" diff --git a/tests/expectations/parser/parser/expression/literal/char_parse.leo.out b/tests/expectations/parser/parser/expression/literal/char_parse.leo.out index f7611f55f5..ce8cfae708 100644 --- a/tests/expectations/parser/parser/expression/literal/char_parse.leo.out +++ b/tests/expectations/parser/parser/expression/literal/char_parse.leo.out @@ -11,7 +11,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: "'a'" - Value: Char: @@ -22,7 +22,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: "'Z'" - Value: Char: @@ -33,7 +33,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 5 - path: test + path: "" content: "'\\\"'" - Value: Char: @@ -44,7 +44,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 5 - path: test + path: "" content: "'\\t'" - Value: Char: @@ -55,7 +55,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 5 - path: test + path: "" content: "'\\r'" - Value: Char: @@ -66,7 +66,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 5 - path: test + path: "" content: "'\\0'" - Value: Char: @@ -77,7 +77,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 8 - path: test + path: "" content: "'\\u{F}'" - Value: Char: @@ -88,7 +88,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: "''" - Value: Char: @@ -99,7 +99,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 9 - path: test + path: "" content: "'\\u{E5}'" - Value: Char: @@ -110,7 +110,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 5 - path: test + path: "" content: "'å'" - Value: Char: @@ -121,7 +121,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "'\\u{4e0}'" - Value: Char: @@ -132,7 +132,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 5 - path: test + path: "" content: "'Ӡ'" - Value: Char: @@ -143,7 +143,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 11 - path: test + path: "" content: "'\\u{2764}'" - Value: Char: @@ -154,7 +154,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: "'❤'" - Value: Char: @@ -165,7 +165,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: "'\\u{1F622}'" - Value: Char: @@ -176,7 +176,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "'😭'" - Value: Char: @@ -187,7 +187,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: "'\\u{10001F}'" - Value: Char: @@ -198,7 +198,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "'\\x2A'" - Value: Char: @@ -209,7 +209,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "'\\x7f'" - Value: Char: @@ -220,7 +220,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "'\\x00'" - Value: Char: @@ -231,7 +231,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "'\\x01'" - Value: Char: @@ -242,7 +242,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "'\\x02'" - Value: Char: @@ -253,7 +253,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "'\\x03'" - Value: Char: @@ -264,7 +264,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "'\\x04'" - Value: Char: @@ -275,7 +275,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "'\\x05'" - Value: Char: @@ -286,7 +286,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "'\\x06'" - Value: Char: @@ -297,7 +297,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "'\\x07'" - Value: Char: @@ -308,7 +308,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "'\\x10'" - Value: Char: @@ -319,7 +319,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "'\\x11'" - Value: Char: @@ -330,7 +330,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "'\\x12'" - Value: Char: @@ -341,7 +341,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "'\\x13'" - Value: Char: @@ -352,7 +352,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "'\\x14'" - Value: Char: @@ -363,7 +363,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "'\\x15'" - Value: Char: @@ -374,7 +374,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "'\\x16'" - Value: Char: @@ -385,7 +385,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "'\\x17'" - Value: Char: @@ -396,7 +396,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "'\\x20'" - Value: Char: @@ -407,7 +407,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "'\\x21'" - Value: Char: @@ -418,7 +418,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "'\\x22'" - Value: Char: @@ -429,7 +429,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "'\\x23'" - Value: Char: @@ -440,7 +440,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "'\\x24'" - Value: Char: @@ -451,7 +451,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "'\\x25'" - Value: Char: @@ -462,7 +462,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "'\\x26'" - Value: Char: @@ -473,7 +473,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "'\\x27'" - Value: Char: @@ -484,7 +484,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "'\\x30'" - Value: Char: @@ -495,7 +495,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "'\\x31'" - Value: Char: @@ -506,7 +506,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "'\\x32'" - Value: Char: @@ -517,7 +517,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "'\\x33'" - Value: Char: @@ -528,7 +528,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "'\\x34'" - Value: Char: @@ -539,7 +539,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "'\\x35'" - Value: Char: @@ -550,7 +550,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "'\\x36'" - Value: Char: @@ -561,5 +561,5 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "'\\x37'" diff --git a/tests/expectations/parser/parser/expression/literal/group.leo.out b/tests/expectations/parser/parser/expression/literal/group.leo.out index 2a4389526e..03113a7eb4 100644 --- a/tests/expectations/parser/parser/expression/literal/group.leo.out +++ b/tests/expectations/parser/parser/expression/literal/group.leo.out @@ -12,7 +12,7 @@ outputs: line_stop: 1 col_start: 2 col_stop: 12 - path: test + path: "" content: "(+, _)group" - Value: Group: @@ -24,7 +24,7 @@ outputs: line_stop: 1 col_start: 2 col_stop: 12 - path: test + path: "" content: "(_, -)group" - Value: Group: @@ -36,7 +36,7 @@ outputs: line_stop: 1 col_start: 2 col_stop: 12 - path: test + path: "" content: "(+, -)group" - Value: Group: @@ -48,7 +48,7 @@ outputs: line_stop: 1 col_start: 2 col_stop: 12 - path: test + path: "" content: "(-, +)group" - Value: Group: @@ -60,7 +60,7 @@ outputs: line_stop: 1 col_start: 2 col_stop: 12 - path: test + path: "" content: "(+, +)group" - Value: Group: @@ -72,7 +72,7 @@ outputs: line_stop: 1 col_start: 2 col_stop: 12 - path: test + path: "" content: "(-, -)group" - Value: Group: @@ -84,7 +84,7 @@ outputs: line_stop: 1 col_start: 2 col_stop: 12 - path: test + path: "" content: "(_, _)group" - Value: Group: @@ -96,7 +96,7 @@ outputs: line_stop: 1 col_start: 2 col_stop: 5 - path: test + path: "" content: "(123,-456)group" y: Number: @@ -105,14 +105,14 @@ outputs: line_stop: 1 col_start: 7 col_stop: 10 - path: test + path: "" content: "(123,-456)group" span: line_start: 1 line_stop: 1 col_start: 2 col_stop: 16 - path: test + path: "" content: "(123,-456)group" - Value: Group: @@ -124,7 +124,7 @@ outputs: line_stop: 1 col_start: 3 col_stop: 6 - path: test + path: "" content: "(-123,456)group" y: Number: @@ -133,14 +133,14 @@ outputs: line_stop: 1 col_start: 7 col_stop: 10 - path: test + path: "" content: "(-123,456)group" span: line_start: 1 line_stop: 1 col_start: 2 col_stop: 16 - path: test + path: "" content: "(-123,456)group" - Value: Group: @@ -152,7 +152,7 @@ outputs: line_stop: 1 col_start: 3 col_stop: 6 - path: test + path: "" content: "(-123,456)group" y: Number: @@ -161,14 +161,14 @@ outputs: line_stop: 1 col_start: 7 col_stop: 10 - path: test + path: "" content: "(-123,456)group" span: line_start: 1 line_stop: 1 col_start: 2 col_stop: 16 - path: test + path: "" content: "(-123,456)group" - Value: Group: @@ -180,7 +180,7 @@ outputs: line_stop: 1 col_start: 2 col_stop: 5 - path: test + path: "" content: "(123, _)group" y: Inferred span: @@ -188,7 +188,7 @@ outputs: line_stop: 1 col_start: 2 col_stop: 14 - path: test + path: "" content: "(123, _)group" - Value: Group: @@ -200,7 +200,7 @@ outputs: line_stop: 1 col_start: 2 col_stop: 5 - path: test + path: "" content: "(123, -)group" y: SignLow span: @@ -208,7 +208,7 @@ outputs: line_stop: 1 col_start: 2 col_stop: 14 - path: test + path: "" content: "(123, -)group" - Value: Group: @@ -220,7 +220,7 @@ outputs: line_stop: 1 col_start: 2 col_stop: 5 - path: test + path: "" content: "(123, -)group" y: SignLow span: @@ -228,7 +228,7 @@ outputs: line_stop: 1 col_start: 2 col_stop: 14 - path: test + path: "" content: "(123, -)group" - Value: Group: @@ -240,7 +240,7 @@ outputs: line_stop: 1 col_start: 2 col_stop: 5 - path: test + path: "" content: "(123, +)group" y: SignHigh span: @@ -248,7 +248,7 @@ outputs: line_stop: 1 col_start: 2 col_stop: 14 - path: test + path: "" content: "(123, +)group" - Value: Group: @@ -260,7 +260,7 @@ outputs: line_stop: 1 col_start: 2 col_stop: 5 - path: test + path: "" content: "(123, +)group" y: SignHigh span: @@ -268,7 +268,7 @@ outputs: line_stop: 1 col_start: 2 col_stop: 14 - path: test + path: "" content: "(123, +)group" - Value: Group: @@ -280,7 +280,7 @@ outputs: line_stop: 1 col_start: 2 col_stop: 5 - path: test + path: "" content: "(123, -)group" y: SignLow span: @@ -288,7 +288,7 @@ outputs: line_stop: 1 col_start: 2 col_stop: 14 - path: test + path: "" content: "(123, -)group" - Value: Group: @@ -300,7 +300,7 @@ outputs: line_stop: 1 col_start: 2 col_stop: 5 - path: test + path: "" content: "(123, _)group" y: Inferred span: @@ -308,7 +308,7 @@ outputs: line_stop: 1 col_start: 2 col_stop: 14 - path: test + path: "" content: "(123, _)group" - Value: Group: @@ -321,14 +321,14 @@ outputs: line_stop: 1 col_start: 5 col_stop: 8 - path: test + path: "" content: "(+, 345)group" span: line_start: 1 line_stop: 1 col_start: 2 col_stop: 14 - path: test + path: "" content: "(+, 345)group" - Value: Group: @@ -341,14 +341,14 @@ outputs: line_stop: 1 col_start: 5 col_stop: 8 - path: test + path: "" content: "(_, 345)group" span: line_start: 1 line_stop: 1 col_start: 2 col_stop: 14 - path: test + path: "" content: "(_, 345)group" - Value: Group: @@ -361,14 +361,14 @@ outputs: line_stop: 1 col_start: 5 col_stop: 8 - path: test + path: "" content: "(+, 345)group" span: line_start: 1 line_stop: 1 col_start: 2 col_stop: 14 - path: test + path: "" content: "(+, 345)group" - Value: Group: @@ -381,14 +381,14 @@ outputs: line_stop: 1 col_start: 5 col_stop: 8 - path: test + path: "" content: "(-, 345)group" span: line_start: 1 line_stop: 1 col_start: 2 col_stop: 14 - path: test + path: "" content: "(-, 345)group" - Value: Group: @@ -401,14 +401,14 @@ outputs: line_stop: 1 col_start: 5 col_stop: 8 - path: test + path: "" content: "(+, 345)group" span: line_start: 1 line_stop: 1 col_start: 2 col_stop: 14 - path: test + path: "" content: "(+, 345)group" - Value: Group: @@ -421,14 +421,14 @@ outputs: line_stop: 1 col_start: 5 col_stop: 8 - path: test + path: "" content: "(-, 345)group" span: line_start: 1 line_stop: 1 col_start: 2 col_stop: 14 - path: test + path: "" content: "(-, 345)group" - Value: Group: @@ -441,14 +441,14 @@ outputs: line_stop: 1 col_start: 5 col_stop: 8 - path: test + path: "" content: "(_, 345)group" span: line_start: 1 line_stop: 1 col_start: 2 col_stop: 14 - path: test + path: "" content: "(_, 345)group" - Value: Group: @@ -460,7 +460,7 @@ outputs: line_stop: 1 col_start: 2 col_stop: 5 - path: test + path: "" content: "(123, 456)group" y: Number: @@ -469,14 +469,14 @@ outputs: line_stop: 1 col_start: 7 col_stop: 10 - path: test + path: "" content: "(123, 456)group" span: line_start: 1 line_stop: 1 col_start: 2 col_stop: 16 - path: test + path: "" content: "(123, 456)group" - Value: Group: @@ -488,7 +488,7 @@ outputs: line_stop: 1 col_start: 2 col_stop: 5 - path: test + path: "" content: "(123, 456)group" y: Number: @@ -497,14 +497,14 @@ outputs: line_stop: 1 col_start: 7 col_stop: 10 - path: test + path: "" content: "(123, 456)group" span: line_start: 1 line_stop: 1 col_start: 2 col_stop: 16 - path: test + path: "" content: "(123, 456)group" - Value: Group: @@ -516,7 +516,7 @@ outputs: line_stop: 1 col_start: 2 col_stop: 5 - path: test + path: "" content: "(123, 456)group" y: Number: @@ -525,14 +525,14 @@ outputs: line_stop: 1 col_start: 7 col_stop: 10 - path: test + path: "" content: "(123, 456)group" span: line_start: 1 line_stop: 1 col_start: 2 col_stop: 16 - path: test + path: "" content: "(123, 456)group" - Value: Group: @@ -544,7 +544,7 @@ outputs: line_stop: 1 col_start: 2 col_stop: 5 - path: test + path: "" content: "(123, 456)group" y: Number: @@ -553,14 +553,14 @@ outputs: line_stop: 1 col_start: 7 col_stop: 10 - path: test + path: "" content: "(123, 456)group" span: line_start: 1 line_stop: 1 col_start: 2 col_stop: 16 - path: test + path: "" content: "(123, 456)group" - Value: Group: @@ -572,7 +572,7 @@ outputs: line_stop: 1 col_start: 2 col_stop: 5 - path: test + path: "" content: "(123, 456)group" y: Number: @@ -581,14 +581,14 @@ outputs: line_stop: 1 col_start: 7 col_stop: 10 - path: test + path: "" content: "(123, 456)group" span: line_start: 1 line_stop: 1 col_start: 2 col_stop: 16 - path: test + path: "" content: "(123, 456)group" - Value: Group: @@ -600,7 +600,7 @@ outputs: line_stop: 1 col_start: 2 col_stop: 5 - path: test + path: "" content: "(123, 456)group" y: Number: @@ -609,14 +609,14 @@ outputs: line_stop: 1 col_start: 7 col_stop: 10 - path: test + path: "" content: "(123, 456)group" span: line_start: 1 line_stop: 1 col_start: 2 col_stop: 16 - path: test + path: "" content: "(123, 456)group" - Value: Group: @@ -628,7 +628,7 @@ outputs: line_stop: 1 col_start: 2 col_stop: 5 - path: test + path: "" content: "(123, 456)group" y: Number: @@ -637,12 +637,12 @@ outputs: line_stop: 1 col_start: 7 col_stop: 10 - path: test + path: "" content: "(123, 456)group" span: line_start: 1 line_stop: 1 col_start: 2 col_stop: 16 - path: test + path: "" content: "(123, 456)group" diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/field.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/field.leo.out index c7f5f3576f..83d189a382 100644 --- a/tests/expectations/parser/parser/expression/literal/int_parse/field.leo.out +++ b/tests/expectations/parser/parser/expression/literal/int_parse/field.leo.out @@ -9,7 +9,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 9 - path: test + path: "" content: 123field - Value: Implicit: @@ -18,7 +18,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: "123" - Value: Field: @@ -27,7 +27,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 9 - path: test + path: "" content: 456field - Value: Field: @@ -36,7 +36,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 86 - path: test + path: "" content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802field - Value: Field: @@ -45,7 +45,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 406 - path: test + path: "" content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802field - Value: Field: @@ -54,7 +54,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 340130024field - Value: Field: @@ -63,7 +63,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 158951116field - Value: Field: @@ -72,7 +72,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 155529659field - Value: Field: @@ -81,7 +81,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 642023166field - Value: Field: @@ -90,7 +90,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 228481736field - Value: Field: @@ -99,7 +99,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 469712960field - Value: Field: @@ -108,7 +108,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 929437719field - Value: Field: @@ -117,7 +117,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 721072814field - Value: Field: @@ -126,7 +126,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 363254789field - Value: Field: @@ -135,7 +135,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 906732565field - Value: Field: @@ -144,7 +144,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 288246391field - Value: Field: @@ -153,7 +153,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 724940549field - Value: Field: @@ -162,7 +162,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 487101620field - Value: Field: @@ -171,7 +171,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 261373583field - Value: Field: @@ -180,7 +180,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 891163927field - Value: Field: @@ -189,7 +189,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 743967544field - Value: Field: @@ -198,7 +198,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 8372586field - Value: Field: @@ -207,7 +207,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 461793278field - Value: Field: @@ -216,7 +216,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 806307045field - Value: Field: @@ -225,7 +225,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 122764546field - Value: Field: @@ -234,7 +234,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 356336181field - Value: Field: @@ -243,7 +243,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 158370903field - Value: Field: @@ -252,7 +252,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 774460877field - Value: Field: @@ -261,7 +261,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 557174131field - Value: Field: @@ -270,7 +270,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 492401267field - Value: Field: @@ -279,7 +279,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 893445620field - Value: Field: @@ -288,7 +288,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 957757048field - Value: Field: @@ -297,7 +297,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 721540649field - Value: Field: @@ -306,7 +306,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 390746493field - Value: Field: @@ -315,7 +315,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 211251725field - Value: Field: @@ -324,7 +324,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 938266114field - Value: Field: @@ -333,7 +333,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 156985870field - Value: Field: @@ -342,7 +342,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 703831126field - Value: Field: @@ -351,7 +351,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 729964155field - Value: Field: @@ -360,7 +360,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 988151305field - Value: Field: @@ -369,7 +369,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 320872435field - Value: Field: @@ -378,7 +378,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 719287167field - Value: Field: @@ -387,7 +387,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 152289486field - Value: Field: @@ -396,7 +396,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 740067975field - Value: Field: @@ -405,7 +405,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 728627816field - Value: Field: @@ -414,7 +414,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 385008978field - Value: Field: @@ -423,7 +423,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 553967635field - Value: Field: @@ -432,7 +432,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 71980713field - Value: Field: @@ -441,7 +441,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 519444716field - Value: Field: @@ -450,7 +450,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 116499965field - Value: Field: @@ -459,7 +459,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 717422268field - Value: Field: @@ -468,7 +468,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 18966279field - Value: Field: @@ -477,7 +477,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 22458638field - Value: Field: @@ -486,7 +486,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 857282620field - Value: Field: @@ -495,7 +495,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 920675898field - Value: Field: @@ -504,7 +504,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 762235516field - Value: Field: @@ -513,7 +513,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 469018377field - Value: Field: @@ -522,7 +522,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 199986521field - Value: Field: @@ -531,7 +531,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 536679358field - Value: Field: @@ -540,7 +540,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 591399452field - Value: Field: @@ -549,7 +549,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 83083158field - Value: Field: @@ -558,7 +558,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 599449051field - Value: Field: @@ -567,7 +567,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 445442318field - Value: Field: @@ -576,7 +576,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 585486590field - Value: Field: @@ -585,7 +585,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 209278800field - Value: Field: @@ -594,7 +594,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 873568117field - Value: Field: @@ -603,7 +603,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 664470940field - Value: Field: @@ -612,7 +612,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 465262783field - Value: Field: @@ -621,7 +621,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 605652874field - Value: Field: @@ -630,7 +630,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 376803940field - Value: Field: @@ -639,7 +639,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 965247040field - Value: Field: @@ -648,7 +648,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 598474509field - Value: Field: @@ -657,7 +657,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 845119918field - Value: Field: @@ -666,7 +666,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 648159133field - Value: Field: @@ -675,7 +675,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 669051032field - Value: Field: @@ -684,7 +684,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 800600261field - Value: Field: @@ -693,7 +693,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 434689764field - Value: Field: @@ -702,7 +702,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 520060080field - Value: Field: @@ -711,7 +711,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 804659385field - Value: Field: @@ -720,7 +720,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 537828058field - Value: Field: @@ -729,7 +729,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 716600292field - Value: Field: @@ -738,7 +738,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 387020273field - Value: Field: @@ -747,7 +747,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 199375617field - Value: Field: @@ -756,7 +756,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 680337189field - Value: Field: @@ -765,7 +765,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 818479931field - Value: Field: @@ -774,7 +774,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 893693281field - Value: Field: @@ -783,7 +783,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 87377802field - Value: Field: @@ -792,7 +792,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 84699261field - Value: Field: @@ -801,7 +801,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 292826090field - Value: Field: @@ -810,7 +810,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 569171405field - Value: Field: @@ -819,7 +819,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 387436237field - Value: Field: @@ -828,7 +828,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 150682190field - Value: Field: @@ -837,7 +837,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 888770419field - Value: Field: @@ -846,7 +846,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 824696431field - Value: Field: @@ -855,7 +855,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 765659803field - Value: Field: @@ -864,7 +864,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 270163693field - Value: Field: @@ -873,7 +873,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 427940240field - Value: Field: @@ -882,7 +882,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 504997332field - Value: Field: @@ -891,7 +891,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 337808338field - Value: Field: @@ -900,7 +900,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 907200008field - Value: Field: @@ -909,7 +909,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 757177889field - Value: Field: @@ -918,7 +918,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 696697188field - Value: Field: @@ -927,7 +927,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 41376051field - Value: Field: @@ -936,7 +936,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 496293518field - Value: Field: @@ -945,5 +945,5 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 251218820field diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/i128.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/i128.leo.out index f0d886348f..cb3fa6dd2e 100644 --- a/tests/expectations/parser/parser/expression/literal/int_parse/i128.leo.out +++ b/tests/expectations/parser/parser/expression/literal/int_parse/i128.leo.out @@ -10,7 +10,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 8 - path: test + path: "" content: 123i128 - Value: Implicit: @@ -19,7 +19,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: "123" - Value: Integer: @@ -29,7 +29,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 8 - path: test + path: "" content: 456i128 - Value: Integer: @@ -39,7 +39,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 85 - path: test + path: "" content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802i128 - Value: Integer: @@ -49,7 +49,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 405 - path: test + path: "" content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802i128 - Value: Integer: @@ -59,7 +59,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 340130024i128 - Value: Integer: @@ -69,7 +69,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 158951116i128 - Value: Integer: @@ -79,7 +79,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 155529659i128 - Value: Integer: @@ -89,7 +89,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 642023166i128 - Value: Integer: @@ -99,7 +99,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 228481736i128 - Value: Integer: @@ -109,7 +109,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 469712960i128 - Value: Integer: @@ -119,7 +119,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 929437719i128 - Value: Integer: @@ -129,7 +129,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 721072814i128 - Value: Integer: @@ -139,7 +139,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 363254789i128 - Value: Integer: @@ -149,7 +149,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 906732565i128 - Value: Integer: @@ -159,7 +159,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 288246391i128 - Value: Integer: @@ -169,7 +169,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 724940549i128 - Value: Integer: @@ -179,7 +179,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 487101620i128 - Value: Integer: @@ -189,7 +189,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 261373583i128 - Value: Integer: @@ -199,7 +199,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 891163927i128 - Value: Integer: @@ -209,7 +209,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 743967544i128 - Value: Integer: @@ -219,7 +219,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 8372586i128 - Value: Integer: @@ -229,7 +229,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 461793278i128 - Value: Integer: @@ -239,7 +239,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 806307045i128 - Value: Integer: @@ -249,7 +249,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 122764546i128 - Value: Integer: @@ -259,7 +259,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 356336181i128 - Value: Integer: @@ -269,7 +269,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 158370903i128 - Value: Integer: @@ -279,7 +279,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 774460877i128 - Value: Integer: @@ -289,7 +289,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 557174131i128 - Value: Integer: @@ -299,7 +299,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 492401267i128 - Value: Integer: @@ -309,7 +309,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 893445620i128 - Value: Integer: @@ -319,7 +319,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 957757048i128 - Value: Integer: @@ -329,7 +329,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 721540649i128 - Value: Integer: @@ -339,7 +339,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 390746493i128 - Value: Integer: @@ -349,7 +349,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 211251725i128 - Value: Integer: @@ -359,7 +359,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 938266114i128 - Value: Integer: @@ -369,7 +369,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 156985870i128 - Value: Integer: @@ -379,7 +379,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 703831126i128 - Value: Integer: @@ -389,7 +389,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 729964155i128 - Value: Integer: @@ -399,7 +399,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 988151305i128 - Value: Integer: @@ -409,7 +409,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 320872435i128 - Value: Integer: @@ -419,7 +419,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 719287167i128 - Value: Integer: @@ -429,7 +429,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 152289486i128 - Value: Integer: @@ -439,7 +439,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 740067975i128 - Value: Integer: @@ -449,7 +449,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 728627816i128 - Value: Integer: @@ -459,7 +459,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 385008978i128 - Value: Integer: @@ -469,7 +469,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 553967635i128 - Value: Integer: @@ -479,7 +479,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 71980713i128 - Value: Integer: @@ -489,7 +489,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 519444716i128 - Value: Integer: @@ -499,7 +499,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 116499965i128 - Value: Integer: @@ -509,7 +509,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 717422268i128 - Value: Integer: @@ -519,7 +519,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 18966279i128 - Value: Integer: @@ -529,7 +529,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 22458638i128 - Value: Integer: @@ -539,7 +539,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 857282620i128 - Value: Integer: @@ -549,7 +549,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 920675898i128 - Value: Integer: @@ -559,7 +559,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 762235516i128 - Value: Integer: @@ -569,7 +569,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 469018377i128 - Value: Integer: @@ -579,7 +579,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 199986521i128 - Value: Integer: @@ -589,7 +589,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 536679358i128 - Value: Integer: @@ -599,7 +599,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 591399452i128 - Value: Integer: @@ -609,7 +609,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 83083158i128 - Value: Integer: @@ -619,7 +619,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 599449051i128 - Value: Integer: @@ -629,7 +629,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 445442318i128 - Value: Integer: @@ -639,7 +639,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 585486590i128 - Value: Integer: @@ -649,7 +649,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 209278800i128 - Value: Integer: @@ -659,7 +659,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 873568117i128 - Value: Integer: @@ -669,7 +669,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 664470940i128 - Value: Integer: @@ -679,7 +679,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 465262783i128 - Value: Integer: @@ -689,7 +689,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 605652874i128 - Value: Integer: @@ -699,7 +699,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 376803940i128 - Value: Integer: @@ -709,7 +709,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 965247040i128 - Value: Integer: @@ -719,7 +719,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 598474509i128 - Value: Integer: @@ -729,7 +729,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 845119918i128 - Value: Integer: @@ -739,7 +739,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 648159133i128 - Value: Integer: @@ -749,7 +749,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 669051032i128 - Value: Integer: @@ -759,7 +759,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 800600261i128 - Value: Integer: @@ -769,7 +769,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 434689764i128 - Value: Integer: @@ -779,7 +779,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 520060080i128 - Value: Integer: @@ -789,7 +789,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 804659385i128 - Value: Integer: @@ -799,7 +799,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 537828058i128 - Value: Integer: @@ -809,7 +809,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 716600292i128 - Value: Integer: @@ -819,7 +819,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 387020273i128 - Value: Integer: @@ -829,7 +829,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 199375617i128 - Value: Integer: @@ -839,7 +839,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 680337189i128 - Value: Integer: @@ -849,7 +849,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 818479931i128 - Value: Integer: @@ -859,7 +859,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 893693281i128 - Value: Integer: @@ -869,7 +869,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 87377802i128 - Value: Integer: @@ -879,7 +879,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 84699261i128 - Value: Integer: @@ -889,7 +889,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 292826090i128 - Value: Integer: @@ -899,7 +899,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 569171405i128 - Value: Integer: @@ -909,7 +909,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 387436237i128 - Value: Integer: @@ -919,7 +919,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 150682190i128 - Value: Integer: @@ -929,7 +929,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 888770419i128 - Value: Integer: @@ -939,7 +939,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 824696431i128 - Value: Integer: @@ -949,7 +949,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 765659803i128 - Value: Integer: @@ -959,7 +959,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 270163693i128 - Value: Integer: @@ -969,7 +969,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 427940240i128 - Value: Integer: @@ -979,7 +979,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 504997332i128 - Value: Integer: @@ -989,7 +989,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 337808338i128 - Value: Integer: @@ -999,7 +999,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 907200008i128 - Value: Integer: @@ -1009,7 +1009,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 757177889i128 - Value: Integer: @@ -1019,7 +1019,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 696697188i128 - Value: Integer: @@ -1029,7 +1029,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 41376051i128 - Value: Integer: @@ -1039,7 +1039,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 496293518i128 - Value: Integer: @@ -1049,5 +1049,5 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 251218820i128 diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/i16.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/i16.leo.out index 82a8fc8b1b..4172ff2c40 100644 --- a/tests/expectations/parser/parser/expression/literal/int_parse/i16.leo.out +++ b/tests/expectations/parser/parser/expression/literal/int_parse/i16.leo.out @@ -10,7 +10,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: 123i16 - Value: Implicit: @@ -19,7 +19,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: "123" - Value: Integer: @@ -29,7 +29,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: 456i16 - Value: Integer: @@ -39,7 +39,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 84 - path: test + path: "" content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802i16 - Value: Integer: @@ -49,7 +49,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 404 - path: test + path: "" content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802i16 - Value: Integer: @@ -59,7 +59,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 340130024i16 - Value: Integer: @@ -69,7 +69,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 158951116i16 - Value: Integer: @@ -79,7 +79,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 155529659i16 - Value: Integer: @@ -89,7 +89,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 642023166i16 - Value: Integer: @@ -99,7 +99,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 228481736i16 - Value: Integer: @@ -109,7 +109,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 469712960i16 - Value: Integer: @@ -119,7 +119,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 929437719i16 - Value: Integer: @@ -129,7 +129,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 721072814i16 - Value: Integer: @@ -139,7 +139,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 363254789i16 - Value: Integer: @@ -149,7 +149,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 906732565i16 - Value: Integer: @@ -159,7 +159,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 288246391i16 - Value: Integer: @@ -169,7 +169,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 724940549i16 - Value: Integer: @@ -179,7 +179,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 487101620i16 - Value: Integer: @@ -189,7 +189,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 261373583i16 - Value: Integer: @@ -199,7 +199,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 891163927i16 - Value: Integer: @@ -209,7 +209,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 743967544i16 - Value: Integer: @@ -219,7 +219,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 11 - path: test + path: "" content: 8372586i16 - Value: Integer: @@ -229,7 +229,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 461793278i16 - Value: Integer: @@ -239,7 +239,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 806307045i16 - Value: Integer: @@ -249,7 +249,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 122764546i16 - Value: Integer: @@ -259,7 +259,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 356336181i16 - Value: Integer: @@ -269,7 +269,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 158370903i16 - Value: Integer: @@ -279,7 +279,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 774460877i16 - Value: Integer: @@ -289,7 +289,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 557174131i16 - Value: Integer: @@ -299,7 +299,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 492401267i16 - Value: Integer: @@ -309,7 +309,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 893445620i16 - Value: Integer: @@ -319,7 +319,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 957757048i16 - Value: Integer: @@ -329,7 +329,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 721540649i16 - Value: Integer: @@ -339,7 +339,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 390746493i16 - Value: Integer: @@ -349,7 +349,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 211251725i16 - Value: Integer: @@ -359,7 +359,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 938266114i16 - Value: Integer: @@ -369,7 +369,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 156985870i16 - Value: Integer: @@ -379,7 +379,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 703831126i16 - Value: Integer: @@ -389,7 +389,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 729964155i16 - Value: Integer: @@ -399,7 +399,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 988151305i16 - Value: Integer: @@ -409,7 +409,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 320872435i16 - Value: Integer: @@ -419,7 +419,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 719287167i16 - Value: Integer: @@ -429,7 +429,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 152289486i16 - Value: Integer: @@ -439,7 +439,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 740067975i16 - Value: Integer: @@ -449,7 +449,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 728627816i16 - Value: Integer: @@ -459,7 +459,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 385008978i16 - Value: Integer: @@ -469,7 +469,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 553967635i16 - Value: Integer: @@ -479,7 +479,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 71980713i16 - Value: Integer: @@ -489,7 +489,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 519444716i16 - Value: Integer: @@ -499,7 +499,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 116499965i16 - Value: Integer: @@ -509,7 +509,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 717422268i16 - Value: Integer: @@ -519,7 +519,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 18966279i16 - Value: Integer: @@ -529,7 +529,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 22458638i16 - Value: Integer: @@ -539,7 +539,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 857282620i16 - Value: Integer: @@ -549,7 +549,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 920675898i16 - Value: Integer: @@ -559,7 +559,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 762235516i16 - Value: Integer: @@ -569,7 +569,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 469018377i16 - Value: Integer: @@ -579,7 +579,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 199986521i16 - Value: Integer: @@ -589,7 +589,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 536679358i16 - Value: Integer: @@ -599,7 +599,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 591399452i16 - Value: Integer: @@ -609,7 +609,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 83083158i16 - Value: Integer: @@ -619,7 +619,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 599449051i16 - Value: Integer: @@ -629,7 +629,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 445442318i16 - Value: Integer: @@ -639,7 +639,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 585486590i16 - Value: Integer: @@ -649,7 +649,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 209278800i16 - Value: Integer: @@ -659,7 +659,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 873568117i16 - Value: Integer: @@ -669,7 +669,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 664470940i16 - Value: Integer: @@ -679,7 +679,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 465262783i16 - Value: Integer: @@ -689,7 +689,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 605652874i16 - Value: Integer: @@ -699,7 +699,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 376803940i16 - Value: Integer: @@ -709,7 +709,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 965247040i16 - Value: Integer: @@ -719,7 +719,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 598474509i16 - Value: Integer: @@ -729,7 +729,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 845119918i16 - Value: Integer: @@ -739,7 +739,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 648159133i16 - Value: Integer: @@ -749,7 +749,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 669051032i16 - Value: Integer: @@ -759,7 +759,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 800600261i16 - Value: Integer: @@ -769,7 +769,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 434689764i16 - Value: Integer: @@ -779,7 +779,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 520060080i16 - Value: Integer: @@ -789,7 +789,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 804659385i16 - Value: Integer: @@ -799,7 +799,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 537828058i16 - Value: Integer: @@ -809,7 +809,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 716600292i16 - Value: Integer: @@ -819,7 +819,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 387020273i16 - Value: Integer: @@ -829,7 +829,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 199375617i16 - Value: Integer: @@ -839,7 +839,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 680337189i16 - Value: Integer: @@ -849,7 +849,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 818479931i16 - Value: Integer: @@ -859,7 +859,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 893693281i16 - Value: Integer: @@ -869,7 +869,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 87377802i16 - Value: Integer: @@ -879,7 +879,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 84699261i16 - Value: Integer: @@ -889,7 +889,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 292826090i16 - Value: Integer: @@ -899,7 +899,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 569171405i16 - Value: Integer: @@ -909,7 +909,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 387436237i16 - Value: Integer: @@ -919,7 +919,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 150682190i16 - Value: Integer: @@ -929,7 +929,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 888770419i16 - Value: Integer: @@ -939,7 +939,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 824696431i16 - Value: Integer: @@ -949,7 +949,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 765659803i16 - Value: Integer: @@ -959,7 +959,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 270163693i16 - Value: Integer: @@ -969,7 +969,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 427940240i16 - Value: Integer: @@ -979,7 +979,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 504997332i16 - Value: Integer: @@ -989,7 +989,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 337808338i16 - Value: Integer: @@ -999,7 +999,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 907200008i16 - Value: Integer: @@ -1009,7 +1009,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 757177889i16 - Value: Integer: @@ -1019,7 +1019,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 696697188i16 - Value: Integer: @@ -1029,7 +1029,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 41376051i16 - Value: Integer: @@ -1039,7 +1039,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 496293518i16 - Value: Integer: @@ -1049,5 +1049,5 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 251218820i16 diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/i32.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/i32.leo.out index 82d66bdbf5..d5e7d115ac 100644 --- a/tests/expectations/parser/parser/expression/literal/int_parse/i32.leo.out +++ b/tests/expectations/parser/parser/expression/literal/int_parse/i32.leo.out @@ -10,7 +10,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: 123i32 - Value: Implicit: @@ -19,7 +19,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: "123" - Value: Integer: @@ -29,7 +29,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: 456i32 - Value: Integer: @@ -39,7 +39,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 84 - path: test + path: "" content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802i32 - Value: Integer: @@ -49,7 +49,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 404 - path: test + path: "" content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802i32 - Value: Integer: @@ -59,7 +59,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 340130024i32 - Value: Integer: @@ -69,7 +69,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 158951116i32 - Value: Integer: @@ -79,7 +79,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 155529659i32 - Value: Integer: @@ -89,7 +89,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 642023166i32 - Value: Integer: @@ -99,7 +99,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 228481736i32 - Value: Integer: @@ -109,7 +109,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 469712960i32 - Value: Integer: @@ -119,7 +119,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 929437719i32 - Value: Integer: @@ -129,7 +129,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 721072814i32 - Value: Integer: @@ -139,7 +139,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 363254789i32 - Value: Integer: @@ -149,7 +149,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 906732565i32 - Value: Integer: @@ -159,7 +159,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 288246391i32 - Value: Integer: @@ -169,7 +169,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 724940549i32 - Value: Integer: @@ -179,7 +179,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 487101620i32 - Value: Integer: @@ -189,7 +189,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 261373583i32 - Value: Integer: @@ -199,7 +199,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 891163927i32 - Value: Integer: @@ -209,7 +209,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 743967544i32 - Value: Integer: @@ -219,7 +219,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 11 - path: test + path: "" content: 8372586i32 - Value: Integer: @@ -229,7 +229,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 461793278i32 - Value: Integer: @@ -239,7 +239,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 806307045i32 - Value: Integer: @@ -249,7 +249,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 122764546i32 - Value: Integer: @@ -259,7 +259,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 356336181i32 - Value: Integer: @@ -269,7 +269,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 158370903i32 - Value: Integer: @@ -279,7 +279,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 774460877i32 - Value: Integer: @@ -289,7 +289,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 557174131i32 - Value: Integer: @@ -299,7 +299,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 492401267i32 - Value: Integer: @@ -309,7 +309,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 893445620i32 - Value: Integer: @@ -319,7 +319,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 957757048i32 - Value: Integer: @@ -329,7 +329,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 721540649i32 - Value: Integer: @@ -339,7 +339,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 390746493i32 - Value: Integer: @@ -349,7 +349,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 211251725i32 - Value: Integer: @@ -359,7 +359,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 938266114i32 - Value: Integer: @@ -369,7 +369,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 156985870i32 - Value: Integer: @@ -379,7 +379,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 703831126i32 - Value: Integer: @@ -389,7 +389,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 729964155i32 - Value: Integer: @@ -399,7 +399,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 988151305i32 - Value: Integer: @@ -409,7 +409,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 320872435i32 - Value: Integer: @@ -419,7 +419,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 719287167i32 - Value: Integer: @@ -429,7 +429,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 152289486i32 - Value: Integer: @@ -439,7 +439,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 740067975i32 - Value: Integer: @@ -449,7 +449,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 728627816i32 - Value: Integer: @@ -459,7 +459,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 385008978i32 - Value: Integer: @@ -469,7 +469,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 553967635i32 - Value: Integer: @@ -479,7 +479,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 71980713i32 - Value: Integer: @@ -489,7 +489,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 519444716i32 - Value: Integer: @@ -499,7 +499,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 116499965i32 - Value: Integer: @@ -509,7 +509,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 717422268i32 - Value: Integer: @@ -519,7 +519,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 18966279i32 - Value: Integer: @@ -529,7 +529,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 22458638i32 - Value: Integer: @@ -539,7 +539,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 857282620i32 - Value: Integer: @@ -549,7 +549,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 920675898i32 - Value: Integer: @@ -559,7 +559,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 762235516i32 - Value: Integer: @@ -569,7 +569,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 469018377i32 - Value: Integer: @@ -579,7 +579,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 199986521i32 - Value: Integer: @@ -589,7 +589,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 536679358i32 - Value: Integer: @@ -599,7 +599,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 591399452i32 - Value: Integer: @@ -609,7 +609,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 83083158i32 - Value: Integer: @@ -619,7 +619,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 599449051i32 - Value: Integer: @@ -629,7 +629,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 445442318i32 - Value: Integer: @@ -639,7 +639,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 585486590i32 - Value: Integer: @@ -649,7 +649,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 209278800i32 - Value: Integer: @@ -659,7 +659,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 873568117i32 - Value: Integer: @@ -669,7 +669,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 664470940i32 - Value: Integer: @@ -679,7 +679,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 465262783i32 - Value: Integer: @@ -689,7 +689,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 605652874i32 - Value: Integer: @@ -699,7 +699,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 376803940i32 - Value: Integer: @@ -709,7 +709,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 965247040i32 - Value: Integer: @@ -719,7 +719,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 598474509i32 - Value: Integer: @@ -729,7 +729,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 845119918i32 - Value: Integer: @@ -739,7 +739,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 648159133i32 - Value: Integer: @@ -749,7 +749,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 669051032i32 - Value: Integer: @@ -759,7 +759,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 800600261i32 - Value: Integer: @@ -769,7 +769,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 434689764i32 - Value: Integer: @@ -779,7 +779,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 520060080i32 - Value: Integer: @@ -789,7 +789,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 804659385i32 - Value: Integer: @@ -799,7 +799,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 537828058i32 - Value: Integer: @@ -809,7 +809,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 716600292i32 - Value: Integer: @@ -819,7 +819,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 387020273i32 - Value: Integer: @@ -829,7 +829,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 199375617i32 - Value: Integer: @@ -839,7 +839,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 680337189i32 - Value: Integer: @@ -849,7 +849,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 818479931i32 - Value: Integer: @@ -859,7 +859,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 893693281i32 - Value: Integer: @@ -869,7 +869,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 87377802i32 - Value: Integer: @@ -879,7 +879,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 84699261i32 - Value: Integer: @@ -889,7 +889,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 292826090i32 - Value: Integer: @@ -899,7 +899,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 569171405i32 - Value: Integer: @@ -909,7 +909,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 387436237i32 - Value: Integer: @@ -919,7 +919,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 150682190i32 - Value: Integer: @@ -929,7 +929,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 888770419i32 - Value: Integer: @@ -939,7 +939,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 824696431i32 - Value: Integer: @@ -949,7 +949,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 765659803i32 - Value: Integer: @@ -959,7 +959,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 270163693i32 - Value: Integer: @@ -969,7 +969,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 427940240i32 - Value: Integer: @@ -979,7 +979,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 504997332i32 - Value: Integer: @@ -989,7 +989,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 337808338i32 - Value: Integer: @@ -999,7 +999,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 907200008i32 - Value: Integer: @@ -1009,7 +1009,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 757177889i32 - Value: Integer: @@ -1019,7 +1019,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 696697188i32 - Value: Integer: @@ -1029,7 +1029,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 41376051i32 - Value: Integer: @@ -1039,7 +1039,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 496293518i32 - Value: Integer: @@ -1049,5 +1049,5 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 251218820i32 diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/i64.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/i64.leo.out index 24949c2f99..f38e693037 100644 --- a/tests/expectations/parser/parser/expression/literal/int_parse/i64.leo.out +++ b/tests/expectations/parser/parser/expression/literal/int_parse/i64.leo.out @@ -10,7 +10,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: 123i64 - Value: Implicit: @@ -19,7 +19,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: "123" - Value: Integer: @@ -29,7 +29,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: 456i64 - Value: Integer: @@ -39,7 +39,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 84 - path: test + path: "" content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802i64 - Value: Integer: @@ -49,7 +49,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 404 - path: test + path: "" content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802i64 - Value: Integer: @@ -59,7 +59,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 340130024i64 - Value: Integer: @@ -69,7 +69,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 158951116i64 - Value: Integer: @@ -79,7 +79,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 155529659i64 - Value: Integer: @@ -89,7 +89,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 642023166i64 - Value: Integer: @@ -99,7 +99,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 228481736i64 - Value: Integer: @@ -109,7 +109,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 469712960i64 - Value: Integer: @@ -119,7 +119,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 929437719i64 - Value: Integer: @@ -129,7 +129,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 721072814i64 - Value: Integer: @@ -139,7 +139,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 363254789i64 - Value: Integer: @@ -149,7 +149,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 906732565i64 - Value: Integer: @@ -159,7 +159,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 288246391i64 - Value: Integer: @@ -169,7 +169,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 724940549i64 - Value: Integer: @@ -179,7 +179,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 487101620i64 - Value: Integer: @@ -189,7 +189,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 261373583i64 - Value: Integer: @@ -199,7 +199,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 891163927i64 - Value: Integer: @@ -209,7 +209,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 743967544i64 - Value: Integer: @@ -219,7 +219,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 11 - path: test + path: "" content: 8372586i64 - Value: Integer: @@ -229,7 +229,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 461793278i64 - Value: Integer: @@ -239,7 +239,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 806307045i64 - Value: Integer: @@ -249,7 +249,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 122764546i64 - Value: Integer: @@ -259,7 +259,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 356336181i64 - Value: Integer: @@ -269,7 +269,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 158370903i64 - Value: Integer: @@ -279,7 +279,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 774460877i64 - Value: Integer: @@ -289,7 +289,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 557174131i64 - Value: Integer: @@ -299,7 +299,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 492401267i64 - Value: Integer: @@ -309,7 +309,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 893445620i64 - Value: Integer: @@ -319,7 +319,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 957757048i64 - Value: Integer: @@ -329,7 +329,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 721540649i64 - Value: Integer: @@ -339,7 +339,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 390746493i64 - Value: Integer: @@ -349,7 +349,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 211251725i64 - Value: Integer: @@ -359,7 +359,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 938266114i64 - Value: Integer: @@ -369,7 +369,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 156985870i64 - Value: Integer: @@ -379,7 +379,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 703831126i64 - Value: Integer: @@ -389,7 +389,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 729964155i64 - Value: Integer: @@ -399,7 +399,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 988151305i64 - Value: Integer: @@ -409,7 +409,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 320872435i64 - Value: Integer: @@ -419,7 +419,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 719287167i64 - Value: Integer: @@ -429,7 +429,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 152289486i64 - Value: Integer: @@ -439,7 +439,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 740067975i64 - Value: Integer: @@ -449,7 +449,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 728627816i64 - Value: Integer: @@ -459,7 +459,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 385008978i64 - Value: Integer: @@ -469,7 +469,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 553967635i64 - Value: Integer: @@ -479,7 +479,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 71980713i64 - Value: Integer: @@ -489,7 +489,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 519444716i64 - Value: Integer: @@ -499,7 +499,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 116499965i64 - Value: Integer: @@ -509,7 +509,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 717422268i64 - Value: Integer: @@ -519,7 +519,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 18966279i64 - Value: Integer: @@ -529,7 +529,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 22458638i64 - Value: Integer: @@ -539,7 +539,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 857282620i64 - Value: Integer: @@ -549,7 +549,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 920675898i64 - Value: Integer: @@ -559,7 +559,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 762235516i64 - Value: Integer: @@ -569,7 +569,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 469018377i64 - Value: Integer: @@ -579,7 +579,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 199986521i64 - Value: Integer: @@ -589,7 +589,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 536679358i64 - Value: Integer: @@ -599,7 +599,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 591399452i64 - Value: Integer: @@ -609,7 +609,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 83083158i64 - Value: Integer: @@ -619,7 +619,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 599449051i64 - Value: Integer: @@ -629,7 +629,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 445442318i64 - Value: Integer: @@ -639,7 +639,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 585486590i64 - Value: Integer: @@ -649,7 +649,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 209278800i64 - Value: Integer: @@ -659,7 +659,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 873568117i64 - Value: Integer: @@ -669,7 +669,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 664470940i64 - Value: Integer: @@ -679,7 +679,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 465262783i64 - Value: Integer: @@ -689,7 +689,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 605652874i64 - Value: Integer: @@ -699,7 +699,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 376803940i64 - Value: Integer: @@ -709,7 +709,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 965247040i64 - Value: Integer: @@ -719,7 +719,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 598474509i64 - Value: Integer: @@ -729,7 +729,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 845119918i64 - Value: Integer: @@ -739,7 +739,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 648159133i64 - Value: Integer: @@ -749,7 +749,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 669051032i64 - Value: Integer: @@ -759,7 +759,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 800600261i64 - Value: Integer: @@ -769,7 +769,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 434689764i64 - Value: Integer: @@ -779,7 +779,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 520060080i64 - Value: Integer: @@ -789,7 +789,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 804659385i64 - Value: Integer: @@ -799,7 +799,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 537828058i64 - Value: Integer: @@ -809,7 +809,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 716600292i64 - Value: Integer: @@ -819,7 +819,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 387020273i64 - Value: Integer: @@ -829,7 +829,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 199375617i64 - Value: Integer: @@ -839,7 +839,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 680337189i64 - Value: Integer: @@ -849,7 +849,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 818479931i64 - Value: Integer: @@ -859,7 +859,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 893693281i64 - Value: Integer: @@ -869,7 +869,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 87377802i64 - Value: Integer: @@ -879,7 +879,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 84699261i64 - Value: Integer: @@ -889,7 +889,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 292826090i64 - Value: Integer: @@ -899,7 +899,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 569171405i64 - Value: Integer: @@ -909,7 +909,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 387436237i64 - Value: Integer: @@ -919,7 +919,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 150682190i64 - Value: Integer: @@ -929,7 +929,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 888770419i64 - Value: Integer: @@ -939,7 +939,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 824696431i64 - Value: Integer: @@ -949,7 +949,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 765659803i64 - Value: Integer: @@ -959,7 +959,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 270163693i64 - Value: Integer: @@ -969,7 +969,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 427940240i64 - Value: Integer: @@ -979,7 +979,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 504997332i64 - Value: Integer: @@ -989,7 +989,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 337808338i64 - Value: Integer: @@ -999,7 +999,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 907200008i64 - Value: Integer: @@ -1009,7 +1009,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 757177889i64 - Value: Integer: @@ -1019,7 +1019,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 696697188i64 - Value: Integer: @@ -1029,7 +1029,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 41376051i64 - Value: Integer: @@ -1039,7 +1039,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 496293518i64 - Value: Integer: @@ -1049,5 +1049,5 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 251218820i64 diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/i8.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/i8.leo.out index 7b06304a6a..d8ceae2783 100644 --- a/tests/expectations/parser/parser/expression/literal/int_parse/i8.leo.out +++ b/tests/expectations/parser/parser/expression/literal/int_parse/i8.leo.out @@ -10,7 +10,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: 123i8 - Value: Implicit: @@ -19,7 +19,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: "123" - Value: Integer: @@ -29,7 +29,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: 456i8 - Value: Integer: @@ -39,7 +39,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 83 - path: test + path: "" content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802i8 - Value: Integer: @@ -49,7 +49,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 403 - path: test + path: "" content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802i8 - Value: Integer: @@ -59,7 +59,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 340130024i8 - Value: Integer: @@ -69,7 +69,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 158951116i8 - Value: Integer: @@ -79,7 +79,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 155529659i8 - Value: Integer: @@ -89,7 +89,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 642023166i8 - Value: Integer: @@ -99,7 +99,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 228481736i8 - Value: Integer: @@ -109,7 +109,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 469712960i8 - Value: Integer: @@ -119,7 +119,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 929437719i8 - Value: Integer: @@ -129,7 +129,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 721072814i8 - Value: Integer: @@ -139,7 +139,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 363254789i8 - Value: Integer: @@ -149,7 +149,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 906732565i8 - Value: Integer: @@ -159,7 +159,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 288246391i8 - Value: Integer: @@ -169,7 +169,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 724940549i8 - Value: Integer: @@ -179,7 +179,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 487101620i8 - Value: Integer: @@ -189,7 +189,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 261373583i8 - Value: Integer: @@ -199,7 +199,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 891163927i8 - Value: Integer: @@ -209,7 +209,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 743967544i8 - Value: Integer: @@ -219,7 +219,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: 8372586i8 - Value: Integer: @@ -229,7 +229,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 461793278i8 - Value: Integer: @@ -239,7 +239,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 806307045i8 - Value: Integer: @@ -249,7 +249,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 122764546i8 - Value: Integer: @@ -259,7 +259,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 356336181i8 - Value: Integer: @@ -269,7 +269,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 158370903i8 - Value: Integer: @@ -279,7 +279,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 774460877i8 - Value: Integer: @@ -289,7 +289,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 557174131i8 - Value: Integer: @@ -299,7 +299,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 492401267i8 - Value: Integer: @@ -309,7 +309,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 893445620i8 - Value: Integer: @@ -319,7 +319,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 957757048i8 - Value: Integer: @@ -329,7 +329,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 721540649i8 - Value: Integer: @@ -339,7 +339,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 390746493i8 - Value: Integer: @@ -349,7 +349,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 211251725i8 - Value: Integer: @@ -359,7 +359,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 938266114i8 - Value: Integer: @@ -369,7 +369,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 156985870i8 - Value: Integer: @@ -379,7 +379,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 703831126i8 - Value: Integer: @@ -389,7 +389,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 729964155i8 - Value: Integer: @@ -399,7 +399,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 988151305i8 - Value: Integer: @@ -409,7 +409,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 320872435i8 - Value: Integer: @@ -419,7 +419,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 719287167i8 - Value: Integer: @@ -429,7 +429,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 152289486i8 - Value: Integer: @@ -439,7 +439,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 740067975i8 - Value: Integer: @@ -449,7 +449,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 728627816i8 - Value: Integer: @@ -459,7 +459,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 385008978i8 - Value: Integer: @@ -469,7 +469,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 553967635i8 - Value: Integer: @@ -479,7 +479,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 11 - path: test + path: "" content: 71980713i8 - Value: Integer: @@ -489,7 +489,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 519444716i8 - Value: Integer: @@ -499,7 +499,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 116499965i8 - Value: Integer: @@ -509,7 +509,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 717422268i8 - Value: Integer: @@ -519,7 +519,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 11 - path: test + path: "" content: 18966279i8 - Value: Integer: @@ -529,7 +529,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 11 - path: test + path: "" content: 22458638i8 - Value: Integer: @@ -539,7 +539,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 857282620i8 - Value: Integer: @@ -549,7 +549,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 920675898i8 - Value: Integer: @@ -559,7 +559,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 762235516i8 - Value: Integer: @@ -569,7 +569,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 469018377i8 - Value: Integer: @@ -579,7 +579,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 199986521i8 - Value: Integer: @@ -589,7 +589,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 536679358i8 - Value: Integer: @@ -599,7 +599,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 591399452i8 - Value: Integer: @@ -609,7 +609,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 11 - path: test + path: "" content: 83083158i8 - Value: Integer: @@ -619,7 +619,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 599449051i8 - Value: Integer: @@ -629,7 +629,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 445442318i8 - Value: Integer: @@ -639,7 +639,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 585486590i8 - Value: Integer: @@ -649,7 +649,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 209278800i8 - Value: Integer: @@ -659,7 +659,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 873568117i8 - Value: Integer: @@ -669,7 +669,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 664470940i8 - Value: Integer: @@ -679,7 +679,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 465262783i8 - Value: Integer: @@ -689,7 +689,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 605652874i8 - Value: Integer: @@ -699,7 +699,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 376803940i8 - Value: Integer: @@ -709,7 +709,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 965247040i8 - Value: Integer: @@ -719,7 +719,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 598474509i8 - Value: Integer: @@ -729,7 +729,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 845119918i8 - Value: Integer: @@ -739,7 +739,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 648159133i8 - Value: Integer: @@ -749,7 +749,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 669051032i8 - Value: Integer: @@ -759,7 +759,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 800600261i8 - Value: Integer: @@ -769,7 +769,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 434689764i8 - Value: Integer: @@ -779,7 +779,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 520060080i8 - Value: Integer: @@ -789,7 +789,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 804659385i8 - Value: Integer: @@ -799,7 +799,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 537828058i8 - Value: Integer: @@ -809,7 +809,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 716600292i8 - Value: Integer: @@ -819,7 +819,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 387020273i8 - Value: Integer: @@ -829,7 +829,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 199375617i8 - Value: Integer: @@ -839,7 +839,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 680337189i8 - Value: Integer: @@ -849,7 +849,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 818479931i8 - Value: Integer: @@ -859,7 +859,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 893693281i8 - Value: Integer: @@ -869,7 +869,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 11 - path: test + path: "" content: 87377802i8 - Value: Integer: @@ -879,7 +879,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 11 - path: test + path: "" content: 84699261i8 - Value: Integer: @@ -889,7 +889,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 292826090i8 - Value: Integer: @@ -899,7 +899,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 569171405i8 - Value: Integer: @@ -909,7 +909,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 387436237i8 - Value: Integer: @@ -919,7 +919,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 150682190i8 - Value: Integer: @@ -929,7 +929,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 888770419i8 - Value: Integer: @@ -939,7 +939,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 824696431i8 - Value: Integer: @@ -949,7 +949,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 765659803i8 - Value: Integer: @@ -959,7 +959,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 270163693i8 - Value: Integer: @@ -969,7 +969,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 427940240i8 - Value: Integer: @@ -979,7 +979,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 504997332i8 - Value: Integer: @@ -989,7 +989,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 337808338i8 - Value: Integer: @@ -999,7 +999,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 907200008i8 - Value: Integer: @@ -1009,7 +1009,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 757177889i8 - Value: Integer: @@ -1019,7 +1019,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 696697188i8 - Value: Integer: @@ -1029,7 +1029,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 11 - path: test + path: "" content: 41376051i8 - Value: Integer: @@ -1039,7 +1039,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 496293518i8 - Value: Integer: @@ -1049,5 +1049,5 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 251218820i8 diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/implicit.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/implicit.leo.out index 43e759dcc6..970daaae96 100644 --- a/tests/expectations/parser/parser/expression/literal/int_parse/implicit.leo.out +++ b/tests/expectations/parser/parser/expression/literal/int_parse/implicit.leo.out @@ -9,7 +9,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: "123" - Value: Implicit: @@ -18,7 +18,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: "123" - Value: Implicit: @@ -27,7 +27,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: "456" - Value: Implicit: @@ -36,7 +36,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 81 - path: test + path: "" content: "87377802873778028737780287377802873778028737780287377802873778028737780287377802" - Value: Implicit: @@ -45,7 +45,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 401 - path: test + path: "" content: "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" - Value: Implicit: @@ -54,7 +54,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "340130024" - Value: Implicit: @@ -63,7 +63,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "158951116" - Value: Implicit: @@ -72,7 +72,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "155529659" - Value: Implicit: @@ -81,7 +81,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "642023166" - Value: Implicit: @@ -90,7 +90,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "228481736" - Value: Implicit: @@ -99,7 +99,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "469712960" - Value: Implicit: @@ -108,7 +108,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "929437719" - Value: Implicit: @@ -117,7 +117,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "721072814" - Value: Implicit: @@ -126,7 +126,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "363254789" - Value: Implicit: @@ -135,7 +135,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "906732565" - Value: Implicit: @@ -144,7 +144,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "288246391" - Value: Implicit: @@ -153,7 +153,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "724940549" - Value: Implicit: @@ -162,7 +162,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "487101620" - Value: Implicit: @@ -171,7 +171,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "261373583" - Value: Implicit: @@ -180,7 +180,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "891163927" - Value: Implicit: @@ -189,7 +189,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "743967544" - Value: Implicit: @@ -198,7 +198,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 8 - path: test + path: "" content: "8372586" - Value: Implicit: @@ -207,7 +207,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "461793278" - Value: Implicit: @@ -216,7 +216,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "806307045" - Value: Implicit: @@ -225,7 +225,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "122764546" - Value: Implicit: @@ -234,7 +234,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "356336181" - Value: Implicit: @@ -243,7 +243,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "158370903" - Value: Implicit: @@ -252,7 +252,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "774460877" - Value: Implicit: @@ -261,7 +261,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "557174131" - Value: Implicit: @@ -270,7 +270,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "492401267" - Value: Implicit: @@ -279,7 +279,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "893445620" - Value: Implicit: @@ -288,7 +288,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "957757048" - Value: Implicit: @@ -297,7 +297,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "721540649" - Value: Implicit: @@ -306,7 +306,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "390746493" - Value: Implicit: @@ -315,7 +315,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "211251725" - Value: Implicit: @@ -324,7 +324,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "938266114" - Value: Implicit: @@ -333,7 +333,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "156985870" - Value: Implicit: @@ -342,7 +342,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "703831126" - Value: Implicit: @@ -351,7 +351,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "729964155" - Value: Implicit: @@ -360,7 +360,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "988151305" - Value: Implicit: @@ -369,7 +369,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "320872435" - Value: Implicit: @@ -378,7 +378,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "719287167" - Value: Implicit: @@ -387,7 +387,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "152289486" - Value: Implicit: @@ -396,7 +396,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "740067975" - Value: Implicit: @@ -405,7 +405,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "728627816" - Value: Implicit: @@ -414,7 +414,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "385008978" - Value: Implicit: @@ -423,7 +423,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "553967635" - Value: Implicit: @@ -432,7 +432,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 9 - path: test + path: "" content: "71980713" - Value: Implicit: @@ -441,7 +441,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "519444716" - Value: Implicit: @@ -450,7 +450,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "116499965" - Value: Implicit: @@ -459,7 +459,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "717422268" - Value: Implicit: @@ -468,7 +468,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 9 - path: test + path: "" content: "18966279" - Value: Implicit: @@ -477,7 +477,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 9 - path: test + path: "" content: "22458638" - Value: Implicit: @@ -486,7 +486,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "857282620" - Value: Implicit: @@ -495,7 +495,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "920675898" - Value: Implicit: @@ -504,7 +504,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "762235516" - Value: Implicit: @@ -513,7 +513,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "469018377" - Value: Implicit: @@ -522,7 +522,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "199986521" - Value: Implicit: @@ -531,7 +531,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "536679358" - Value: Implicit: @@ -540,7 +540,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "591399452" - Value: Implicit: @@ -549,7 +549,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 9 - path: test + path: "" content: "83083158" - Value: Implicit: @@ -558,7 +558,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "599449051" - Value: Implicit: @@ -567,7 +567,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "445442318" - Value: Implicit: @@ -576,7 +576,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "585486590" - Value: Implicit: @@ -585,7 +585,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "209278800" - Value: Implicit: @@ -594,7 +594,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "873568117" - Value: Implicit: @@ -603,7 +603,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "664470940" - Value: Implicit: @@ -612,7 +612,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "465262783" - Value: Implicit: @@ -621,7 +621,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "605652874" - Value: Implicit: @@ -630,7 +630,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "376803940" - Value: Implicit: @@ -639,7 +639,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "965247040" - Value: Implicit: @@ -648,7 +648,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "598474509" - Value: Implicit: @@ -657,7 +657,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "845119918" - Value: Implicit: @@ -666,7 +666,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "648159133" - Value: Implicit: @@ -675,7 +675,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "669051032" - Value: Implicit: @@ -684,7 +684,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "800600261" - Value: Implicit: @@ -693,7 +693,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "434689764" - Value: Implicit: @@ -702,7 +702,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "520060080" - Value: Implicit: @@ -711,7 +711,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "804659385" - Value: Implicit: @@ -720,7 +720,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "537828058" - Value: Implicit: @@ -729,7 +729,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "716600292" - Value: Implicit: @@ -738,7 +738,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "387020273" - Value: Implicit: @@ -747,7 +747,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "199375617" - Value: Implicit: @@ -756,7 +756,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "680337189" - Value: Implicit: @@ -765,7 +765,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "818479931" - Value: Implicit: @@ -774,7 +774,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "893693281" - Value: Implicit: @@ -783,7 +783,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 9 - path: test + path: "" content: "87377802" - Value: Implicit: @@ -792,7 +792,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 9 - path: test + path: "" content: "84699261" - Value: Implicit: @@ -801,7 +801,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "292826090" - Value: Implicit: @@ -810,7 +810,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "569171405" - Value: Implicit: @@ -819,7 +819,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "387436237" - Value: Implicit: @@ -828,7 +828,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "150682190" - Value: Implicit: @@ -837,7 +837,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "888770419" - Value: Implicit: @@ -846,7 +846,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "824696431" - Value: Implicit: @@ -855,7 +855,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "765659803" - Value: Implicit: @@ -864,7 +864,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "270163693" - Value: Implicit: @@ -873,7 +873,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "427940240" - Value: Implicit: @@ -882,7 +882,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "504997332" - Value: Implicit: @@ -891,7 +891,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "337808338" - Value: Implicit: @@ -900,7 +900,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "907200008" - Value: Implicit: @@ -909,7 +909,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "757177889" - Value: Implicit: @@ -918,7 +918,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "696697188" - Value: Implicit: @@ -927,7 +927,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 9 - path: test + path: "" content: "41376051" - Value: Implicit: @@ -936,7 +936,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "496293518" - Value: Implicit: @@ -945,5 +945,5 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "251218820" diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/mono_group.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/mono_group.leo.out index 9e959269ac..a2aca76916 100644 --- a/tests/expectations/parser/parser/expression/literal/int_parse/mono_group.leo.out +++ b/tests/expectations/parser/parser/expression/literal/int_parse/mono_group.leo.out @@ -10,7 +10,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 9 - path: test + path: "" content: 123group - Value: Implicit: @@ -19,7 +19,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: "123" - Value: Group: @@ -29,7 +29,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 9 - path: test + path: "" content: 456group - Value: Group: @@ -39,7 +39,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 86 - path: test + path: "" content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802group - Value: Group: @@ -49,7 +49,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 406 - path: test + path: "" content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802group - Value: Group: @@ -59,7 +59,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 340130024group - Value: Group: @@ -69,7 +69,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 158951116group - Value: Group: @@ -79,7 +79,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 155529659group - Value: Group: @@ -89,7 +89,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 642023166group - Value: Group: @@ -99,7 +99,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 228481736group - Value: Group: @@ -109,7 +109,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 469712960group - Value: Group: @@ -119,7 +119,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 929437719group - Value: Group: @@ -129,7 +129,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 721072814group - Value: Group: @@ -139,7 +139,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 363254789group - Value: Group: @@ -149,7 +149,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 906732565group - Value: Group: @@ -159,7 +159,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 288246391group - Value: Group: @@ -169,7 +169,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 724940549group - Value: Group: @@ -179,7 +179,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 487101620group - Value: Group: @@ -189,7 +189,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 261373583group - Value: Group: @@ -199,7 +199,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 891163927group - Value: Group: @@ -209,7 +209,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 743967544group - Value: Group: @@ -219,7 +219,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 8372586group - Value: Group: @@ -229,7 +229,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 461793278group - Value: Group: @@ -239,7 +239,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 806307045group - Value: Group: @@ -249,7 +249,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 122764546group - Value: Group: @@ -259,7 +259,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 356336181group - Value: Group: @@ -269,7 +269,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 158370903group - Value: Group: @@ -279,7 +279,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 774460877group - Value: Group: @@ -289,7 +289,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 557174131group - Value: Group: @@ -299,7 +299,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 492401267group - Value: Group: @@ -309,7 +309,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 893445620group - Value: Group: @@ -319,7 +319,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 957757048group - Value: Group: @@ -329,7 +329,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 721540649group - Value: Group: @@ -339,7 +339,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 390746493group - Value: Group: @@ -349,7 +349,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 211251725group - Value: Group: @@ -359,7 +359,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 938266114group - Value: Group: @@ -369,7 +369,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 156985870group - Value: Group: @@ -379,7 +379,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 703831126group - Value: Group: @@ -389,7 +389,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 729964155group - Value: Group: @@ -399,7 +399,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 988151305group - Value: Group: @@ -409,7 +409,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 320872435group - Value: Group: @@ -419,7 +419,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 719287167group - Value: Group: @@ -429,7 +429,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 152289486group - Value: Group: @@ -439,7 +439,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 740067975group - Value: Group: @@ -449,7 +449,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 728627816group - Value: Group: @@ -459,7 +459,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 385008978group - Value: Group: @@ -469,7 +469,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 553967635group - Value: Group: @@ -479,7 +479,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 71980713group - Value: Group: @@ -489,7 +489,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 519444716group - Value: Group: @@ -499,7 +499,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 116499965group - Value: Group: @@ -509,7 +509,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 717422268group - Value: Group: @@ -519,7 +519,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 18966279group - Value: Group: @@ -529,7 +529,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 22458638group - Value: Group: @@ -539,7 +539,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 857282620group - Value: Group: @@ -549,7 +549,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 920675898group - Value: Group: @@ -559,7 +559,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 762235516group - Value: Group: @@ -569,7 +569,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 469018377group - Value: Group: @@ -579,7 +579,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 199986521group - Value: Group: @@ -589,7 +589,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 536679358group - Value: Group: @@ -599,7 +599,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 591399452group - Value: Group: @@ -609,7 +609,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 83083158group - Value: Group: @@ -619,7 +619,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 599449051group - Value: Group: @@ -629,7 +629,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 445442318group - Value: Group: @@ -639,7 +639,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 585486590group - Value: Group: @@ -649,7 +649,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 209278800group - Value: Group: @@ -659,7 +659,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 873568117group - Value: Group: @@ -669,7 +669,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 664470940group - Value: Group: @@ -679,7 +679,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 465262783group - Value: Group: @@ -689,7 +689,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 605652874group - Value: Group: @@ -699,7 +699,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 376803940group - Value: Group: @@ -709,7 +709,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 965247040group - Value: Group: @@ -719,7 +719,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 598474509group - Value: Group: @@ -729,7 +729,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 845119918group - Value: Group: @@ -739,7 +739,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 648159133group - Value: Group: @@ -749,7 +749,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 669051032group - Value: Group: @@ -759,7 +759,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 800600261group - Value: Group: @@ -769,7 +769,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 434689764group - Value: Group: @@ -779,7 +779,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 520060080group - Value: Group: @@ -789,7 +789,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 804659385group - Value: Group: @@ -799,7 +799,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 537828058group - Value: Group: @@ -809,7 +809,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 716600292group - Value: Group: @@ -819,7 +819,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 387020273group - Value: Group: @@ -829,7 +829,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 199375617group - Value: Group: @@ -839,7 +839,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 680337189group - Value: Group: @@ -849,7 +849,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 818479931group - Value: Group: @@ -859,7 +859,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 893693281group - Value: Group: @@ -869,7 +869,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 87377802group - Value: Group: @@ -879,7 +879,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 84699261group - Value: Group: @@ -889,7 +889,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 292826090group - Value: Group: @@ -899,7 +899,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 569171405group - Value: Group: @@ -909,7 +909,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 387436237group - Value: Group: @@ -919,7 +919,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 150682190group - Value: Group: @@ -929,7 +929,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 888770419group - Value: Group: @@ -939,7 +939,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 824696431group - Value: Group: @@ -949,7 +949,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 765659803group - Value: Group: @@ -959,7 +959,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 270163693group - Value: Group: @@ -969,7 +969,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 427940240group - Value: Group: @@ -979,7 +979,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 504997332group - Value: Group: @@ -989,7 +989,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 337808338group - Value: Group: @@ -999,7 +999,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 907200008group - Value: Group: @@ -1009,7 +1009,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 757177889group - Value: Group: @@ -1019,7 +1019,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 696697188group - Value: Group: @@ -1029,7 +1029,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 41376051group - Value: Group: @@ -1039,7 +1039,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 496293518group - Value: Group: @@ -1049,5 +1049,5 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: 251218820group diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/u128.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/u128.leo.out index f1048e6469..6a8b3e1a53 100644 --- a/tests/expectations/parser/parser/expression/literal/int_parse/u128.leo.out +++ b/tests/expectations/parser/parser/expression/literal/int_parse/u128.leo.out @@ -10,7 +10,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 8 - path: test + path: "" content: 123u128 - Value: Implicit: @@ -19,7 +19,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: "123" - Value: Integer: @@ -29,7 +29,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 8 - path: test + path: "" content: 456u128 - Value: Integer: @@ -39,7 +39,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 85 - path: test + path: "" content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802u128 - Value: Integer: @@ -49,7 +49,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 405 - path: test + path: "" content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802u128 - Value: Integer: @@ -59,7 +59,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 340130024u128 - Value: Integer: @@ -69,7 +69,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 158951116u128 - Value: Integer: @@ -79,7 +79,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 155529659u128 - Value: Integer: @@ -89,7 +89,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 642023166u128 - Value: Integer: @@ -99,7 +99,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 228481736u128 - Value: Integer: @@ -109,7 +109,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 469712960u128 - Value: Integer: @@ -119,7 +119,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 929437719u128 - Value: Integer: @@ -129,7 +129,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 721072814u128 - Value: Integer: @@ -139,7 +139,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 363254789u128 - Value: Integer: @@ -149,7 +149,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 906732565u128 - Value: Integer: @@ -159,7 +159,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 288246391u128 - Value: Integer: @@ -169,7 +169,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 724940549u128 - Value: Integer: @@ -179,7 +179,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 487101620u128 - Value: Integer: @@ -189,7 +189,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 261373583u128 - Value: Integer: @@ -199,7 +199,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 891163927u128 - Value: Integer: @@ -209,7 +209,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 743967544u128 - Value: Integer: @@ -219,7 +219,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 8372586u128 - Value: Integer: @@ -229,7 +229,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 461793278u128 - Value: Integer: @@ -239,7 +239,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 806307045u128 - Value: Integer: @@ -249,7 +249,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 122764546u128 - Value: Integer: @@ -259,7 +259,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 356336181u128 - Value: Integer: @@ -269,7 +269,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 158370903u128 - Value: Integer: @@ -279,7 +279,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 774460877u128 - Value: Integer: @@ -289,7 +289,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 557174131u128 - Value: Integer: @@ -299,7 +299,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 492401267u128 - Value: Integer: @@ -309,7 +309,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 893445620u128 - Value: Integer: @@ -319,7 +319,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 957757048u128 - Value: Integer: @@ -329,7 +329,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 721540649u128 - Value: Integer: @@ -339,7 +339,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 390746493u128 - Value: Integer: @@ -349,7 +349,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 211251725u128 - Value: Integer: @@ -359,7 +359,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 938266114u128 - Value: Integer: @@ -369,7 +369,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 156985870u128 - Value: Integer: @@ -379,7 +379,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 703831126u128 - Value: Integer: @@ -389,7 +389,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 729964155u128 - Value: Integer: @@ -399,7 +399,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 988151305u128 - Value: Integer: @@ -409,7 +409,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 320872435u128 - Value: Integer: @@ -419,7 +419,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 719287167u128 - Value: Integer: @@ -429,7 +429,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 152289486u128 - Value: Integer: @@ -439,7 +439,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 740067975u128 - Value: Integer: @@ -449,7 +449,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 728627816u128 - Value: Integer: @@ -459,7 +459,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 385008978u128 - Value: Integer: @@ -469,7 +469,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 553967635u128 - Value: Integer: @@ -479,7 +479,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 71980713u128 - Value: Integer: @@ -489,7 +489,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 519444716u128 - Value: Integer: @@ -499,7 +499,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 116499965u128 - Value: Integer: @@ -509,7 +509,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 717422268u128 - Value: Integer: @@ -519,7 +519,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 18966279u128 - Value: Integer: @@ -529,7 +529,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 22458638u128 - Value: Integer: @@ -539,7 +539,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 857282620u128 - Value: Integer: @@ -549,7 +549,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 920675898u128 - Value: Integer: @@ -559,7 +559,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 762235516u128 - Value: Integer: @@ -569,7 +569,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 469018377u128 - Value: Integer: @@ -579,7 +579,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 199986521u128 - Value: Integer: @@ -589,7 +589,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 536679358u128 - Value: Integer: @@ -599,7 +599,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 591399452u128 - Value: Integer: @@ -609,7 +609,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 83083158u128 - Value: Integer: @@ -619,7 +619,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 599449051u128 - Value: Integer: @@ -629,7 +629,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 445442318u128 - Value: Integer: @@ -639,7 +639,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 585486590u128 - Value: Integer: @@ -649,7 +649,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 209278800u128 - Value: Integer: @@ -659,7 +659,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 873568117u128 - Value: Integer: @@ -669,7 +669,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 664470940u128 - Value: Integer: @@ -679,7 +679,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 465262783u128 - Value: Integer: @@ -689,7 +689,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 605652874u128 - Value: Integer: @@ -699,7 +699,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 376803940u128 - Value: Integer: @@ -709,7 +709,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 965247040u128 - Value: Integer: @@ -719,7 +719,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 598474509u128 - Value: Integer: @@ -729,7 +729,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 845119918u128 - Value: Integer: @@ -739,7 +739,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 648159133u128 - Value: Integer: @@ -749,7 +749,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 669051032u128 - Value: Integer: @@ -759,7 +759,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 800600261u128 - Value: Integer: @@ -769,7 +769,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 434689764u128 - Value: Integer: @@ -779,7 +779,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 520060080u128 - Value: Integer: @@ -789,7 +789,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 804659385u128 - Value: Integer: @@ -799,7 +799,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 537828058u128 - Value: Integer: @@ -809,7 +809,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 716600292u128 - Value: Integer: @@ -819,7 +819,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 387020273u128 - Value: Integer: @@ -829,7 +829,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 199375617u128 - Value: Integer: @@ -839,7 +839,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 680337189u128 - Value: Integer: @@ -849,7 +849,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 818479931u128 - Value: Integer: @@ -859,7 +859,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 893693281u128 - Value: Integer: @@ -869,7 +869,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 87377802u128 - Value: Integer: @@ -879,7 +879,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 84699261u128 - Value: Integer: @@ -889,7 +889,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 292826090u128 - Value: Integer: @@ -899,7 +899,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 569171405u128 - Value: Integer: @@ -909,7 +909,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 387436237u128 - Value: Integer: @@ -919,7 +919,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 150682190u128 - Value: Integer: @@ -929,7 +929,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 888770419u128 - Value: Integer: @@ -939,7 +939,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 824696431u128 - Value: Integer: @@ -949,7 +949,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 765659803u128 - Value: Integer: @@ -959,7 +959,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 270163693u128 - Value: Integer: @@ -969,7 +969,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 427940240u128 - Value: Integer: @@ -979,7 +979,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 504997332u128 - Value: Integer: @@ -989,7 +989,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 337808338u128 - Value: Integer: @@ -999,7 +999,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 907200008u128 - Value: Integer: @@ -1009,7 +1009,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 757177889u128 - Value: Integer: @@ -1019,7 +1019,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 696697188u128 - Value: Integer: @@ -1029,7 +1029,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 41376051u128 - Value: Integer: @@ -1039,7 +1039,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 496293518u128 - Value: Integer: @@ -1049,5 +1049,5 @@ outputs: line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: 251218820u128 diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/u16.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/u16.leo.out index 324a0abcce..2c0fa81b0f 100644 --- a/tests/expectations/parser/parser/expression/literal/int_parse/u16.leo.out +++ b/tests/expectations/parser/parser/expression/literal/int_parse/u16.leo.out @@ -10,7 +10,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: 123u8 - Value: Implicit: @@ -19,7 +19,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: "123" - Value: Integer: @@ -29,7 +29,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: 456u8 - Value: Integer: @@ -39,7 +39,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 83 - path: test + path: "" content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802u8 - Value: Integer: @@ -49,7 +49,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 403 - path: test + path: "" content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802u8 - Value: Integer: @@ -59,7 +59,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 340130024u8 - Value: Integer: @@ -69,7 +69,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 158951116u8 - Value: Integer: @@ -79,7 +79,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 155529659u8 - Value: Integer: @@ -89,7 +89,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 642023166u8 - Value: Integer: @@ -99,7 +99,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 228481736u8 - Value: Integer: @@ -109,7 +109,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 469712960u8 - Value: Integer: @@ -119,7 +119,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 929437719u8 - Value: Integer: @@ -129,7 +129,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 721072814u8 - Value: Integer: @@ -139,7 +139,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 363254789u8 - Value: Integer: @@ -149,7 +149,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 906732565u8 - Value: Integer: @@ -159,7 +159,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 288246391u8 - Value: Integer: @@ -169,7 +169,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 724940549u8 - Value: Integer: @@ -179,7 +179,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 487101620u8 - Value: Integer: @@ -189,7 +189,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 261373583u8 - Value: Integer: @@ -199,7 +199,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 891163927u8 - Value: Integer: @@ -209,7 +209,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 743967544u8 - Value: Integer: @@ -219,7 +219,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: 8372586u8 - Value: Integer: @@ -229,7 +229,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 461793278u8 - Value: Integer: @@ -239,7 +239,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 806307045u8 - Value: Integer: @@ -249,7 +249,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 122764546u8 - Value: Integer: @@ -259,7 +259,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 356336181u8 - Value: Integer: @@ -269,7 +269,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 158370903u8 - Value: Integer: @@ -279,7 +279,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 774460877u8 - Value: Integer: @@ -289,7 +289,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 557174131u8 - Value: Integer: @@ -299,7 +299,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 492401267u8 - Value: Integer: @@ -309,7 +309,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 893445620u8 - Value: Integer: @@ -319,7 +319,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 957757048u8 - Value: Integer: @@ -329,7 +329,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 721540649u8 - Value: Integer: @@ -339,7 +339,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 390746493u8 - Value: Integer: @@ -349,7 +349,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 211251725u8 - Value: Integer: @@ -359,7 +359,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 938266114u8 - Value: Integer: @@ -369,7 +369,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 156985870u8 - Value: Integer: @@ -379,7 +379,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 703831126u8 - Value: Integer: @@ -389,7 +389,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 729964155u8 - Value: Integer: @@ -399,7 +399,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 988151305u8 - Value: Integer: @@ -409,7 +409,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 320872435u8 - Value: Integer: @@ -419,7 +419,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 719287167u8 - Value: Integer: @@ -429,7 +429,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 152289486u8 - Value: Integer: @@ -439,7 +439,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 740067975u8 - Value: Integer: @@ -449,7 +449,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 728627816u8 - Value: Integer: @@ -459,7 +459,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 385008978u8 - Value: Integer: @@ -469,7 +469,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 553967635u8 - Value: Integer: @@ -479,7 +479,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 11 - path: test + path: "" content: 71980713u8 - Value: Integer: @@ -489,7 +489,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 519444716u8 - Value: Integer: @@ -499,7 +499,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 116499965u8 - Value: Integer: @@ -509,7 +509,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 717422268u8 - Value: Integer: @@ -519,7 +519,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 11 - path: test + path: "" content: 18966279u8 - Value: Integer: @@ -529,7 +529,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 11 - path: test + path: "" content: 22458638u8 - Value: Integer: @@ -539,7 +539,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 857282620u8 - Value: Integer: @@ -549,7 +549,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 920675898u8 - Value: Integer: @@ -559,7 +559,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 762235516u8 - Value: Integer: @@ -569,7 +569,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 469018377u8 - Value: Integer: @@ -579,7 +579,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 199986521u8 - Value: Integer: @@ -589,7 +589,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 536679358u8 - Value: Integer: @@ -599,7 +599,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 591399452u8 - Value: Integer: @@ -609,7 +609,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 11 - path: test + path: "" content: 83083158u8 - Value: Integer: @@ -619,7 +619,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 599449051u8 - Value: Integer: @@ -629,7 +629,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 445442318u8 - Value: Integer: @@ -639,7 +639,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 585486590u8 - Value: Integer: @@ -649,7 +649,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 209278800u8 - Value: Integer: @@ -659,7 +659,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 873568117u8 - Value: Integer: @@ -669,7 +669,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 664470940u8 - Value: Integer: @@ -679,7 +679,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 465262783u8 - Value: Integer: @@ -689,7 +689,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 605652874u8 - Value: Integer: @@ -699,7 +699,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 376803940u8 - Value: Integer: @@ -709,7 +709,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 965247040u8 - Value: Integer: @@ -719,7 +719,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 598474509u8 - Value: Integer: @@ -729,7 +729,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 845119918u8 - Value: Integer: @@ -739,7 +739,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 648159133u8 - Value: Integer: @@ -749,7 +749,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 669051032u8 - Value: Integer: @@ -759,7 +759,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 800600261u8 - Value: Integer: @@ -769,7 +769,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 434689764u8 - Value: Integer: @@ -779,7 +779,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 520060080u8 - Value: Integer: @@ -789,7 +789,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 804659385u8 - Value: Integer: @@ -799,7 +799,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 537828058u8 - Value: Integer: @@ -809,7 +809,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 716600292u8 - Value: Integer: @@ -819,7 +819,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 387020273u8 - Value: Integer: @@ -829,7 +829,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 199375617u8 - Value: Integer: @@ -839,7 +839,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 680337189u8 - Value: Integer: @@ -849,7 +849,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 818479931u8 - Value: Integer: @@ -859,7 +859,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 893693281u8 - Value: Integer: @@ -869,7 +869,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 11 - path: test + path: "" content: 87377802u8 - Value: Integer: @@ -879,7 +879,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 11 - path: test + path: "" content: 84699261u8 - Value: Integer: @@ -889,7 +889,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 292826090u8 - Value: Integer: @@ -899,7 +899,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 569171405u8 - Value: Integer: @@ -909,7 +909,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 387436237u8 - Value: Integer: @@ -919,7 +919,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 150682190u8 - Value: Integer: @@ -929,7 +929,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 888770419u8 - Value: Integer: @@ -939,7 +939,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 824696431u8 - Value: Integer: @@ -949,7 +949,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 765659803u8 - Value: Integer: @@ -959,7 +959,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 270163693u8 - Value: Integer: @@ -969,7 +969,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 427940240u8 - Value: Integer: @@ -979,7 +979,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 504997332u8 - Value: Integer: @@ -989,7 +989,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 337808338u8 - Value: Integer: @@ -999,7 +999,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 907200008u8 - Value: Integer: @@ -1009,7 +1009,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 757177889u8 - Value: Integer: @@ -1019,7 +1019,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 696697188u8 - Value: Integer: @@ -1029,7 +1029,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 11 - path: test + path: "" content: 41376051u8 - Value: Integer: @@ -1039,7 +1039,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 496293518u8 - Value: Integer: @@ -1049,5 +1049,5 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 251218820u8 diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/u32.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/u32.leo.out index ba97127eac..5b7c9e4485 100644 --- a/tests/expectations/parser/parser/expression/literal/int_parse/u32.leo.out +++ b/tests/expectations/parser/parser/expression/literal/int_parse/u32.leo.out @@ -10,7 +10,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: 123u32 - Value: Implicit: @@ -19,7 +19,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: "123" - Value: Integer: @@ -29,7 +29,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: 456u32 - Value: Integer: @@ -39,7 +39,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 84 - path: test + path: "" content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802u32 - Value: Integer: @@ -49,7 +49,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 404 - path: test + path: "" content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802u32 - Value: Integer: @@ -59,7 +59,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 340130024u32 - Value: Integer: @@ -69,7 +69,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 158951116u32 - Value: Integer: @@ -79,7 +79,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 155529659u32 - Value: Integer: @@ -89,7 +89,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 642023166u32 - Value: Integer: @@ -99,7 +99,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 228481736u32 - Value: Integer: @@ -109,7 +109,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 469712960u32 - Value: Integer: @@ -119,7 +119,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 929437719u32 - Value: Integer: @@ -129,7 +129,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 721072814u32 - Value: Integer: @@ -139,7 +139,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 363254789u32 - Value: Integer: @@ -149,7 +149,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 906732565u32 - Value: Integer: @@ -159,7 +159,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 288246391u32 - Value: Integer: @@ -169,7 +169,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 724940549u32 - Value: Integer: @@ -179,7 +179,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 487101620u32 - Value: Integer: @@ -189,7 +189,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 261373583u32 - Value: Integer: @@ -199,7 +199,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 891163927u32 - Value: Integer: @@ -209,7 +209,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 743967544u32 - Value: Integer: @@ -219,7 +219,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 11 - path: test + path: "" content: 8372586u32 - Value: Integer: @@ -229,7 +229,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 461793278u32 - Value: Integer: @@ -239,7 +239,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 806307045u32 - Value: Integer: @@ -249,7 +249,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 122764546u32 - Value: Integer: @@ -259,7 +259,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 356336181u32 - Value: Integer: @@ -269,7 +269,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 158370903u32 - Value: Integer: @@ -279,7 +279,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 774460877u32 - Value: Integer: @@ -289,7 +289,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 557174131u32 - Value: Integer: @@ -299,7 +299,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 492401267u32 - Value: Integer: @@ -309,7 +309,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 893445620u32 - Value: Integer: @@ -319,7 +319,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 957757048u32 - Value: Integer: @@ -329,7 +329,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 721540649u32 - Value: Integer: @@ -339,7 +339,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 390746493u32 - Value: Integer: @@ -349,7 +349,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 211251725u32 - Value: Integer: @@ -359,7 +359,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 938266114u32 - Value: Integer: @@ -369,7 +369,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 156985870u32 - Value: Integer: @@ -379,7 +379,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 703831126u32 - Value: Integer: @@ -389,7 +389,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 729964155u32 - Value: Integer: @@ -399,7 +399,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 988151305u32 - Value: Integer: @@ -409,7 +409,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 320872435u32 - Value: Integer: @@ -419,7 +419,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 719287167u32 - Value: Integer: @@ -429,7 +429,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 152289486u32 - Value: Integer: @@ -439,7 +439,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 740067975u32 - Value: Integer: @@ -449,7 +449,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 728627816u32 - Value: Integer: @@ -459,7 +459,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 385008978u32 - Value: Integer: @@ -469,7 +469,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 553967635u32 - Value: Integer: @@ -479,7 +479,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 71980713u32 - Value: Integer: @@ -489,7 +489,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 519444716u32 - Value: Integer: @@ -499,7 +499,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 116499965u32 - Value: Integer: @@ -509,7 +509,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 717422268u32 - Value: Integer: @@ -519,7 +519,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 18966279u32 - Value: Integer: @@ -529,7 +529,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 22458638u32 - Value: Integer: @@ -539,7 +539,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 857282620u32 - Value: Integer: @@ -549,7 +549,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 920675898u32 - Value: Integer: @@ -559,7 +559,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 762235516u32 - Value: Integer: @@ -569,7 +569,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 469018377u32 - Value: Integer: @@ -579,7 +579,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 199986521u32 - Value: Integer: @@ -589,7 +589,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 536679358u32 - Value: Integer: @@ -599,7 +599,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 591399452u32 - Value: Integer: @@ -609,7 +609,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 83083158u32 - Value: Integer: @@ -619,7 +619,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 599449051u32 - Value: Integer: @@ -629,7 +629,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 445442318u32 - Value: Integer: @@ -639,7 +639,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 585486590u32 - Value: Integer: @@ -649,7 +649,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 209278800u32 - Value: Integer: @@ -659,7 +659,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 873568117u32 - Value: Integer: @@ -669,7 +669,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 664470940u32 - Value: Integer: @@ -679,7 +679,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 465262783u32 - Value: Integer: @@ -689,7 +689,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 605652874u32 - Value: Integer: @@ -699,7 +699,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 376803940u32 - Value: Integer: @@ -709,7 +709,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 965247040u32 - Value: Integer: @@ -719,7 +719,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 598474509u32 - Value: Integer: @@ -729,7 +729,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 845119918u32 - Value: Integer: @@ -739,7 +739,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 648159133u32 - Value: Integer: @@ -749,7 +749,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 669051032u32 - Value: Integer: @@ -759,7 +759,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 800600261u32 - Value: Integer: @@ -769,7 +769,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 434689764u32 - Value: Integer: @@ -779,7 +779,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 520060080u32 - Value: Integer: @@ -789,7 +789,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 804659385u32 - Value: Integer: @@ -799,7 +799,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 537828058u32 - Value: Integer: @@ -809,7 +809,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 716600292u32 - Value: Integer: @@ -819,7 +819,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 387020273u32 - Value: Integer: @@ -829,7 +829,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 199375617u32 - Value: Integer: @@ -839,7 +839,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 680337189u32 - Value: Integer: @@ -849,7 +849,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 818479931u32 - Value: Integer: @@ -859,7 +859,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 893693281u32 - Value: Integer: @@ -869,7 +869,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 87377802u32 - Value: Integer: @@ -879,7 +879,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 84699261u32 - Value: Integer: @@ -889,7 +889,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 292826090u32 - Value: Integer: @@ -899,7 +899,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 569171405u32 - Value: Integer: @@ -909,7 +909,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 387436237u32 - Value: Integer: @@ -919,7 +919,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 150682190u32 - Value: Integer: @@ -929,7 +929,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 888770419u32 - Value: Integer: @@ -939,7 +939,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 824696431u32 - Value: Integer: @@ -949,7 +949,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 765659803u32 - Value: Integer: @@ -959,7 +959,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 270163693u32 - Value: Integer: @@ -969,7 +969,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 427940240u32 - Value: Integer: @@ -979,7 +979,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 504997332u32 - Value: Integer: @@ -989,7 +989,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 337808338u32 - Value: Integer: @@ -999,7 +999,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 907200008u32 - Value: Integer: @@ -1009,7 +1009,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 757177889u32 - Value: Integer: @@ -1019,7 +1019,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 696697188u32 - Value: Integer: @@ -1029,7 +1029,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 41376051u32 - Value: Integer: @@ -1039,7 +1039,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 496293518u32 - Value: Integer: @@ -1049,5 +1049,5 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 251218820u32 diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/u64.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/u64.leo.out index ba97127eac..5b7c9e4485 100644 --- a/tests/expectations/parser/parser/expression/literal/int_parse/u64.leo.out +++ b/tests/expectations/parser/parser/expression/literal/int_parse/u64.leo.out @@ -10,7 +10,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: 123u32 - Value: Implicit: @@ -19,7 +19,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: "123" - Value: Integer: @@ -29,7 +29,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: 456u32 - Value: Integer: @@ -39,7 +39,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 84 - path: test + path: "" content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802u32 - Value: Integer: @@ -49,7 +49,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 404 - path: test + path: "" content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802u32 - Value: Integer: @@ -59,7 +59,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 340130024u32 - Value: Integer: @@ -69,7 +69,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 158951116u32 - Value: Integer: @@ -79,7 +79,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 155529659u32 - Value: Integer: @@ -89,7 +89,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 642023166u32 - Value: Integer: @@ -99,7 +99,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 228481736u32 - Value: Integer: @@ -109,7 +109,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 469712960u32 - Value: Integer: @@ -119,7 +119,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 929437719u32 - Value: Integer: @@ -129,7 +129,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 721072814u32 - Value: Integer: @@ -139,7 +139,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 363254789u32 - Value: Integer: @@ -149,7 +149,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 906732565u32 - Value: Integer: @@ -159,7 +159,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 288246391u32 - Value: Integer: @@ -169,7 +169,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 724940549u32 - Value: Integer: @@ -179,7 +179,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 487101620u32 - Value: Integer: @@ -189,7 +189,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 261373583u32 - Value: Integer: @@ -199,7 +199,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 891163927u32 - Value: Integer: @@ -209,7 +209,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 743967544u32 - Value: Integer: @@ -219,7 +219,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 11 - path: test + path: "" content: 8372586u32 - Value: Integer: @@ -229,7 +229,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 461793278u32 - Value: Integer: @@ -239,7 +239,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 806307045u32 - Value: Integer: @@ -249,7 +249,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 122764546u32 - Value: Integer: @@ -259,7 +259,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 356336181u32 - Value: Integer: @@ -269,7 +269,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 158370903u32 - Value: Integer: @@ -279,7 +279,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 774460877u32 - Value: Integer: @@ -289,7 +289,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 557174131u32 - Value: Integer: @@ -299,7 +299,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 492401267u32 - Value: Integer: @@ -309,7 +309,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 893445620u32 - Value: Integer: @@ -319,7 +319,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 957757048u32 - Value: Integer: @@ -329,7 +329,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 721540649u32 - Value: Integer: @@ -339,7 +339,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 390746493u32 - Value: Integer: @@ -349,7 +349,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 211251725u32 - Value: Integer: @@ -359,7 +359,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 938266114u32 - Value: Integer: @@ -369,7 +369,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 156985870u32 - Value: Integer: @@ -379,7 +379,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 703831126u32 - Value: Integer: @@ -389,7 +389,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 729964155u32 - Value: Integer: @@ -399,7 +399,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 988151305u32 - Value: Integer: @@ -409,7 +409,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 320872435u32 - Value: Integer: @@ -419,7 +419,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 719287167u32 - Value: Integer: @@ -429,7 +429,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 152289486u32 - Value: Integer: @@ -439,7 +439,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 740067975u32 - Value: Integer: @@ -449,7 +449,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 728627816u32 - Value: Integer: @@ -459,7 +459,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 385008978u32 - Value: Integer: @@ -469,7 +469,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 553967635u32 - Value: Integer: @@ -479,7 +479,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 71980713u32 - Value: Integer: @@ -489,7 +489,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 519444716u32 - Value: Integer: @@ -499,7 +499,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 116499965u32 - Value: Integer: @@ -509,7 +509,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 717422268u32 - Value: Integer: @@ -519,7 +519,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 18966279u32 - Value: Integer: @@ -529,7 +529,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 22458638u32 - Value: Integer: @@ -539,7 +539,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 857282620u32 - Value: Integer: @@ -549,7 +549,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 920675898u32 - Value: Integer: @@ -559,7 +559,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 762235516u32 - Value: Integer: @@ -569,7 +569,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 469018377u32 - Value: Integer: @@ -579,7 +579,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 199986521u32 - Value: Integer: @@ -589,7 +589,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 536679358u32 - Value: Integer: @@ -599,7 +599,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 591399452u32 - Value: Integer: @@ -609,7 +609,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 83083158u32 - Value: Integer: @@ -619,7 +619,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 599449051u32 - Value: Integer: @@ -629,7 +629,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 445442318u32 - Value: Integer: @@ -639,7 +639,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 585486590u32 - Value: Integer: @@ -649,7 +649,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 209278800u32 - Value: Integer: @@ -659,7 +659,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 873568117u32 - Value: Integer: @@ -669,7 +669,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 664470940u32 - Value: Integer: @@ -679,7 +679,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 465262783u32 - Value: Integer: @@ -689,7 +689,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 605652874u32 - Value: Integer: @@ -699,7 +699,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 376803940u32 - Value: Integer: @@ -709,7 +709,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 965247040u32 - Value: Integer: @@ -719,7 +719,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 598474509u32 - Value: Integer: @@ -729,7 +729,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 845119918u32 - Value: Integer: @@ -739,7 +739,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 648159133u32 - Value: Integer: @@ -749,7 +749,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 669051032u32 - Value: Integer: @@ -759,7 +759,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 800600261u32 - Value: Integer: @@ -769,7 +769,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 434689764u32 - Value: Integer: @@ -779,7 +779,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 520060080u32 - Value: Integer: @@ -789,7 +789,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 804659385u32 - Value: Integer: @@ -799,7 +799,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 537828058u32 - Value: Integer: @@ -809,7 +809,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 716600292u32 - Value: Integer: @@ -819,7 +819,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 387020273u32 - Value: Integer: @@ -829,7 +829,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 199375617u32 - Value: Integer: @@ -839,7 +839,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 680337189u32 - Value: Integer: @@ -849,7 +849,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 818479931u32 - Value: Integer: @@ -859,7 +859,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 893693281u32 - Value: Integer: @@ -869,7 +869,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 87377802u32 - Value: Integer: @@ -879,7 +879,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 84699261u32 - Value: Integer: @@ -889,7 +889,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 292826090u32 - Value: Integer: @@ -899,7 +899,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 569171405u32 - Value: Integer: @@ -909,7 +909,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 387436237u32 - Value: Integer: @@ -919,7 +919,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 150682190u32 - Value: Integer: @@ -929,7 +929,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 888770419u32 - Value: Integer: @@ -939,7 +939,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 824696431u32 - Value: Integer: @@ -949,7 +949,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 765659803u32 - Value: Integer: @@ -959,7 +959,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 270163693u32 - Value: Integer: @@ -969,7 +969,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 427940240u32 - Value: Integer: @@ -979,7 +979,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 504997332u32 - Value: Integer: @@ -989,7 +989,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 337808338u32 - Value: Integer: @@ -999,7 +999,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 907200008u32 - Value: Integer: @@ -1009,7 +1009,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 757177889u32 - Value: Integer: @@ -1019,7 +1019,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 696697188u32 - Value: Integer: @@ -1029,7 +1029,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 41376051u32 - Value: Integer: @@ -1039,7 +1039,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 496293518u32 - Value: Integer: @@ -1049,5 +1049,5 @@ outputs: line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: 251218820u32 diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/u8.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/u8.leo.out index 324a0abcce..2c0fa81b0f 100644 --- a/tests/expectations/parser/parser/expression/literal/int_parse/u8.leo.out +++ b/tests/expectations/parser/parser/expression/literal/int_parse/u8.leo.out @@ -10,7 +10,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: 123u8 - Value: Implicit: @@ -19,7 +19,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: "123" - Value: Integer: @@ -29,7 +29,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: 456u8 - Value: Integer: @@ -39,7 +39,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 83 - path: test + path: "" content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802u8 - Value: Integer: @@ -49,7 +49,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 403 - path: test + path: "" content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802u8 - Value: Integer: @@ -59,7 +59,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 340130024u8 - Value: Integer: @@ -69,7 +69,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 158951116u8 - Value: Integer: @@ -79,7 +79,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 155529659u8 - Value: Integer: @@ -89,7 +89,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 642023166u8 - Value: Integer: @@ -99,7 +99,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 228481736u8 - Value: Integer: @@ -109,7 +109,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 469712960u8 - Value: Integer: @@ -119,7 +119,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 929437719u8 - Value: Integer: @@ -129,7 +129,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 721072814u8 - Value: Integer: @@ -139,7 +139,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 363254789u8 - Value: Integer: @@ -149,7 +149,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 906732565u8 - Value: Integer: @@ -159,7 +159,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 288246391u8 - Value: Integer: @@ -169,7 +169,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 724940549u8 - Value: Integer: @@ -179,7 +179,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 487101620u8 - Value: Integer: @@ -189,7 +189,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 261373583u8 - Value: Integer: @@ -199,7 +199,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 891163927u8 - Value: Integer: @@ -209,7 +209,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 743967544u8 - Value: Integer: @@ -219,7 +219,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: 8372586u8 - Value: Integer: @@ -229,7 +229,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 461793278u8 - Value: Integer: @@ -239,7 +239,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 806307045u8 - Value: Integer: @@ -249,7 +249,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 122764546u8 - Value: Integer: @@ -259,7 +259,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 356336181u8 - Value: Integer: @@ -269,7 +269,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 158370903u8 - Value: Integer: @@ -279,7 +279,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 774460877u8 - Value: Integer: @@ -289,7 +289,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 557174131u8 - Value: Integer: @@ -299,7 +299,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 492401267u8 - Value: Integer: @@ -309,7 +309,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 893445620u8 - Value: Integer: @@ -319,7 +319,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 957757048u8 - Value: Integer: @@ -329,7 +329,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 721540649u8 - Value: Integer: @@ -339,7 +339,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 390746493u8 - Value: Integer: @@ -349,7 +349,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 211251725u8 - Value: Integer: @@ -359,7 +359,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 938266114u8 - Value: Integer: @@ -369,7 +369,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 156985870u8 - Value: Integer: @@ -379,7 +379,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 703831126u8 - Value: Integer: @@ -389,7 +389,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 729964155u8 - Value: Integer: @@ -399,7 +399,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 988151305u8 - Value: Integer: @@ -409,7 +409,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 320872435u8 - Value: Integer: @@ -419,7 +419,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 719287167u8 - Value: Integer: @@ -429,7 +429,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 152289486u8 - Value: Integer: @@ -439,7 +439,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 740067975u8 - Value: Integer: @@ -449,7 +449,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 728627816u8 - Value: Integer: @@ -459,7 +459,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 385008978u8 - Value: Integer: @@ -469,7 +469,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 553967635u8 - Value: Integer: @@ -479,7 +479,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 11 - path: test + path: "" content: 71980713u8 - Value: Integer: @@ -489,7 +489,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 519444716u8 - Value: Integer: @@ -499,7 +499,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 116499965u8 - Value: Integer: @@ -509,7 +509,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 717422268u8 - Value: Integer: @@ -519,7 +519,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 11 - path: test + path: "" content: 18966279u8 - Value: Integer: @@ -529,7 +529,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 11 - path: test + path: "" content: 22458638u8 - Value: Integer: @@ -539,7 +539,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 857282620u8 - Value: Integer: @@ -549,7 +549,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 920675898u8 - Value: Integer: @@ -559,7 +559,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 762235516u8 - Value: Integer: @@ -569,7 +569,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 469018377u8 - Value: Integer: @@ -579,7 +579,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 199986521u8 - Value: Integer: @@ -589,7 +589,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 536679358u8 - Value: Integer: @@ -599,7 +599,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 591399452u8 - Value: Integer: @@ -609,7 +609,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 11 - path: test + path: "" content: 83083158u8 - Value: Integer: @@ -619,7 +619,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 599449051u8 - Value: Integer: @@ -629,7 +629,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 445442318u8 - Value: Integer: @@ -639,7 +639,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 585486590u8 - Value: Integer: @@ -649,7 +649,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 209278800u8 - Value: Integer: @@ -659,7 +659,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 873568117u8 - Value: Integer: @@ -669,7 +669,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 664470940u8 - Value: Integer: @@ -679,7 +679,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 465262783u8 - Value: Integer: @@ -689,7 +689,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 605652874u8 - Value: Integer: @@ -699,7 +699,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 376803940u8 - Value: Integer: @@ -709,7 +709,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 965247040u8 - Value: Integer: @@ -719,7 +719,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 598474509u8 - Value: Integer: @@ -729,7 +729,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 845119918u8 - Value: Integer: @@ -739,7 +739,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 648159133u8 - Value: Integer: @@ -749,7 +749,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 669051032u8 - Value: Integer: @@ -759,7 +759,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 800600261u8 - Value: Integer: @@ -769,7 +769,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 434689764u8 - Value: Integer: @@ -779,7 +779,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 520060080u8 - Value: Integer: @@ -789,7 +789,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 804659385u8 - Value: Integer: @@ -799,7 +799,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 537828058u8 - Value: Integer: @@ -809,7 +809,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 716600292u8 - Value: Integer: @@ -819,7 +819,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 387020273u8 - Value: Integer: @@ -829,7 +829,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 199375617u8 - Value: Integer: @@ -839,7 +839,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 680337189u8 - Value: Integer: @@ -849,7 +849,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 818479931u8 - Value: Integer: @@ -859,7 +859,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 893693281u8 - Value: Integer: @@ -869,7 +869,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 11 - path: test + path: "" content: 87377802u8 - Value: Integer: @@ -879,7 +879,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 11 - path: test + path: "" content: 84699261u8 - Value: Integer: @@ -889,7 +889,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 292826090u8 - Value: Integer: @@ -899,7 +899,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 569171405u8 - Value: Integer: @@ -909,7 +909,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 387436237u8 - Value: Integer: @@ -919,7 +919,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 150682190u8 - Value: Integer: @@ -929,7 +929,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 888770419u8 - Value: Integer: @@ -939,7 +939,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 824696431u8 - Value: Integer: @@ -949,7 +949,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 765659803u8 - Value: Integer: @@ -959,7 +959,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 270163693u8 - Value: Integer: @@ -969,7 +969,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 427940240u8 - Value: Integer: @@ -979,7 +979,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 504997332u8 - Value: Integer: @@ -989,7 +989,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 337808338u8 - Value: Integer: @@ -999,7 +999,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 907200008u8 - Value: Integer: @@ -1009,7 +1009,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 757177889u8 - Value: Integer: @@ -1019,7 +1019,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 696697188u8 - Value: Integer: @@ -1029,7 +1029,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 11 - path: test + path: "" content: 41376051u8 - Value: Integer: @@ -1039,7 +1039,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 496293518u8 - Value: Integer: @@ -1049,5 +1049,5 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: 251218820u8 diff --git a/tests/expectations/parser/parser/expression/literal/string_parse.leo.out b/tests/expectations/parser/parser/expression/literal/string_parse.leo.out index 15539db427..a46854fcb4 100644 --- a/tests/expectations/parser/parser/expression/literal/string_parse.leo.out +++ b/tests/expectations/parser/parser/expression/literal/string_parse.leo.out @@ -14,7 +14,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 9 - path: test + path: "" content: "\"string\"" - Value: String: @@ -40,7 +40,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 21 - path: test + path: "" content: "\"another { } string\"" - Value: String: @@ -57,7 +57,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: "\"{ ] [ ; a\"" - Value: String: @@ -66,7 +66,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "\"\\u{FFA}\"" - Value: String: @@ -75,7 +75,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: "\"\\u{afafa}\"" - Value: String: @@ -84,7 +84,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 11 - path: test + path: "" content: "\"\\u{afaf}\"" - Value: String: @@ -93,7 +93,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "\"\\u{afa}\"" - Value: String: @@ -102,7 +102,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 9 - path: test + path: "" content: "\"\\u{af}\"" - Value: String: @@ -111,7 +111,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 8 - path: test + path: "" content: "\"\\u{a}\"" - Value: String: @@ -120,7 +120,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "\"\\x0A\"" - Value: String: @@ -129,7 +129,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "\"\\x7F\"" - Value: String: @@ -156,7 +156,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 28 - path: test + path: "" content: "\"aa \\\\ \\\" \\n aa \\t \\r \\0\"" - Value: String: @@ -171,7 +171,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: "\"test 😒€\"" - Value: String: @@ -182,5 +182,5 @@ outputs: line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: "\"😭😂😘\"" diff --git a/tests/expectations/parser/parser/expression/ternary.leo.out b/tests/expectations/parser/parser/expression/ternary.leo.out index 0d672f23d9..9fef5ba769 100644 --- a/tests/expectations/parser/parser/expression/ternary.leo.out +++ b/tests/expectations/parser/parser/expression/ternary.leo.out @@ -4,69 +4,69 @@ expectation: Pass outputs: - Ternary: condition: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? y : z\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x ? y : z\\\"}\"}" if_true: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? y : z\\\"}\"}" + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x ? y : z\\\"}\"}" if_false: - Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? y : z\\\"}\"}" + Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x ? y : z\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "x ? y : z" - Ternary: condition: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? a ? b : c : z\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x ? a ? b : c : z\\\"}\"}" if_true: Ternary: condition: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? a ? b : c : z\\\"}\"}" + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x ? a ? b : c : z\\\"}\"}" if_true: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? a ? b : c : z\\\"}\"}" + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x ? a ? b : c : z\\\"}\"}" if_false: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? a ? b : c : z\\\"}\"}" + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x ? a ? b : c : z\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 5 col_stop: 14 - path: test + path: "" content: "x ? a ? b : c : z" if_false: - Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? a ? b : c : z\\\"}\"}" + Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x ? a ? b : c : z\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 18 - path: test + path: "" content: "x ? a ? b : c : z" - Ternary: condition: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? y : a ? b : c\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x ? y : a ? b : c\\\"}\"}" if_true: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? y : a ? b : c\\\"}\"}" + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x ? y : a ? b : c\\\"}\"}" if_false: Ternary: condition: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? y : a ? b : c\\\"}\"}" + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x ? y : a ? b : c\\\"}\"}" if_true: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? y : a ? b : c\\\"}\"}" + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x ? y : a ? b : c\\\"}\"}" if_false: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? y : a ? b : c\\\"}\"}" + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x ? y : a ? b : c\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 9 col_stop: 18 - path: test + path: "" content: "x ? y : a ? b : c" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 18 - path: test + path: "" content: "x ? y : a ? b : c" diff --git a/tests/expectations/parser/parser/expression/tuple.leo.out b/tests/expectations/parser/parser/expression/tuple.leo.out index f5ec2aa11b..cfed424a4b 100644 --- a/tests/expectations/parser/parser/expression/tuple.leo.out +++ b/tests/expectations/parser/parser/expression/tuple.leo.out @@ -11,9 +11,9 @@ outputs: col_stop: 0 path: "" content: "" - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(x)\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(y)\\\"}\"}" - - Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(z)\\\"}\"}" + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"(x)\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"(y)\\\"}\"}" + - Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"(z)\\\"}\"}" - Value: Implicit: - "" @@ -23,29 +23,29 @@ outputs: col_stop: 0 path: "" content: "" - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(x,)\\\"}\"}" + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"(x,)\\\"}\"}" - TupleInit: elements: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(x,y)\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(x,y)\\\"}\"}" + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"(x,y)\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"(x,y)\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: "(x,y)" - TupleInit: elements: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(x,y,z)\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(x,y,z)\\\"}\"}" - - Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(x,y,z)\\\"}\"}" + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"(x,y,z)\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"(x,y,z)\\\"}\"}" + - Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"(x,y,z)\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 8 - path: test + path: "" content: "(x,y,z)" - TupleInit: elements: @@ -56,7 +56,7 @@ outputs: line_stop: 1 col_start: 2 col_stop: 5 - path: test + path: "" content: "(123,123)" - Value: Implicit: @@ -65,14 +65,14 @@ outputs: line_stop: 1 col_start: 6 col_stop: 9 - path: test + path: "" content: "(123,123)" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "(123,123)" - TupleInit: elements: [] @@ -81,7 +81,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 3 - path: test + path: "" content: () - TupleInit: elements: [] @@ -90,5 +90,5 @@ outputs: line_stop: 1 col_start: 2 col_stop: 4 - path: test + path: "" content: (()) diff --git a/tests/expectations/parser/parser/expression/unary/negate.leo.out b/tests/expectations/parser/parser/expression/unary/negate.leo.out index de785f2be6..fc683e6957 100644 --- a/tests/expectations/parser/parser/expression/unary/negate.leo.out +++ b/tests/expectations/parser/parser/expression/unary/negate.leo.out @@ -4,27 +4,27 @@ expectation: Pass outputs: - Unary: inner: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"-x\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"-x\\\"}\"}" op: Negate span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 3 - path: test + path: "" content: "-x" - Unary: inner: CircuitMemberAccess: circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"-x.y\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"-x.y\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"-x.y\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"-x.y\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 2 col_stop: 5 - path: test + path: "" content: "-x.y" op: Negate span: @@ -32,20 +32,20 @@ outputs: line_stop: 1 col_start: 1 col_stop: 5 - path: test + path: "" content: "-x.y" - Unary: inner: CircuitStaticFunctionAccess: circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"-x::y\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"-x::y\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"-x::y\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"-x::y\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 2 col_stop: 6 - path: test + path: "" content: "-x::y" op: Negate span: @@ -53,20 +53,20 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: "-x::y" - Unary: inner: Call: function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"-x()\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"-x()\\\"}\"}" arguments: [] span: line_start: 1 line_stop: 1 col_start: 2 col_stop: 5 - path: test + path: "" content: "-x()" op: Negate span: @@ -74,20 +74,20 @@ outputs: line_stop: 1 col_start: 1 col_stop: 5 - path: test + path: "" content: "-x()" - Unary: inner: Unary: inner: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"--x\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"--x\\\"}\"}" op: Negate span: line_start: 1 line_stop: 1 col_start: 2 col_stop: 4 - path: test + path: "" content: "--x" op: Negate span: @@ -95,20 +95,20 @@ outputs: line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: "--x" - Unary: inner: Unary: inner: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"-!x\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"-!x\\\"}\"}" op: Not span: line_start: 1 line_stop: 1 col_start: 2 col_stop: 4 - path: test + path: "" content: "-!x" op: Negate span: @@ -116,5 +116,5 @@ outputs: line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: "-!x" diff --git a/tests/expectations/parser/parser/expression/unary/not.leo.out b/tests/expectations/parser/parser/expression/unary/not.leo.out index 5c93154572..15d331191c 100644 --- a/tests/expectations/parser/parser/expression/unary/not.leo.out +++ b/tests/expectations/parser/parser/expression/unary/not.leo.out @@ -4,27 +4,27 @@ expectation: Pass outputs: - Unary: inner: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"!x\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"!x\\\"}\"}" op: Not span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 3 - path: test + path: "" content: "!x" - Unary: inner: CircuitMemberAccess: circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"!x.y\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"!x.y\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"!x.y\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"!x.y\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 2 col_stop: 5 - path: test + path: "" content: "!x.y" op: Not span: @@ -32,20 +32,20 @@ outputs: line_stop: 1 col_start: 1 col_stop: 5 - path: test + path: "" content: "!x.y" - Unary: inner: CircuitStaticFunctionAccess: circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"!x::y\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"!x::y\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"!x::y\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"!x::y\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 2 col_stop: 6 - path: test + path: "" content: "!x::y" op: Not span: @@ -53,20 +53,20 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: "!x::y" - Unary: inner: Call: function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"!x()\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"!x()\\\"}\"}" arguments: [] span: line_start: 1 line_stop: 1 col_start: 2 col_stop: 5 - path: test + path: "" content: "!x()" op: Not span: @@ -74,20 +74,20 @@ outputs: line_stop: 1 col_start: 1 col_stop: 5 - path: test + path: "" content: "!x()" - Unary: inner: Unary: inner: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"!!x\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"!!x\\\"}\"}" op: Not span: line_start: 1 line_stop: 1 col_start: 2 col_stop: 4 - path: test + path: "" content: "!!x" op: Not span: @@ -95,20 +95,20 @@ outputs: line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: "!!x" - Unary: inner: Unary: inner: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"!-x\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"!-x\\\"}\"}" op: Negate span: line_start: 1 line_stop: 1 col_start: 2 col_stop: 4 - path: test + path: "" content: "!-x" op: Not span: @@ -116,5 +116,5 @@ outputs: line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: "!-x" diff --git a/tests/expectations/parser/parser/functions/annotated.leo.out b/tests/expectations/parser/parser/functions/annotated.leo.out index 29612e265a..447958aff6 100644 --- a/tests/expectations/parser/parser/functions/annotated.leo.out +++ b/tests/expectations/parser/parser/functions/annotated.leo.out @@ -8,18 +8,18 @@ outputs: circuits: {} global_consts: {} functions: - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {\\\"}\"}": + "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x() {\\\"}\"}": annotations: - span: line_start: 3 line_stop: 3 col_start: 1 col_stop: 6 - path: test + path: "" content: "@test" - name: "{\"name\":\"test\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":2,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"@test\\\"}\"}" + name: "{\"name\":\"test\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":2,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"@test\\\"}\"}" arguments: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x() {\\\"}\"}" input: [] output: ~ block: @@ -33,26 +33,26 @@ outputs: line_stop: 5 col_start: 12 col_stop: 14 - path: test + path: "" content: " return ();" span: line_start: 5 line_stop: 5 col_start: 5 col_stop: 14 - path: test + path: "" content: " return ();" span: line_start: 4 line_stop: 6 col_start: 14 col_stop: 2 - path: test + path: "" content: "function x() {\n...\n}" span: line_start: 4 line_stop: 6 col_start: 1 col_stop: 2 - path: test + path: "" content: "function x() {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/annotated_param.leo.out b/tests/expectations/parser/parser/functions/annotated_param.leo.out index 72ca72549e..c3103b64c2 100644 --- a/tests/expectations/parser/parser/functions/annotated_param.leo.out +++ b/tests/expectations/parser/parser/functions/annotated_param.leo.out @@ -8,19 +8,19 @@ outputs: circuits: {} global_consts: {} functions: - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {\\\"}\"}": + "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x() {\\\"}\"}": annotations: - span: line_start: 3 line_stop: 3 col_start: 1 col_stop: 12 - path: test + path: "" content: "@test(test)" - name: "{\"name\":\"test\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":2,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"@test(test)\\\"}\"}" + name: "{\"name\":\"test\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":2,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"@test(test)\\\"}\"}" arguments: - test - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x() {\\\"}\"}" input: [] output: ~ block: @@ -34,26 +34,26 @@ outputs: line_stop: 5 col_start: 12 col_stop: 14 - path: test + path: "" content: " return ();" span: line_start: 5 line_stop: 5 col_start: 5 col_stop: 14 - path: test + path: "" content: " return ();" span: line_start: 4 line_stop: 6 col_start: 14 col_stop: 2 - path: test + path: "" content: "function x() {\n...\n}" span: line_start: 4 line_stop: 6 col_start: 1 col_stop: 2 - path: test + path: "" content: "function x() {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/annotated_twice.leo.out b/tests/expectations/parser/parser/functions/annotated_twice.leo.out index a83199ec50..9ca087d95b 100644 --- a/tests/expectations/parser/parser/functions/annotated_twice.leo.out +++ b/tests/expectations/parser/parser/functions/annotated_twice.leo.out @@ -8,27 +8,27 @@ outputs: circuits: {} global_consts: {} functions: - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {\\\"}\"}": + "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x() {\\\"}\"}": annotations: - span: line_start: 3 line_stop: 3 col_start: 1 col_stop: 6 - path: test + path: "" content: "@test @test2" - name: "{\"name\":\"test\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":2,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"@test @test2\\\"}\"}" + name: "{\"name\":\"test\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":2,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"@test @test2\\\"}\"}" arguments: [] - span: line_start: 3 line_stop: 3 col_start: 7 col_stop: 13 - path: test + path: "" content: "@test @test2" - name: "{\"name\":\"test2\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"@test @test2\\\"}\"}" + name: "{\"name\":\"test2\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"@test @test2\\\"}\"}" arguments: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x() {\\\"}\"}" input: [] output: ~ block: @@ -42,26 +42,26 @@ outputs: line_stop: 5 col_start: 12 col_stop: 14 - path: test + path: "" content: " return ();" span: line_start: 5 line_stop: 5 col_start: 5 col_stop: 14 - path: test + path: "" content: " return ();" span: line_start: 4 line_stop: 6 col_start: 14 col_stop: 2 - path: test + path: "" content: "function x() {\n...\n}" span: line_start: 4 line_stop: 6 col_start: 1 col_stop: 2 - path: test + path: "" content: "function x() {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/const_param.leo.out b/tests/expectations/parser/parser/functions/const_param.leo.out index 609a83247f..eecb5eb51d 100644 --- a/tests/expectations/parser/parser/functions/const_param.leo.out +++ b/tests/expectations/parser/parser/functions/const_param.leo.out @@ -8,12 +8,12 @@ outputs: circuits: {} global_consts: {} functions: - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, const y: i32) {\\\"}\"}": + "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(x: u32, const y: i32) {\\\"}\"}": annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, const y: i32) {\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(x: u32, const y: i32) {\\\"}\"}" input: - Variable: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, const y: i32) {\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(x: u32, const y: i32) {\\\"}\"}" const_: false mutable: true type_: @@ -23,10 +23,10 @@ outputs: line_stop: 3 col_start: 12 col_stop: 13 - path: test + path: "" content: "function x(x: u32, const y: i32) {" - Variable: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, const y: i32) {\\\"}\"}" + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(x: u32, const y: i32) {\\\"}\"}" const_: true mutable: false type_: @@ -36,7 +36,7 @@ outputs: line_stop: 3 col_start: 26 col_stop: 27 - path: test + path: "" content: "function x(x: u32, const y: i32) {" output: ~ block: @@ -50,35 +50,35 @@ outputs: line_stop: 4 col_start: 12 col_stop: 14 - path: test + path: "" content: " return ();" span: line_start: 4 line_stop: 4 col_start: 5 col_stop: 14 - path: test + path: "" content: " return ();" span: line_start: 3 line_stop: 5 col_start: 34 col_stop: 2 - path: test + path: "" content: "function x(x: u32, const y: i32) {\n...\n}" span: line_start: 3 line_stop: 5 col_start: 1 col_stop: 2 - path: test + path: "" content: "function x(x: u32, const y: i32) {\n...\n}" - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(const x: u32, y: i32) {\\\"}\"}": + "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(const x: u32, y: i32) {\\\"}\"}": annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(const x: u32, y: i32) {\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(const x: u32, y: i32) {\\\"}\"}" input: - Variable: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(const x: u32, y: i32) {\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(const x: u32, y: i32) {\\\"}\"}" const_: true mutable: false type_: @@ -88,10 +88,10 @@ outputs: line_stop: 7 col_start: 18 col_stop: 19 - path: test + path: "" content: "function x(const x: u32, y: i32) {" - Variable: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(const x: u32, y: i32) {\\\"}\"}" + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(const x: u32, y: i32) {\\\"}\"}" const_: false mutable: true type_: @@ -101,7 +101,7 @@ outputs: line_stop: 7 col_start: 26 col_stop: 27 - path: test + path: "" content: "function x(const x: u32, y: i32) {" output: ~ block: @@ -115,26 +115,26 @@ outputs: line_stop: 8 col_start: 12 col_stop: 14 - path: test + path: "" content: " return ();" span: line_start: 8 line_stop: 8 col_start: 5 col_stop: 14 - path: test + path: "" content: " return ();" span: line_start: 7 line_stop: 9 col_start: 34 col_stop: 2 - path: test + path: "" content: "function x(const x: u32, y: i32) {\n...\n}" span: line_start: 7 line_stop: 9 col_start: 1 col_stop: 2 - path: test + path: "" content: "function x(const x: u32, y: i32) {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/const_self_bad.leo.out b/tests/expectations/parser/parser/functions/const_self_bad.leo.out index 3b6e210cef..60b7a2fbda 100644 --- a/tests/expectations/parser/parser/functions/const_self_bad.leo.out +++ b/tests/expectations/parser/parser/functions/const_self_bad.leo.out @@ -8,11 +8,11 @@ outputs: circuits: {} global_consts: {} functions: - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(const self) {\\\"}\"}": + "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(const self) {\\\"}\"}": annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(const self) {\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(const self) {\\\"}\"}" input: - - ConstSelfKeyword: "{\"name\":\"const self\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":22,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(const self) {\\\"}\"}" + - ConstSelfKeyword: "{\"name\":\"const self\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":22,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(const self) {\\\"}\"}" output: ~ block: statements: @@ -25,26 +25,26 @@ outputs: line_stop: 4 col_start: 12 col_stop: 14 - path: test + path: "" content: " return ();" span: line_start: 4 line_stop: 4 col_start: 5 col_stop: 14 - path: test + path: "" content: " return ();" span: line_start: 3 line_stop: 5 col_start: 24 col_stop: 2 - path: test + path: "" content: "function x(const self) {\n...\n}" span: line_start: 3 line_stop: 5 col_start: 1 col_stop: 2 - path: test + path: "" content: "function x(const self) {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/empty.leo.out b/tests/expectations/parser/parser/functions/empty.leo.out index 5ead848ab3..eed8a3d595 100644 --- a/tests/expectations/parser/parser/functions/empty.leo.out +++ b/tests/expectations/parser/parser/functions/empty.leo.out @@ -8,9 +8,9 @@ outputs: circuits: {} global_consts: {} functions: - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {\\\"}\"}": + "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x() {\\\"}\"}": annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x() {\\\"}\"}" input: [] output: ~ block: @@ -24,26 +24,26 @@ outputs: line_stop: 4 col_start: 12 col_stop: 14 - path: test + path: "" content: " return ();" span: line_start: 4 line_stop: 4 col_start: 5 col_stop: 14 - path: test + path: "" content: " return ();" span: line_start: 3 line_stop: 5 col_start: 14 col_stop: 2 - path: test + path: "" content: "function x() {\n...\n}" span: line_start: 3 line_stop: 5 col_start: 1 col_stop: 2 - path: test + path: "" content: "function x() {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/empty2.leo.out b/tests/expectations/parser/parser/functions/empty2.leo.out index 16574b1dc3..9e6e0e1b79 100644 --- a/tests/expectations/parser/parser/functions/empty2.leo.out +++ b/tests/expectations/parser/parser/functions/empty2.leo.out @@ -8,9 +8,9 @@ outputs: circuits: {} global_consts: {} functions: - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {}\\\"}\"}": + "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x() {}\\\"}\"}": annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {}\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x() {}\\\"}\"}" input: [] output: ~ block: @@ -20,12 +20,12 @@ outputs: line_stop: 3 col_start: 14 col_stop: 16 - path: test + path: "" content: "function x() {}" span: line_start: 3 line_stop: 3 col_start: 1 col_stop: 16 - path: test + path: "" content: "function x() {}" diff --git a/tests/expectations/parser/parser/functions/param_array.leo.out b/tests/expectations/parser/parser/functions/param_array.leo.out index c9b3cc79cd..115a79fe88 100644 --- a/tests/expectations/parser/parser/functions/param_array.leo.out +++ b/tests/expectations/parser/parser/functions/param_array.leo.out @@ -8,12 +8,12 @@ outputs: circuits: {} global_consts: {} functions: - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: [u8; 12]) {\\\"}\"}": + "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(x: [u8; 12]) {\\\"}\"}": annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: [u8; 12]) {\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(x: [u8; 12]) {\\\"}\"}" input: - Variable: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: [u8; 12]) {\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(x: [u8; 12]) {\\\"}\"}" const_: false mutable: true type_: @@ -25,7 +25,7 @@ outputs: line_stop: 3 col_start: 12 col_stop: 13 - path: test + path: "" content: "function x(x: [u8; 12]) {" output: ~ block: @@ -39,26 +39,26 @@ outputs: line_stop: 4 col_start: 12 col_stop: 14 - path: test + path: "" content: " return ();" span: line_start: 4 line_stop: 4 col_start: 5 col_stop: 14 - path: test + path: "" content: " return ();" span: line_start: 3 line_stop: 5 col_start: 25 col_stop: 2 - path: test + path: "" content: "function x(x: [u8; 12]) {\n...\n}" span: line_start: 3 line_stop: 5 col_start: 1 col_stop: 2 - path: test + path: "" content: "function x(x: [u8; 12]) {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/param_circuit.leo.out b/tests/expectations/parser/parser/functions/param_circuit.leo.out index e998fe7f92..cbfae352d5 100644 --- a/tests/expectations/parser/parser/functions/param_circuit.leo.out +++ b/tests/expectations/parser/parser/functions/param_circuit.leo.out @@ -8,22 +8,22 @@ outputs: circuits: {} global_consts: {} functions: - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: MyCircuit) {\\\"}\"}": + "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(x: MyCircuit) {\\\"}\"}": annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: MyCircuit) {\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(x: MyCircuit) {\\\"}\"}" input: - Variable: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: MyCircuit) {\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(x: MyCircuit) {\\\"}\"}" const_: false mutable: true type_: - Circuit: "{\"name\":\"MyCircuit\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":24,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: MyCircuit) {\\\"}\"}" + Circuit: "{\"name\":\"MyCircuit\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":24,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(x: MyCircuit) {\\\"}\"}" span: line_start: 3 line_stop: 3 col_start: 12 col_stop: 13 - path: test + path: "" content: "function x(x: MyCircuit) {" output: ~ block: @@ -37,26 +37,26 @@ outputs: line_stop: 4 col_start: 12 col_stop: 14 - path: test + path: "" content: " return ();" span: line_start: 4 line_stop: 4 col_start: 5 col_stop: 14 - path: test + path: "" content: " return ();" span: line_start: 3 line_stop: 5 col_start: 26 col_stop: 2 - path: test + path: "" content: "function x(x: MyCircuit) {\n...\n}" span: line_start: 3 line_stop: 5 col_start: 1 col_stop: 2 - path: test + path: "" content: "function x(x: MyCircuit) {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/param_tuple.leo.out b/tests/expectations/parser/parser/functions/param_tuple.leo.out index 9597b18cb3..c6c615f19f 100644 --- a/tests/expectations/parser/parser/functions/param_tuple.leo.out +++ b/tests/expectations/parser/parser/functions/param_tuple.leo.out @@ -8,12 +8,12 @@ outputs: circuits: {} global_consts: {} functions: - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: (u32, i32)) {\\\"}\"}": + "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(x: (u32, i32)) {\\\"}\"}": annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: (u32, i32)) {\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(x: (u32, i32)) {\\\"}\"}" input: - Variable: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: (u32, i32)) {\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(x: (u32, i32)) {\\\"}\"}" const_: false mutable: true type_: @@ -25,7 +25,7 @@ outputs: line_stop: 3 col_start: 12 col_stop: 13 - path: test + path: "" content: "function x(x: (u32, i32)) {" output: ~ block: @@ -39,26 +39,26 @@ outputs: line_stop: 4 col_start: 12 col_stop: 14 - path: test + path: "" content: " return ();" span: line_start: 4 line_stop: 4 col_start: 5 col_stop: 14 - path: test + path: "" content: " return ();" span: line_start: 3 line_stop: 5 col_start: 27 col_stop: 2 - path: test + path: "" content: "function x(x: (u32, i32)) {\n...\n}" span: line_start: 3 line_stop: 5 col_start: 1 col_stop: 2 - path: test + path: "" content: "function x(x: (u32, i32)) {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/params.leo.out b/tests/expectations/parser/parser/functions/params.leo.out index 9c74dafafd..c4f953e3ab 100644 --- a/tests/expectations/parser/parser/functions/params.leo.out +++ b/tests/expectations/parser/parser/functions/params.leo.out @@ -8,12 +8,12 @@ outputs: circuits: {} global_consts: {} functions: - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) {\\\"}\"}": + "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) {\\\"}\"}": annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) {\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) {\\\"}\"}" input: - Variable: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) {\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) {\\\"}\"}" const_: false mutable: true type_: @@ -23,10 +23,10 @@ outputs: line_stop: 3 col_start: 12 col_stop: 13 - path: test + path: "" content: "function x(x: u32, y: i32) {" - Variable: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) {\\\"}\"}" + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) {\\\"}\"}" const_: false mutable: true type_: @@ -36,7 +36,7 @@ outputs: line_stop: 3 col_start: 20 col_stop: 21 - path: test + path: "" content: "function x(x: u32, y: i32) {" output: ~ block: @@ -50,26 +50,26 @@ outputs: line_stop: 4 col_start: 12 col_stop: 14 - path: test + path: "" content: " return ();" span: line_start: 4 line_stop: 4 col_start: 5 col_stop: 14 - path: test + path: "" content: " return ();" span: line_start: 3 line_stop: 5 col_start: 28 col_stop: 2 - path: test + path: "" content: "function x(x: u32, y: i32) {\n...\n}" span: line_start: 3 line_stop: 5 col_start: 1 col_stop: 2 - path: test + path: "" content: "function x(x: u32, y: i32) {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/params_return.leo.out b/tests/expectations/parser/parser/functions/params_return.leo.out index 6b1980e238..39a67ccd35 100644 --- a/tests/expectations/parser/parser/functions/params_return.leo.out +++ b/tests/expectations/parser/parser/functions/params_return.leo.out @@ -8,12 +8,12 @@ outputs: circuits: {} global_consts: {} functions: - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) -> u32 {\\\"}\"}": + "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) -> u32 {\\\"}\"}": annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) -> u32 {\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) -> u32 {\\\"}\"}" input: - Variable: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) -> u32 {\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) -> u32 {\\\"}\"}" const_: false mutable: true type_: @@ -23,10 +23,10 @@ outputs: line_stop: 3 col_start: 12 col_stop: 13 - path: test + path: "" content: "function x(x: u32, y: i32) -> u32 {" - Variable: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) -> u32 {\\\"}\"}" + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) -> u32 {\\\"}\"}" const_: false mutable: true type_: @@ -36,7 +36,7 @@ outputs: line_stop: 3 col_start: 20 col_stop: 21 - path: test + path: "" content: "function x(x: u32, y: i32) -> u32 {" output: IntegerType: U32 @@ -51,26 +51,26 @@ outputs: line_stop: 4 col_start: 12 col_stop: 14 - path: test + path: "" content: " return ();" span: line_start: 4 line_stop: 4 col_start: 5 col_stop: 14 - path: test + path: "" content: " return ();" span: line_start: 3 line_stop: 5 col_start: 35 col_stop: 2 - path: test + path: "" content: "function x(x: u32, y: i32) -> u32 {\n...\n}" span: line_start: 3 line_stop: 5 col_start: 1 col_stop: 2 - path: test + path: "" content: "function x(x: u32, y: i32) -> u32 {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/return.leo.out b/tests/expectations/parser/parser/functions/return.leo.out index 3baa2a2e79..a608443be1 100644 --- a/tests/expectations/parser/parser/functions/return.leo.out +++ b/tests/expectations/parser/parser/functions/return.leo.out @@ -8,9 +8,9 @@ outputs: circuits: {} global_consts: {} functions: - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() -> u32 {\\\"}\"}": + "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x() -> u32 {\\\"}\"}": annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() -> u32 {\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x() -> u32 {\\\"}\"}" input: [] output: IntegerType: U32 @@ -25,26 +25,26 @@ outputs: line_stop: 4 col_start: 12 col_stop: 14 - path: test + path: "" content: " return ();" span: line_start: 4 line_stop: 4 col_start: 5 col_stop: 14 - path: test + path: "" content: " return ();" span: line_start: 3 line_stop: 5 col_start: 21 col_stop: 2 - path: test + path: "" content: "function x() -> u32 {\n...\n}" span: line_start: 3 line_stop: 5 col_start: 1 col_stop: 2 - path: test + path: "" content: "function x() -> u32 {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/return_tuple.leo.out b/tests/expectations/parser/parser/functions/return_tuple.leo.out index aa853f04df..ab2ed0316a 100644 --- a/tests/expectations/parser/parser/functions/return_tuple.leo.out +++ b/tests/expectations/parser/parser/functions/return_tuple.leo.out @@ -8,9 +8,9 @@ outputs: circuits: {} global_consts: {} functions: - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() -> (u32, u32) {\\\"}\"}": + "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x() -> (u32, u32) {\\\"}\"}": annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() -> (u32, u32) {\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x() -> (u32, u32) {\\\"}\"}" input: [] output: Tuple: @@ -27,26 +27,26 @@ outputs: line_stop: 4 col_start: 12 col_stop: 14 - path: test + path: "" content: " return ();" span: line_start: 4 line_stop: 4 col_start: 5 col_stop: 14 - path: test + path: "" content: " return ();" span: line_start: 3 line_stop: 5 col_start: 28 col_stop: 2 - path: test + path: "" content: "function x() -> (u32, u32) {\n...\n}" span: line_start: 3 line_stop: 5 col_start: 1 col_stop: 2 - path: test + path: "" content: "function x() -> (u32, u32) {\n...\n}" diff --git a/tests/expectations/parser/parser/import/alias.leo.out b/tests/expectations/parser/parser/import/alias.leo.out index e0c181f3d7..548fd7c84c 100644 --- a/tests/expectations/parser/parser/import/alias.leo.out +++ b/tests/expectations/parser/parser/import/alias.leo.out @@ -7,31 +7,31 @@ outputs: imports: - package_or_packages: Package: - name: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import a.b as bar;\\\"}\"}" + name: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"import a.b as bar;\\\"}\"}" access: Symbol: - symbol: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import a.b as bar;\\\"}\"}" - alias: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import a.b as bar;\\\"}\"}" + symbol: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"import a.b as bar;\\\"}\"}" + alias: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":18,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"import a.b as bar;\\\"}\"}" span: line_start: 3 line_stop: 3 col_start: 10 col_stop: 18 - path: test + path: "" content: import a.b as bar; span: line_start: 3 line_stop: 3 col_start: 8 col_stop: 18 - path: test + path: "" content: import a.b as bar; span: line_start: 3 line_stop: 3 col_start: 8 col_stop: 18 - path: test + path: "" content: import a.b as bar; circuits: {} global_consts: {} diff --git a/tests/expectations/parser/parser/import/basic.leo.out b/tests/expectations/parser/parser/import/basic.leo.out index 7293ccb78e..17a6ffdce3 100644 --- a/tests/expectations/parser/parser/import/basic.leo.out +++ b/tests/expectations/parser/parser/import/basic.leo.out @@ -7,31 +7,31 @@ outputs: imports: - package_or_packages: Package: - name: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import a.b;\\\"}\"}" + name: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"import a.b;\\\"}\"}" access: Symbol: - symbol: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import a.b;\\\"}\"}" + symbol: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"import a.b;\\\"}\"}" alias: ~ span: line_start: 3 line_stop: 3 col_start: 10 col_stop: 11 - path: test + path: "" content: import a.b; span: line_start: 3 line_stop: 3 col_start: 8 col_stop: 11 - path: test + path: "" content: import a.b; span: line_start: 3 line_stop: 3 col_start: 8 col_stop: 11 - path: test + path: "" content: import a.b; circuits: {} global_consts: {} diff --git a/tests/expectations/parser/parser/import/many_import.leo.out b/tests/expectations/parser/parser/import/many_import.leo.out index c8bf9349c8..2354a64596 100644 --- a/tests/expectations/parser/parser/import/many_import.leo.out +++ b/tests/expectations/parser/parser/import/many_import.leo.out @@ -7,129 +7,129 @@ outputs: imports: - package_or_packages: Packages: - name: "{\"name\":\"test-import\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import test-import.( // local import\\\"}\"}" + name: "{\"name\":\"test-import\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"import test-import.( // local import\\\"}\"}" accesses: - Symbol: - symbol: "{\"name\":\"Point\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" Point,\\\"}\"}" + symbol: "{\"name\":\"Point\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" Point,\\\"}\"}" alias: ~ span: line_start: 4 line_stop: 4 col_start: 5 col_stop: 10 - path: test + path: "" content: " Point," - Symbol: - symbol: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" foo,\\\"}\"}" + symbol: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" foo,\\\"}\"}" alias: ~ span: line_start: 5 line_stop: 5 col_start: 5 col_stop: 8 - path: test + path: "" content: " foo," span: line_start: 3 line_stop: 5 col_start: 8 col_stop: 8 - path: test + path: "" content: "import test-import.( // local import\n...\n foo," span: line_start: 3 line_stop: 5 col_start: 8 col_stop: 8 - path: test + path: "" content: "import test-import.( // local import\n...\n foo," - package_or_packages: Packages: - name: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":8,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import bar.( // imports directory import\\\"}\"}" + name: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":8,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"import bar.( // imports directory import\\\"}\"}" accesses: - Symbol: - symbol: "{\"name\":\"Bar\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" Bar,\\\"}\"}" + symbol: "{\"name\":\"Bar\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" Bar,\\\"}\"}" alias: ~ span: line_start: 9 line_stop: 9 col_start: 5 col_stop: 8 - path: test + path: "" content: " Bar," - Multiple: - name: "{\"name\":\"baz\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" baz.(Baz, Bazzar),\\\"}\"}" + name: "{\"name\":\"baz\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" baz.(Baz, Bazzar),\\\"}\"}" accesses: - Symbol: - symbol: "{\"name\":\"Baz\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" baz.(Baz, Bazzar),\\\"}\"}" + symbol: "{\"name\":\"Baz\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" baz.(Baz, Bazzar),\\\"}\"}" alias: ~ span: line_start: 10 line_stop: 10 col_start: 10 col_stop: 13 - path: test + path: "" content: " baz.(Baz, Bazzar)," - Symbol: - symbol: "{\"name\":\"Bazzar\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":15,\\\"col_stop\\\":21,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" baz.(Baz, Bazzar),\\\"}\"}" + symbol: "{\"name\":\"Bazzar\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":15,\\\"col_stop\\\":21,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" baz.(Baz, Bazzar),\\\"}\"}" alias: ~ span: line_start: 10 line_stop: 10 col_start: 15 col_stop: 21 - path: test + path: "" content: " baz.(Baz, Bazzar)," span: line_start: 10 line_stop: 10 col_start: 5 col_stop: 21 - path: test + path: "" content: " baz.(Baz, Bazzar)," - SubPackage: - name: "{\"name\":\"bat\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" bat.bat.Bat,\\\"}\"}" + name: "{\"name\":\"bat\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" bat.bat.Bat,\\\"}\"}" access: SubPackage: - name: "{\"name\":\"bat\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" bat.bat.Bat,\\\"}\"}" + name: "{\"name\":\"bat\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" bat.bat.Bat,\\\"}\"}" access: Symbol: - symbol: "{\"name\":\"Bat\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" bat.bat.Bat,\\\"}\"}" + symbol: "{\"name\":\"Bat\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" bat.bat.Bat,\\\"}\"}" alias: ~ span: line_start: 11 line_stop: 11 col_start: 13 col_stop: 16 - path: test + path: "" content: " bat.bat.Bat," span: line_start: 11 line_stop: 11 col_start: 9 col_stop: 16 - path: test + path: "" content: " bat.bat.Bat," span: line_start: 11 line_stop: 11 col_start: 5 col_stop: 16 - path: test + path: "" content: " bat.bat.Bat," span: line_start: 8 line_stop: 11 col_start: 8 col_stop: 16 - path: test + path: "" content: "import bar.( // imports directory import\n...\n bat.bat.Bat," span: line_start: 8 line_stop: 11 col_start: 8 col_stop: 16 - path: test + path: "" content: "import bar.( // imports directory import\n...\n bat.bat.Bat," circuits: {} global_consts: {} diff --git a/tests/expectations/parser/parser/import/many_import_star.leo.out b/tests/expectations/parser/parser/import/many_import_star.leo.out index d1555ed1e0..1e129a584b 100644 --- a/tests/expectations/parser/parser/import/many_import_star.leo.out +++ b/tests/expectations/parser/parser/import/many_import_star.leo.out @@ -7,7 +7,7 @@ outputs: imports: - package_or_packages: Package: - name: "{\"name\":\"test-import\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import test-import.*; // local import\\\"}\"}" + name: "{\"name\":\"test-import\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"import test-import.*; // local import\\\"}\"}" access: Star: span: @@ -15,25 +15,25 @@ outputs: line_stop: 3 col_start: 20 col_stop: 21 - path: test + path: "" content: import test-import.*; // local import span: line_start: 3 line_stop: 3 col_start: 8 col_stop: 21 - path: test + path: "" content: import test-import.*; // local import span: line_start: 3 line_stop: 3 col_start: 8 col_stop: 21 - path: test + path: "" content: import test-import.*; // local import - package_or_packages: Package: - name: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":8,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import bar.*; // imports directory import\\\"}\"}" + name: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":8,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"import bar.*; // imports directory import\\\"}\"}" access: Star: span: @@ -41,28 +41,28 @@ outputs: line_stop: 5 col_start: 12 col_stop: 13 - path: test + path: "" content: import bar.*; // imports directory import span: line_start: 5 line_stop: 5 col_start: 8 col_stop: 13 - path: test + path: "" content: import bar.*; // imports directory import span: line_start: 5 line_stop: 5 col_start: 8 col_stop: 13 - path: test + path: "" content: import bar.*; // imports directory import - package_or_packages: Package: - name: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":8,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import bar.baz.*; // imports directory import\\\"}\"}" + name: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":8,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"import bar.baz.*; // imports directory import\\\"}\"}" access: SubPackage: - name: "{\"name\":\"baz\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import bar.baz.*; // imports directory import\\\"}\"}" + name: "{\"name\":\"baz\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"import bar.baz.*; // imports directory import\\\"}\"}" access: Star: span: @@ -70,38 +70,38 @@ outputs: line_stop: 6 col_start: 16 col_stop: 17 - path: test + path: "" content: import bar.baz.*; // imports directory import span: line_start: 6 line_stop: 6 col_start: 12 col_stop: 17 - path: test + path: "" content: import bar.baz.*; // imports directory import span: line_start: 6 line_stop: 6 col_start: 8 col_stop: 17 - path: test + path: "" content: import bar.baz.*; // imports directory import span: line_start: 6 line_stop: 6 col_start: 8 col_stop: 17 - path: test + path: "" content: import bar.baz.*; // imports directory import - package_or_packages: Package: - name: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":8,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import bar.bat.bat.*; // imports directory import\\\"}\"}" + name: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":8,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"import bar.bat.bat.*; // imports directory import\\\"}\"}" access: SubPackage: - name: "{\"name\":\"bat\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import bar.bat.bat.*; // imports directory import\\\"}\"}" + name: "{\"name\":\"bat\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"import bar.bat.bat.*; // imports directory import\\\"}\"}" access: SubPackage: - name: "{\"name\":\"bat\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":16,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import bar.bat.bat.*; // imports directory import\\\"}\"}" + name: "{\"name\":\"bat\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":16,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"import bar.bat.bat.*; // imports directory import\\\"}\"}" access: Star: span: @@ -109,39 +109,39 @@ outputs: line_stop: 7 col_start: 20 col_stop: 21 - path: test + path: "" content: import bar.bat.bat.*; // imports directory import span: line_start: 7 line_stop: 7 col_start: 16 col_stop: 21 - path: test + path: "" content: import bar.bat.bat.*; // imports directory import span: line_start: 7 line_stop: 7 col_start: 12 col_stop: 21 - path: test + path: "" content: import bar.bat.bat.*; // imports directory import span: line_start: 7 line_stop: 7 col_start: 8 col_stop: 21 - path: test + path: "" content: import bar.bat.bat.*; // imports directory import span: line_start: 7 line_stop: 7 col_start: 8 col_stop: 21 - path: test + path: "" content: import bar.bat.bat.*; // imports directory import - package_or_packages: Package: - name: "{\"name\":\"car\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":8,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import car.*; // imports directory import\\\"}\"}" + name: "{\"name\":\"car\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":8,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"import car.*; // imports directory import\\\"}\"}" access: Star: span: @@ -149,21 +149,21 @@ outputs: line_stop: 8 col_start: 12 col_stop: 13 - path: test + path: "" content: import car.*; // imports directory import span: line_start: 8 line_stop: 8 col_start: 8 col_stop: 13 - path: test + path: "" content: import car.*; // imports directory import span: line_start: 8 line_stop: 8 col_start: 8 col_stop: 13 - path: test + path: "" content: import car.*; // imports directory import circuits: {} global_consts: {} diff --git a/tests/expectations/parser/parser/import/names.leo.out b/tests/expectations/parser/parser/import/names.leo.out index 9bc9319577..1c38d71a94 100644 --- a/tests/expectations/parser/parser/import/names.leo.out +++ b/tests/expectations/parser/parser/import/names.leo.out @@ -7,87 +7,87 @@ outputs: imports: - package_or_packages: Package: - name: "{\"name\":\"a0-f\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import a0-f.foo;\\\"}\"}" + name: "{\"name\":\"a0-f\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"import a0-f.foo;\\\"}\"}" access: Symbol: - symbol: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import a0-f.foo;\\\"}\"}" + symbol: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"import a0-f.foo;\\\"}\"}" alias: ~ span: line_start: 3 line_stop: 3 col_start: 13 col_stop: 16 - path: test + path: "" content: import a0-f.foo; span: line_start: 3 line_stop: 3 col_start: 8 col_stop: 16 - path: test + path: "" content: import a0-f.foo; span: line_start: 3 line_stop: 3 col_start: 8 col_stop: 16 - path: test + path: "" content: import a0-f.foo; - package_or_packages: Package: - name: "{\"name\":\"a-9\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":8,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import a-9.bar;\\\"}\"}" + name: "{\"name\":\"a-9\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":8,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"import a-9.bar;\\\"}\"}" access: Symbol: - symbol: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import a-9.bar;\\\"}\"}" + symbol: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"import a-9.bar;\\\"}\"}" alias: ~ span: line_start: 4 line_stop: 4 col_start: 12 col_stop: 15 - path: test + path: "" content: import a-9.bar; span: line_start: 4 line_stop: 4 col_start: 8 col_stop: 15 - path: test + path: "" content: import a-9.bar; span: line_start: 4 line_stop: 4 col_start: 8 col_stop: 15 - path: test + path: "" content: import a-9.bar; - package_or_packages: Package: - name: "{\"name\":\"hello-world\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":8,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import hello-world.hello;\\\"}\"}" + name: "{\"name\":\"hello-world\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":8,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"import hello-world.hello;\\\"}\"}" access: Symbol: - symbol: "{\"name\":\"hello\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":20,\\\"col_stop\\\":25,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import hello-world.hello;\\\"}\"}" + symbol: "{\"name\":\"hello\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":20,\\\"col_stop\\\":25,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"import hello-world.hello;\\\"}\"}" alias: ~ span: line_start: 5 line_stop: 5 col_start: 20 col_stop: 25 - path: test + path: "" content: import hello-world.hello; span: line_start: 5 line_stop: 5 col_start: 8 col_stop: 25 - path: test + path: "" content: import hello-world.hello; span: line_start: 5 line_stop: 5 col_start: 8 col_stop: 25 - path: test + path: "" content: import hello-world.hello; circuits: {} global_consts: {} diff --git a/tests/expectations/parser/parser/import/names_underscore.leo.out b/tests/expectations/parser/parser/import/names_underscore.leo.out index 952c5c0ac7..c9f7799293 100644 --- a/tests/expectations/parser/parser/import/names_underscore.leo.out +++ b/tests/expectations/parser/parser/import/names_underscore.leo.out @@ -7,31 +7,31 @@ outputs: imports: - package_or_packages: Package: - name: "{\"name\":\"hello_world\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import hello_world.foo;\\\"}\"}" + name: "{\"name\":\"hello_world\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"import hello_world.foo;\\\"}\"}" access: Symbol: - symbol: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":20,\\\"col_stop\\\":23,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import hello_world.foo;\\\"}\"}" + symbol: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":20,\\\"col_stop\\\":23,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"import hello_world.foo;\\\"}\"}" alias: ~ span: line_start: 3 line_stop: 3 col_start: 20 col_stop: 23 - path: test + path: "" content: import hello_world.foo; span: line_start: 3 line_stop: 3 col_start: 8 col_stop: 23 - path: test + path: "" content: import hello_world.foo; span: line_start: 3 line_stop: 3 col_start: 8 col_stop: 23 - path: test + path: "" content: import hello_world.foo; circuits: {} global_consts: {} diff --git a/tests/expectations/parser/parser/import/star.leo.out b/tests/expectations/parser/parser/import/star.leo.out index f9e234a287..b2cce28fdc 100644 --- a/tests/expectations/parser/parser/import/star.leo.out +++ b/tests/expectations/parser/parser/import/star.leo.out @@ -7,7 +7,7 @@ outputs: imports: - package_or_packages: Package: - name: "{\"name\":\"test-import\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import test-import.*;\\\"}\"}" + name: "{\"name\":\"test-import\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"import test-import.*;\\\"}\"}" access: Star: span: @@ -15,21 +15,21 @@ outputs: line_stop: 3 col_start: 20 col_stop: 21 - path: test + path: "" content: import test-import.*; span: line_start: 3 line_stop: 3 col_start: 8 col_stop: 21 - path: test + path: "" content: import test-import.*; span: line_start: 3 line_stop: 3 col_start: 8 col_stop: 21 - path: test + path: "" content: import test-import.*; circuits: {} global_consts: {} diff --git a/tests/expectations/parser/parser/statement/assign.leo.out b/tests/expectations/parser/parser/statement/assign.leo.out index d992c636a2..422cb1d114 100644 --- a/tests/expectations/parser/parser/statement/assign.leo.out +++ b/tests/expectations/parser/parser/statement/assign.leo.out @@ -5,35 +5,35 @@ outputs: - Assign: operation: Assign assignee: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = expr;\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x = expr;\\\"}\"}" accesses: [] span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: x = expr; value: - Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = expr;\\\"}\"}" + Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x = expr;\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 9 - path: test + path: "" content: x = expr; - Assign: operation: Assign assignee: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = ();\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x = ();\\\"}\"}" accesses: [] span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: x = (); value: TupleInit: @@ -43,114 +43,114 @@ outputs: line_stop: 1 col_start: 5 col_stop: 7 - path: test + path: "" content: x = (); span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: x = (); - Assign: operation: Assign assignee: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = x+y;\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x = x+y;\\\"}\"}" accesses: [] span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: x = x+y; value: Binary: left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = x+y;\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x = x+y;\\\"}\"}" right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = x+y;\\\"}\"}" + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x = x+y;\\\"}\"}" op: Add span: line_start: 1 line_stop: 1 col_start: 5 col_stop: 8 - path: test + path: "" content: x = x+y; span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 8 - path: test + path: "" content: x = x+y; - Assign: operation: Assign assignee: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = (x,y);\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x = (x,y);\\\"}\"}" accesses: [] span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: "x = (x,y);" value: TupleInit: elements: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = (x,y);\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = (x,y);\\\"}\"}" + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x = (x,y);\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x = (x,y);\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 5 col_stop: 10 - path: test + path: "" content: "x = (x,y);" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "x = (x,y);" - Assign: operation: Assign assignee: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = x();\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x = x();\\\"}\"}" accesses: [] span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 2 - path: test + path: "" content: x = x(); value: Call: function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = x();\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x = x();\\\"}\"}" arguments: [] span: line_start: 1 line_stop: 1 col_start: 5 col_stop: 8 - path: test + path: "" content: x = x(); span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 8 - path: test + path: "" content: x = x(); - Assign: operation: Assign assignee: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0] = y;\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[0] = y;\\\"}\"}" accesses: - ArrayIndex: Value: @@ -160,28 +160,28 @@ outputs: line_stop: 1 col_start: 3 col_stop: 4 - path: test + path: "" content: "x[0] = y;" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 5 - path: test + path: "" content: "x[0] = y;" value: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0] = y;\\\"}\"}" + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[0] = y;\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 9 - path: test + path: "" content: "x[0] = y;" - Assign: operation: Assign assignee: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0u32] = y;\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[0u32] = y;\\\"}\"}" accesses: - ArrayIndex: Value: @@ -192,28 +192,28 @@ outputs: line_stop: 1 col_start: 3 col_stop: 7 - path: test + path: "" content: "x[0u32] = y;" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 8 - path: test + path: "" content: "x[0u32] = y;" value: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0u32] = y;\\\"}\"}" + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[0u32] = y;\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: "x[0u32] = y;" - Assign: operation: Assign assignee: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.0 = y;\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.0 = y;\\\"}\"}" accesses: - Tuple: - value: "0" @@ -221,28 +221,28 @@ outputs: line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: x.0 = y; span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: x.0 = y; value: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.0 = y;\\\"}\"}" + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.0 = y;\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 8 - path: test + path: "" content: x.0 = y; - Assign: operation: Assign assignee: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[1..2] = y;\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[1..2] = y;\\\"}\"}" accesses: - ArrayRange: - Value: @@ -252,7 +252,7 @@ outputs: line_stop: 1 col_start: 3 col_stop: 4 - path: test + path: "" content: "x[1..2] = y;" - Value: Implicit: @@ -261,28 +261,28 @@ outputs: line_stop: 1 col_start: 6 col_stop: 7 - path: test + path: "" content: "x[1..2] = y;" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 8 - path: test + path: "" content: "x[1..2] = y;" value: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[1..2] = y;\\\"}\"}" + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[1..2] = y;\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: "x[1..2] = y;" - Assign: operation: Assign assignee: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..2] = y;\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[..2] = y;\\\"}\"}" accesses: - ArrayRange: - ~ @@ -293,28 +293,28 @@ outputs: line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: "x[..2] = y;" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "x[..2] = y;" value: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..2] = y;\\\"}\"}" + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[..2] = y;\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 11 - path: test + path: "" content: "x[..2] = y;" - Assign: operation: Assign assignee: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[2..] = y;\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[2..] = y;\\\"}\"}" accesses: - ArrayRange: - Value: @@ -324,7 +324,7 @@ outputs: line_stop: 1 col_start: 3 col_stop: 4 - path: test + path: "" content: "x[2..] = y;" - ~ span: @@ -332,21 +332,21 @@ outputs: line_stop: 1 col_start: 1 col_stop: 7 - path: test + path: "" content: "x[2..] = y;" value: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[2..] = y;\\\"}\"}" + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[2..] = y;\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 11 - path: test + path: "" content: "x[2..] = y;" - Assign: operation: Assign assignee: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..] = y;\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[..] = y;\\\"}\"}" accesses: - ArrayRange: - ~ @@ -356,21 +356,21 @@ outputs: line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: "x[..] = y;" value: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..] = y;\\\"}\"}" + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[..] = y;\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: "x[..] = y;" - Assign: operation: Assign assignee: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.0[0][..] = y;\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.0[0][..] = y;\\\"}\"}" accesses: - Tuple: - value: "0" @@ -378,7 +378,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: "x.0[0][..] = y;" - ArrayIndex: Value: @@ -388,7 +388,7 @@ outputs: line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: "x.0[0][..] = y;" - ArrayRange: - ~ @@ -398,14 +398,14 @@ outputs: line_stop: 1 col_start: 1 col_stop: 11 - path: test + path: "" content: "x.0[0][..] = y;" value: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.0[0][..] = y;\\\"}\"}" + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.0[0][..] = y;\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: "x.0[0][..] = y;" diff --git a/tests/expectations/parser/parser/statement/block.leo.out b/tests/expectations/parser/parser/statement/block.leo.out index 6e40c82b0f..29ec5fe1f8 100644 --- a/tests/expectations/parser/parser/statement/block.leo.out +++ b/tests/expectations/parser/parser/statement/block.leo.out @@ -9,7 +9,7 @@ outputs: line_stop: 1 col_start: 1 col_stop: 3 - path: test + path: "" content: "{}" - Block: statements: @@ -22,21 +22,21 @@ outputs: line_stop: 2 col_start: 8 col_stop: 10 - path: test + path: "" content: return (); span: line_start: 2 line_stop: 2 col_start: 1 col_stop: 10 - path: test + path: "" content: return (); span: line_start: 1 line_stop: 3 col_start: 1 col_stop: 2 - path: test + path: "" content: "{\n...\n}" - Block: statements: @@ -47,14 +47,14 @@ outputs: line_stop: 1 col_start: 2 col_stop: 4 - path: test + path: "" content: "{{}}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 5 - path: test + path: "" content: "{{}}" - Block: statements: @@ -69,34 +69,34 @@ outputs: line_stop: 3 col_start: 8 col_stop: 10 - path: test + path: "" content: return (); span: line_start: 3 line_stop: 3 col_start: 1 col_stop: 10 - path: test + path: "" content: return (); span: line_start: 2 line_stop: 4 col_start: 1 col_stop: 2 - path: test + path: "" content: "{\n...\n}" span: line_start: 1 line_stop: 5 col_start: 1 col_stop: 2 - path: test + path: "" content: "{\n...\n}" - Block: statements: - Conditional: condition: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":2,\\\"line_stop\\\":2,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"if x {\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":2,\\\"line_stop\\\":2,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"if x {\\\"}\"}" block: statements: - Return: @@ -108,21 +108,21 @@ outputs: line_stop: 3 col_start: 8 col_stop: 10 - path: test + path: "" content: return (); span: line_start: 3 line_stop: 3 col_start: 1 col_stop: 10 - path: test + path: "" content: return (); span: line_start: 2 line_stop: 4 col_start: 6 col_stop: 2 - path: test + path: "" content: "if x {\n...\n}" next: ~ span: @@ -130,12 +130,12 @@ outputs: line_stop: 4 col_start: 1 col_stop: 2 - path: test + path: "" content: "if x {\n...\n}" span: line_start: 1 line_stop: 5 col_start: 1 col_stop: 2 - path: test + path: "" content: "{\n...\n}" diff --git a/tests/expectations/parser/parser/statement/conditional.leo.out b/tests/expectations/parser/parser/statement/conditional.leo.out index c29e4db887..dcac2a651e 100644 --- a/tests/expectations/parser/parser/statement/conditional.leo.out +++ b/tests/expectations/parser/parser/statement/conditional.leo.out @@ -4,7 +4,7 @@ expectation: Pass outputs: - Conditional: condition: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"if x {\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"if x {\\\"}\"}" block: statements: - Return: @@ -16,21 +16,21 @@ outputs: line_stop: 2 col_start: 8 col_stop: 10 - path: test + path: "" content: return (); span: line_start: 2 line_stop: 2 col_start: 1 col_stop: 10 - path: test + path: "" content: return (); span: line_start: 1 line_stop: 3 col_start: 6 col_stop: 2 - path: test + path: "" content: "if x {\n...\n}" next: ~ span: @@ -38,11 +38,11 @@ outputs: line_stop: 3 col_start: 1 col_stop: 2 - path: test + path: "" content: "if x {\n...\n}" - Conditional: condition: - Identifier: "{\"name\":\"Self\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"if Self {\\\"}\"}" + Identifier: "{\"name\":\"Self\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"if Self {\\\"}\"}" block: statements: - Return: @@ -54,21 +54,21 @@ outputs: line_stop: 2 col_start: 8 col_stop: 10 - path: test + path: "" content: return (); span: line_start: 2 line_stop: 2 col_start: 1 col_stop: 10 - path: test + path: "" content: return (); span: line_start: 1 line_stop: 3 col_start: 9 col_stop: 2 - path: test + path: "" content: "if Self {\n...\n}" next: ~ span: @@ -76,11 +76,11 @@ outputs: line_stop: 3 col_start: 1 col_stop: 2 - path: test + path: "" content: "if Self {\n...\n}" - Conditional: condition: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"if (x) {\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"if (x) {\\\"}\"}" block: statements: - Return: @@ -92,21 +92,21 @@ outputs: line_stop: 2 col_start: 8 col_stop: 10 - path: test + path: "" content: return (); span: line_start: 2 line_stop: 2 col_start: 1 col_stop: 10 - path: test + path: "" content: return (); span: line_start: 1 line_stop: 3 col_start: 8 col_stop: 2 - path: test + path: "" content: "if (x) {\n...\n}" next: ~ span: @@ -114,11 +114,11 @@ outputs: line_stop: 3 col_start: 1 col_stop: 2 - path: test + path: "" content: "if (x) {\n...\n}" - Conditional: condition: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"if (x) {} else {}\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"if (x) {} else {}\\\"}\"}" block: statements: [] span: @@ -126,7 +126,7 @@ outputs: line_stop: 1 col_start: 8 col_stop: 10 - path: test + path: "" content: "if (x) {} else {}" next: Block: @@ -136,29 +136,29 @@ outputs: line_stop: 1 col_start: 16 col_stop: 18 - path: test + path: "" content: "if (x) {} else {}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 18 - path: test + path: "" content: "if (x) {} else {}" - Conditional: condition: Binary: left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"if x+y {} else if x+z {} else {}\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"if x+y {} else if x+z {} else {}\\\"}\"}" right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"if x+y {} else if x+z {} else {}\\\"}\"}" + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"if x+y {} else if x+z {} else {}\\\"}\"}" op: Add span: line_start: 1 line_stop: 1 col_start: 4 col_stop: 7 - path: test + path: "" content: "if x+y {} else if x+z {} else {}" block: statements: [] @@ -167,23 +167,23 @@ outputs: line_stop: 1 col_start: 8 col_stop: 10 - path: test + path: "" content: "if x+y {} else if x+z {} else {}" next: Conditional: condition: Binary: left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"if x+y {} else if x+z {} else {}\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"if x+y {} else if x+z {} else {}\\\"}\"}" right: - Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"if x+y {} else if x+z {} else {}\\\"}\"}" + Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"if x+y {} else if x+z {} else {}\\\"}\"}" op: Add span: line_start: 1 line_stop: 1 col_start: 19 col_stop: 22 - path: test + path: "" content: "if x+y {} else if x+z {} else {}" block: statements: [] @@ -192,7 +192,7 @@ outputs: line_stop: 1 col_start: 23 col_stop: 25 - path: test + path: "" content: "if x+y {} else if x+z {} else {}" next: Block: @@ -202,48 +202,48 @@ outputs: line_stop: 1 col_start: 31 col_stop: 33 - path: test + path: "" content: "if x+y {} else if x+z {} else {}" span: line_start: 1 line_stop: 1 col_start: 16 col_stop: 33 - path: test + path: "" content: "if x+y {} else if x+z {} else {}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 33 - path: test + path: "" content: "if x+y {} else if x+z {} else {}" - Conditional: condition: Binary: left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"if x+y {\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"if x+y {\\\"}\"}" right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"if x+y {\\\"}\"}" + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"if x+y {\\\"}\"}" op: Add span: line_start: 1 line_stop: 1 col_start: 4 col_stop: 7 - path: test + path: "" content: "if x+y {" block: statements: - Expression: expression: - Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":2,\\\"line_stop\\\":2,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"expr;\\\"}\"}" + Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":2,\\\"line_stop\\\":2,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"expr;\\\"}\"}" span: line_start: 2 line_stop: 2 col_start: 1 col_stop: 5 - path: test + path: "" content: expr; - Return: expression: @@ -254,21 +254,21 @@ outputs: line_stop: 3 col_start: 8 col_stop: 10 - path: test + path: "" content: return (); span: line_start: 3 line_stop: 3 col_start: 1 col_stop: 10 - path: test + path: "" content: return (); span: line_start: 1 line_stop: 4 col_start: 8 col_stop: 2 - path: test + path: "" content: "if x+y {\n...\n}" next: ~ span: @@ -276,5 +276,5 @@ outputs: line_stop: 4 col_start: 1 col_stop: 2 - path: test + path: "" content: "if x+y {\n...\n}\n" diff --git a/tests/expectations/parser/parser/statement/console.leo.out b/tests/expectations/parser/parser/statement/console.leo.out index 4ff3e93b83..f8bb2b4c7d 100644 --- a/tests/expectations/parser/parser/statement/console.leo.out +++ b/tests/expectations/parser/parser/statement/console.leo.out @@ -5,13 +5,13 @@ outputs: - Console: function: Assert: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"console.assert(x);\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"console.assert(x);\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 17 - path: test + path: "" content: console.assert(x); - Console: function: @@ -20,20 +20,20 @@ outputs: - Scalar: 123 - Scalar: 125 parameters: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"console.error(\\\\\\\"{}\\\\\\\", x);\\\"}\"}" + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"console.error(\\\\\\\"{}\\\\\\\", x);\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 15 col_stop: 22 - path: test + path: "" content: "console.error(\"{}\", x);" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 22 - path: test + path: "" content: "console.error(\"{}\", x);" - Console: function: @@ -44,21 +44,21 @@ outputs: - Scalar: 123 - Scalar: 125 parameters: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"console.error(\\\\\\\"{}{}\\\\\\\", x, y);\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"console.error(\\\\\\\"{}{}\\\\\\\", x, y);\\\"}\"}" + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"console.error(\\\\\\\"{}{}\\\\\\\", x, y);\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"console.error(\\\\\\\"{}{}\\\\\\\", x, y);\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 15 col_stop: 27 - path: test + path: "" content: "console.error(\"{}{}\", x, y);" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 27 - path: test + path: "" content: "console.error(\"{}{}\", x, y);" - Console: function: @@ -71,14 +71,14 @@ outputs: line_stop: 1 col_start: 15 col_stop: 18 - path: test + path: "" content: "console.error(\"x\");" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 18 - path: test + path: "" content: "console.error(\"x\");" - Console: function: @@ -87,20 +87,20 @@ outputs: - Scalar: 123 - Scalar: 125 parameters: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"console.log(\\\\\\\"{}\\\\\\\", x);\\\"}\"}" + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"console.log(\\\\\\\"{}\\\\\\\", x);\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 13 col_stop: 20 - path: test + path: "" content: "console.log(\"{}\", x);" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 20 - path: test + path: "" content: "console.log(\"{}\", x);" - Console: function: @@ -111,21 +111,21 @@ outputs: - Scalar: 123 - Scalar: 125 parameters: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"console.log(\\\\\\\"{}{}\\\\\\\", x, y);\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"console.log(\\\\\\\"{}{}\\\\\\\", x, y);\\\"}\"}" + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"console.log(\\\\\\\"{}{}\\\\\\\", x, y);\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"console.log(\\\\\\\"{}{}\\\\\\\", x, y);\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 13 col_stop: 25 - path: test + path: "" content: "console.log(\"{}{}\", x, y);" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 25 - path: test + path: "" content: "console.log(\"{}{}\", x, y);" - Console: function: @@ -138,12 +138,12 @@ outputs: line_stop: 1 col_start: 13 col_stop: 16 - path: test + path: "" content: "console.log(\"x\");" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 16 - path: test + path: "" content: "console.log(\"x\");" diff --git a/tests/expectations/parser/parser/statement/definition.leo.out b/tests/expectations/parser/parser/statement/definition.leo.out index fa12ad7cea..04b085addb 100644 --- a/tests/expectations/parser/parser/statement/definition.leo.out +++ b/tests/expectations/parser/parser/statement/definition.leo.out @@ -6,35 +6,35 @@ outputs: declaration_type: Let variable_names: - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = expr;\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = expr;\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: let x = expr; type_: ~ value: - Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = expr;\\\"}\"}" + Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = expr;\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: let x = expr; - Definition: declaration_type: Let variable_names: - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = ();\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = ();\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: let x = (); type_: ~ value: @@ -45,146 +45,146 @@ outputs: line_stop: 1 col_start: 9 col_stop: 11 - path: test + path: "" content: let x = (); span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 11 - path: test + path: "" content: let x = (); - Definition: declaration_type: Let variable_names: - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = x+y;\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = x+y;\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: let x = x+y; type_: ~ value: Binary: left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = x+y;\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = x+y;\\\"}\"}" right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = x+y;\\\"}\"}" + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = x+y;\\\"}\"}" op: Add span: line_start: 1 line_stop: 1 col_start: 9 col_stop: 12 - path: test + path: "" content: let x = x+y; span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: let x = x+y; - Definition: declaration_type: Let variable_names: - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = (x,y);\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = (x,y);\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: "let x = (x,y);" type_: ~ value: TupleInit: elements: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = (x,y);\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = (x,y);\\\"}\"}" + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = (x,y);\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = (x,y);\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 9 col_stop: 14 - path: test + path: "" content: "let x = (x,y);" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: "let x = (x,y);" - Definition: declaration_type: Let variable_names: - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = x();\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = x();\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: let x = x(); type_: ~ value: Call: function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = x();\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = x();\\\"}\"}" arguments: [] span: line_start: 1 line_stop: 1 col_start: 9 col_stop: 12 - path: test + path: "" content: let x = x(); span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: let x = x(); - Definition: declaration_type: Const variable_names: - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = expr;\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const x = expr;\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 7 col_stop: 8 - path: test + path: "" content: const x = expr; type_: ~ value: - Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = expr;\\\"}\"}" + Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const x = expr;\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 15 - path: test + path: "" content: const x = expr; - Definition: declaration_type: Const variable_names: - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = ();\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const x = ();\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 7 col_stop: 8 - path: test + path: "" content: const x = (); type_: ~ value: @@ -195,147 +195,147 @@ outputs: line_stop: 1 col_start: 11 col_stop: 13 - path: test + path: "" content: const x = (); span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: const x = (); - Definition: declaration_type: Const variable_names: - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = x+y;\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const x = x+y;\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 7 col_stop: 8 - path: test + path: "" content: const x = x+y; type_: ~ value: Binary: left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = x+y;\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const x = x+y;\\\"}\"}" right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = x+y;\\\"}\"}" + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const x = x+y;\\\"}\"}" op: Add span: line_start: 1 line_stop: 1 col_start: 11 col_stop: 14 - path: test + path: "" content: const x = x+y; span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: const x = x+y; - Definition: declaration_type: Const variable_names: - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = (x,y);\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const x = (x,y);\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 7 col_stop: 8 - path: test + path: "" content: "const x = (x,y);" type_: ~ value: TupleInit: elements: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = (x,y);\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = (x,y);\\\"}\"}" + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const x = (x,y);\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const x = (x,y);\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 11 col_stop: 16 - path: test + path: "" content: "const x = (x,y);" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 16 - path: test + path: "" content: "const x = (x,y);" - Definition: declaration_type: Const variable_names: - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = x();\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const x = x();\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 7 col_stop: 8 - path: test + path: "" content: const x = x(); type_: ~ value: Call: function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = x();\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const x = x();\\\"}\"}" arguments: [] span: line_start: 1 line_stop: 1 col_start: 11 col_stop: 14 - path: test + path: "" content: const x = x(); span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: const x = x(); - Definition: declaration_type: Let variable_names: - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = expr;\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x: u32 = expr;\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: "let x: u32 = expr;" type_: IntegerType: U32 value: - Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = expr;\\\"}\"}" + Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":18,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x: u32 = expr;\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 18 - path: test + path: "" content: "let x: u32 = expr;" - Definition: declaration_type: Let variable_names: - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = ();\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x: u32 = ();\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: "let x: u32 = ();" type_: IntegerType: U32 @@ -347,150 +347,150 @@ outputs: line_stop: 1 col_start: 14 col_stop: 16 - path: test + path: "" content: "let x: u32 = ();" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 16 - path: test + path: "" content: "let x: u32 = ();" - Definition: declaration_type: Let variable_names: - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = x+y;\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x: u32 = x+y;\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: "let x: u32 = x+y;" type_: IntegerType: U32 value: Binary: left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = x+y;\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x: u32 = x+y;\\\"}\"}" right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = x+y;\\\"}\"}" + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x: u32 = x+y;\\\"}\"}" op: Add span: line_start: 1 line_stop: 1 col_start: 14 col_stop: 17 - path: test + path: "" content: "let x: u32 = x+y;" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 17 - path: test + path: "" content: "let x: u32 = x+y;" - Definition: declaration_type: Let variable_names: - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = (x,y);\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x: u32 = (x,y);\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: "let x: u32 = (x,y);" type_: IntegerType: U32 value: TupleInit: elements: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = (x,y);\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = (x,y);\\\"}\"}" + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x: u32 = (x,y);\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x: u32 = (x,y);\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 14 col_stop: 19 - path: test + path: "" content: "let x: u32 = (x,y);" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 19 - path: test + path: "" content: "let x: u32 = (x,y);" - Definition: declaration_type: Let variable_names: - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = x();\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x: u32 = x();\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 5 col_stop: 6 - path: test + path: "" content: "let x: u32 = x();" type_: IntegerType: U32 value: Call: function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = x();\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x: u32 = x();\\\"}\"}" arguments: [] span: line_start: 1 line_stop: 1 col_start: 14 col_stop: 17 - path: test + path: "" content: "let x: u32 = x();" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 17 - path: test + path: "" content: "let x: u32 = x();" - Definition: declaration_type: Const variable_names: - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = expr;\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const x: u32 = expr;\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 7 col_stop: 8 - path: test + path: "" content: "const x: u32 = expr;" type_: IntegerType: U32 value: - Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = expr;\\\"}\"}" + Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const x: u32 = expr;\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 20 - path: test + path: "" content: "const x: u32 = expr;" - Definition: declaration_type: Const variable_names: - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = ();\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const x: u32 = ();\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 7 col_stop: 8 - path: test + path: "" content: "const x: u32 = ();" type_: IntegerType: U32 @@ -502,167 +502,167 @@ outputs: line_stop: 1 col_start: 16 col_stop: 18 - path: test + path: "" content: "const x: u32 = ();" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 18 - path: test + path: "" content: "const x: u32 = ();" - Definition: declaration_type: Const variable_names: - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = x+y;\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const x: u32 = x+y;\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 7 col_stop: 8 - path: test + path: "" content: "const x: u32 = x+y;" type_: IntegerType: U32 value: Binary: left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = x+y;\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const x: u32 = x+y;\\\"}\"}" right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = x+y;\\\"}\"}" + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const x: u32 = x+y;\\\"}\"}" op: Add span: line_start: 1 line_stop: 1 col_start: 16 col_stop: 19 - path: test + path: "" content: "const x: u32 = x+y;" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 19 - path: test + path: "" content: "const x: u32 = x+y;" - Definition: declaration_type: Const variable_names: - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = (x,y);\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const x: u32 = (x,y);\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 7 col_stop: 8 - path: test + path: "" content: "const x: u32 = (x,y);" type_: IntegerType: U32 value: TupleInit: elements: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = (x,y);\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = (x,y);\\\"}\"}" + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const x: u32 = (x,y);\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const x: u32 = (x,y);\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 16 col_stop: 21 - path: test + path: "" content: "const x: u32 = (x,y);" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 21 - path: test + path: "" content: "const x: u32 = (x,y);" - Definition: declaration_type: Const variable_names: - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = x();\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const x: u32 = x();\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 7 col_stop: 8 - path: test + path: "" content: "const x: u32 = x();" type_: IntegerType: U32 value: Call: function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = x();\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const x: u32 = x();\\\"}\"}" arguments: [] span: line_start: 1 line_stop: 1 col_start: 16 col_stop: 19 - path: test + path: "" content: "const x: u32 = x();" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 19 - path: test + path: "" content: "const x: u32 = x();" - Definition: declaration_type: Let variable_names: - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = expr;\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x, y) = expr;\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 6 col_stop: 7 - path: test + path: "" content: "let (x, y) = expr;" - mutable: true - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = expr;\\\"}\"}" + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x, y) = expr;\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 9 col_stop: 10 - path: test + path: "" content: "let (x, y) = expr;" type_: ~ value: - Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = expr;\\\"}\"}" + Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":18,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x, y) = expr;\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 18 - path: test + path: "" content: "let (x, y) = expr;" - Definition: declaration_type: Let variable_names: - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = ();\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x, y) = ();\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 6 col_stop: 7 - path: test + path: "" content: "let (x, y) = ();" - mutable: true - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = ();\\\"}\"}" + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x, y) = ();\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 9 col_stop: 10 - path: test + path: "" content: "let (x, y) = ();" type_: ~ value: @@ -673,191 +673,191 @@ outputs: line_stop: 1 col_start: 14 col_stop: 16 - path: test + path: "" content: "let (x, y) = ();" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 16 - path: test + path: "" content: "let (x, y) = ();" - Definition: declaration_type: Let variable_names: - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = x+y;\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x, y) = x+y;\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 6 col_stop: 7 - path: test + path: "" content: "let (x, y) = x+y;" - mutable: true - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = x+y;\\\"}\"}" + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x, y) = x+y;\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 9 col_stop: 10 - path: test + path: "" content: "let (x, y) = x+y;" type_: ~ value: Binary: left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = x+y;\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x, y) = x+y;\\\"}\"}" right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = x+y;\\\"}\"}" + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x, y) = x+y;\\\"}\"}" op: Add span: line_start: 1 line_stop: 1 col_start: 14 col_stop: 17 - path: test + path: "" content: "let (x, y) = x+y;" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 17 - path: test + path: "" content: "let (x, y) = x+y;" - Definition: declaration_type: Let variable_names: - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = (x,y);\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x, y) = (x,y);\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 6 col_stop: 7 - path: test + path: "" content: "let (x, y) = (x,y);" - mutable: true - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = (x,y);\\\"}\"}" + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x, y) = (x,y);\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 9 col_stop: 10 - path: test + path: "" content: "let (x, y) = (x,y);" type_: ~ value: TupleInit: elements: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = (x,y);\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = (x,y);\\\"}\"}" + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x, y) = (x,y);\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x, y) = (x,y);\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 14 col_stop: 19 - path: test + path: "" content: "let (x, y) = (x,y);" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 19 - path: test + path: "" content: "let (x, y) = (x,y);" - Definition: declaration_type: Let variable_names: - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = x();\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x, y) = x();\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 6 col_stop: 7 - path: test + path: "" content: "let (x, y) = x();" - mutable: true - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = x();\\\"}\"}" + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x, y) = x();\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 9 col_stop: 10 - path: test + path: "" content: "let (x, y) = x();" type_: ~ value: Call: function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = x();\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x, y) = x();\\\"}\"}" arguments: [] span: line_start: 1 line_stop: 1 col_start: 14 col_stop: 17 - path: test + path: "" content: "let (x, y) = x();" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 17 - path: test + path: "" content: "let (x, y) = x();" - Definition: declaration_type: Const variable_names: - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = expr;\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const (x, y) = expr;\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 8 col_stop: 9 - path: test + path: "" content: "const (x, y) = expr;" - mutable: false - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = expr;\\\"}\"}" + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const (x, y) = expr;\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 11 col_stop: 12 - path: test + path: "" content: "const (x, y) = expr;" type_: ~ value: - Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = expr;\\\"}\"}" + Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const (x, y) = expr;\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 20 - path: test + path: "" content: "const (x, y) = expr;" - Definition: declaration_type: Const variable_names: - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = ();\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const (x, y) = ();\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 8 col_stop: 9 - path: test + path: "" content: "const (x, y) = ();" - mutable: false - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = ();\\\"}\"}" + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const (x, y) = ();\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 11 col_stop: 12 - path: test + path: "" content: "const (x, y) = ();" type_: ~ value: @@ -868,192 +868,192 @@ outputs: line_stop: 1 col_start: 16 col_stop: 18 - path: test + path: "" content: "const (x, y) = ();" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 18 - path: test + path: "" content: "const (x, y) = ();" - Definition: declaration_type: Const variable_names: - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = x+y;\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const (x, y) = x+y;\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 8 col_stop: 9 - path: test + path: "" content: "const (x, y) = x+y;" - mutable: false - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = x+y;\\\"}\"}" + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const (x, y) = x+y;\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 11 col_stop: 12 - path: test + path: "" content: "const (x, y) = x+y;" type_: ~ value: Binary: left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = x+y;\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const (x, y) = x+y;\\\"}\"}" right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = x+y;\\\"}\"}" + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const (x, y) = x+y;\\\"}\"}" op: Add span: line_start: 1 line_stop: 1 col_start: 16 col_stop: 19 - path: test + path: "" content: "const (x, y) = x+y;" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 19 - path: test + path: "" content: "const (x, y) = x+y;" - Definition: declaration_type: Const variable_names: - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = (x,y);\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const (x, y) = (x,y);\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 8 col_stop: 9 - path: test + path: "" content: "const (x, y) = (x,y);" - mutable: false - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = (x,y);\\\"}\"}" + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const (x, y) = (x,y);\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 11 col_stop: 12 - path: test + path: "" content: "const (x, y) = (x,y);" type_: ~ value: TupleInit: elements: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = (x,y);\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = (x,y);\\\"}\"}" + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const (x, y) = (x,y);\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const (x, y) = (x,y);\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 16 col_stop: 21 - path: test + path: "" content: "const (x, y) = (x,y);" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 21 - path: test + path: "" content: "const (x, y) = (x,y);" - Definition: declaration_type: Const variable_names: - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = x();\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const (x, y) = x();\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 8 col_stop: 9 - path: test + path: "" content: "const (x, y) = x();" - mutable: false - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = x();\\\"}\"}" + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const (x, y) = x();\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 11 col_stop: 12 - path: test + path: "" content: "const (x, y) = x();" type_: ~ value: Call: function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = x();\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const (x, y) = x();\\\"}\"}" arguments: [] span: line_start: 1 line_stop: 1 col_start: 16 col_stop: 19 - path: test + path: "" content: "const (x, y) = x();" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 19 - path: test + path: "" content: "const (x, y) = x();" - Definition: declaration_type: Let variable_names: - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = expr;\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x, y): u32 = expr;\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 6 col_stop: 7 - path: test + path: "" content: "let (x, y): u32 = expr;" - mutable: true - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = expr;\\\"}\"}" + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x, y): u32 = expr;\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 9 col_stop: 10 - path: test + path: "" content: "let (x, y): u32 = expr;" type_: IntegerType: U32 value: - Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":19,\\\"col_stop\\\":23,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = expr;\\\"}\"}" + Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":19,\\\"col_stop\\\":23,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x, y): u32 = expr;\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 23 - path: test + path: "" content: "let (x, y): u32 = expr;" - Definition: declaration_type: Let variable_names: - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = ();\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x, y): u32 = ();\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 6 col_stop: 7 - path: test + path: "" content: "let (x, y): u32 = ();" - mutable: true - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = ();\\\"}\"}" + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x, y): u32 = ();\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 9 col_stop: 10 - path: test + path: "" content: "let (x, y): u32 = ();" type_: IntegerType: U32 @@ -1065,195 +1065,195 @@ outputs: line_stop: 1 col_start: 19 col_stop: 21 - path: test + path: "" content: "let (x, y): u32 = ();" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 21 - path: test + path: "" content: "let (x, y): u32 = ();" - Definition: declaration_type: Let variable_names: - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = x+y;\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x, y): u32 = x+y;\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 6 col_stop: 7 - path: test + path: "" content: "let (x, y): u32 = x+y;" - mutable: true - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = x+y;\\\"}\"}" + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x, y): u32 = x+y;\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 9 col_stop: 10 - path: test + path: "" content: "let (x, y): u32 = x+y;" type_: IntegerType: U32 value: Binary: left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = x+y;\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x, y): u32 = x+y;\\\"}\"}" right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = x+y;\\\"}\"}" + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x, y): u32 = x+y;\\\"}\"}" op: Add span: line_start: 1 line_stop: 1 col_start: 19 col_stop: 22 - path: test + path: "" content: "let (x, y): u32 = x+y;" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 22 - path: test + path: "" content: "let (x, y): u32 = x+y;" - Definition: declaration_type: Let variable_names: - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = (x,y);\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x, y): u32 = (x,y);\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 6 col_stop: 7 - path: test + path: "" content: "let (x, y): u32 = (x,y);" - mutable: true - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = (x,y);\\\"}\"}" + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x, y): u32 = (x,y);\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 9 col_stop: 10 - path: test + path: "" content: "let (x, y): u32 = (x,y);" type_: IntegerType: U32 value: TupleInit: elements: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = (x,y);\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = (x,y);\\\"}\"}" + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x, y): u32 = (x,y);\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x, y): u32 = (x,y);\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 19 col_stop: 24 - path: test + path: "" content: "let (x, y): u32 = (x,y);" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 24 - path: test + path: "" content: "let (x, y): u32 = (x,y);" - Definition: declaration_type: Let variable_names: - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = x();\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x, y): u32 = x();\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 6 col_stop: 7 - path: test + path: "" content: "let (x, y): u32 = x();" - mutable: true - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = x();\\\"}\"}" + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x, y): u32 = x();\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 9 col_stop: 10 - path: test + path: "" content: "let (x, y): u32 = x();" type_: IntegerType: U32 value: Call: function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = x();\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x, y): u32 = x();\\\"}\"}" arguments: [] span: line_start: 1 line_stop: 1 col_start: 19 col_stop: 22 - path: test + path: "" content: "let (x, y): u32 = x();" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 22 - path: test + path: "" content: "let (x, y): u32 = x();" - Definition: declaration_type: Const variable_names: - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = expr;\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const (x, y): u32 = expr;\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 8 col_stop: 9 - path: test + path: "" content: "const (x, y): u32 = expr;" - mutable: false - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = expr;\\\"}\"}" + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const (x, y): u32 = expr;\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 11 col_stop: 12 - path: test + path: "" content: "const (x, y): u32 = expr;" type_: IntegerType: U32 value: - Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":21,\\\"col_stop\\\":25,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = expr;\\\"}\"}" + Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":21,\\\"col_stop\\\":25,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const (x, y): u32 = expr;\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 25 - path: test + path: "" content: "const (x, y): u32 = expr;" - Definition: declaration_type: Const variable_names: - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = ();\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const (x, y): u32 = ();\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 8 col_stop: 9 - path: test + path: "" content: "const (x, y): u32 = ();" - mutable: false - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = ();\\\"}\"}" + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const (x, y): u32 = ();\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 11 col_stop: 12 - path: test + path: "" content: "const (x, y): u32 = ();" type_: IntegerType: U32 @@ -1265,163 +1265,163 @@ outputs: line_stop: 1 col_start: 21 col_stop: 23 - path: test + path: "" content: "const (x, y): u32 = ();" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 23 - path: test + path: "" content: "const (x, y): u32 = ();" - Definition: declaration_type: Const variable_names: - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = x+y;\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const (x, y): u32 = x+y;\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 8 col_stop: 9 - path: test + path: "" content: "const (x, y): u32 = x+y;" - mutable: false - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = x+y;\\\"}\"}" + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const (x, y): u32 = x+y;\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 11 col_stop: 12 - path: test + path: "" content: "const (x, y): u32 = x+y;" type_: IntegerType: U32 value: Binary: left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = x+y;\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const (x, y): u32 = x+y;\\\"}\"}" right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = x+y;\\\"}\"}" + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const (x, y): u32 = x+y;\\\"}\"}" op: Add span: line_start: 1 line_stop: 1 col_start: 21 col_stop: 24 - path: test + path: "" content: "const (x, y): u32 = x+y;" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 24 - path: test + path: "" content: "const (x, y): u32 = x+y;" - Definition: declaration_type: Const variable_names: - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = (x,y);\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const (x, y): u32 = (x,y);\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 8 col_stop: 9 - path: test + path: "" content: "const (x, y): u32 = (x,y);" - mutable: false - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = (x,y);\\\"}\"}" + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const (x, y): u32 = (x,y);\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 11 col_stop: 12 - path: test + path: "" content: "const (x, y): u32 = (x,y);" type_: IntegerType: U32 value: TupleInit: elements: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = (x,y);\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = (x,y);\\\"}\"}" + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const (x, y): u32 = (x,y);\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const (x, y): u32 = (x,y);\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 21 col_stop: 26 - path: test + path: "" content: "const (x, y): u32 = (x,y);" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 26 - path: test + path: "" content: "const (x, y): u32 = (x,y);" - Definition: declaration_type: Const variable_names: - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = x();\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const (x, y): u32 = x();\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 8 col_stop: 9 - path: test + path: "" content: "const (x, y): u32 = x();" - mutable: false - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = x();\\\"}\"}" + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const (x, y): u32 = x();\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 11 col_stop: 12 - path: test + path: "" content: "const (x, y): u32 = x();" type_: IntegerType: U32 value: Call: function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = x();\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const (x, y): u32 = x();\\\"}\"}" arguments: [] span: line_start: 1 line_stop: 1 col_start: 21 col_stop: 24 - path: test + path: "" content: "const (x, y): u32 = x();" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 24 - path: test + path: "" content: "const (x, y): u32 = x();" - Definition: declaration_type: Let variable_names: - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x,y,) = ();\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x,y,) = ();\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 6 col_stop: 7 - path: test + path: "" content: "let (x,y,) = ();" - mutable: true - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x,y,) = ();\\\"}\"}" + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x,y,) = ();\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 8 col_stop: 9 - path: test + path: "" content: "let (x,y,) = ();" type_: ~ value: @@ -1432,26 +1432,26 @@ outputs: line_stop: 1 col_start: 14 col_stop: 16 - path: test + path: "" content: "let (x,y,) = ();" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 16 - path: test + path: "" content: "let (x,y,) = ();" - Definition: declaration_type: Let variable_names: - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x,) = ();\\\"}\"}" + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x,) = ();\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 6 col_stop: 7 - path: test + path: "" content: "let (x,) = ();" type_: ~ value: @@ -1462,12 +1462,12 @@ outputs: line_stop: 1 col_start: 12 col_stop: 14 - path: test + path: "" content: "let (x,) = ();" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 14 - path: test + path: "" content: "let (x,) = ();" diff --git a/tests/expectations/parser/parser/statement/expression.leo.out b/tests/expectations/parser/parser/statement/expression.leo.out index f9542ff844..d03278d686 100644 --- a/tests/expectations/parser/parser/statement/expression.leo.out +++ b/tests/expectations/parser/parser/statement/expression.leo.out @@ -4,13 +4,13 @@ expectation: Pass outputs: - Expression: expression: - Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"expr;\\\"}\"}" + Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"expr;\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 5 - path: test + path: "" content: expr; - Expression: expression: @@ -21,74 +21,74 @@ outputs: line_stop: 1 col_start: 1 col_stop: 3 - path: test + path: "" content: (); span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 3 - path: test + path: "" content: (); - Expression: expression: Binary: left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x+y;\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x+y;\\\"}\"}" right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x+y;\\\"}\"}" + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x+y;\\\"}\"}" op: Add span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: x+y; span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: x+y; - Expression: expression: TupleInit: elements: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(x,y);\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(x,y);\\\"}\"}" + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"(x,y);\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"(x,y);\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: "(x,y);" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 6 - path: test + path: "" content: "(x,y);" - Expression: expression: Call: function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x();\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x();\\\"}\"}" arguments: [] span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: x(); span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 4 - path: test + path: "" content: x(); diff --git a/tests/expectations/parser/parser/statement/iteration.leo.out b/tests/expectations/parser/parser/statement/iteration.leo.out index 045effafff..93945a6d4a 100644 --- a/tests/expectations/parser/parser/statement/iteration.leo.out +++ b/tests/expectations/parser/parser/statement/iteration.leo.out @@ -3,7 +3,7 @@ namespace: ParseStatement expectation: Pass outputs: - Iteration: - variable: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"for x in 0..7 {}\\\"}\"}" + variable: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"for x in 0..7 {}\\\"}\"}" start: Value: Implicit: @@ -12,7 +12,7 @@ outputs: line_stop: 1 col_start: 10 col_stop: 11 - path: test + path: "" content: "for x in 0..7 {}" stop: Value: @@ -22,7 +22,7 @@ outputs: line_stop: 1 col_start: 13 col_stop: 14 - path: test + path: "" content: "for x in 0..7 {}" inclusive: false block: @@ -32,17 +32,17 @@ outputs: line_stop: 1 col_start: 15 col_stop: 17 - path: test + path: "" content: "for x in 0..7 {}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 17 - path: test + path: "" content: "for x in 0..7 {}" - Iteration: - variable: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"for x in 0..7 {\\\"}\"}" + variable: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"for x in 0..7 {\\\"}\"}" start: Value: Implicit: @@ -51,7 +51,7 @@ outputs: line_stop: 1 col_start: 10 col_stop: 11 - path: test + path: "" content: "for x in 0..7 {" stop: Value: @@ -61,7 +61,7 @@ outputs: line_stop: 1 col_start: 13 col_stop: 14 - path: test + path: "" content: "for x in 0..7 {" inclusive: false block: @@ -75,31 +75,31 @@ outputs: line_stop: 2 col_start: 8 col_stop: 10 - path: test + path: "" content: return (); span: line_start: 2 line_stop: 2 col_start: 1 col_stop: 10 - path: test + path: "" content: return (); span: line_start: 1 line_stop: 3 col_start: 15 col_stop: 2 - path: test + path: "" content: "for x in 0..7 {\n...\n}" span: line_start: 1 line_stop: 3 col_start: 1 col_stop: 2 - path: test + path: "" content: "for x in 0..7 {\n...\n}" - Iteration: - variable: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"for x in 0..99u8 {\\\"}\"}" + variable: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"for x in 0..99u8 {\\\"}\"}" start: Value: Implicit: @@ -108,7 +108,7 @@ outputs: line_stop: 1 col_start: 10 col_stop: 11 - path: test + path: "" content: "for x in 0..99u8 {" stop: Value: @@ -119,7 +119,7 @@ outputs: line_stop: 1 col_start: 13 col_stop: 17 - path: test + path: "" content: "for x in 0..99u8 {" inclusive: false block: @@ -133,31 +133,31 @@ outputs: line_stop: 2 col_start: 8 col_stop: 10 - path: test + path: "" content: return (); span: line_start: 2 line_stop: 2 col_start: 1 col_stop: 10 - path: test + path: "" content: return (); span: line_start: 1 line_stop: 3 col_start: 18 col_stop: 2 - path: test + path: "" content: "for x in 0..99u8 {\n...\n}" span: line_start: 1 line_stop: 3 col_start: 1 col_stop: 2 - path: test + path: "" content: "for x in 0..99u8 {\n...\n}" - Iteration: - variable: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"for x in 0..Self {\\\"}\"}" + variable: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"for x in 0..Self {\\\"}\"}" start: Value: Implicit: @@ -166,10 +166,10 @@ outputs: line_stop: 1 col_start: 10 col_stop: 11 - path: test + path: "" content: "for x in 0..Self {" stop: - Identifier: "{\"name\":\"Self\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":13,\\\"col_stop\\\":17,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"for x in 0..Self {\\\"}\"}" + Identifier: "{\"name\":\"Self\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":13,\\\"col_stop\\\":17,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"for x in 0..Self {\\\"}\"}" inclusive: false block: statements: @@ -182,26 +182,26 @@ outputs: line_stop: 2 col_start: 8 col_stop: 10 - path: test + path: "" content: return (); span: line_start: 2 line_stop: 2 col_start: 1 col_stop: 10 - path: test + path: "" content: return (); span: line_start: 1 line_stop: 3 col_start: 18 col_stop: 2 - path: test + path: "" content: "for x in 0..Self {\n...\n}" span: line_start: 1 line_stop: 3 col_start: 1 col_stop: 2 - path: test + path: "" content: "for x in 0..Self {\n...\n}" diff --git a/tests/expectations/parser/parser/statement/return.leo.out b/tests/expectations/parser/parser/statement/return.leo.out index 938e0d0efe..8fa07e1f42 100644 --- a/tests/expectations/parser/parser/statement/return.leo.out +++ b/tests/expectations/parser/parser/statement/return.leo.out @@ -4,13 +4,13 @@ expectation: Pass outputs: - Return: expression: - Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"return expr;\\\"}\"}" + Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"return expr;\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 12 - path: test + path: "" content: return expr; - Return: expression: @@ -21,14 +21,14 @@ outputs: line_stop: 1 col_start: 8 col_stop: 10 - path: test + path: "" content: return (); span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: return (); - Return: expression: @@ -39,56 +39,56 @@ outputs: line_stop: 1 col_start: 8 col_stop: 10 - path: test + path: "" content: return (); span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 10 - path: test + path: "" content: return (); - Return: expression: Binary: left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"return x+y;\\\"}\"}" + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"return x+y;\\\"}\"}" right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"return x+y;\\\"}\"}" + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"return x+y;\\\"}\"}" op: Add span: line_start: 1 line_stop: 1 col_start: 8 col_stop: 11 - path: test + path: "" content: return x+y; span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 11 - path: test + path: "" content: return x+y; - Return: expression: TupleInit: elements: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"return (x,y);\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"return (x,y);\\\"}\"}" + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"return (x,y);\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"return (x,y);\\\"}\"}" span: line_start: 1 line_stop: 1 col_start: 8 col_stop: 13 - path: test + path: "" content: "return (x,y);" span: line_start: 1 line_stop: 1 col_start: 1 col_stop: 13 - path: test + path: "" content: "return (x,y);" - Return: expression: @@ -99,12 +99,12 @@ outputs: line_stop: 2 col_start: 1 col_stop: 2 - path: test + path: "" content: 5; span: line_start: 1 line_stop: 2 col_start: 1 col_stop: 2 - path: test + path: "" content: "return\n5;" From d0d12033818d6ff3dc2deec70558fc2ac5832174 Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Thu, 12 Aug 2021 04:11:16 -0700 Subject: [PATCH 31/58] use test all features again just pass --all --- .github/workflows/ci.yml | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2e6207a5ed..546d80ee04 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,14 +92,15 @@ jobs: - name: Start sccache server run: | sccache --start-server + + - name: Install cargo-all-features + run: | + cargo install cargo-all-features - name: Test - uses: actions-rs/cargo@v1 - with: - command: test - args: --all --features ci_skip -- --nocapture - env: - CARGO_INCREMENTAL: "0" + run: | + cd package + cargo test-all-features --all - name: Print sccache stats run: sccache --show-stats @@ -159,11 +160,17 @@ jobs: run: | sccache --start-server + - name: Install cargo-all-features + run: | + SDKROOT=$(xcrun -sdk macosx11.1 --show-sdk-path) \ + MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx11.1 --show-sdk-platform-version) \ + cargo install cargo-all-features + - name: Test run: | SDKROOT=$(xcrun -sdk macosx11.1 --show-sdk-path) \ MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx11.1 --show-sdk-platform-version) \ - cd package && cargo test --all -- --nocapture + cd package && cargo test-all-features --all - name: Print sccache stats run: sccache --show-stats @@ -299,7 +306,7 @@ jobs: uses: actions-rs/cargo@v1 with: command: test - args: --all --features ci_skip -- --nocapture + args: --all --features ci_skip env: CARGO_INCREMENTAL: "0" From e69e81110e26496ce658ce90009e07125f09b7a1 Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Thu, 12 Aug 2021 04:44:45 -0700 Subject: [PATCH 32/58] debug windows ci this time --- .github/workflows/ci.yml | 6 ++---- compiler/src/test.rs | 10 ++++++++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 546d80ee04..b733fda941 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -98,9 +98,7 @@ jobs: cargo install cargo-all-features - name: Test - run: | - cd package - cargo test-all-features --all + run: cargo test-all-features --all - name: Print sccache stats run: sccache --show-stats @@ -170,7 +168,7 @@ jobs: run: | SDKROOT=$(xcrun -sdk macosx11.1 --show-sdk-path) \ MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx11.1 --show-sdk-platform-version) \ - cd package && cargo test-all-features --all + cargo test-all-features --all - name: Print sccache stats run: sccache --show-stats diff --git a/compiler/src/test.rs b/compiler/src/test.rs index 244fa58961..0a445757b8 100644 --- a/compiler/src/test.rs +++ b/compiler/src/test.rs @@ -226,6 +226,16 @@ impl Namespace for CompileNamespace { .unwrap_or_else(|_| "Error converting ast to string.".to_string()), ); + if test.name == "string_transformation" { + println!( + "{}", + Ast::from_json_file("/tmp/output/initial_ast.json".into()) + .unwrap_or_else(|_| Ast::new(Program::new("Error reading initial theorem.".to_string()))) + .to_json_string() + .unwrap_or_else(|_| "Error converting ast to string.".to_string()), + ); + } + if std::fs::read_dir("/tmp/output").is_ok() { std::fs::remove_dir_all(std::path::Path::new("/tmp/output")).expect("Error failed to clean up output dir."); } From e9ffacda41a469c730cdc6ca4e3f85dfba53f44c Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Thu, 12 Aug 2021 09:11:54 -0700 Subject: [PATCH 33/58] difference is CRLF vs LF somehow --- .gitattributes | 4 ++++ .github/workflows/ci.yml | 9 ++++----- 2 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000..97f135a24d --- /dev/null +++ b/.gitattributes @@ -0,0 +1,4 @@ +# Force certain filse to be LF +*.leo text eol=lf +*.out text eol=lf +*.rs text eol=lf diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b733fda941..a55d8e3123 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -93,12 +93,11 @@ jobs: run: | sccache --start-server - - name: Install cargo-all-features - run: | - cargo install cargo-all-features - - name: Test - run: cargo test-all-features --all + uses: actions-rs/cargo@v1 + with: + command: test + args: --all --features ci_skip - name: Print sccache stats run: sccache --show-stats From eaa4151f1643ed30c0b51b430ea854f40f40369f Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Thu, 12 Aug 2021 09:51:00 -0700 Subject: [PATCH 34/58] now its just mac release list failing --- .gitattributes | 2 +- compiler/src/test.rs | 10 ---------- leo/commands/update.rs | 4 ++-- leo/updater.rs | 2 +- 4 files changed, 4 insertions(+), 14 deletions(-) diff --git a/.gitattributes b/.gitattributes index 97f135a24d..2168b7bfd2 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,4 @@ -# Force certain filse to be LF +# Force certain files to be LF *.leo text eol=lf *.out text eol=lf *.rs text eol=lf diff --git a/compiler/src/test.rs b/compiler/src/test.rs index 0a445757b8..244fa58961 100644 --- a/compiler/src/test.rs +++ b/compiler/src/test.rs @@ -226,16 +226,6 @@ impl Namespace for CompileNamespace { .unwrap_or_else(|_| "Error converting ast to string.".to_string()), ); - if test.name == "string_transformation" { - println!( - "{}", - Ast::from_json_file("/tmp/output/initial_ast.json".into()) - .unwrap_or_else(|_| Ast::new(Program::new("Error reading initial theorem.".to_string()))) - .to_json_string() - .unwrap_or_else(|_| "Error converting ast to string.".to_string()), - ); - } - if std::fs::read_dir("/tmp/output").is_ok() { std::fs::remove_dir_all(std::path::Path::new("/tmp/output")).expect("Error failed to clean up output dir."); } diff --git a/leo/commands/update.rs b/leo/commands/update.rs index c434027778..a8f3ff5fbc 100644 --- a/leo/commands/update.rs +++ b/leo/commands/update.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use crate::{commands::Command, config::Config, context::Context, updater::Updater}; -use leo_errors::{CliError, Result}; +use leo_errors::Result; use structopt::StructOpt; use tracing::span::Span; @@ -61,7 +61,7 @@ impl Command for Update { fn apply(self, _: Context, _: Self::Input) -> Result { // If --list is passed, list all available versions and return. if self.list { - return Ok(Updater::show_available_releases().map_err(CliError::could_not_fetch_versions)?); + return Updater::show_available_releases(); } // Handles enabling and disabling automatic updates in the config file. diff --git a/leo/updater.rs b/leo/updater.rs index b54b3cdfc2..d86f1eb2e1 100644 --- a/leo/updater.rs +++ b/leo/updater.rs @@ -36,7 +36,7 @@ impl Updater { .build() .map_err(CliError::self_update_error)? .fetch() - .map_err(CliError::self_update_error)?; + .map_err(CliError::could_not_fetch_versions)?; let mut output = "\nList of available versions\n".to_string(); for release in releases { From 8ca3ab465e4bd2b4b5b4e3a34b0139c9154a08a3 Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Fri, 13 Aug 2021 10:48:38 -0700 Subject: [PATCH 35/58] circleci updated rust version --- .circleci/config.yml | 26 +++++++++++++------------- asg-passes/src/lib.rs | 3 +-- asg/src/lib.rs | 3 +-- ast/src/lib.rs | 3 +-- compiler/src/lib.rs | 3 +-- errors/src/lib.rs | 3 +-- imports/src/lib.rs | 3 +-- input/src/lib.rs | 3 +-- leo/lib.rs | 3 +-- package/src/lib.rs | 3 +-- parser/src/lib.rs | 3 +-- state/src/lib.rs | 3 +-- synthesizer/src/lib.rs | 3 +-- test-framework/src/lib.rs | 3 +-- 14 files changed, 26 insertions(+), 39 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0bb6141c07..eb801f834d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -46,7 +46,7 @@ commands: jobs: check-style: docker: - - image: cimg/rust:1.53.0 + - image: cimg/rust:1.54.0 resource_class: xlarge steps: - checkout @@ -61,7 +61,7 @@ jobs: clippy: docker: - - image: cimg/rust:1.53.0 + - image: cimg/rust:1.54.0 resource_class: xlarge steps: - checkout @@ -76,7 +76,7 @@ jobs: # code-cov: # docker: - # - image: cimg/rust:1.53.0.0 + # - image: cimg/rust:1.54.0 # resource_class: xlarge # environment: # RUSTC_BOOTSTRAP: 1 @@ -118,7 +118,7 @@ jobs: leo-executable: docker: - - image: cimg/rust:1.53.0 + - image: cimg/rust:1.54.0 resource_class: xlarge steps: - checkout @@ -136,7 +136,7 @@ jobs: leo-new: docker: - - image: cimg/rust:1.53.0 + - image: cimg/rust:1.54.0 resource_class: xlarge steps: - attach_workspace: @@ -149,7 +149,7 @@ jobs: leo-init: docker: - - image: cimg/rust:1.53.0 + - image: cimg/rust:1.54.0 resource_class: xlarge steps: - attach_workspace: @@ -162,7 +162,7 @@ jobs: leo-clean: docker: - - image: cimg/rust:1.53.0 + - image: cimg/rust:1.54.0 resource_class: xlarge steps: - attach_workspace: @@ -175,7 +175,7 @@ jobs: leo-setup: docker: - - image: cimg/rust:1.53.0 + - image: cimg/rust:1.54.0 resource_class: xlarge steps: - attach_workspace: @@ -188,7 +188,7 @@ jobs: leo-add-remove: docker: - - image: cimg/rust:1.53.0 + - image: cimg/rust:1.54.0 resource_class: xlarge steps: - attach_workspace: @@ -201,7 +201,7 @@ jobs: leo-check-constraints: docker: - - image: cimg/rust:1.53.0 + - image: cimg/rust:1.54.0 resource_class: xlarge steps: - attach_workspace: @@ -214,7 +214,7 @@ jobs: leo-login-logout: docker: - - image: cimg/rust:1.53.0 + - image: cimg/rust:1.54.0 resource_class: xlarge steps: - attach_workspace: @@ -227,7 +227,7 @@ jobs: leo-clone: docker: - - image: cimg/rust:1.53.0 + - image: cimg/rust:1.54.0 resource_class: xlarge steps: - attach_workspace: @@ -240,7 +240,7 @@ jobs: leo-publish: docker: - - image: cimg/rust:1.53.0 + - image: cimg/rust:1.54.0 resource_class: xlarge steps: - attach_workspace: diff --git a/asg-passes/src/lib.rs b/asg-passes/src/lib.rs index 4703e4242e..1904bf782d 100644 --- a/asg-passes/src/lib.rs +++ b/asg-passes/src/lib.rs @@ -14,8 +14,7 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -// Re-enable when circleci supports rust 1.54.0. -// #![doc = include_str!("../README.md")] +#![doc = include_str!("../README.md")] pub mod constant_folding; pub use constant_folding::*; diff --git a/asg/src/lib.rs b/asg/src/lib.rs index ad8ca9f304..ecb5702ab6 100644 --- a/asg/src/lib.rs +++ b/asg/src/lib.rs @@ -24,8 +24,7 @@ #![allow(clippy::from_over_into)] #![allow(clippy::result_unit_err)] -// Re-enable when circleci supports rust 1.54.0. -// #![doc = include_str!("../README.md")] +#![doc = include_str!("../README.md")] pub mod checks; pub use checks::*; diff --git a/ast/src/lib.rs b/ast/src/lib.rs index d1367a89b8..58a45a6677 100644 --- a/ast/src/lib.rs +++ b/ast/src/lib.rs @@ -20,8 +20,7 @@ //! The [`Ast`] type is intended to be parsed and modified by different passes //! of the Leo compiler. The Leo compiler can generate a set of R1CS constraints from any [`Ast`]. -// Re-enable when circleci supports rust 1.54.0. -// #![doc = include_str!("../README.md")] +#![doc = include_str!("../README.md")] pub mod annotation; pub use self::annotation::*; diff --git a/compiler/src/lib.rs b/compiler/src/lib.rs index e96d936a19..7153205c81 100644 --- a/compiler/src/lib.rs +++ b/compiler/src/lib.rs @@ -21,8 +21,7 @@ #![allow(clippy::module_inception)] #![allow(clippy::upper_case_acronyms)] -// Re-enable when circleci supports rust 1.54.0. -// #![doc = include_str!("../README.md")] +#![doc = include_str!("../README.md")] pub mod compiler; diff --git a/errors/src/lib.rs b/errors/src/lib.rs index bb78eb0289..e4046d2c7c 100644 --- a/errors/src/lib.rs +++ b/errors/src/lib.rs @@ -15,8 +15,7 @@ // along with the Leo library. If not, see . #![deny(clippy::all, clippy::missing_docs_in_private_items)] -// Re-enable when circleci supports rust 1.54.0. -// #![doc = include_str!("../README.md")] +#![doc = include_str!("../README.md")] //! `leo-errors` crate. diff --git a/imports/src/lib.rs b/imports/src/lib.rs index f575b7fa91..cc7e046520 100644 --- a/imports/src/lib.rs +++ b/imports/src/lib.rs @@ -15,8 +15,7 @@ // along with the Leo library. If not, see . #![allow(clippy::from_over_into)] -// Re-enable when circleci supports rust 1.54.0. -// #![doc = include_str!("../README.md")] +#![doc = include_str!("../README.md")] pub mod parser; pub use self::parser::*; diff --git a/input/src/lib.rs b/input/src/lib.rs index 75a8a45ab8..1b73fdb778 100644 --- a/input/src/lib.rs +++ b/input/src/lib.rs @@ -14,8 +14,7 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -// Re-enable when circleci supports rust 1.54.0. -// #![doc = include_str!("../README.md")] +#![doc = include_str!("../README.md")] #[macro_use] extern crate pest_derive; diff --git a/leo/lib.rs b/leo/lib.rs index 3a730c0f4e..6c0c3470b2 100644 --- a/leo/lib.rs +++ b/leo/lib.rs @@ -14,8 +14,7 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -// Re-enable when circleci supports rust 1.54.0. -// #![doc = include_str!("../README.md")] +#![doc = include_str!("../README.md")] pub mod api; pub mod commands; diff --git a/package/src/lib.rs b/package/src/lib.rs index 4353e74b31..aa8a7f082a 100644 --- a/package/src/lib.rs +++ b/package/src/lib.rs @@ -14,8 +14,7 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -// Re-enable when circleci supports rust 1.54.0. -// #![doc = include_str!("../README.md")] +#![doc = include_str!("../README.md")] pub mod imports; pub mod inputs; diff --git a/parser/src/lib.rs b/parser/src/lib.rs index 88e23bb1b8..7b1a0d83aa 100644 --- a/parser/src/lib.rs +++ b/parser/src/lib.rs @@ -20,8 +20,7 @@ //! method to create a new program ast. #![allow(clippy::vec_init_then_push)] -// Re-enable when circleci supports rust 1.54.0. -// #![doc = include_str!("../README.md")] +#![doc = include_str!("../README.md")] pub(crate) mod tokenizer; pub use tokenizer::KEYWORD_TOKENS; diff --git a/state/src/lib.rs b/state/src/lib.rs index 6778312f1d..88531a4873 100644 --- a/state/src/lib.rs +++ b/state/src/lib.rs @@ -16,8 +16,7 @@ #![allow(clippy::module_inception)] #![allow(clippy::upper_case_acronyms)] -// Re-enable when circleci supports rust 1.54.0. -// #![doc = include_str!("../README.md")] +#![doc = include_str!("../README.md")] pub mod local_data_commitment; pub use self::local_data_commitment::*; diff --git a/synthesizer/src/lib.rs b/synthesizer/src/lib.rs index 542e05f6c3..36396dd78e 100644 --- a/synthesizer/src/lib.rs +++ b/synthesizer/src/lib.rs @@ -14,8 +14,7 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -// Re-enable when circleci supports rust 1.54.0. -// #![doc = include_str!("../README.md")] +#![doc = include_str!("../README.md")] pub mod circuit_synthesizer; pub use self::circuit_synthesizer::*; diff --git a/test-framework/src/lib.rs b/test-framework/src/lib.rs index aa000235be..86115089ca 100644 --- a/test-framework/src/lib.rs +++ b/test-framework/src/lib.rs @@ -22,8 +22,7 @@ //! To regenerate the tests after a syntax change or failing test, delete the [`tests/expectations/`] //! directory and run the [`parser_tests()`] test in [`parser/src/test.rs`]. -// Re-enable when circleci supports rust 1.54.0. -// #![doc = include_str!("../README.md")] +#![doc = include_str!("../README.md")] pub mod error; From f65fff602f84e6debe7d7c1cc293525522cc2fba Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Fri, 13 Aug 2021 11:35:48 -0700 Subject: [PATCH 36/58] clippy fix, tyring to debug cli upadte on osx --- compiler/src/lib.rs | 1 - errors/src/cli/cli_errors.rs | 8 ++++++++ leo/updater.rs | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/compiler/src/lib.rs b/compiler/src/lib.rs index 7153205c81..d020bfb780 100644 --- a/compiler/src/lib.rs +++ b/compiler/src/lib.rs @@ -20,7 +20,6 @@ #![allow(clippy::module_inception)] #![allow(clippy::upper_case_acronyms)] - #![doc = include_str!("../README.md")] pub mod compiler; diff --git a/errors/src/cli/cli_errors.rs b/errors/src/cli/cli_errors.rs index 7a2d3cf1dd..09a060439b 100644 --- a/errors/src/cli/cli_errors.rs +++ b/errors/src/cli/cli_errors.rs @@ -364,6 +364,14 @@ create_errors!( help: None, } + /// For when the CLI fails to self update. + @backtraced + self_update_build_error { + args: (error: impl ErrorArg), + msg: format!("self update crate failed to build Error: {}", error), + help: None, + } + /// For when the CLI has an old release version. @backtraced old_release_version { diff --git a/leo/updater.rs b/leo/updater.rs index d86f1eb2e1..cce14d3e58 100644 --- a/leo/updater.rs +++ b/leo/updater.rs @@ -60,7 +60,7 @@ impl Updater { .no_confirm(true) .show_output(show_output) .build() - .map_err(CliError::self_update_error)? + .map_err(CliError::self_update_build_error)? .update() .map_err(CliError::self_update_error)?; From f1384787eedb8b92736987f22c658f990614c2c5 Mon Sep 17 00:00:00 2001 From: Alessandro Coglio Date: Fri, 13 Aug 2021 12:00:19 -0700 Subject: [PATCH 37/58] [RFC] Initial proposal for native functions. --- docs/rfc/010-native-functions.md | 195 +++++++++++++++++++++++++++++++ 1 file changed, 195 insertions(+) create mode 100644 docs/rfc/010-native-functions.md diff --git a/docs/rfc/010-native-functions.md b/docs/rfc/010-native-functions.md new file mode 100644 index 0000000000..3760e5478b --- /dev/null +++ b/docs/rfc/010-native-functions.md @@ -0,0 +1,195 @@ +# Leo RFC 010: Native Functions + +## Authors + +- Max Bruce +- Collin Chin +- Alessandro Coglio +- Eric McCarthy +- Jon Pavlik +- Damir Shamanaev +- Damon Sicore +- Howard Wu + +## Status + +DRAFT + +# Summary + +This RFC proposes an approach to handling natively implemented functions ('native functions', for short) in Leo, +that is functions implemented not via Leo code but (in essence) via Rust code. +Currently there is just one such function, namely BLAKE2s. +The scope of this proposal is limited to native functions defined by the developers of Leo itself, +not by users of Leo (i.e. developers of applications written in Leo). + +The approach proposed here is to allow (global and member) Leo functions to have no defining bodies, +in which case they are regarded as natively implemented; +this is only allowed in Leo files that contain standard/core libraries, provided with the Leo toolchain. +Most of the compiler can work essentially in the same way as it does now; +at R1CS generation time, native functions must be recognized, and turned into the known gadgets that implement them. + +# Motivation + +Many languages support native functions (here we generically use 'functions' to also denote methods), +where 'native' refers to the fact that the functions are implemented not in the language under consideration, +but rather in the language used to implement the language under consideration. +For instance, Java supports native methods that are implemented in C rather than Java. + +There are two main reasons for native functions in programming languages: +1. The functionality cannot be expressed at all in the language under consideration, + e.g. Java has no constructs to print on screen, making a native implementation necessary. +2. The functionality can be realized more efficiently in the native language. + +The first reason above may not apply to Leo, at least currently, +as Leo's intended use is mainly for "pure computations" rather than interactions with the external world. +However, we note that console statements could be regarded as native functions (as opposed to "ad hoc" statements), +and this may be in fact the path to pursue if we extend the scope of console features (e.g. even to full GUIs), +as has been recently proposed (we emphasize that the console code is not meant to be compiled to R1CS). + +The second reason above applies to Leo right now. +While there is currently just one native function supported in Leo, namely BLAKE2s, +it is conceivable that there may be other cryptographic (or non-cryptographic) functions +for which hand-crafted R1CS gadgets are available +that are more efficient than what the Leo compiler would generate if their functionality were written in Leo. +While we will continue working towards making the Leo compiler better, +and perhaps eventually capable to generate R1CS whose efficiency is competitive with hand-crafted gadgets, +this will take time, and in the meanwhile new and more native functions may be added, +resulting in a sort of arms race. +In other words, it is conceivable that Leo will need to support native functions in the foreseeable future. + +Languages typically come with standard/core libraries that application developers can readily use. +Even though the Leo standard/core libraries are currently limited (perhaps just to BLAKE2s), +it seems likely that we will want to provide more extensive standard/core libraries, +not just for cryptographic functions, but also for data structures and operations on them. + +The just mentioned use case of data structures brings about an important point. +Leo circuit types are reasonable ways to provide library data structures, +as they support static and instance member functions that realize operations on those data structures. +Just like some Java library classes provide a mix of native and non-native methods, +we could imagine certain Leo library circuit types providing a mix of native and non-native member functions, e.g.: +```ts +circuit Point2D { + x: u32; + y: u32; + function origin() -> Point2D { ... } // probably non-native + function move(mut self, delta_x: u32, delta_y: u32) { ... } // probably non-native + function distance(self, other:Point2D); // maybe native (involves square root) +} +``` + +Our initial motivation for naive functions is limited to Leo standard/core libraries, +not to user-defined libraries or applications. +That is, only the developers of the Leo language will be able to create native functions. +Leo users, i.e. developers of Leo applications, will be able to use the provided native functions, +but not to create their own. +If support for user-defined native functions may become desired in the future, it will be discussed in a separate RFC. + +# Design + +## Background + +### Current Approach to Native Functions + +The BLAKE2s native function is currently implemented as follows (as a high-level view): +1. Prior to type checking/inference, its declaration (without a defining body) + is programmatically added to the program under consideration. + This way, the input and output types of the BLAKE2s function can be used to type-check code that calls it. +2. At R1CS generation time, when the BLAKE2s function is compiled, it is recognized as native and, + instead of translating its body to R1CS (which is not possible as the function has no Leo body), + a known BLAKE2s gadget is used. + +This approach is fine for a single native function, but may not be the best for a richer collection of native functions. +In particular, consider the `Point2D` example above, which has a mix of native and non-native functions: +presumably, we would like to write at least the non-native functions of `Point2D` directly in a Leo file, +as opposed to programmatically generating them prior to type checking/inference. + +### Multi-File Compilation + +Leo already supports the compilation of multiple files that form a program, via packages and importing. +This capability is independent from native functions. + +We note that, for the purpose of type checking code that calls a function `f`, +the defining body of `f` is irrelevant: only the input and output types of `f` are relevant. +The defining body is of course type-checked when `f` itself is type-checked, +and furthermore the defining body is obviously needed to generate R1CS, +but the point here is that only the input and output types of `f` are needed to type-check code that calls `f`. +In particular, this means that, if a Leo file imports a package, +only the type information from the package is needed to type-check the file that imports the package. +Conceptually, each package exports a symbol table, used (and sufficient) to type-check files that import that package. + +## Proposal + +we propose to: +1. Allow declarations of (global and member) functions to have no defining body, signaling that the function is native. +2. Extend the AST and ASG to allow functions to have no bodies. +3. Have the compiler allow empty function bodies only in standard/core library files, which should be known. +4. Have type checking/inference "skip over" absent function bodies. +5. At R1CS generation time, when a function without body is encountered, find and use the known gadget for it. + +Currently the ABNF grammar requires function declarations to have a defining body (a block), i.e. to be implemented in Leo: +``` +function-declaration = *annotation %s"function" identifier + "(" [ function-parameters ] ")" [ "->" type ] + block +``` +We propose to relax the rule as follows: +``` +function-declaration = *annotation %s"function" identifier + "(" [ function-parameters ] ")" [ "->" type ] + ( block / ";" ) +``` +This allows a function declaration to have a terminating semicolon instead of a block. + +Since we do not have anything like abstract methods in Leo, this is a workable way to indicate native functions. +However, it is easy, if desired, to have a more promiment indication, such as a `native` keyword, or an annotation. + +It may be necessary to extend the AST and ASG to accommodate function bodies to be optional, +although this may be already the case for representing BLAKE2s in its current form described above. + +The compiler should know which files are part of the Leo standard/core libraries and which ones are not. +Functions without bodies will be only allowed to appear in those files. +It will be an error if any other file (e.g. user-defined) contains functions without bodies. +Type checking/inference may be where we make this check, or perhaps in some other phase. + +Because of the already existing support for multi-file compilation described above, +no essential change is needed in the compiler's type checking/inference. +We just need to make sure that functions without bodies are expected and properly handled +(i.e. their input and output types must be checked and added to the proper symbol tables, +but their absent bodies must be skipped); +this may already be the case, for the treatment of BLAKE2s described above. + +The main change is in R1CS generation. +Normally, when a function definition is encountered, its Leo body is translated to R1CS. +For a native function, we need to find and use a known gadget instead. +The compiler must know a mapping from native functions in the standard/core libraries +to the R1CS gadgets that implement them, so it should be just a matter of selecting the appropriate one. +Some of this logic must be already present, in order to detect and select the BLAkE2s gadget. + +# Drawbacks + +This does not seem to bring any drawbacks. +A capability for native functions (for BLAKE2s) already exists; +this RFC proposes a way to make it more flexible, +with mild (and likely simplifying) changes to the compiler. + +# Effect on Ecosystem + +This should help support richer standard/core libraries for Leo. + +# Alternatives + +Instead of storing declarations of native functions in standard/core files as proposed above, +we could programmatically generate them as currently done for BLAKE2s. +Macros may be used to generate families of similar function declarations. + +However, consider `Point2D` above, which has a mix or native and non-native functions. +One approach is to programmatically generate the whole `Point2D` declarative, +with both native and non-native functions. +But it seems that a Leo file would be clearer and more maintainable than a Rust string in the compiler. +We could think of splitting the non-native and native functions of `Point2D`: +the former in a Leo file, and the latter programmatically added. +Again, this looks more complicated than just declaring native funcions in Leo files. + +In summary, accommodating native functions in Leo standard/core file +should be doable with mild and possibly simplifying changes to the current Leo compiler. From 04e8ccc9e69bdcfea142d64bf67d7d8bc56cb778 Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Fri, 13 Aug 2021 15:06:04 -0700 Subject: [PATCH 38/58] error code fixes --- errors/src/asg/asg_errors.rs | 6 +++--- errors/src/ast/ast_errors.rs | 2 +- errors/src/common/backtraced.rs | 4 ++-- errors/src/common/formatted.rs | 4 ++-- errors/src/compiler/compiler_errors.rs | 2 +- errors/src/import/import_errors.rs | 2 +- errors/src/lib.rs | 2 -- errors/src/package/package_errors.rs | 2 +- errors/src/parser/parser_errors.rs | 2 +- errors/src/state/state_errors.rs | 2 +- leo/main.rs | 2 +- 11 files changed, 14 insertions(+), 16 deletions(-) diff --git a/errors/src/asg/asg_errors.rs b/errors/src/asg/asg_errors.rs index 5875864901..c3076b243d 100644 --- a/errors/src/asg/asg_errors.rs +++ b/errors/src/asg/asg_errors.rs @@ -21,7 +21,7 @@ use std::fmt::{Debug, Display}; create_errors!( /// AsgError enum that represents all the errors for the `leo-asg` crate. AsgError, - exit_code_mask: 0i32, + exit_code_mask: 3000i32, error_code_prefix: "ASG", /// For when a circuit of the specified type is unresolved. @@ -408,7 +408,7 @@ create_errors!( @formatted unexpected_big_self { args: (), - msg: "received a Self statement, which should never happen", - help: None, + msg: "received a Self statement, which should never happen.", + help: Some("Something went wrong during canonicalization, or you ran the ASG uncanonicalized AST.".to_string()), } ); diff --git a/errors/src/ast/ast_errors.rs b/errors/src/ast/ast_errors.rs index 5ee5ceb975..0d13ab94da 100644 --- a/errors/src/ast/ast_errors.rs +++ b/errors/src/ast/ast_errors.rs @@ -20,7 +20,7 @@ use std::{error::Error as ErrorArg, fmt::Debug}; create_errors!( /// AstError enum that represents all the errors for the `leo-ast` crate. AstError, - exit_code_mask: 1000i32, + exit_code_mask: 2000i32, error_code_prefix: "AST", /// For when the AST fails to be represented as a JSON string. diff --git a/errors/src/common/backtraced.rs b/errors/src/common/backtraced.rs index b26ec01298..e5a5320a1d 100644 --- a/errors/src/common/backtraced.rs +++ b/errors/src/common/backtraced.rs @@ -74,9 +74,9 @@ impl BacktracedError { pub fn exit_code(&self) -> i32 { let mut code: i32; if self.code_identifier > 99 { - code = self.code_identifier as i32 * 111_000; + code = self.code_identifier as i32 * 100_000; } else if self.code_identifier as i32 > 9 { - code = self.code_identifier as i32 * 11_000; + code = self.code_identifier as i32 * 10_000; } else { code = self.code_identifier as i32 * 1_000; } diff --git a/errors/src/common/formatted.rs b/errors/src/common/formatted.rs index 6d4f2f8abe..aaa0366b77 100644 --- a/errors/src/common/formatted.rs +++ b/errors/src/common/formatted.rs @@ -161,7 +161,7 @@ impl fmt::Display for FormattedError { let trace = printer .format_trace_to_string(&self.backtrace.backtrace) .map_err(|_| fmt::Error)?; - write!(f, "{}", trace)?; + write!(f, "\n{}", trace)?; } "full" => { let mut printer = BacktracePrinter::default(); @@ -170,7 +170,7 @@ impl fmt::Display for FormattedError { let trace = printer .format_trace_to_string(&self.backtrace.backtrace) .map_err(|_| fmt::Error)?; - write!(f, "{}", trace)?; + write!(f, "\n{}", trace)?; } _ => {} } diff --git a/errors/src/compiler/compiler_errors.rs b/errors/src/compiler/compiler_errors.rs index 95070ff3c9..c9663b5fc4 100644 --- a/errors/src/compiler/compiler_errors.rs +++ b/errors/src/compiler/compiler_errors.rs @@ -24,7 +24,7 @@ use std::{ create_errors!( /// CompilerError enum that represents all the errors for the `leo-compiler` crate. CompilerError, - exit_code_mask: 2000i32, + exit_code_mask: 7000i32, error_code_prefix: "CMP", /// For when the test function has invalid test context. diff --git a/errors/src/import/import_errors.rs b/errors/src/import/import_errors.rs index 5590b19bc6..16250f2b63 100644 --- a/errors/src/import/import_errors.rs +++ b/errors/src/import/import_errors.rs @@ -24,7 +24,7 @@ use std::{ create_errors!( /// ImportError enum that represents all the errors for the `leo-import` crate. ImportError, - exit_code_mask: 3000i32, + exit_code_mask: 4000i32, error_code_prefix: "IMP", /// For when an imported package has the same name as an imported core_package. diff --git a/errors/src/lib.rs b/errors/src/lib.rs index e4046d2c7c..27dc6be2c2 100644 --- a/errors/src/lib.rs +++ b/errors/src/lib.rs @@ -17,8 +17,6 @@ #![deny(clippy::all, clippy::missing_docs_in_private_items)] #![doc = include_str!("../README.md")] -//! `leo-errors` crate. - /// Contains the ASG error definitions. pub mod asg; pub use self::asg::*; diff --git a/errors/src/package/package_errors.rs b/errors/src/package/package_errors.rs index 973bd01bdd..fca8c663f8 100644 --- a/errors/src/package/package_errors.rs +++ b/errors/src/package/package_errors.rs @@ -24,7 +24,7 @@ use std::{ create_errors!( /// PackageError enum that represents all the errors for the `leo-package` crate. PackageError, - exit_code_mask: 4000i32, + exit_code_mask: 5000i32, error_code_prefix: "PAK", /// For when creating the imports directory failed. diff --git a/errors/src/parser/parser_errors.rs b/errors/src/parser/parser_errors.rs index 186cd7cec4..35f9b90cb5 100644 --- a/errors/src/parser/parser_errors.rs +++ b/errors/src/parser/parser_errors.rs @@ -21,7 +21,7 @@ use std::fmt::Display; create_errors!( /// ParserError enum that represents all the errors for the `leo-parser` crate. ParserError, - exit_code_mask: 5000i32, + exit_code_mask: 0000i32, error_code_prefix: "PAR", /// For when the parser encountered an unexpected token. diff --git a/errors/src/state/state_errors.rs b/errors/src/state/state_errors.rs index c5488f5493..97b948b82a 100644 --- a/errors/src/state/state_errors.rs +++ b/errors/src/state/state_errors.rs @@ -24,7 +24,7 @@ use std::{ create_errors!( /// StateError enum that represents all the errors for the `leo-state` crate. StateError, - exit_code_mask: 6000i32, + exit_code_mask: 1000i32, error_code_prefix: "STA", /// For when it cannot parse the state boolean value. diff --git a/leo/main.rs b/leo/main.rs index 38a25f722c..447c66550b 100644 --- a/leo/main.rs +++ b/leo/main.rs @@ -221,7 +221,7 @@ fn handle_error(res: Result) -> T { Ok(t) => t, Err(err) => { eprintln!("{}", err); - exit(err.exit_code()); + exit(dbg!(err.exit_code())); } } } From a3ef6a034215e5a5d5d876940aab35efe7203b32 Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Fri, 13 Aug 2021 15:57:17 -0700 Subject: [PATCH 39/58] more error message cleanup, and remove debug statement --- errors/src/common/backtraced.rs | 2 +- errors/src/common/formatted.rs | 2 +- leo/main.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/errors/src/common/backtraced.rs b/errors/src/common/backtraced.rs index e5a5320a1d..4d28bfe1b9 100644 --- a/errors/src/common/backtraced.rs +++ b/errors/src/common/backtraced.rs @@ -89,7 +89,7 @@ impl BacktracedError { impl fmt::Display for BacktracedError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let error_message = format!( - "Error: [E{error_type}{code_identifier:0>3}{exit_code:0>4}]: {message}", + "Error [E{error_type}{code_identifier:0>3}{exit_code:0>4}]: {message}", error_type = self.error_type, code_identifier = self.code_identifier, exit_code = self.exit_code, diff --git a/errors/src/common/formatted.rs b/errors/src/common/formatted.rs index aaa0366b77..ee7b88ab92 100644 --- a/errors/src/common/formatted.rs +++ b/errors/src/common/formatted.rs @@ -96,7 +96,7 @@ impl fmt::Display for FormattedError { let underlined = underline(self.span.col_start, self.span.col_stop); let error_message = format!( - "Error: [E{error_type}{code_identifier:0>3}{exit_code:0>4}]: {message}", + "Error [E{error_type}{code_identifier:0>3}{exit_code:0>4}]: {message}", error_type = self.backtrace.error_type, code_identifier = self.backtrace.code_identifier, exit_code = self.backtrace.exit_code, diff --git a/leo/main.rs b/leo/main.rs index 447c66550b..38a25f722c 100644 --- a/leo/main.rs +++ b/leo/main.rs @@ -221,7 +221,7 @@ fn handle_error(res: Result) -> T { Ok(t) => t, Err(err) => { eprintln!("{}", err); - exit(dbg!(err.exit_code())); + exit(err.exit_code()); } } } From 0702be2a1842d32f9997e524a98de088ab6b08ab Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Fri, 13 Aug 2021 16:12:54 -0700 Subject: [PATCH 40/58] regen error tests --- .../array/array_range_access_fail.leo.out | 2 +- .../array/array_size_zero_fail.leo.out | 2 +- .../array/input_nested_3x2_fail.leo.out | 2 +- .../array/multi_fail_initializer.leo.out | 2 +- .../compiler/array/multi_fail_inline.leo.out | 2 +- .../array/multi_initializer_fail.leo.out | 2 +- .../array/nested_3x2_value_fail.leo.out | 2 +- .../array/tuple_3x2_value_fail.leo.out | 2 +- .../compiler/compiler/array/type_fail.leo.out | 2 +- .../type_nested_value_nested_3x2_fail.leo.out | 2 +- ...ype_nested_value_nested_4x3x2_fail.leo.out | 2 +- .../type_nested_value_tuple_3x2_fail.leo.out | 2 +- ...type_nested_value_tuple_4x3x2_fail.leo.out | 2 +- .../type_tuple_value_nested_3x2_fail.leo.out | 2 +- ...type_tuple_value_nested_4x3x2_fail.leo.out | 2 +- .../type_tuple_value_tuple_3x2_fail.leo.out | 2 +- .../type_tuple_value_tuple_4x3x2_fail.leo.out | 2 +- .../array/variable_slice_fail.leo.out | 2 +- .../compiler/char/invalid_char.leo.out | 2 +- .../big_self_outside_circuit_fail.leo.out | 2 +- .../circuits/const_self_variable_fail.leo.out | 2 +- .../compiler/circuits/inline_fail.leo.out | 2 +- .../circuits/inline_member_fail.leo.out | 2 +- .../circuits/inline_undefined.leo.out | 2 +- .../circuits/member_function_fail.leo.out | 2 +- .../circuits/member_function_invalid.leo.out | 2 +- .../member_static_function_invalid.leo.out | 2 +- .../member_static_function_undefined.leo.out | 2 +- .../circuits/member_variable_fail.leo.out | 2 +- .../circuits/mut_function_fail.leo.out | 2 +- .../circuits/mut_self_function_fail.leo.out | 2 +- .../mut_self_static_function_fail.leo.out | 2 +- .../circuits/mut_self_variable_fail.leo.out | 2 +- .../circuits/mut_static_function_fail.leo.out | 2 +- .../circuits/mut_variable_fail.leo.out | 2 +- .../compiler/circuits/self_circuit.leo.out | 2 +- .../compiler/circuits/self_fail.leo.out | 2 +- .../circuits/self_member_invalid.leo.out | 2 +- .../circuits/self_member_undefined.leo.out | 2 +- .../compiler/console/log_fail.leo.out | 2 +- .../console/log_parameter_fail_empty.leo.out | 2 +- .../console/log_parameter_fail_none.leo.out | 2 +- .../log_parameter_fail_unknown.leo.out | 2 +- .../core/core_circuit_invalid.leo.out | 2 +- .../core/core_circuit_star_fail.leo.out | 2 +- .../core/core_package_invalid.leo.out | 2 +- .../core_unstable_package_invalid.leo.out | 2 +- .../field/no_space_between_literal.leo.out | 2 +- .../duplicate_definition_fail.leo.out | 2 +- .../function/multiple_returns_fail.leo.out | 2 +- .../multiple_returns_fail_conditional.leo.out | 2 +- .../function/return_array_nested_fail.leo.out | 2 +- .../function/return_array_tuple_fail.leo.out | 2 +- .../compiler/function/scope_fail.leo.out | 2 +- .../compiler/function/undefined.leo.out | 2 +- .../global_consts/modify_global_const.leo.out | 2 +- .../const_input_non_const.leo.out | 2 +- .../const_var_in_both_sections_fail.leo.out | 2 +- .../program_input/main_array_fail.leo.out | 2 +- .../program_input/main_tuple_fail.leo.out | 2 +- .../non_const_input_const.leo.out | 2 +- .../var_in_both_sections_fail.leo.out | 2 +- .../main_array_fail.leo.out | 2 +- .../main_tuple_fail.leo.out | 2 +- .../program_registers/registers_fail.leo.out | 2 +- .../compiler/integers/i128/max_fail.leo.out | 2 +- .../compiler/integers/i128/min_fail.leo.out | 2 +- .../i128/no_space_between_literal.leo.out | 2 +- .../compiler/integers/i16/max_fail.leo.out | 2 +- .../compiler/integers/i16/min_fail.leo.out | 2 +- .../i16/no_space_between_literal.leo.out | 2 +- .../compiler/integers/i32/max_fail.leo.out | 2 +- .../compiler/integers/i32/min_fail.leo.out | 2 +- .../i32/no_space_between_literal.leo.out | 2 +- .../compiler/integers/i64/max_fail.leo.out | 2 +- .../compiler/integers/i64/min_fail.leo.out | 2 +- .../i64/no_space_between_literal.leo.out | 2 +- .../compiler/integers/i8/max_fail.leo.out | 2 +- .../compiler/integers/i8/min_fail.leo.out | 2 +- .../compiler/integers/i8/negate_min.leo.out | 2 +- .../i8/no_space_between_literal.leo.out | 2 +- .../compiler/integers/u128/max_fail.leo.out | 2 +- .../compiler/integers/u128/min_fail.leo.out | 2 +- .../integers/u128/negative_input_fail.leo.out | 2 +- .../u128/no_space_between_literal.leo.out | 2 +- .../compiler/integers/u16/max_fail.leo.out | 2 +- .../compiler/integers/u16/min_fail.leo.out | 2 +- .../integers/u16/negative_input_fail.leo.out | 2 +- .../u16/no_space_between_literal.leo.out | 2 +- .../compiler/integers/u32/max_fail.leo.out | 2 +- .../compiler/integers/u32/min_fail.leo.out | 2 +- .../integers/u32/negative_input_fail.leo.out | 2 +- .../u32/no_space_between_literal.leo.out | 2 +- .../compiler/integers/u64/max_fail.leo.out | 2 +- .../compiler/integers/u64/min_fail.leo.out | 2 +- .../integers/u64/negative_input_fail.leo.out | 2 +- .../u64/no_space_between_literal.leo.out | 2 +- .../compiler/integers/u8/max_fail.leo.out | 2 +- .../compiler/integers/u8/min_fail.leo.out | 2 +- .../integers/u8/negative_input_fail.leo.out | 2 +- .../u8/no_space_between_literal.leo.out | 2 +- .../compiler/mutability/array_fail.leo.out | 2 +- .../compiler/mutability/circuit_fail.leo.out | 2 +- .../mutability/circuit_function_const.leo.out | 2 +- .../circuit_static_function_mut_fail.leo.out | 2 +- .../compiler/mutability/const.leo.out | 2 +- .../mutability/function_input.leo.out | 2 +- .../compiler/mutability/let_fail.leo.out | 2 +- .../statements/assign_ternary.leo.out | 2 +- .../statements/duplicate_variable.leo.out | 2 +- .../statements/ternary_non_const_fail.leo.out | 2 +- .../parser/circuits/fields_fail.leo.out | 2 +- .../parser/expression/array_init_fail.leo.out | 4 +- .../expression/array_inline_fail.leo.out | 10 +-- .../expression/circuit_init_fail.leo.out | 22 +++--- .../expression/literal/address_fail.leo.out | 18 ++--- .../expression/literal/char_fail.leo.out | 70 +++++++++---------- .../expression/literal/group_fail.leo.out | 8 +-- .../expression/literal/string_fail.leo.out | 14 ++-- .../parser/functions/annotated_fail.leo.out | 2 +- .../parser/functions/const_input_fail.leo.out | 2 +- .../import/import_empty_list_fail.leo.out | 2 +- .../parser/parser/import/invalid.leo.out | 2 +- .../parser/statement/conditional_fail.leo.out | 2 +- .../parser/statement/definition_fail.leo.out | 46 ++++++------ .../parser/statement/return_fail.leo.out | 6 +- 126 files changed, 216 insertions(+), 216 deletions(-) diff --git a/tests/expectations/compiler/compiler/array/array_range_access_fail.leo.out b/tests/expectations/compiler/compiler/array/array_range_access_fail.leo.out index 5961919c76..e28da3683a 100644 --- a/tests/expectations/compiler/compiler/array/array_range_access_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/array_range_access_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370020]: array index out of bounds: '0'\n --> compiler-test:7:24\n |\n 7 | const z: [u8; 2] = y[..1u32][..x];\n | ^^^^^^^^^^^^^^" + - "Error [EASG0373020]: array index out of bounds: '0'\n --> compiler-test:7:24\n |\n 7 | const z: [u8; 2] = y[..1u32][..x];\n | ^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/array/array_size_zero_fail.leo.out b/tests/expectations/compiler/compiler/array/array_size_zero_fail.leo.out index 8b96eb47b0..018bc69003 100644 --- a/tests/expectations/compiler/compiler/array/array_size_zero_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/array_size_zero_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EAST0371006]: received dimension size of 0, expected it to be 1 or larger.\n --> compiler-test:4:13\n |\n 4 | let a = [true; (0)];\n | ^^^^^^^^^^^" + - "Error [EAST0372006]: received dimension size of 0, expected it to be 1 or larger.\n --> compiler-test:4:13\n |\n 4 | let a = [true; (0)];\n | ^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/array/input_nested_3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/input_nested_3x2_fail.leo.out index ede4c5bbaf..498d522f18 100644 --- a/tests/expectations/compiler/compiler/array/input_nested_3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/input_nested_3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EPAR0375005]: expected ] -- got ')'\n --> compiler-test:4:29\n |\n 4 | return a == [[0u8; 2]; 3)]; // This should be written the right way as this test is for the input file.\n | ^" + - "Error [EPAR0370005]: expected ] -- got ')'\n --> compiler-test:4:29\n |\n 4 | return a == [[0u8; 2]; 3)]; // This should be written the right way as this test is for the input file.\n | ^" diff --git a/tests/expectations/compiler/compiler/array/multi_fail_initializer.leo.out b/tests/expectations/compiler/compiler/array/multi_fail_initializer.leo.out index 1d1099918d..c6849d72e8 100644 --- a/tests/expectations/compiler/compiler/array/multi_fail_initializer.leo.out +++ b/tests/expectations/compiler/compiler/array/multi_fail_initializer.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370026]: unexpected type, expected: 'array of length 2', received: 'array of length 1'\n --> compiler-test:4:31\n |\n 4 | const arr: [u8; (2, 2)] = [[1u8; 2]; 1]; // incorrect dimensions\n | ^^^^^^^^^^^^^" + - "Error [EASG0373026]: unexpected type, expected: 'array of length 2', received: 'array of length 1'\n --> compiler-test:4:31\n |\n 4 | const arr: [u8; (2, 2)] = [[1u8; 2]; 1]; // incorrect dimensions\n | ^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/array/multi_fail_inline.leo.out b/tests/expectations/compiler/compiler/array/multi_fail_inline.leo.out index 3579bced18..08e07e5508 100644 --- a/tests/expectations/compiler/compiler/array/multi_fail_inline.leo.out +++ b/tests/expectations/compiler/compiler/array/multi_fail_inline.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370026]: unexpected type, expected: 'array of length 2', received: 'array of length 1'\n --> compiler-test:5:35\n |\n 5 | [1u8]]; // incorrect dimensions\n | ^^^^^" + - "Error [EASG0373026]: unexpected type, expected: 'array of length 2', received: 'array of length 1'\n --> compiler-test:5:35\n |\n 5 | [1u8]]; // incorrect dimensions\n | ^^^^^" diff --git a/tests/expectations/compiler/compiler/array/multi_initializer_fail.leo.out b/tests/expectations/compiler/compiler/array/multi_initializer_fail.leo.out index 547204826a..75c810dc3b 100644 --- a/tests/expectations/compiler/compiler/array/multi_initializer_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/multi_initializer_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370026]: unexpected type, expected: 'array of length 2', received: 'array of length 1'\n --> compiler-test:4:31\n |\n 4 | const arr: [u8; (2, 2)] = [1u8; (2, 1)]; // incorrect dimensions\n | ^^^^^^^^^^^^^" + - "Error [EASG0373026]: unexpected type, expected: 'array of length 2', received: 'array of length 1'\n --> compiler-test:4:31\n |\n 4 | const arr: [u8; (2, 2)] = [1u8; (2, 1)]; // incorrect dimensions\n | ^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/array/nested_3x2_value_fail.leo.out b/tests/expectations/compiler/compiler/array/nested_3x2_value_fail.leo.out index 61b1d5a67b..ac7a7d9c6f 100644 --- a/tests/expectations/compiler/compiler/array/nested_3x2_value_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/nested_3x2_value_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:6:30\n |\n 6 | const a: [u32; (3, 2)] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^" + - "Error [EASG0373026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:6:30\n |\n 6 | const a: [u32; (3, 2)] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/array/tuple_3x2_value_fail.leo.out b/tests/expectations/compiler/compiler/array/tuple_3x2_value_fail.leo.out index 7ec8d35fa4..1812da5de7 100644 --- a/tests/expectations/compiler/compiler/array/tuple_3x2_value_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/tuple_3x2_value_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:5:30\n |\n 5 | const a: [u32; (3, 2)] = [0; (2, 3)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^" + - "Error [EASG0373026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:5:30\n |\n 5 | const a: [u32; (3, 2)] = [0; (2, 3)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/array/type_fail.leo.out b/tests/expectations/compiler/compiler/array/type_fail.leo.out index 2023c8eda1..06738a76cd 100644 --- a/tests/expectations/compiler/compiler/array/type_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EPAR0375005]: expected ( -- got '-'\n --> compiler-test:4:19\n |\n 4 | const a: [u8; -2] = [0u32; 2];\n | ^" + - "Error [EPAR0370005]: expected ( -- got '-'\n --> compiler-test:4:19\n |\n 4 | const a: [u8; -2] = [0u32; 2];\n | ^" diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2_fail.leo.out index cb227c9e85..217955800f 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:4:29\n |\n 4 | const b: [[u8; 2]; 3] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^" + - "Error [EASG0373026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:4:29\n |\n 4 | const b: [[u8; 2]; 3] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2_fail.leo.out index 3dd59694d9..54c025b34a 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370026]: unexpected type, expected: 'array of length 4', received: 'array of length 2'\n --> compiler-test:4:34\n |\n 4 | const b: [[[u8; 2]; 3]; 4] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^^^^^^" + - "Error [EASG0373026]: unexpected type, expected: 'array of length 4', received: 'array of length 2'\n --> compiler-test:4:34\n |\n 4 | const b: [[[u8; 2]; 3]; 4] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2_fail.leo.out index b0c5e21798..d1af91c904 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:4:29\n |\n 4 | const b: [[u8; 2]; 3] = [0; (2, 3)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^" + - "Error [EASG0373026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:4:29\n |\n 4 | const b: [[u8; 2]; 3] = [0; (2, 3)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2_fail.leo.out index 54179727d5..bf875ee25e 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370026]: unexpected type, expected: 'array of length 4', received: 'array of length 2'\n --> compiler-test:4:34\n |\n 4 | const b: [[[u8; 2]; 3]; 4] = [0; (2, 3, 4)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^^^^" + - "Error [EASG0373026]: unexpected type, expected: 'array of length 4', received: 'array of length 2'\n --> compiler-test:4:34\n |\n 4 | const b: [[[u8; 2]; 3]; 4] = [0; (2, 3, 4)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2_fail.leo.out index a782c491e2..d9ade042ec 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370026]: unexpected type, expected: 'array of length 2', received: 'array of length 3'\n --> compiler-test:4:29\n |\n 4 | const b: [u8; (2, 3)] = [[0; 2]; 3]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^" + - "Error [EASG0373026]: unexpected type, expected: 'array of length 2', received: 'array of length 3'\n --> compiler-test:4:29\n |\n 4 | const b: [u8; (2, 3)] = [[0; 2]; 3]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2_fail.leo.out index 78be85a377..f236a3578a 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370026]: unexpected type, expected: 'array of length 4', received: 'array of length 2'\n --> compiler-test:4:32\n |\n 4 | const b: [u8; (4, 3, 2)] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^^^^^^" + - "Error [EASG0373026]: unexpected type, expected: 'array of length 4', received: 'array of length 2'\n --> compiler-test:4:32\n |\n 4 | const b: [u8; (4, 3, 2)] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2_fail.leo.out index 69ea29b49f..243e146be8 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370026]: unexpected type, expected: 'array of length 2', received: 'array of length 3'\n --> compiler-test:4:29\n |\n 4 | const b: [u8; (2, 3)] = [0; (3, 2)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^" + - "Error [EASG0373026]: unexpected type, expected: 'array of length 2', received: 'array of length 3'\n --> compiler-test:4:29\n |\n 4 | const b: [u8; (2, 3)] = [0; (3, 2)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2_fail.leo.out index 66fc9e0415..370d7730e6 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370026]: unexpected type, expected: 'array of length 4', received: 'array of length 2'\n --> compiler-test:4:32\n |\n 4 | const b: [u8; (4, 3, 2)] = [0; (2, 3, 4)]; // initializer (incorrectly reversed order)\n | ^^^^^^^^^^^^^^" + - "Error [EASG0373026]: unexpected type, expected: 'array of length 4', received: 'array of length 2'\n --> compiler-test:4:32\n |\n 4 | const b: [u8; (4, 3, 2)] = [0; (2, 3, 4)]; // initializer (incorrectly reversed order)\n | ^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/array/variable_slice_fail.leo.out b/tests/expectations/compiler/compiler/array/variable_slice_fail.leo.out index d69981da1c..2362a9a01e 100644 --- a/tests/expectations/compiler/compiler/array/variable_slice_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/variable_slice_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EPAR0375007]: unexpected identifier: expected 'assert', 'error', 'log' -- got 'debug'\n --> compiler-test:7:17\n |\n 7 | console.debug(\"{}\", x);\n | ^^^^^" + - "Error [EPAR0370007]: unexpected identifier: expected 'assert', 'error', 'log' -- got 'debug'\n --> compiler-test:7:17\n |\n 7 | console.debug(\"{}\", x);\n | ^^^^^" diff --git a/tests/expectations/compiler/compiler/char/invalid_char.leo.out b/tests/expectations/compiler/compiler/char/invalid_char.leo.out index 8f728c62b9..1044b2dbf1 100644 --- a/tests/expectations/compiler/compiler/char/invalid_char.leo.out +++ b/tests/expectations/compiler/compiler/char/invalid_char.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EPAR0375000]: '\n --> compiler-test:4:23\n |\n 4 | const not_valid = '';\n | ^\n |\n = HELP TODO" + - "Error [EPAR0370000]: '\n --> compiler-test:4:23\n |\n 4 | const not_valid = '';\n | ^\n |\n = HELP TODO" diff --git a/tests/expectations/compiler/compiler/circuits/big_self_outside_circuit_fail.leo.out b/tests/expectations/compiler/compiler/circuits/big_self_outside_circuit_fail.leo.out index ba8870e8cf..7d1e87d756 100644 --- a/tests/expectations/compiler/compiler/circuits/big_self_outside_circuit_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/big_self_outside_circuit_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EAST0371005]: cannot call keyword `Self` outside of a circuit function\n --> compiler-test:16:3\n |\n 16 | let foo: Self = Foo::new();\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^" + - "Error [EAST0372005]: cannot call keyword `Self` outside of a circuit function\n --> compiler-test:16:3\n |\n 16 | let foo: Self = Foo::new();\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/circuits/const_self_variable_fail.leo.out b/tests/expectations/compiler/compiler/circuits/const_self_variable_fail.leo.out index fb798c1e90..d3d1a707f1 100644 --- a/tests/expectations/compiler/compiler/circuits/const_self_variable_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/const_self_variable_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370033]: illegal assignment to immutable variable 'self'\n --> compiler-test:7:9\n |\n 7 | self.a = new;\n | ^^^^^^^^^^^^" + - "Error [EASG0373033]: illegal assignment to immutable variable 'self'\n --> compiler-test:7:9\n |\n 7 | self.a = new;\n | ^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/circuits/inline_fail.leo.out b/tests/expectations/compiler/compiler/circuits/inline_fail.leo.out index 0afc915e8f..6854a2bc6f 100644 --- a/tests/expectations/compiler/compiler/circuits/inline_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/inline_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370003]: missing circuit member 'x' for initialization of circuit 'Foo'\n --> compiler-test:9:15\n |\n 9 | const a = Foo { y: 0u32 };\n | ^^^^^^^^^^^^^^^" + - "Error [EASG0373003]: missing circuit member 'x' for initialization of circuit 'Foo'\n --> compiler-test:9:15\n |\n 9 | const a = Foo { y: 0u32 };\n | ^^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/circuits/inline_member_fail.leo.out b/tests/expectations/compiler/compiler/circuits/inline_member_fail.leo.out index 8af15fda33..a6b6460e54 100644 --- a/tests/expectations/compiler/compiler/circuits/inline_member_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/inline_member_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370003]: missing circuit member 'x' for initialization of circuit 'Foo'\n --> compiler-test:9:15\n |\n 9 | const a = Foo { y };\n | ^^^^^^^^^" + - "Error [EASG0373003]: missing circuit member 'x' for initialization of circuit 'Foo'\n --> compiler-test:9:15\n |\n 9 | const a = Foo { y };\n | ^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/circuits/inline_undefined.leo.out b/tests/expectations/compiler/compiler/circuits/inline_undefined.leo.out index bbcaeb8205..690ccca5b5 100644 --- a/tests/expectations/compiler/compiler/circuits/inline_undefined.leo.out +++ b/tests/expectations/compiler/compiler/circuits/inline_undefined.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370000]: failed to resolve circuit: 'Foo'\n --> compiler-test:4:15\n |\n 4 | const a = Foo { };\n | ^^^" + - "Error [EASG0373000]: failed to resolve circuit: 'Foo'\n --> compiler-test:4:15\n |\n 4 | const a = Foo { };\n | ^^^" diff --git a/tests/expectations/compiler/compiler/circuits/member_function_fail.leo.out b/tests/expectations/compiler/compiler/circuits/member_function_fail.leo.out index 22869c14b5..5c34a23b9d 100644 --- a/tests/expectations/compiler/compiler/circuits/member_function_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_function_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370002]: illegal reference to non-existant member 'echoed' of circuit 'Foo'\n --> compiler-test:11:17\n |\n 11 | const err = a.echoed(1u32);\n | ^^^^^^^^" + - "Error [EASG0373002]: illegal reference to non-existant member 'echoed' of circuit 'Foo'\n --> compiler-test:11:17\n |\n 11 | const err = a.echoed(1u32);\n | ^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/circuits/member_function_invalid.leo.out b/tests/expectations/compiler/compiler/circuits/member_function_invalid.leo.out index 500bd65a04..50f8f5a0b5 100644 --- a/tests/expectations/compiler/compiler/circuits/member_function_invalid.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_function_invalid.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370009]: cannot call static function 'echo' of circuit 'Foo' from target\n --> compiler-test:11:17\n |\n 11 | const err = a.echo(1u32); // echo is a static function and must be accessed using `::`\n | ^^^^^^" + - "Error [EASG0373009]: cannot call static function 'echo' of circuit 'Foo' from target\n --> compiler-test:11:17\n |\n 11 | const err = a.echo(1u32); // echo is a static function and must be accessed using `::`\n | ^^^^^^" diff --git a/tests/expectations/compiler/compiler/circuits/member_static_function_invalid.leo.out b/tests/expectations/compiler/compiler/circuits/member_static_function_invalid.leo.out index 221febe732..0fedea2143 100644 --- a/tests/expectations/compiler/compiler/circuits/member_static_function_invalid.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_static_function_invalid.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370028]: failed to resolve variable reference 'Foo'\n --> compiler-test:10:17\n |\n 10 | const err = Foo.echo(1u32); // Invalid, echo is a static function and must be accessed using `::`\n | ^^^" + - "Error [EASG0373028]: failed to resolve variable reference 'Foo'\n --> compiler-test:10:17\n |\n 10 | const err = Foo.echo(1u32); // Invalid, echo is a static function and must be accessed using `::`\n | ^^^" diff --git a/tests/expectations/compiler/compiler/circuits/member_static_function_undefined.leo.out b/tests/expectations/compiler/compiler/circuits/member_static_function_undefined.leo.out index cb5b0b662f..66b5cccfc3 100644 --- a/tests/expectations/compiler/compiler/circuits/member_static_function_undefined.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_static_function_undefined.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370002]: illegal reference to non-existant member 'echoed' of circuit 'Foo'\n --> compiler-test:10:17\n |\n 10 | const err = Foo::echoed(1u32);\n | ^^^^^^^^^^^" + - "Error [EASG0373002]: illegal reference to non-existant member 'echoed' of circuit 'Foo'\n --> compiler-test:10:17\n |\n 10 | const err = Foo::echoed(1u32);\n | ^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/circuits/member_variable_fail.leo.out b/tests/expectations/compiler/compiler/circuits/member_variable_fail.leo.out index cfb960f1d4..f80585c1ea 100644 --- a/tests/expectations/compiler/compiler/circuits/member_variable_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_variable_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370002]: illegal reference to non-existant member 'y' of circuit 'Foo'\n --> compiler-test:9:17\n |\n 9 | const err = a.y;\n | ^^^" + - "Error [EASG0373002]: illegal reference to non-existant member 'y' of circuit 'Foo'\n --> compiler-test:9:17\n |\n 9 | const err = a.y;\n | ^^^" diff --git a/tests/expectations/compiler/compiler/circuits/mut_function_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_function_fail.leo.out index 0c960ce1f0..550752bee7 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_function_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_function_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370007]: attempt to assign to function 'bar'\n --> compiler-test:12:5\n |\n 12 | f.bar = 1u8;\n | ^^^^^^^^^^^" + - "Error [EASG0373007]: attempt to assign to function 'bar'\n --> compiler-test:12:5\n |\n 12 | f.bar = 1u8;\n | ^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_function_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_function_fail.leo.out index f45fda2e57..e1958638b2 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_self_function_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_self_function_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370007]: attempt to assign to function 'bar'\n --> compiler-test:9:9\n |\n 9 | self.bar = new;\n | ^^^^^^^^^^^^^^" + - "Error [EASG0373007]: attempt to assign to function 'bar'\n --> compiler-test:9:9\n |\n 9 | self.bar = new;\n | ^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_static_function_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_static_function_fail.leo.out index f45fda2e57..e1958638b2 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_self_static_function_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_self_static_function_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370007]: attempt to assign to function 'bar'\n --> compiler-test:9:9\n |\n 9 | self.bar = new;\n | ^^^^^^^^^^^^^^" + - "Error [EASG0373007]: attempt to assign to function 'bar'\n --> compiler-test:9:9\n |\n 9 | self.bar = new;\n | ^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_variable_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_variable_fail.leo.out index fb798c1e90..d3d1a707f1 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_self_variable_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_self_variable_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370033]: illegal assignment to immutable variable 'self'\n --> compiler-test:7:9\n |\n 7 | self.a = new;\n | ^^^^^^^^^^^^" + - "Error [EASG0373033]: illegal assignment to immutable variable 'self'\n --> compiler-test:7:9\n |\n 7 | self.a = new;\n | ^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/circuits/mut_static_function_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_static_function_fail.leo.out index bfa56e7615..db91c8aeef 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_static_function_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_static_function_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370006]: extra circuit member 'a' for initialization of circuit 'Foo' is not allowed\n --> compiler-test:8:19\n |\n 8 | let f = Foo { a: 0u8 };\n | ^" + - "Error [EASG0373006]: extra circuit member 'a' for initialization of circuit 'Foo' is not allowed\n --> compiler-test:8:19\n |\n 8 | let f = Foo { a: 0u8 };\n | ^" diff --git a/tests/expectations/compiler/compiler/circuits/mut_variable_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_variable_fail.leo.out index 8331680b0c..d56bfa412b 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_variable_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_variable_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370033]: illegal assignment to immutable variable 'f'\n --> compiler-test:10:5\n |\n 10 | f.a = 1u8;\n | ^^^^^^^^^" + - "Error [EASG0373033]: illegal assignment to immutable variable 'f'\n --> compiler-test:10:5\n |\n 10 | f.a = 1u8;\n | ^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/circuits/self_circuit.leo.out b/tests/expectations/compiler/compiler/circuits/self_circuit.leo.out index 0ec6fb0092..d12165d6a1 100644 --- a/tests/expectations/compiler/compiler/circuits/self_circuit.leo.out +++ b/tests/expectations/compiler/compiler/circuits/self_circuit.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EPAR0375009]: unexpected string: expected 'ident', got 'static'\n --> compiler-test:5:5\n |\n 5 | static function new() -> Self {\n | ^^^^^^" + - "Error [EPAR0370009]: unexpected string: expected 'ident', got 'static'\n --> compiler-test:5:5\n |\n 5 | static function new() -> Self {\n | ^^^^^^" diff --git a/tests/expectations/compiler/compiler/circuits/self_fail.leo.out b/tests/expectations/compiler/compiler/circuits/self_fail.leo.out index 21e22afac0..25126ce204 100644 --- a/tests/expectations/compiler/compiler/circuits/self_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/self_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370000]: failed to resolve circuit: 'Self'\n --> compiler-test:4:5\n |\n 4 | Self::main();\n | ^^^^" + - "Error [EASG0373000]: failed to resolve circuit: 'Self'\n --> compiler-test:4:5\n |\n 4 | Self::main();\n | ^^^^" diff --git a/tests/expectations/compiler/compiler/circuits/self_member_invalid.leo.out b/tests/expectations/compiler/compiler/circuits/self_member_invalid.leo.out index e56afced75..8056d661ae 100644 --- a/tests/expectations/compiler/compiler/circuits/self_member_invalid.leo.out +++ b/tests/expectations/compiler/compiler/circuits/self_member_invalid.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370009]: cannot call static function 'bar' of circuit 'Foo' from target\n --> compiler-test:13:17\n |\n 13 | const err = foo.bar();\n | ^^^^^^^" + - "Error [EASG0373009]: cannot call static function 'bar' of circuit 'Foo' from target\n --> compiler-test:13:17\n |\n 13 | const err = foo.bar();\n | ^^^^^^^" diff --git a/tests/expectations/compiler/compiler/circuits/self_member_undefined.leo.out b/tests/expectations/compiler/compiler/circuits/self_member_undefined.leo.out index cf5e022627..357c5dcc1e 100644 --- a/tests/expectations/compiler/compiler/circuits/self_member_undefined.leo.out +++ b/tests/expectations/compiler/compiler/circuits/self_member_undefined.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370009]: cannot call static function 'bar' of circuit 'Foo' from target\n --> compiler-test:11:17\n |\n 11 | const err = foo.bar();\n | ^^^^^^^" + - "Error [EASG0373009]: cannot call static function 'bar' of circuit 'Foo' from target\n --> compiler-test:11:17\n |\n 11 | const err = foo.bar();\n | ^^^^^^^" diff --git a/tests/expectations/compiler/compiler/console/log_fail.leo.out b/tests/expectations/compiler/compiler/console/log_fail.leo.out index cb0e724299..3d62711430 100644 --- a/tests/expectations/compiler/compiler/console/log_fail.leo.out +++ b/tests/expectations/compiler/compiler/console/log_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EPAR0375009]: unexpected string: expected 'formatted string', got 'hello'\n --> compiler-test:4:18\n |\n 4 | console.log( hello );\n | ^^^^^" + - "Error [EPAR0370009]: unexpected string: expected 'formatted string', got 'hello'\n --> compiler-test:4:18\n |\n 4 | console.log( hello );\n | ^^^^^" diff --git a/tests/expectations/compiler/compiler/console/log_parameter_fail_empty.leo.out b/tests/expectations/compiler/compiler/console/log_parameter_fail_empty.leo.out index dd0c8befab..fbb16d3bc3 100644 --- a/tests/expectations/compiler/compiler/console/log_parameter_fail_empty.leo.out +++ b/tests/expectations/compiler/compiler/console/log_parameter_fail_empty.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [ECMP0372006]: Formatter given 1 containers and found 0 parameters\n --> compiler-test:4:17\n |\n 4 | console.log(\"{}\");\n | ^^^^" + - "Error [ECMP0377006]: Formatter given 1 containers and found 0 parameters\n --> compiler-test:4:17\n |\n 4 | console.log(\"{}\");\n | ^^^^" diff --git a/tests/expectations/compiler/compiler/console/log_parameter_fail_none.leo.out b/tests/expectations/compiler/compiler/console/log_parameter_fail_none.leo.out index 97cc9b7321..d1636388cb 100644 --- a/tests/expectations/compiler/compiler/console/log_parameter_fail_none.leo.out +++ b/tests/expectations/compiler/compiler/console/log_parameter_fail_none.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [ECMP0372006]: Formatter given 0 containers and found 1 parameters\n --> compiler-test:4:17\n |\n 4 | console.log(\"\", 1u32);\n | ^^^^^^^^" + - "Error [ECMP0377006]: Formatter given 0 containers and found 1 parameters\n --> compiler-test:4:17\n |\n 4 | console.log(\"\", 1u32);\n | ^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/console/log_parameter_fail_unknown.leo.out b/tests/expectations/compiler/compiler/console/log_parameter_fail_unknown.leo.out index dc064690fd..0693d53502 100644 --- a/tests/expectations/compiler/compiler/console/log_parameter_fail_unknown.leo.out +++ b/tests/expectations/compiler/compiler/console/log_parameter_fail_unknown.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370028]: failed to resolve variable reference 'a'\n --> compiler-test:4:23\n |\n 4 | console.log(\"{}\", a);\n | ^" + - "Error [EASG0373028]: failed to resolve variable reference 'a'\n --> compiler-test:4:23\n |\n 4 | console.log(\"{}\", a);\n | ^" diff --git a/tests/expectations/compiler/compiler/core/core_circuit_invalid.leo.out b/tests/expectations/compiler/compiler/core/core_circuit_invalid.leo.out index ff9c43b3f1..0fe84aeec0 100644 --- a/tests/expectations/compiler/compiler/core/core_circuit_invalid.leo.out +++ b/tests/expectations/compiler/compiler/core/core_circuit_invalid.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370001]: failed to resolve import: 'core.unstable.blake2s.BadCircuit'\n --> compiler-test:3:30\n |\n 3 | import core.unstable.blake2s.BadCircuit; // `BadCircuit` is not included in the blake2s package\n | ^^^^^^^^^^" + - "Error [EASG0373001]: failed to resolve import: 'core.unstable.blake2s.BadCircuit'\n --> compiler-test:3:30\n |\n 3 | import core.unstable.blake2s.BadCircuit; // `BadCircuit` is not included in the blake2s package\n | ^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/core/core_circuit_star_fail.leo.out b/tests/expectations/compiler/compiler/core/core_circuit_star_fail.leo.out index 89336f9227..4698b66c89 100644 --- a/tests/expectations/compiler/compiler/core/core_circuit_star_fail.leo.out +++ b/tests/expectations/compiler/compiler/core/core_circuit_star_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370001]: failed to resolve import: 'core'\n --> :0:0\n |" + - "Error [EASG0373001]: failed to resolve import: 'core'\n --> :0:0\n |" diff --git a/tests/expectations/compiler/compiler/core/core_package_invalid.leo.out b/tests/expectations/compiler/compiler/core/core_package_invalid.leo.out index 89336f9227..4698b66c89 100644 --- a/tests/expectations/compiler/compiler/core/core_package_invalid.leo.out +++ b/tests/expectations/compiler/compiler/core/core_package_invalid.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370001]: failed to resolve import: 'core'\n --> :0:0\n |" + - "Error [EASG0373001]: failed to resolve import: 'core'\n --> :0:0\n |" diff --git a/tests/expectations/compiler/compiler/core/core_unstable_package_invalid.leo.out b/tests/expectations/compiler/compiler/core/core_unstable_package_invalid.leo.out index f45b179d2e..93668fe671 100644 --- a/tests/expectations/compiler/compiler/core/core_unstable_package_invalid.leo.out +++ b/tests/expectations/compiler/compiler/core/core_unstable_package_invalid.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370001]: failed to resolve import: 'core.unstable'\n --> :0:0\n |" + - "Error [EASG0373001]: failed to resolve import: 'core.unstable'\n --> :0:0\n |" diff --git a/tests/expectations/compiler/compiler/field/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/field/no_space_between_literal.leo.out index c5eccb9b71..bcdd357d41 100644 --- a/tests/expectations/compiler/compiler/field/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/field/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EPAR0375004]: Unexpected white space between terms 1 and field\n --> compiler-test:4:13\n |\n 4 | const f = 1 field;\n | ^" + - "Error [EPAR0370004]: Unexpected white space between terms 1 and field\n --> compiler-test:4:13\n |\n 4 | const f = 1 field;\n | ^" diff --git a/tests/expectations/compiler/compiler/function/duplicate_definition_fail.leo.out b/tests/expectations/compiler/compiler/function/duplicate_definition_fail.leo.out index b96997a9cc..9a1ad26683 100644 --- a/tests/expectations/compiler/compiler/function/duplicate_definition_fail.leo.out +++ b/tests/expectations/compiler/compiler/function/duplicate_definition_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370016]: a function named \"main\" already exists in this scope\n --> compiler-test:8:1\n |\n 8 | function main() {\n|\n 9 | ...\n|\n 10 | }\n | ^" + - "Error [EASG0373016]: a function named \"main\" already exists in this scope\n --> compiler-test:8:1\n |\n 8 | function main() {\n|\n 9 | ...\n|\n 10 | }\n | ^" diff --git a/tests/expectations/compiler/compiler/function/multiple_returns_fail.leo.out b/tests/expectations/compiler/compiler/function/multiple_returns_fail.leo.out index cf80360e9a..f1d0427062 100644 --- a/tests/expectations/compiler/compiler/function/multiple_returns_fail.leo.out +++ b/tests/expectations/compiler/compiler/function/multiple_returns_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370035]: function 'main' failed to validate return path: 'cannot have asymmetrical return in if statement'\n --> compiler-test:4:5\n |\n 4 | if true {\n|\n 5 | ...\n|\n 6 | }\n | ^" + - "Error [EASG0373035]: function 'main' failed to validate return path: 'cannot have asymmetrical return in if statement'\n --> compiler-test:4:5\n |\n 4 | if true {\n|\n 5 | ...\n|\n 6 | }\n | ^" diff --git a/tests/expectations/compiler/compiler/function/multiple_returns_fail_conditional.leo.out b/tests/expectations/compiler/compiler/function/multiple_returns_fail_conditional.leo.out index 2d0d2d86f0..814f563ee2 100644 --- a/tests/expectations/compiler/compiler/function/multiple_returns_fail_conditional.leo.out +++ b/tests/expectations/compiler/compiler/function/multiple_returns_fail_conditional.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370034]: function 'main' missing return for all paths\n --> compiler-test:3:1\n |\n 3 | function main() -> bool {\n|\n 4 | ...\n|\n 5 | }\n|\n 6 | \n|\n 7 | \n|\n 8 | \n|\n 9 | \n|\n 10 | \n | ^" + - "Error [EASG0373034]: function 'main' missing return for all paths\n --> compiler-test:3:1\n |\n 3 | function main() -> bool {\n|\n 4 | ...\n|\n 5 | }\n|\n 6 | \n|\n 7 | \n|\n 8 | \n|\n 9 | \n|\n 10 | \n | ^" diff --git a/tests/expectations/compiler/compiler/function/return_array_nested_fail.leo.out b/tests/expectations/compiler/compiler/function/return_array_nested_fail.leo.out index 1315fb284f..ec70067b21 100644 --- a/tests/expectations/compiler/compiler/function/return_array_nested_fail.leo.out +++ b/tests/expectations/compiler/compiler/function/return_array_nested_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:4:12\n |\n 4 | return [0u8; (2, 3)]; // The correct 3x2 array tuple is `[0u8; (3, 2)]`\n | ^^^^^^^^^^^^^" + - "Error [EASG0373026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:4:12\n |\n 4 | return [0u8; (2, 3)]; // The correct 3x2 array tuple is `[0u8; (3, 2)]`\n | ^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/function/return_array_tuple_fail.leo.out b/tests/expectations/compiler/compiler/function/return_array_tuple_fail.leo.out index ec44831b0f..e2256628cb 100644 --- a/tests/expectations/compiler/compiler/function/return_array_tuple_fail.leo.out +++ b/tests/expectations/compiler/compiler/function/return_array_tuple_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:4:12\n |\n 4 | return [[0u8; 3]; 2]; // The correct 3x2 nested array is `[0u8; 2]; 3]`\n | ^^^^^^^^^^^^^" + - "Error [EASG0373026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:4:12\n |\n 4 | return [[0u8; 3]; 2]; // The correct 3x2 nested array is `[0u8; 2]; 3]`\n | ^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/function/scope_fail.leo.out b/tests/expectations/compiler/compiler/function/scope_fail.leo.out index 989d129c74..1d2cfacf9e 100644 --- a/tests/expectations/compiler/compiler/function/scope_fail.leo.out +++ b/tests/expectations/compiler/compiler/function/scope_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370028]: failed to resolve variable reference 'myGlobal'\n --> compiler-test:5:12\n |\n 5 | return myGlobal;\n | ^^^^^^^^" + - "Error [EASG0373028]: failed to resolve variable reference 'myGlobal'\n --> compiler-test:5:12\n |\n 5 | return myGlobal;\n | ^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/function/undefined.leo.out b/tests/expectations/compiler/compiler/function/undefined.leo.out index ba2e4447cb..d21aace1cd 100644 --- a/tests/expectations/compiler/compiler/function/undefined.leo.out +++ b/tests/expectations/compiler/compiler/function/undefined.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370024]: failed to resolve function: 'my_function'\n --> compiler-test:5:5\n |\n 5 | my_function();\n | ^^^^^^^^^^^" + - "Error [EASG0373024]: failed to resolve function: 'my_function'\n --> compiler-test:5:5\n |\n 5 | my_function();\n | ^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/global_consts/modify_global_const.leo.out b/tests/expectations/compiler/compiler/global_consts/modify_global_const.leo.out index d551456bce..1f854bf2fd 100644 --- a/tests/expectations/compiler/compiler/global_consts/modify_global_const.leo.out +++ b/tests/expectations/compiler/compiler/global_consts/modify_global_const.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370033]: illegal assignment to immutable variable 'basic'\n --> compiler-test:7:5\n |\n 7 | basic = 2u32;\n | ^^^^^^^^^^^^" + - "Error [EASG0373033]: illegal assignment to immutable variable 'basic'\n --> compiler-test:7:5\n |\n 7 | basic = 2u32;\n | ^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/const_input_non_const.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/const_input_non_const.leo.out index fde3e4206d..4a6ba5acca 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/const_input_non_const.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/const_input_non_const.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [ECMP0372029]: Expected input variable `a` to be non-constant. Move input variable `a` to [main] section of input file\n --> compiler-test:3:15\n |\n 3 | function main(a: u32) {\n | ^" + - "Error [ECMP0377029]: Expected input variable `a` to be non-constant. Move input variable `a` to [main] section of input file\n --> compiler-test:3:15\n |\n 3 | function main(a: u32) {\n | ^" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/const_var_in_both_sections_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/const_var_in_both_sections_fail.leo.out index fd59f17a81..1d0801ec0a 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/const_var_in_both_sections_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/const_var_in_both_sections_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [ECMP0372035]: Input variable a declared twice\n --> compiler-test:3:21\n |\n 3 | function main(const a: u32) {\n | ^" + - "Error [ECMP0377035]: Input variable a declared twice\n --> compiler-test:3:21\n |\n 3 | function main(const a: u32) {\n | ^" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_array_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_array_fail.leo.out index 30df60f303..ce091ba256 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_array_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_array_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [ECMP0372031]: Input array dimensions mismatch expected 1, found array dimensions 2\n --> compiler-test:3:15\n |\n 3 | function main(x: [i16; 2]) {\n | ^" + - "Error [ECMP0377031]: Input array dimensions mismatch expected 1, found array dimensions 2\n --> compiler-test:3:15\n |\n 3 | function main(x: [i16; 2]) {\n | ^" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_tuple_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_tuple_fail.leo.out index e15fabc998..6a41a4ee1f 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_tuple_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_tuple_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [ECMP0372032]: Input tuple size mismatch expected 3, found tuple with length 2\n --> compiler-test:3:15\n |\n 3 | function main(x: (u8, bool, u8)) {\n | ^" + - "Error [ECMP0377032]: Input tuple size mismatch expected 3, found tuple with length 2\n --> compiler-test:3:15\n |\n 3 | function main(x: (u8, bool, u8)) {\n | ^" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/non_const_input_const.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/non_const_input_const.leo.out index 7cb4eab0ad..7c208e40ac 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/non_const_input_const.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/non_const_input_const.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370025]: failed to resolve type for variable definition 'unknown'\n --> compiler-test:4:17\n |\n 4 | let b = a * 2;\n | ^" + - "Error [EASG0373025]: failed to resolve type for variable definition 'unknown'\n --> compiler-test:4:17\n |\n 4 | let b = a * 2;\n | ^" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/var_in_both_sections_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/var_in_both_sections_fail.leo.out index 5ec6400513..79419506ea 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/var_in_both_sections_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/var_in_both_sections_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [ECMP0372035]: Input variable a declared twice\n --> compiler-test:3:15\n |\n 3 | function main(a: u32) {\n | ^" + - "Error [ECMP0377035]: Input variable a declared twice\n --> compiler-test:3:15\n |\n 3 | function main(a: u32) {\n | ^" diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array_fail.leo.out index 9c720585eb..9933967b5d 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [ECMP0372031]: Input array dimensions mismatch expected 2, found array dimensions 1\n --> compiler-test:3:21\n |\n 3 | function main(const x: [i16; 2]) {\n | ^" + - "Error [ECMP0377031]: Input array dimensions mismatch expected 2, found array dimensions 1\n --> compiler-test:3:21\n |\n 3 | function main(const x: [i16; 2]) {\n | ^" diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple_fail.leo.out index 93830cd25a..ecd59ab71c 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [ECMP0372032]: Input tuple size mismatch expected 3, found tuple with length 2\n --> compiler-test:3:21\n |\n 3 | function main(const x: (u8, bool, u8)) {\n | ^" + - "Error [ECMP0377032]: Input tuple size mismatch expected 3, found tuple with length 2\n --> compiler-test:3:21\n |\n 3 | function main(const x: (u8, bool, u8)) {\n | ^" diff --git a/tests/expectations/compiler/compiler/input_files/program_registers/registers_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_registers/registers_fail.leo.out index ee3409a8ea..3b3b01af02 100644 --- a/tests/expectations/compiler/compiler/input_files/program_registers/registers_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_registers/registers_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [ECMP0372037]: Mismatched types. Expected register output type `u8`, found type `bool`.\n --> compiler-test:3:1\n |\n 3 | function main() -> bool {\n|\n 4 | ...\n|\n 5 | }\n | ^" + - "Error [ECMP0377037]: Mismatched types. Expected register output type `u8`, found type `bool`.\n --> compiler-test:3:1\n |\n 3 | function main() -> bool {\n|\n 4 | ...\n|\n 5 | }\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/i128/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/i128/max_fail.leo.out index 9026291d1a..d3bcb58a4e 100644 --- a/tests/expectations/compiler/compiler/integers/i128/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370031]: failed to parse int value '170141183460469231731687303715884105728'\n --> compiler-test:4:21\n |\n 4 | const a: i128 = 170141183460469231731687303715884105728;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" + - "Error [EASG0373031]: failed to parse int value '170141183460469231731687303715884105728'\n --> compiler-test:4:21\n |\n 4 | const a: i128 = 170141183460469231731687303715884105728;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/integers/i128/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/i128/min_fail.leo.out index 7a09f07f02..55f057ca89 100644 --- a/tests/expectations/compiler/compiler/integers/i128/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370031]: failed to parse int value '-170141183460469231731687303715884105729'\n --> compiler-test:4:21\n |\n 4 | const a: i128 = -170141183460469231731687303715884105729;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" + - "Error [EASG0373031]: failed to parse int value '-170141183460469231731687303715884105729'\n --> compiler-test:4:21\n |\n 4 | const a: i128 = -170141183460469231731687303715884105729;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/integers/i128/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/i128/no_space_between_literal.leo.out index 14e4ee187f..58e069fbb0 100644 --- a/tests/expectations/compiler/compiler/integers/i128/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EPAR0375004]: Unexpected white space between terms 1 and i128\n --> compiler-test:4:15\n |\n 4 | const i = 1 i128;\n | ^" + - "Error [EPAR0370004]: Unexpected white space between terms 1 and i128\n --> compiler-test:4:15\n |\n 4 | const i = 1 i128;\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/i16/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/i16/max_fail.leo.out index fa665292e6..243ee127a8 100644 --- a/tests/expectations/compiler/compiler/integers/i16/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370031]: failed to parse int value '32768'\n --> compiler-test:4:20\n |\n 4 | const a: i16 = 32768;\n | ^^^^^" + - "Error [EASG0373031]: failed to parse int value '32768'\n --> compiler-test:4:20\n |\n 4 | const a: i16 = 32768;\n | ^^^^^" diff --git a/tests/expectations/compiler/compiler/integers/i16/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/i16/min_fail.leo.out index c54cf7d4d2..00fcc69d5c 100644 --- a/tests/expectations/compiler/compiler/integers/i16/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370031]: failed to parse int value '-32769'\n --> compiler-test:4:20\n |\n 4 | const a: i16 = -32769;\n | ^^^^^^" + - "Error [EASG0373031]: failed to parse int value '-32769'\n --> compiler-test:4:20\n |\n 4 | const a: i16 = -32769;\n | ^^^^^^" diff --git a/tests/expectations/compiler/compiler/integers/i16/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/i16/no_space_between_literal.leo.out index ea8a530c33..8484337bd0 100644 --- a/tests/expectations/compiler/compiler/integers/i16/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EPAR0375004]: Unexpected white space between terms 1 and i16\n --> compiler-test:4:15\n |\n 4 | const i = 1 i16;\n | ^" + - "Error [EPAR0370004]: Unexpected white space between terms 1 and i16\n --> compiler-test:4:15\n |\n 4 | const i = 1 i16;\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/i32/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/i32/max_fail.leo.out index 52c9d46119..3781b7b1a9 100644 --- a/tests/expectations/compiler/compiler/integers/i32/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370031]: failed to parse int value '2147483648'\n --> compiler-test:4:20\n |\n 4 | const a: i32 = 2147483648;\n | ^^^^^^^^^^" + - "Error [EASG0373031]: failed to parse int value '2147483648'\n --> compiler-test:4:20\n |\n 4 | const a: i32 = 2147483648;\n | ^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/integers/i32/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/i32/min_fail.leo.out index 76eb3daffa..45d45fc6e5 100644 --- a/tests/expectations/compiler/compiler/integers/i32/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370031]: failed to parse int value '-2147483649'\n --> compiler-test:4:20\n |\n 4 | const a: i32 = -2147483649;\n | ^^^^^^^^^^^" + - "Error [EASG0373031]: failed to parse int value '-2147483649'\n --> compiler-test:4:20\n |\n 4 | const a: i32 = -2147483649;\n | ^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/integers/i32/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/i32/no_space_between_literal.leo.out index 731ad7d55d..8bf423a222 100644 --- a/tests/expectations/compiler/compiler/integers/i32/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EPAR0375004]: Unexpected white space between terms 1 and i32\n --> compiler-test:4:15\n |\n 4 | const i = 1 i32;\n | ^" + - "Error [EPAR0370004]: Unexpected white space between terms 1 and i32\n --> compiler-test:4:15\n |\n 4 | const i = 1 i32;\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/i64/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/i64/max_fail.leo.out index 586880c425..70acb90ad2 100644 --- a/tests/expectations/compiler/compiler/integers/i64/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370031]: failed to parse int value '9223372036854775808'\n --> compiler-test:4:20\n |\n 4 | const a: i64 = 9223372036854775808;\n | ^^^^^^^^^^^^^^^^^^^" + - "Error [EASG0373031]: failed to parse int value '9223372036854775808'\n --> compiler-test:4:20\n |\n 4 | const a: i64 = 9223372036854775808;\n | ^^^^^^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/integers/i64/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/i64/min_fail.leo.out index e937843da5..d40e357854 100644 --- a/tests/expectations/compiler/compiler/integers/i64/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370031]: failed to parse int value '-9223372036854775809'\n --> compiler-test:4:20\n |\n 4 | const a: i64 = -9223372036854775809;\n | ^^^^^^^^^^^^^^^^^^^^" + - "Error [EASG0373031]: failed to parse int value '-9223372036854775809'\n --> compiler-test:4:20\n |\n 4 | const a: i64 = -9223372036854775809;\n | ^^^^^^^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/integers/i64/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/i64/no_space_between_literal.leo.out index 5f6922206c..c5d6f40e8c 100644 --- a/tests/expectations/compiler/compiler/integers/i64/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EPAR0375004]: Unexpected white space between terms 1 and i64\n --> compiler-test:4:15\n |\n 4 | const i = 1 i64;\n | ^" + - "Error [EPAR0370004]: Unexpected white space between terms 1 and i64\n --> compiler-test:4:15\n |\n 4 | const i = 1 i64;\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/i8/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/i8/max_fail.leo.out index 4c5f219d6e..59e58793b3 100644 --- a/tests/expectations/compiler/compiler/integers/i8/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370031]: failed to parse int value '128'\n --> compiler-test:4:19\n |\n 4 | const a: i8 = 128;\n | ^^^" + - "Error [EASG0373031]: failed to parse int value '128'\n --> compiler-test:4:19\n |\n 4 | const a: i8 = 128;\n | ^^^" diff --git a/tests/expectations/compiler/compiler/integers/i8/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/i8/min_fail.leo.out index 940f2096a9..849c2b97bc 100644 --- a/tests/expectations/compiler/compiler/integers/i8/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370031]: failed to parse int value '-129'\n --> compiler-test:4:19\n |\n 4 | const a: i8 = -129;\n | ^^^^" + - "Error [EASG0373031]: failed to parse int value '-129'\n --> compiler-test:4:19\n |\n 4 | const a: i8 = -129;\n | ^^^^" diff --git a/tests/expectations/compiler/compiler/integers/i8/negate_min.leo.out b/tests/expectations/compiler/compiler/integers/i8/negate_min.leo.out index 0fafb838ba..be2e450685 100644 --- a/tests/expectations/compiler/compiler/integers/i8/negate_min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/negate_min.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [ECMP0372083]: integer operation failed due to the signed integer error `Integer overflow`\n --> compiler-test:5:15\n |\n 5 | const b = -a;\n | ^^" + - "Error [ECMP0377083]: integer operation failed due to the signed integer error `Integer overflow`\n --> compiler-test:5:15\n |\n 5 | const b = -a;\n | ^^" diff --git a/tests/expectations/compiler/compiler/integers/i8/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/i8/no_space_between_literal.leo.out index 1cdbda5f17..5a8f095af1 100644 --- a/tests/expectations/compiler/compiler/integers/i8/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EPAR0375004]: Unexpected white space between terms 1 and i8\n --> compiler-test:4:15\n |\n 4 | const i = 1 i8;\n | ^" + - "Error [EPAR0370004]: Unexpected white space between terms 1 and i8\n --> compiler-test:4:15\n |\n 4 | const i = 1 i8;\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/u128/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/u128/max_fail.leo.out index 1e59b8e4f9..0e63762f44 100644 --- a/tests/expectations/compiler/compiler/integers/u128/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370031]: failed to parse int value '340282366920938463463374607431768211456'\n --> compiler-test:4:21\n |\n 4 | const a: u128 = 340282366920938463463374607431768211456;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" + - "Error [EASG0373031]: failed to parse int value '340282366920938463463374607431768211456'\n --> compiler-test:4:21\n |\n 4 | const a: u128 = 340282366920938463463374607431768211456;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/integers/u128/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/u128/min_fail.leo.out index f74b261793..db0cdb2474 100644 --- a/tests/expectations/compiler/compiler/integers/u128/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370031]: failed to parse int value '-1'\n --> compiler-test:4:21\n |\n 4 | const a: u128 = -1;\n | ^^" + - "Error [EASG0373031]: failed to parse int value '-1'\n --> compiler-test:4:21\n |\n 4 | const a: u128 = -1;\n | ^^" diff --git a/tests/expectations/compiler/compiler/integers/u128/negative_input_fail.leo.out b/tests/expectations/compiler/compiler/integers/u128/negative_input_fail.leo.out index c923771547..d2f2b29d22 100644 --- a/tests/expectations/compiler/compiler/integers/u128/negative_input_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/negative_input_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [ECMP0372089]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u128) {}\n | ^" + - "Error [ECMP0377089]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u128) {}\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/u128/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/u128/no_space_between_literal.leo.out index 13902eae38..b53dbf17a5 100644 --- a/tests/expectations/compiler/compiler/integers/u128/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EPAR0375004]: Unexpected white space between terms 1 and u128\n --> compiler-test:4:15\n |\n 4 | const i = 1 u128;\n | ^" + - "Error [EPAR0370004]: Unexpected white space between terms 1 and u128\n --> compiler-test:4:15\n |\n 4 | const i = 1 u128;\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/u16/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/u16/max_fail.leo.out index f72e74eabd..b249cb3754 100644 --- a/tests/expectations/compiler/compiler/integers/u16/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370031]: failed to parse int value '65536'\n --> compiler-test:4:20\n |\n 4 | const a: u16 = 65536;\n | ^^^^^" + - "Error [EASG0373031]: failed to parse int value '65536'\n --> compiler-test:4:20\n |\n 4 | const a: u16 = 65536;\n | ^^^^^" diff --git a/tests/expectations/compiler/compiler/integers/u16/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/u16/min_fail.leo.out index ec1525d1ec..7f1c33ece7 100644 --- a/tests/expectations/compiler/compiler/integers/u16/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370031]: failed to parse int value '-1'\n --> compiler-test:4:20\n |\n 4 | const a: u16 = -1;\n | ^^" + - "Error [EASG0373031]: failed to parse int value '-1'\n --> compiler-test:4:20\n |\n 4 | const a: u16 = -1;\n | ^^" diff --git a/tests/expectations/compiler/compiler/integers/u16/negative_input_fail.leo.out b/tests/expectations/compiler/compiler/integers/u16/negative_input_fail.leo.out index d7b8b136ee..db2a11040d 100644 --- a/tests/expectations/compiler/compiler/integers/u16/negative_input_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/negative_input_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [ECMP0372089]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u16) {}\n | ^" + - "Error [ECMP0377089]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u16) {}\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/u16/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/u16/no_space_between_literal.leo.out index b236bbea52..852084492c 100644 --- a/tests/expectations/compiler/compiler/integers/u16/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EPAR0375004]: Unexpected white space between terms 1 and u16\n --> compiler-test:4:15\n |\n 4 | const i = 1 u16;\n | ^" + - "Error [EPAR0370004]: Unexpected white space between terms 1 and u16\n --> compiler-test:4:15\n |\n 4 | const i = 1 u16;\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/u32/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/u32/max_fail.leo.out index f33b079724..9846c671e1 100644 --- a/tests/expectations/compiler/compiler/integers/u32/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370031]: failed to parse int value '4294967296'\n --> compiler-test:4:20\n |\n 4 | const a: u32 = 4294967296;\n | ^^^^^^^^^^" + - "Error [EASG0373031]: failed to parse int value '4294967296'\n --> compiler-test:4:20\n |\n 4 | const a: u32 = 4294967296;\n | ^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/integers/u32/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/u32/min_fail.leo.out index acab12b37c..28202851e3 100644 --- a/tests/expectations/compiler/compiler/integers/u32/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370031]: failed to parse int value '-1'\n --> compiler-test:4:20\n |\n 4 | const a: u32 = -1;\n | ^^" + - "Error [EASG0373031]: failed to parse int value '-1'\n --> compiler-test:4:20\n |\n 4 | const a: u32 = -1;\n | ^^" diff --git a/tests/expectations/compiler/compiler/integers/u32/negative_input_fail.leo.out b/tests/expectations/compiler/compiler/integers/u32/negative_input_fail.leo.out index 304c83ff0e..8347c44b4b 100644 --- a/tests/expectations/compiler/compiler/integers/u32/negative_input_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/negative_input_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [ECMP0372089]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u32) {}\n | ^" + - "Error [ECMP0377089]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u32) {}\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/u32/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/u32/no_space_between_literal.leo.out index ffae67da70..4974811270 100644 --- a/tests/expectations/compiler/compiler/integers/u32/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EPAR0375004]: Unexpected white space between terms 1 and u32\n --> compiler-test:4:15\n |\n 4 | const i = 1 u32;\n | ^" + - "Error [EPAR0370004]: Unexpected white space between terms 1 and u32\n --> compiler-test:4:15\n |\n 4 | const i = 1 u32;\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/u64/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/u64/max_fail.leo.out index eb02af02a1..4636c42cf2 100644 --- a/tests/expectations/compiler/compiler/integers/u64/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370031]: failed to parse int value '18446744073709551616'\n --> compiler-test:4:20\n |\n 4 | const a: u64 = 18446744073709551616;\n | ^^^^^^^^^^^^^^^^^^^^" + - "Error [EASG0373031]: failed to parse int value '18446744073709551616'\n --> compiler-test:4:20\n |\n 4 | const a: u64 = 18446744073709551616;\n | ^^^^^^^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/integers/u64/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/u64/min_fail.leo.out index d6c8da7920..a33bae4611 100644 --- a/tests/expectations/compiler/compiler/integers/u64/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370031]: failed to parse int value '-1'\n --> compiler-test:4:20\n |\n 4 | const a: u64 = -1;\n | ^^" + - "Error [EASG0373031]: failed to parse int value '-1'\n --> compiler-test:4:20\n |\n 4 | const a: u64 = -1;\n | ^^" diff --git a/tests/expectations/compiler/compiler/integers/u64/negative_input_fail.leo.out b/tests/expectations/compiler/compiler/integers/u64/negative_input_fail.leo.out index 153869f2e1..d42bd484ae 100644 --- a/tests/expectations/compiler/compiler/integers/u64/negative_input_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/negative_input_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [ECMP0372089]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u64) {}\n | ^" + - "Error [ECMP0377089]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u64) {}\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/u64/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/u64/no_space_between_literal.leo.out index d0142db447..69aa25a324 100644 --- a/tests/expectations/compiler/compiler/integers/u64/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EPAR0375004]: Unexpected white space between terms 1 and u64\n --> compiler-test:4:15\n |\n 4 | const i = 1 u64;\n | ^" + - "Error [EPAR0370004]: Unexpected white space between terms 1 and u64\n --> compiler-test:4:15\n |\n 4 | const i = 1 u64;\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/u8/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/u8/max_fail.leo.out index a94c06481a..1764ec3502 100644 --- a/tests/expectations/compiler/compiler/integers/u8/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370031]: failed to parse int value '256'\n --> compiler-test:4:19\n |\n 4 | const a: u8 = 256;\n | ^^^" + - "Error [EASG0373031]: failed to parse int value '256'\n --> compiler-test:4:19\n |\n 4 | const a: u8 = 256;\n | ^^^" diff --git a/tests/expectations/compiler/compiler/integers/u8/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/u8/min_fail.leo.out index a767289f9e..c2e3b45913 100644 --- a/tests/expectations/compiler/compiler/integers/u8/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370031]: failed to parse int value '-1'\n --> compiler-test:4:19\n |\n 4 | const a: u8 = -1;\n | ^^" + - "Error [EASG0373031]: failed to parse int value '-1'\n --> compiler-test:4:19\n |\n 4 | const a: u8 = -1;\n | ^^" diff --git a/tests/expectations/compiler/compiler/integers/u8/negative_input_fail.leo.out b/tests/expectations/compiler/compiler/integers/u8/negative_input_fail.leo.out index 48ddecbb71..8f4a2425db 100644 --- a/tests/expectations/compiler/compiler/integers/u8/negative_input_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/negative_input_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [ECMP0372089]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u8) {}\n | ^" + - "Error [ECMP0377089]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u8) {}\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/u8/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/u8/no_space_between_literal.leo.out index ff2b29278c..4f1333e8cc 100644 --- a/tests/expectations/compiler/compiler/integers/u8/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EPAR0375004]: Unexpected white space between terms 1 and u8\n --> compiler-test:4:15\n |\n 4 | const i = 1 u8;\n | ^" + - "Error [EPAR0370004]: Unexpected white space between terms 1 and u8\n --> compiler-test:4:15\n |\n 4 | const i = 1 u8;\n | ^" diff --git a/tests/expectations/compiler/compiler/mutability/array_fail.leo.out b/tests/expectations/compiler/compiler/mutability/array_fail.leo.out index 1994ea61f6..ca06a5b485 100644 --- a/tests/expectations/compiler/compiler/mutability/array_fail.leo.out +++ b/tests/expectations/compiler/compiler/mutability/array_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370033]: illegal assignment to immutable variable 'a'\n --> compiler-test:5:5\n |\n 5 | a[0] = 0;\n | ^^^^^^^^" + - "Error [EASG0373033]: illegal assignment to immutable variable 'a'\n --> compiler-test:5:5\n |\n 5 | a[0] = 0;\n | ^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/mutability/circuit_fail.leo.out b/tests/expectations/compiler/compiler/mutability/circuit_fail.leo.out index 2acdf7d78e..0d6020a433 100644 --- a/tests/expectations/compiler/compiler/mutability/circuit_fail.leo.out +++ b/tests/expectations/compiler/compiler/mutability/circuit_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370033]: illegal assignment to immutable variable 'a'\n --> compiler-test:10:5\n |\n 10 | a.x = 0;\n | ^^^^^^^" + - "Error [EASG0373033]: illegal assignment to immutable variable 'a'\n --> compiler-test:10:5\n |\n 10 | a.x = 0;\n | ^^^^^^^" diff --git a/tests/expectations/compiler/compiler/mutability/circuit_function_const.leo.out b/tests/expectations/compiler/compiler/mutability/circuit_function_const.leo.out index b74ade55c8..91f1479abc 100644 --- a/tests/expectations/compiler/compiler/mutability/circuit_function_const.leo.out +++ b/tests/expectations/compiler/compiler/mutability/circuit_function_const.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370010]: cannot call mutable member function 'foo' of circuit 'Foo' from immutable context\n --> compiler-test:15:5\n |\n 15 | a.foo();\n | ^^^^^" + - "Error [EASG0373010]: cannot call mutable member function 'foo' of circuit 'Foo' from immutable context\n --> compiler-test:15:5\n |\n 15 | a.foo();\n | ^^^^^" diff --git a/tests/expectations/compiler/compiler/mutability/circuit_static_function_mut_fail.leo.out b/tests/expectations/compiler/compiler/mutability/circuit_static_function_mut_fail.leo.out index 5f13e6a818..c173994d24 100644 --- a/tests/expectations/compiler/compiler/mutability/circuit_static_function_mut_fail.leo.out +++ b/tests/expectations/compiler/compiler/mutability/circuit_static_function_mut_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370006]: extra circuit member 'x' for initialization of circuit 'Foo' is not allowed\n --> compiler-test:8:19\n |\n 8 | let a = Foo { x: 1 };\n | ^" + - "Error [EASG0373006]: extra circuit member 'x' for initialization of circuit 'Foo' is not allowed\n --> compiler-test:8:19\n |\n 8 | let a = Foo { x: 1 };\n | ^" diff --git a/tests/expectations/compiler/compiler/mutability/const.leo.out b/tests/expectations/compiler/compiler/mutability/const.leo.out index bc943a8225..c6ba953ccb 100644 --- a/tests/expectations/compiler/compiler/mutability/const.leo.out +++ b/tests/expectations/compiler/compiler/mutability/const.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370033]: illegal assignment to immutable variable 'a'\n --> compiler-test:6:5\n |\n 6 | a = 0;\n | ^^^^^" + - "Error [EASG0373033]: illegal assignment to immutable variable 'a'\n --> compiler-test:6:5\n |\n 6 | a = 0;\n | ^^^^^" diff --git a/tests/expectations/compiler/compiler/mutability/function_input.leo.out b/tests/expectations/compiler/compiler/mutability/function_input.leo.out index d62ff241ee..3c28b515fc 100644 --- a/tests/expectations/compiler/compiler/mutability/function_input.leo.out +++ b/tests/expectations/compiler/compiler/mutability/function_input.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370028]: failed to resolve variable reference 'a'\n --> compiler-test:5:5\n |\n 5 | a = false;\n | ^" + - "Error [EASG0373028]: failed to resolve variable reference 'a'\n --> compiler-test:5:5\n |\n 5 | a = false;\n | ^" diff --git a/tests/expectations/compiler/compiler/mutability/let_fail.leo.out b/tests/expectations/compiler/compiler/mutability/let_fail.leo.out index bc943a8225..c6ba953ccb 100644 --- a/tests/expectations/compiler/compiler/mutability/let_fail.leo.out +++ b/tests/expectations/compiler/compiler/mutability/let_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370033]: illegal assignment to immutable variable 'a'\n --> compiler-test:6:5\n |\n 6 | a = 0;\n | ^^^^^" + - "Error [EASG0373033]: illegal assignment to immutable variable 'a'\n --> compiler-test:6:5\n |\n 6 | a = 0;\n | ^^^^^" diff --git a/tests/expectations/compiler/compiler/statements/assign_ternary.leo.out b/tests/expectations/compiler/compiler/statements/assign_ternary.leo.out index f5373d32e9..659cb7e8b4 100644 --- a/tests/expectations/compiler/compiler/statements/assign_ternary.leo.out +++ b/tests/expectations/compiler/compiler/statements/assign_ternary.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370021]: ternary sides had different types: left u32, right bool\n --> compiler-test:4:13\n |\n 4 | let x = true ? x: true;\n | ^^^^^^^^^^^^^^" + - "Error [EASG0373021]: ternary sides had different types: left u32, right bool\n --> compiler-test:4:13\n |\n 4 | let x = true ? x: true;\n | ^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/statements/duplicate_variable.leo.out b/tests/expectations/compiler/compiler/statements/duplicate_variable.leo.out index 0dc18a17b6..349d819abb 100644 --- a/tests/expectations/compiler/compiler/statements/duplicate_variable.leo.out +++ b/tests/expectations/compiler/compiler/statements/duplicate_variable.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370017]: a variable named \"x\" already exists in this scope\n --> compiler-test:5:3\n |\n 5 | let x = true;\n | ^^^^^^^^^^^^" + - "Error [EASG0373017]: a variable named \"x\" already exists in this scope\n --> compiler-test:5:3\n |\n 5 | let x = true;\n | ^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/statements/ternary_non_const_fail.leo.out b/tests/expectations/compiler/compiler/statements/ternary_non_const_fail.leo.out index 73c6f6e92c..0deb81474b 100644 --- a/tests/expectations/compiler/compiler/statements/ternary_non_const_fail.leo.out +++ b/tests/expectations/compiler/compiler/statements/ternary_non_const_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error: [EASG0370015]: failed to create const variable(s) 'y' with non constant values.\n --> compiler-test:5:5\n |\n 5 | const y = x > 2u8? 1u8 : 2u8;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^" + - "Error [EASG0373015]: failed to create const variable(s) 'y' with non constant values.\n --> compiler-test:5:5\n |\n 5 | const y = x > 2u8? 1u8 : 2u8;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^" diff --git a/tests/expectations/parser/parser/circuits/fields_fail.leo.out b/tests/expectations/parser/parser/circuits/fields_fail.leo.out index a195c893e7..8c4dbaf736 100644 --- a/tests/expectations/parser/parser/circuits/fields_fail.leo.out +++ b/tests/expectations/parser/parser/circuits/fields_fail.leo.out @@ -2,4 +2,4 @@ namespace: Parse expectation: Fail outputs: - - "Error: [EPAR0375006]: Cannot mix use of commas and semi-colons for circuit member variable declarations.\n --> test:10:11\n |\n 10 | y: u32;\n | ^" + - "Error [EPAR0370006]: Cannot mix use of commas and semi-colons for circuit member variable declarations.\n --> test:10:11\n |\n 10 | y: u32;\n | ^" diff --git a/tests/expectations/parser/parser/expression/array_init_fail.leo.out b/tests/expectations/parser/parser/expression/array_init_fail.leo.out index 4b8f94e586..0eacb46895 100644 --- a/tests/expectations/parser/parser/expression/array_init_fail.leo.out +++ b/tests/expectations/parser/parser/expression/array_init_fail.leo.out @@ -2,5 +2,5 @@ namespace: ParseExpression expectation: Fail outputs: - - "Error: [EPAR0375010]: illegal spread in array initializer\n --> test:1:1\n |\n 1 | [...0u8; 1]\n | ^^^^^^^" - - "Error: [EPAR0375010]: illegal spread in array initializer\n --> test:1:1\n |\n 1 | [...0; 1]\n | ^^^^^" + - "Error [EPAR0370010]: illegal spread in array initializer\n --> test:1:1\n |\n 1 | [...0u8; 1]\n | ^^^^^^^" + - "Error [EPAR0370010]: illegal spread in array initializer\n --> test:1:1\n |\n 1 | [...0; 1]\n | ^^^^^" diff --git a/tests/expectations/parser/parser/expression/array_inline_fail.leo.out b/tests/expectations/parser/parser/expression/array_inline_fail.leo.out index 4d2804e7c0..dd15703185 100644 --- a/tests/expectations/parser/parser/expression/array_inline_fail.leo.out +++ b/tests/expectations/parser/parser/expression/array_inline_fail.leo.out @@ -2,8 +2,8 @@ namespace: ParseExpression expectation: Fail outputs: - - "Error: [EPAR0375009]: unexpected string: expected 'expression', got ','\n --> test:1:2\n |\n 1 | [,]\n | ^" - - "Error: [EPAR0375009]: unexpected string: expected 'expression', got ','\n --> test:1:2\n |\n 1 | [,,]\n | ^" - - "Error: [EPAR0375009]: unexpected string: expected 'expression', got ','\n --> test:1:4\n |\n 1 | [0,,]\n | ^" - - "Error: [EPAR0375009]: unexpected string: expected 'expression', got ','\n --> test:1:2\n |\n 1 | [,0]\n | ^" - - "Error: [EPAR0375009]: unexpected string: expected 'expression', got ','\n --> test:1:2\n |\n 1 | [,0,]\n | ^" + - "Error [EPAR0370009]: unexpected string: expected 'expression', got ','\n --> test:1:2\n |\n 1 | [,]\n | ^" + - "Error [EPAR0370009]: unexpected string: expected 'expression', got ','\n --> test:1:2\n |\n 1 | [,,]\n | ^" + - "Error [EPAR0370009]: unexpected string: expected 'expression', got ','\n --> test:1:4\n |\n 1 | [0,,]\n | ^" + - "Error [EPAR0370009]: unexpected string: expected 'expression', got ','\n --> test:1:2\n |\n 1 | [,0]\n | ^" + - "Error [EPAR0370009]: unexpected string: expected 'expression', got ','\n --> test:1:2\n |\n 1 | [,0,]\n | ^" diff --git a/tests/expectations/parser/parser/expression/circuit_init_fail.leo.out b/tests/expectations/parser/parser/expression/circuit_init_fail.leo.out index e38a7ea93f..9a08737239 100644 --- a/tests/expectations/parser/parser/expression/circuit_init_fail.leo.out +++ b/tests/expectations/parser/parser/expression/circuit_init_fail.leo.out @@ -2,15 +2,15 @@ namespace: ParseExpression expectation: Fail outputs: - - "Error: [EPAR0375003]: unexpected EOF\n --> test:1:3\n |\n 1 | x {\n | ^" + - "Error [EPAR0370003]: unexpected EOF\n --> test:1:3\n |\n 1 | x {\n | ^" - "did not consume all input: '}' @ 1:3-4\n" - - "Error: [EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:4\n |\n 1 | x {,}\n | ^" - - "Error: [EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:5\n |\n 1 | x { , }\n | ^" - - "Error: [EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:4\n |\n 1 | x {,,,}\n | ^" - - "Error: [EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:6\n |\n 1 | x {x,,}\n | ^" - - "Error: [EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:4\n |\n 1 | x {,,x}\n | ^" - - "Error: [EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:4\n |\n 1 | x {,x}\n | ^" - - "Error: [EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:8\n |\n 1 | x {x:y,,}\n | ^" - - "Error: [EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:4\n |\n 1 | x {,,x:y}\n | ^" - - "Error: [EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:4\n |\n 1 | x {,x:y}\n | ^" - - "Error: [EPAR0375009]: unexpected string: expected 'expression', got '}'\n --> test:1:6\n |\n 1 | x {x:}\n | ^" + - "Error [EPAR0370009]: unexpected string: expected 'ident', got ','\n --> test:1:4\n |\n 1 | x {,}\n | ^" + - "Error [EPAR0370009]: unexpected string: expected 'ident', got ','\n --> test:1:5\n |\n 1 | x { , }\n | ^" + - "Error [EPAR0370009]: unexpected string: expected 'ident', got ','\n --> test:1:4\n |\n 1 | x {,,,}\n | ^" + - "Error [EPAR0370009]: unexpected string: expected 'ident', got ','\n --> test:1:6\n |\n 1 | x {x,,}\n | ^" + - "Error [EPAR0370009]: unexpected string: expected 'ident', got ','\n --> test:1:4\n |\n 1 | x {,,x}\n | ^" + - "Error [EPAR0370009]: unexpected string: expected 'ident', got ','\n --> test:1:4\n |\n 1 | x {,x}\n | ^" + - "Error [EPAR0370009]: unexpected string: expected 'ident', got ','\n --> test:1:8\n |\n 1 | x {x:y,,}\n | ^" + - "Error [EPAR0370009]: unexpected string: expected 'ident', got ','\n --> test:1:4\n |\n 1 | x {,,x:y}\n | ^" + - "Error [EPAR0370009]: unexpected string: expected 'ident', got ','\n --> test:1:4\n |\n 1 | x {,x:y}\n | ^" + - "Error [EPAR0370009]: unexpected string: expected 'expression', got '}'\n --> test:1:6\n |\n 1 | x {x:}\n | ^" diff --git a/tests/expectations/parser/parser/expression/literal/address_fail.leo.out b/tests/expectations/parser/parser/expression/literal/address_fail.leo.out index 6f39f1dec4..ecbfa3a8ac 100644 --- a/tests/expectations/parser/parser/expression/literal/address_fail.leo.out +++ b/tests/expectations/parser/parser/expression/literal/address_fail.leo.out @@ -2,12 +2,12 @@ namespace: Token expectation: Fail outputs: - - "Error: [EPAR0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" - - "Error: [EPAR0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6Z2eu975wnpz2925ntjccd5cfqxtyu8sta57J9'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6Z2eu975wnpz2925ntjccd5cfqxtyu8sta57J9\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" - - "Error: [EPAR0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" - - "Error: [EPAR0375001]: invalid address literal: 'aleo1'\n --> test:1:1\n |\n 1 | aleo1\n | ^^^^^" - - "Error: [EPAR0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" - - "Error: [EPAR0375001]: invalid address literal: 'aleo1'\n --> test:1:1\n |\n 1 | aleo1\n | ^^^^^" - - "Error: [EPAR0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" - - "Error: [EPAR0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d11'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d11\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" - - "Error: [EPAR0375001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1x'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1x\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" + - "Error [EPAR0370001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" + - "Error [EPAR0370001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6Z2eu975wnpz2925ntjccd5cfqxtyu8sta57J9'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6Z2eu975wnpz2925ntjccd5cfqxtyu8sta57J9\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" + - "Error [EPAR0370001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" + - "Error [EPAR0370001]: invalid address literal: 'aleo1'\n --> test:1:1\n |\n 1 | aleo1\n | ^^^^^" + - "Error [EPAR0370001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" + - "Error [EPAR0370001]: invalid address literal: 'aleo1'\n --> test:1:1\n |\n 1 | aleo1\n | ^^^^^" + - "Error [EPAR0370001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" + - "Error [EPAR0370001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d11'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d11\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" + - "Error [EPAR0370001]: invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1x'\n --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1x\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" diff --git a/tests/expectations/parser/parser/expression/literal/char_fail.leo.out b/tests/expectations/parser/parser/expression/literal/char_fail.leo.out index 944bd1c196..a5656a5488 100644 --- a/tests/expectations/parser/parser/expression/literal/char_fail.leo.out +++ b/tests/expectations/parser/parser/expression/literal/char_fail.leo.out @@ -2,38 +2,38 @@ namespace: Token expectation: Fail outputs: - - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\'\n | ^\n |\n = HELP TODO" - - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | 'a\n | ^\n |\n = HELP TODO" - - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | ''\n | ^\n |\n = HELP TODO" - - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\x9A'\n | ^\n |\n = HELP TODO" - - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\x7'\n | ^\n |\n = HELP TODO" - - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\x7g'\n | ^\n |\n = HELP TODO" - - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\xz'\n | ^\n |\n = HELP TODO" - - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\x80'\n | ^\n |\n = HELP TODO" - - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\xc1'\n | ^\n |\n = HELP TODO" - - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\xc2'\n | ^\n |\n = HELP TODO" - - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\xDF'\n | ^\n |\n = HELP TODO" - - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\xC0'\n | ^\n |\n = HELP TODO" - - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\xe0'\n | ^\n |\n = HELP TODO" - - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\x9f'\n | ^\n |\n = HELP TODO" - - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | 'abcdefg'\n | ^\n |\n = HELP TODO" - - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\t\\t'\n | ^\n |\n = HELP TODO" - - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\a'\n | ^\n |\n = HELP TODO" - - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\z'\n | ^\n |\n = HELP TODO" - - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\A'\n | ^\n |\n = HELP TODO" - - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\Z'\n | ^\n |\n = HELP TODO" - - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\1'\n | ^\n |\n = HELP TODO" - - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\9'\n | ^\n |\n = HELP TODO" - - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\*'\n | ^\n |\n = HELP TODO" - - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\x'\n | ^\n |\n = HELP TODO" - - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u'\n | ^\n |\n = HELP TODO" - - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u{bbbbb}\\u{aaaa}'\n | ^\n |\n = HELP TODO" - - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\uz'\n | ^\n |\n = HELP TODO" - - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u1'\n | ^\n |\n = HELP TODO" - - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u123'\n | ^\n |\n = HELP TODO" - - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u{2764z'\n | ^\n |\n = HELP TODO" - - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u{276g}'\n | ^\n |\n = HELP TODO" - - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u00000000'\n | ^\n |\n = HELP TODO" - - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u01000000'\n | ^\n |\n = HELP TODO" - - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '\\u9999999'\n | ^\n |\n = HELP TODO" - - "Error: [EPAR0375000]: '\n --> test:1:1\n |\n 1 | '😭😂😘'\n | ^\n |\n = HELP TODO" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\'\n | ^\n |\n = HELP TODO" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | 'a\n | ^\n |\n = HELP TODO" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | ''\n | ^\n |\n = HELP TODO" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\x9A'\n | ^\n |\n = HELP TODO" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\x7'\n | ^\n |\n = HELP TODO" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\x7g'\n | ^\n |\n = HELP TODO" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\xz'\n | ^\n |\n = HELP TODO" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\x80'\n | ^\n |\n = HELP TODO" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\xc1'\n | ^\n |\n = HELP TODO" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\xc2'\n | ^\n |\n = HELP TODO" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\xDF'\n | ^\n |\n = HELP TODO" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\xC0'\n | ^\n |\n = HELP TODO" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\xe0'\n | ^\n |\n = HELP TODO" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\x9f'\n | ^\n |\n = HELP TODO" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | 'abcdefg'\n | ^\n |\n = HELP TODO" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\t\\t'\n | ^\n |\n = HELP TODO" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\a'\n | ^\n |\n = HELP TODO" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\z'\n | ^\n |\n = HELP TODO" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\A'\n | ^\n |\n = HELP TODO" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\Z'\n | ^\n |\n = HELP TODO" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\1'\n | ^\n |\n = HELP TODO" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\9'\n | ^\n |\n = HELP TODO" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\*'\n | ^\n |\n = HELP TODO" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\x'\n | ^\n |\n = HELP TODO" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\u'\n | ^\n |\n = HELP TODO" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\u{bbbbb}\\u{aaaa}'\n | ^\n |\n = HELP TODO" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\uz'\n | ^\n |\n = HELP TODO" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\u1'\n | ^\n |\n = HELP TODO" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\u123'\n | ^\n |\n = HELP TODO" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\u{2764z'\n | ^\n |\n = HELP TODO" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\u{276g}'\n | ^\n |\n = HELP TODO" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\u00000000'\n | ^\n |\n = HELP TODO" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\u01000000'\n | ^\n |\n = HELP TODO" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\u9999999'\n | ^\n |\n = HELP TODO" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '😭😂😘'\n | ^\n |\n = HELP TODO" diff --git a/tests/expectations/parser/parser/expression/literal/group_fail.leo.out b/tests/expectations/parser/parser/expression/literal/group_fail.leo.out index befe1a0513..8816fb7773 100644 --- a/tests/expectations/parser/parser/expression/literal/group_fail.leo.out +++ b/tests/expectations/parser/parser/expression/literal/group_fail.leo.out @@ -2,12 +2,12 @@ namespace: ParseExpression expectation: Fail outputs: - - "Error: [EPAR0375009]: unexpected string: expected 'expression', got 'group'\n --> test:1:1\n |\n 1 | group\n | ^^^^^" + - "Error [EPAR0370009]: unexpected string: expected 'expression', got 'group'\n --> test:1:1\n |\n 1 | group\n | ^^^^^" - "did not consume all input: 'group' @ 1:3-8\n" - "did not consume all input: 'group' @ 1:6-11\n" - - "Error: [EPAR0375009]: unexpected string: expected 'expression', got ','\n --> test:1:2\n |\n 1 | (,)group\n | ^" - - "Error: [EPAR0375009]: unexpected string: expected 'expression', got '+'\n --> test:1:2\n |\n 1 | (+, -,)group\n | ^" - - "Error: [EPAR0375009]: unexpected string: expected 'expression', got ','\n --> test:1:2\n |\n 1 | (,+, -)group\n | ^" + - "Error [EPAR0370009]: unexpected string: expected 'expression', got ','\n --> test:1:2\n |\n 1 | (,)group\n | ^" + - "Error [EPAR0370009]: unexpected string: expected 'expression', got '+'\n --> test:1:2\n |\n 1 | (+, -,)group\n | ^" + - "Error [EPAR0370009]: unexpected string: expected 'expression', got ','\n --> test:1:2\n |\n 1 | (,+, -)group\n | ^" - "did not consume all input: 'group' @ 1:6-11\n" - "did not consume all input: 'group' @ 1:12-17\n" - "did not consume all input: 'group' @ 1:15-20\n" diff --git a/tests/expectations/parser/parser/expression/literal/string_fail.leo.out b/tests/expectations/parser/parser/expression/literal/string_fail.leo.out index 8f79cc3a34..07ac3097ed 100644 --- a/tests/expectations/parser/parser/expression/literal/string_fail.leo.out +++ b/tests/expectations/parser/parser/expression/literal/string_fail.leo.out @@ -2,10 +2,10 @@ namespace: Token expectation: Fail outputs: - - "Error: [EPAR0375000]: \"\n --> test:1:1\n |\n 1 | \"Hello world!\n | ^\n |\n = HELP TODO" - - "Error: [EPAR0375000]: \"\n --> test:1:1\n |\n 1 | \"\\\"\n | ^\n |\n = HELP TODO" - - "Error: [EPAR0375000]: \"\n --> test:1:1\n |\n 1 | \"\\l\"\n | ^\n |\n = HELP TODO" - - "Error: [EPAR0375000]: \"\n --> test:1:1\n |\n 1 | \"\\uaaa\"\n | ^\n |\n = HELP TODO" - - "Error: [EPAR0375000]: \"\n --> test:1:1\n |\n 1 | \"\\u\"\n | ^\n |\n = HELP TODO" - - "Error: [EPAR0375000]: \"\n --> test:1:1\n |\n 1 | \"\\xFF\"\n | ^\n |\n = HELP TODO" - - "Error: [EPAR0375000]: \"\n --> test:1:1\n |\n 1 | \"\\x\"\n | ^\n |\n = HELP TODO" + - "Error [EPAR0370000]: \"\n --> test:1:1\n |\n 1 | \"Hello world!\n | ^\n |\n = HELP TODO" + - "Error [EPAR0370000]: \"\n --> test:1:1\n |\n 1 | \"\\\"\n | ^\n |\n = HELP TODO" + - "Error [EPAR0370000]: \"\n --> test:1:1\n |\n 1 | \"\\l\"\n | ^\n |\n = HELP TODO" + - "Error [EPAR0370000]: \"\n --> test:1:1\n |\n 1 | \"\\uaaa\"\n | ^\n |\n = HELP TODO" + - "Error [EPAR0370000]: \"\n --> test:1:1\n |\n 1 | \"\\u\"\n | ^\n |\n = HELP TODO" + - "Error [EPAR0370000]: \"\n --> test:1:1\n |\n 1 | \"\\xFF\"\n | ^\n |\n = HELP TODO" + - "Error [EPAR0370000]: \"\n --> test:1:1\n |\n 1 | \"\\x\"\n | ^\n |\n = HELP TODO" diff --git a/tests/expectations/parser/parser/functions/annotated_fail.leo.out b/tests/expectations/parser/parser/functions/annotated_fail.leo.out index b8cd8b8d51..f3bf4dee20 100644 --- a/tests/expectations/parser/parser/functions/annotated_fail.leo.out +++ b/tests/expectations/parser/parser/functions/annotated_fail.leo.out @@ -2,4 +2,4 @@ namespace: Parse expectation: Fail outputs: - - "Error: [EPAR0375005]: expected 'identifier', 'number' -- got ')'\n --> test:3:12\n |\n 3 | @test(test,)\n | ^" + - "Error [EPAR0370005]: expected 'identifier', 'number' -- got ')'\n --> test:3:12\n |\n 3 | @test(test,)\n | ^" diff --git a/tests/expectations/parser/parser/functions/const_input_fail.leo.out b/tests/expectations/parser/parser/functions/const_input_fail.leo.out index 4d782992f1..d0d34e7510 100644 --- a/tests/expectations/parser/parser/functions/const_input_fail.leo.out +++ b/tests/expectations/parser/parser/functions/const_input_fail.leo.out @@ -2,4 +2,4 @@ namespace: Parse expectation: Fail outputs: - - "Error: [EPAR0375009]: unexpected string: expected 'ident', got 'input'\n --> test:3:18\n |\n 3 | function x(const input) {\n | ^^^^^" + - "Error [EPAR0370009]: unexpected string: expected 'ident', got 'input'\n --> test:3:18\n |\n 3 | function x(const input) {\n | ^^^^^" diff --git a/tests/expectations/parser/parser/import/import_empty_list_fail.leo.out b/tests/expectations/parser/parser/import/import_empty_list_fail.leo.out index 208a8168e2..e9201ce299 100644 --- a/tests/expectations/parser/parser/import/import_empty_list_fail.leo.out +++ b/tests/expectations/parser/parser/import/import_empty_list_fail.leo.out @@ -2,4 +2,4 @@ namespace: Parse expectation: Fail outputs: - - "Error: [EPAR0375002]: Cannot import empty list\n --> test:3:8\n |\n 3 | import a.();\n | ^" + - "Error [EPAR0370002]: Cannot import empty list\n --> test:3:8\n |\n 3 | import a.();\n | ^" diff --git a/tests/expectations/parser/parser/import/invalid.leo.out b/tests/expectations/parser/parser/import/invalid.leo.out index 62e236873f..b71e40aa89 100644 --- a/tests/expectations/parser/parser/import/invalid.leo.out +++ b/tests/expectations/parser/parser/import/invalid.leo.out @@ -2,4 +2,4 @@ namespace: Parse expectation: Fail outputs: - - "Error: [EPAR0375005]: expected . -- got ';'\n --> test:3:18\n |\n 3 | import foo as bar;\n | ^" + - "Error [EPAR0370005]: expected . -- got ';'\n --> test:3:18\n |\n 3 | import foo as bar;\n | ^" diff --git a/tests/expectations/parser/parser/statement/conditional_fail.leo.out b/tests/expectations/parser/parser/statement/conditional_fail.leo.out index 5edf5ccd68..8a62d7823e 100644 --- a/tests/expectations/parser/parser/statement/conditional_fail.leo.out +++ b/tests/expectations/parser/parser/statement/conditional_fail.leo.out @@ -2,4 +2,4 @@ namespace: ParseStatement expectation: Fail outputs: - - "Error: [EPAR0375008]: unexpected statement: expected 'Block or Conditional', got 'let mut x = 2;'\n --> test:1:17\n |\n 1 | if true {} else let x = 2;\n | ^^^^^^^^^" + - "Error [EPAR0370008]: unexpected statement: expected 'Block or Conditional', got 'let mut x = 2;'\n --> test:1:17\n |\n 1 | if true {} else let x = 2;\n | ^^^^^^^^^" diff --git a/tests/expectations/parser/parser/statement/definition_fail.leo.out b/tests/expectations/parser/parser/statement/definition_fail.leo.out index d80b64d83e..11640aa977 100644 --- a/tests/expectations/parser/parser/statement/definition_fail.leo.out +++ b/tests/expectations/parser/parser/statement/definition_fail.leo.out @@ -2,26 +2,26 @@ namespace: ParseStatement expectation: Fail outputs: - - "Error: [EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x = expr;\n | ^^^^^^^" - - "Error: [EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x = ();\n | ^^^^^^^" - - "Error: [EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x = x+y;\n | ^^^^^^^" - - "Error: [EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x = (x,y);\n | ^^^^^^^" - - "Error: [EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x = x();\n | ^^^^^^^" - - "Error: [EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x = expr;\n | ^^^^^^^^^" - - "Error: [EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x = ();\n | ^^^^^^^^^" - - "Error: [EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x = x+y;\n | ^^^^^^^^^" - - "Error: [EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x = (x,y);\n | ^^^^^^^^^" - - "Error: [EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x = x();\n | ^^^^^^^^^" - - "Error: [EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x: u32 = expr;\n | ^^^^^^^" - - "Error: [EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x: u32 = ();\n | ^^^^^^^" - - "Error: [EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x: u32 = x+y;\n | ^^^^^^^" - - "Error: [EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x: u32 = (x,y);\n | ^^^^^^^" - - "Error: [EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x: u32 = x();\n | ^^^^^^^" - - "Error: [EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x: u32 = expr;\n | ^^^^^^^^^" - - "Error: [EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x: u32 = ();\n | ^^^^^^^^^" - - "Error: [EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x: u32 = x+y;\n | ^^^^^^^^^" - - "Error: [EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x: u32 = (x,y);\n | ^^^^^^^^^" - - "Error: [EPAR0375015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x: u32 = x();\n | ^^^^^^^^^" - - "Error: [EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:10\n |\n 1 | let (x,y,,) = ();\n | ^" - - "Error: [EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:6\n |\n 1 | let (,x,y) = ();\n | ^" - - "Error: [EPAR0375009]: unexpected string: expected 'ident', got ','\n --> test:1:8\n |\n 1 | let (x,,y) = ();\n | ^" + - "Error [EPAR0370015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x = expr;\n | ^^^^^^^" + - "Error [EPAR0370015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x = ();\n | ^^^^^^^" + - "Error [EPAR0370015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x = x+y;\n | ^^^^^^^" + - "Error [EPAR0370015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x = (x,y);\n | ^^^^^^^" + - "Error [EPAR0370015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x = x();\n | ^^^^^^^" + - "Error [EPAR0370015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x = expr;\n | ^^^^^^^^^" + - "Error [EPAR0370015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x = ();\n | ^^^^^^^^^" + - "Error [EPAR0370015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x = x+y;\n | ^^^^^^^^^" + - "Error [EPAR0370015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x = (x,y);\n | ^^^^^^^^^" + - "Error [EPAR0370015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x = x();\n | ^^^^^^^^^" + - "Error [EPAR0370015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x: u32 = expr;\n | ^^^^^^^" + - "Error [EPAR0370015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x: u32 = ();\n | ^^^^^^^" + - "Error [EPAR0370015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x: u32 = x+y;\n | ^^^^^^^" + - "Error [EPAR0370015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x: u32 = (x,y);\n | ^^^^^^^" + - "Error [EPAR0370015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x: u32 = x();\n | ^^^^^^^" + - "Error [EPAR0370015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x: u32 = expr;\n | ^^^^^^^^^" + - "Error [EPAR0370015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x: u32 = ();\n | ^^^^^^^^^" + - "Error [EPAR0370015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x: u32 = x+y;\n | ^^^^^^^^^" + - "Error [EPAR0370015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x: u32 = (x,y);\n | ^^^^^^^^^" + - "Error [EPAR0370015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x: u32 = x();\n | ^^^^^^^^^" + - "Error [EPAR0370009]: unexpected string: expected 'ident', got ','\n --> test:1:10\n |\n 1 | let (x,y,,) = ();\n | ^" + - "Error [EPAR0370009]: unexpected string: expected 'ident', got ','\n --> test:1:6\n |\n 1 | let (,x,y) = ();\n | ^" + - "Error [EPAR0370009]: unexpected string: expected 'ident', got ','\n --> test:1:8\n |\n 1 | let (x,,y) = ();\n | ^" diff --git a/tests/expectations/parser/parser/statement/return_fail.leo.out b/tests/expectations/parser/parser/statement/return_fail.leo.out index 46ed0ecc34..05811b1484 100644 --- a/tests/expectations/parser/parser/statement/return_fail.leo.out +++ b/tests/expectations/parser/parser/statement/return_fail.leo.out @@ -2,6 +2,6 @@ namespace: ParseStatement expectation: Fail outputs: - - "Error: [EPAR0375003]: unexpected EOF\n --> test:1:1\n |\n 1 | return\n | ^^^^^^" - - "Error: [EPAR0375003]: unexpected EOF\n --> test:1:8\n |\n 1 | return 5\n | ^" - - "Error: [EPAR0375009]: unexpected string: expected 'expression', got 'if'\n --> test:2:1\n |\n 2 | if x {}\n | ^^" + - "Error [EPAR0370003]: unexpected EOF\n --> test:1:1\n |\n 1 | return\n | ^^^^^^" + - "Error [EPAR0370003]: unexpected EOF\n --> test:1:8\n |\n 1 | return 5\n | ^" + - "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:2:1\n |\n 2 | if x {}\n | ^^" From 54eb95c62de9c305539a307ca4265f5200bdd38e Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Fri, 13 Aug 2021 18:21:39 -0700 Subject: [PATCH 41/58] Change RFC based on discussion --- docs/rfc/009-primitive-type-circuits.md | 64 --------------- .../009-scalar-type-accesses-and-methods.md | 77 +++++++++++++++++++ 2 files changed, 77 insertions(+), 64 deletions(-) delete mode 100644 docs/rfc/009-primitive-type-circuits.md create mode 100644 docs/rfc/009-scalar-type-accesses-and-methods.md diff --git a/docs/rfc/009-primitive-type-circuits.md b/docs/rfc/009-primitive-type-circuits.md deleted file mode 100644 index 7d2e461b2d..0000000000 --- a/docs/rfc/009-primitive-type-circuits.md +++ /dev/null @@ -1,64 +0,0 @@ -# Leo RFC 001: Initial String Support - -## Authors - -- Max Bruce -- Collin Chin -- Alessandro Coglio -- Eric McCarthy -- Jon Pavlik -- Damir Shamanaev -- Damon Sicore -- Howard Wu - -## Status - -DRAFT - -## Summary - -This RFC proposes that the primitive types in Leo (integers, fields, etc.) are treated as circuits. The actual type primitives would still exist within the compiler and language. However, whenever a type primitive is encountered, it would be treated as a circuit(similar to Java types being objects). Note that this would not affect circuit synthesis. - -## Motivation - -Several languages have their types represented by an object within the language itself. This approach allows for a clean interface to provide built-in methods or static members for these basic types. - -## Design - -### Semantics - -Leo already has support for circuits. As such, the change would occur mainly during the parsing stage. However, we would still validate the parsing of literals/tuple-expressions/array-expressions the same way; the resulting type would just be a circuit. When we encounter either implicit types or an explicitly typed system, they would be parsed as a circuit. - -We could implement the circuits internally as follows: - -```ts -circuit U8 { - data: u8 -} -``` - -As for AST clarity's sake, these circuits should still be written to the AST the same way as the current primitives are. - -It would benefit us to store these circuits in a separate list of circuits on the AST that are pre-defined. - -All current operations on these circuits representing the basic functions should still work. These operations can easily be implemented by just leveraging the actual type primitive stored within the circuit. - -Now methods and static members would be first-class citizens of the circuits treated similarly to current operations like existing primitive operators. For example, in the following: - -```ts -let x = 1u8.to_bits(); -``` - -the method call would be treated as a gadget call. This implementation would save us implementing Leo methods the same way as blake2s currently is. - -## Drawbacks - -This change adds more complexity to the language. - -## Effect on Ecosystem - -None. All currently valid Leo programs would still be valid after this proposal. - -## Alternatives - -For implementing built-in operators, we could also allow operator overloading and then have a default overloaded method on these circuits. diff --git a/docs/rfc/009-scalar-type-accesses-and-methods.md b/docs/rfc/009-scalar-type-accesses-and-methods.md new file mode 100644 index 0000000000..d359dd715b --- /dev/null +++ b/docs/rfc/009-scalar-type-accesses-and-methods.md @@ -0,0 +1,77 @@ +# Leo RFC 009: Scalar Type Accesses And Methods + +## Authors + +- Max Bruce +- Collin Chin +- Alessandro Coglio +- Eric McCarthy +- Jon Pavlik +- Damir Shamanaev +- Damon Sicore +- Howard Wu + +## Status + +DRAFT + +## Summary + +This RFC proposes two things: + +1. The scalar types in Leo (integers, fields, etc.) can have static methods. +2. The scalar types in Leo (integers, fields, etc.) can have static constants. +3. Those values that have a scalar type can have methods directly on them. + +## Motivation + +This approach allows for a clean interface to provide built-in methods or static members for these basic types. + +## Design + +### Semantics + +Firstly we would have to modify both the ABNF and parsing of Leo to allow static method calls onto a scalar type. + +The ABNF would look as follows: + +```abnf +; This is an existing old rule +scalar-type = boolean-type / arithmetic-type / address-type / character-type + +; This is an existing old rule +circuit-type = identifier / self-type + +; Add this rule. +named-type = circuit-type / scalar-type ; new rule + +; Modify this rule: +postfix-expression = primary-expression + / postfix-expression "." natural + / postfix-expression "." identifier + / identifier function-arguments + / postfix-expression "." identifier function-arguments + / named-type "::" identifier function-arguments ; this used to be a circuit-type + / postfix-expression "[" expression "]" + / postfix-expression "[" [expression] ".." [expression] "]" +``` + +Now methods and static members would be first-class citizens of scalar types and their values. For example, in the following could be done: + +```ts +let x = 1u8.to_bits(); // A method call on on a scalar value itself +let x = u8::MAX; // A constant value on the scalar type +let y = u8::to_bits(1u8); // A static method on the scalar type +``` + +## Drawbacks + +This change adds more complexity to the language. + +## Effect on Ecosystem + +None. The new parsing changes would not break any older programs. + +## Alternatives + +None. From 12fe6264858a53c4dc6101c801800e88956da592 Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Fri, 13 Aug 2021 20:02:43 -0700 Subject: [PATCH 42/58] update readme, fix compiler error range --- errors/README.md | 22 +++++++++---------- errors/src/compiler/compiler_errors.rs | 2 +- .../console/log_parameter_fail_empty.leo.out | 2 +- .../console/log_parameter_fail_none.leo.out | 2 +- .../const_input_non_const.leo.out | 2 +- .../const_var_in_both_sections_fail.leo.out | 2 +- .../program_input/main_array_fail.leo.out | 2 +- .../program_input/main_tuple_fail.leo.out | 2 +- .../var_in_both_sections_fail.leo.out | 2 +- .../main_array_fail.leo.out | 2 +- .../main_tuple_fail.leo.out | 2 +- .../program_registers/registers_fail.leo.out | 2 +- .../compiler/integers/i8/negate_min.leo.out | 2 +- .../integers/u128/negative_input_fail.leo.out | 2 +- .../integers/u16/negative_input_fail.leo.out | 2 +- .../integers/u32/negative_input_fail.leo.out | 2 +- .../integers/u64/negative_input_fail.leo.out | 2 +- .../integers/u8/negative_input_fail.leo.out | 2 +- 18 files changed, 28 insertions(+), 28 deletions(-) diff --git a/errors/README.md b/errors/README.md index 55c3ac280c..ce05b1ed5d 100644 --- a/errors/README.md +++ b/errors/README.md @@ -23,42 +23,42 @@ These are the different kinds of errors that are made in this crate. Note that i ### ASG -The errors for the `leo-asg` crate. It's error codes will range from 0-999, and be prefixed with the characters `ASG`. +The errors for the `leo-asg` crate. Its error codes will range from 3_000-3_999 and be prefixed with the characters `ASG`. ### AST -The errors for the `leo-ast` crate. It's error codes will range from 1_000-1_999, and be prefixed with the characters `AST`. +The errors for the `leo-ast` crate. Its error codes will range from 2_000-2_999 and be prefixed with the characters `AST`. ### CLI -The errors for the `leo-lang` crate. It's error codes will range from 7_000-7_999, and be prefixed with the characters `CLI`. +The errors for the `leo-lang` crate. Its error codes will range from 7_000-7_999 and be prefixed with the characters `CLI`. ### Compiler -The errors for the `leo-compiler` crate. It's error codes will range from 2_000-2_999, and be prefixed with the characters `CMP`. +The errors for the `leo-compiler` crate. Its error codes will range from 6_000-6_999 and be prefixed with the characters `CMP`. ### Import -The errors for the `leo-imports` crate. It's error codes will range from 3_000-3_999, and be prefixed with the characters `IMP`. +The errors for the `leo-imports` crate. Its error codes will range from 4_000-4_999 and be prefixed with the characters `IMP`. ### Input -The errors for the `leo-input` crate. For right now they just have an exit code of 1, as they aren't ported. +The errors for the `leo-input` crate. For right now, they have an exit code of 1, as they aren't ported. The reason they aren't ported is due to a desire for 0 deps in case this crate moves to SnarkVM. ### Package -The errors for the `leo-package` crate. It's error codes will range from 4_000-4_999, and be prefixed with the characters `PAK`. +The errors for the `leo-package` crate. Its error codes will range from 5_000-5_999 and be prefixed with the characters `PAK`. ### Parser -The errors for the `leo-parser` crate. It's error codes will range from 5_000-5_999, and be prefixed with the characters `PAR`. +The errors for the `leo-parser` crate. Its error codes will range from 0-999 and be prefixed with the characters `PAR`. ### SnarkVM -The errors from SnarkVM that bubble up into Leo in some situations. For right now they just have an exit code of 1. -When SnarkVM implments better error codes and messages we can just bubble them up. +The errors from SnarkVM that bubble up into Leo in some situations. For right now, they have an exit code of 1. +When SnarkVM implements better error codes and messages, we can bubble them up. ### State -The errors for the `leo-state` crate. It's error codes will range from 6000-6_999, and be prefixed with the characters `STA`. +The errors for the `leo-state` crate. Its error codes will range from 1_000-1_999 and be prefixed with the characters `STA`. diff --git a/errors/src/compiler/compiler_errors.rs b/errors/src/compiler/compiler_errors.rs index c9663b5fc4..f46b4e9566 100644 --- a/errors/src/compiler/compiler_errors.rs +++ b/errors/src/compiler/compiler_errors.rs @@ -24,7 +24,7 @@ use std::{ create_errors!( /// CompilerError enum that represents all the errors for the `leo-compiler` crate. CompilerError, - exit_code_mask: 7000i32, + exit_code_mask: 6000i32, error_code_prefix: "CMP", /// For when the test function has invalid test context. diff --git a/tests/expectations/compiler/compiler/console/log_parameter_fail_empty.leo.out b/tests/expectations/compiler/compiler/console/log_parameter_fail_empty.leo.out index fbb16d3bc3..a29353bd2f 100644 --- a/tests/expectations/compiler/compiler/console/log_parameter_fail_empty.leo.out +++ b/tests/expectations/compiler/compiler/console/log_parameter_fail_empty.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error [ECMP0377006]: Formatter given 1 containers and found 0 parameters\n --> compiler-test:4:17\n |\n 4 | console.log(\"{}\");\n | ^^^^" + - "Error [ECMP0376006]: Formatter given 1 containers and found 0 parameters\n --> compiler-test:4:17\n |\n 4 | console.log(\"{}\");\n | ^^^^" diff --git a/tests/expectations/compiler/compiler/console/log_parameter_fail_none.leo.out b/tests/expectations/compiler/compiler/console/log_parameter_fail_none.leo.out index d1636388cb..7af538b8d5 100644 --- a/tests/expectations/compiler/compiler/console/log_parameter_fail_none.leo.out +++ b/tests/expectations/compiler/compiler/console/log_parameter_fail_none.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error [ECMP0377006]: Formatter given 0 containers and found 1 parameters\n --> compiler-test:4:17\n |\n 4 | console.log(\"\", 1u32);\n | ^^^^^^^^" + - "Error [ECMP0376006]: Formatter given 0 containers and found 1 parameters\n --> compiler-test:4:17\n |\n 4 | console.log(\"\", 1u32);\n | ^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/const_input_non_const.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/const_input_non_const.leo.out index 4a6ba5acca..a93d0799e0 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/const_input_non_const.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/const_input_non_const.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error [ECMP0377029]: Expected input variable `a` to be non-constant. Move input variable `a` to [main] section of input file\n --> compiler-test:3:15\n |\n 3 | function main(a: u32) {\n | ^" + - "Error [ECMP0376029]: Expected input variable `a` to be non-constant. Move input variable `a` to [main] section of input file\n --> compiler-test:3:15\n |\n 3 | function main(a: u32) {\n | ^" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/const_var_in_both_sections_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/const_var_in_both_sections_fail.leo.out index 1d0801ec0a..fff9ee336c 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/const_var_in_both_sections_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/const_var_in_both_sections_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error [ECMP0377035]: Input variable a declared twice\n --> compiler-test:3:21\n |\n 3 | function main(const a: u32) {\n | ^" + - "Error [ECMP0376035]: Input variable a declared twice\n --> compiler-test:3:21\n |\n 3 | function main(const a: u32) {\n | ^" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_array_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_array_fail.leo.out index ce091ba256..97ab65d88b 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_array_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_array_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error [ECMP0377031]: Input array dimensions mismatch expected 1, found array dimensions 2\n --> compiler-test:3:15\n |\n 3 | function main(x: [i16; 2]) {\n | ^" + - "Error [ECMP0376031]: Input array dimensions mismatch expected 1, found array dimensions 2\n --> compiler-test:3:15\n |\n 3 | function main(x: [i16; 2]) {\n | ^" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_tuple_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_tuple_fail.leo.out index 6a41a4ee1f..2699fc0238 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_tuple_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_tuple_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error [ECMP0377032]: Input tuple size mismatch expected 3, found tuple with length 2\n --> compiler-test:3:15\n |\n 3 | function main(x: (u8, bool, u8)) {\n | ^" + - "Error [ECMP0376032]: Input tuple size mismatch expected 3, found tuple with length 2\n --> compiler-test:3:15\n |\n 3 | function main(x: (u8, bool, u8)) {\n | ^" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/var_in_both_sections_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/var_in_both_sections_fail.leo.out index 79419506ea..29564d375c 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/var_in_both_sections_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/var_in_both_sections_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error [ECMP0377035]: Input variable a declared twice\n --> compiler-test:3:15\n |\n 3 | function main(a: u32) {\n | ^" + - "Error [ECMP0376035]: Input variable a declared twice\n --> compiler-test:3:15\n |\n 3 | function main(a: u32) {\n | ^" diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array_fail.leo.out index 9933967b5d..2b6757d01d 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error [ECMP0377031]: Input array dimensions mismatch expected 2, found array dimensions 1\n --> compiler-test:3:21\n |\n 3 | function main(const x: [i16; 2]) {\n | ^" + - "Error [ECMP0376031]: Input array dimensions mismatch expected 2, found array dimensions 1\n --> compiler-test:3:21\n |\n 3 | function main(const x: [i16; 2]) {\n | ^" diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple_fail.leo.out index ecd59ab71c..6ab90fa4b5 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error [ECMP0377032]: Input tuple size mismatch expected 3, found tuple with length 2\n --> compiler-test:3:21\n |\n 3 | function main(const x: (u8, bool, u8)) {\n | ^" + - "Error [ECMP0376032]: Input tuple size mismatch expected 3, found tuple with length 2\n --> compiler-test:3:21\n |\n 3 | function main(const x: (u8, bool, u8)) {\n | ^" diff --git a/tests/expectations/compiler/compiler/input_files/program_registers/registers_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_registers/registers_fail.leo.out index 3b3b01af02..f79dfeeb70 100644 --- a/tests/expectations/compiler/compiler/input_files/program_registers/registers_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_registers/registers_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error [ECMP0377037]: Mismatched types. Expected register output type `u8`, found type `bool`.\n --> compiler-test:3:1\n |\n 3 | function main() -> bool {\n|\n 4 | ...\n|\n 5 | }\n | ^" + - "Error [ECMP0376037]: Mismatched types. Expected register output type `u8`, found type `bool`.\n --> compiler-test:3:1\n |\n 3 | function main() -> bool {\n|\n 4 | ...\n|\n 5 | }\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/i8/negate_min.leo.out b/tests/expectations/compiler/compiler/integers/i8/negate_min.leo.out index be2e450685..cc8f46e1c2 100644 --- a/tests/expectations/compiler/compiler/integers/i8/negate_min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/negate_min.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error [ECMP0377083]: integer operation failed due to the signed integer error `Integer overflow`\n --> compiler-test:5:15\n |\n 5 | const b = -a;\n | ^^" + - "Error [ECMP0376083]: integer operation failed due to the signed integer error `Integer overflow`\n --> compiler-test:5:15\n |\n 5 | const b = -a;\n | ^^" diff --git a/tests/expectations/compiler/compiler/integers/u128/negative_input_fail.leo.out b/tests/expectations/compiler/compiler/integers/u128/negative_input_fail.leo.out index d2f2b29d22..e5b8fb94a9 100644 --- a/tests/expectations/compiler/compiler/integers/u128/negative_input_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/negative_input_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error [ECMP0377089]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u128) {}\n | ^" + - "Error [ECMP0376089]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u128) {}\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/u16/negative_input_fail.leo.out b/tests/expectations/compiler/compiler/integers/u16/negative_input_fail.leo.out index db2a11040d..55d679debc 100644 --- a/tests/expectations/compiler/compiler/integers/u16/negative_input_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/negative_input_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error [ECMP0377089]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u16) {}\n | ^" + - "Error [ECMP0376089]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u16) {}\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/u32/negative_input_fail.leo.out b/tests/expectations/compiler/compiler/integers/u32/negative_input_fail.leo.out index 8347c44b4b..122639ac74 100644 --- a/tests/expectations/compiler/compiler/integers/u32/negative_input_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/negative_input_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error [ECMP0377089]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u32) {}\n | ^" + - "Error [ECMP0376089]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u32) {}\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/u64/negative_input_fail.leo.out b/tests/expectations/compiler/compiler/integers/u64/negative_input_fail.leo.out index d42bd484ae..b160ff699c 100644 --- a/tests/expectations/compiler/compiler/integers/u64/negative_input_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/negative_input_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error [ECMP0377089]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u64) {}\n | ^" + - "Error [ECMP0376089]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u64) {}\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/u8/negative_input_fail.leo.out b/tests/expectations/compiler/compiler/integers/u8/negative_input_fail.leo.out index 8f4a2425db..f4d484c12b 100644 --- a/tests/expectations/compiler/compiler/integers/u8/negative_input_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/negative_input_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error [ECMP0377089]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u8) {}\n | ^" + - "Error [ECMP0376089]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u8) {}\n | ^" From 110b05bfc2c35fcc5469aa5978a530fecefa681a Mon Sep 17 00:00:00 2001 From: Alessandro Coglio Date: Mon, 16 Aug 2021 10:11:52 -0700 Subject: [PATCH 43/58] [RFC] Improve title as suggested by Jon. --- docs/rfc/010-native-functions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/rfc/010-native-functions.md b/docs/rfc/010-native-functions.md index 3760e5478b..097474efd1 100644 --- a/docs/rfc/010-native-functions.md +++ b/docs/rfc/010-native-functions.md @@ -1,4 +1,4 @@ -# Leo RFC 010: Native Functions +# Leo RFC 010: Improved Native Functions ## Authors @@ -17,7 +17,7 @@ DRAFT # Summary -This RFC proposes an approach to handling natively implemented functions ('native functions', for short) in Leo, +This RFC proposes an improved approach to handling natively implemented functions ('native functions', for short) in Leo, that is functions implemented not via Leo code but (in essence) via Rust code. Currently there is just one such function, namely BLAKE2s. The scope of this proposal is limited to native functions defined by the developers of Leo itself, From 16daa63dea7294c6f5c2e85b6b4cb09efe8becde Mon Sep 17 00:00:00 2001 From: Alessandro Coglio Date: Mon, 16 Aug 2021 10:19:16 -0700 Subject: [PATCH 44/58] [RFC] Extend native functions RFC based on discussion with Jon. --- docs/rfc/010-native-functions.md | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/docs/rfc/010-native-functions.md b/docs/rfc/010-native-functions.md index 097474efd1..4d26baf0cc 100644 --- a/docs/rfc/010-native-functions.md +++ b/docs/rfc/010-native-functions.md @@ -179,6 +179,8 @@ This should help support richer standard/core libraries for Leo. # Alternatives +## Programmatic Generation + Instead of storing declarations of native functions in standard/core files as proposed above, we could programmatically generate them as currently done for BLAKE2s. Macros may be used to generate families of similar function declarations. @@ -191,5 +193,22 @@ We could think of splitting the non-native and native functions of `Point2D`: the former in a Leo file, and the latter programmatically added. Again, this looks more complicated than just declaring native funcions in Leo files. -In summary, accommodating native functions in Leo standard/core file -should be doable with mild and possibly simplifying changes to the current Leo compiler. +## Leo Code in Rust Files + +It has been pointed out that it would be beneficial to have +both the Leo code (for the non-native functions) +and the Rust code (for the native functions) +in the same place (i.e. file). +This is not possible if the non-native code is in a Leo file, because Leo files cannot contain Rust code +(and there is no plan to allow that, i.e. no inline Rust code). + +However, we can turn things around and leverage Rust's macro system to accommodate Leo code in Rust files. +That is, we can have Rust files that include both the non-native Leo code, +written as Leo code (with some surrounding macro call or something like that), +along with the Rust code that implements the naive functions. + +This may turn out to be in fact the preferred design in the end, +as it combines the advantage of writing non-native code in Leo +with the advantage of having native and non-native code in the same place. +In that case, we will revise this RFC to swap this design proposal with the one in the main section, +moving the proposal for Leo files to this section as an alternative. \ No newline at end of file From 1bc19d8b1c18be2d0972fd8ac62b818a583864d4 Mon Sep 17 00:00:00 2001 From: Alessandro Coglio Date: Mon, 16 Aug 2021 10:22:04 -0700 Subject: [PATCH 45/58] [RFC] Extend the native functions RFC a bit more. Explicate how the initially proposed design is consistent with Java, and how the native implementations live in separate files in that design. This better paves the way to the more recent variant of this proposal, currently discussed under alternatives but that may be eventually "swapped" if that's also the rest of the team's consensus. --- docs/rfc/010-native-functions.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/rfc/010-native-functions.md b/docs/rfc/010-native-functions.md index 4d26baf0cc..17b28d6440 100644 --- a/docs/rfc/010-native-functions.md +++ b/docs/rfc/010-native-functions.md @@ -166,6 +166,10 @@ The compiler must know a mapping from native functions in the standard/core libr to the R1CS gadgets that implement them, so it should be just a matter of selecting the appropriate one. Some of this logic must be already present, in order to detect and select the BLAkE2s gadget. +This approach is used in Java, where Java files may declare certain methods as `native`, +without a body but with a declaration of input and output types. +The actual native implementations, i.e. the native method bodies live in different files, as they are written in C. + # Drawbacks This does not seem to bring any drawbacks. From 6e264b86ef9b05ef6a09869567cef6b55fde2e23 Mon Sep 17 00:00:00 2001 From: Alessandro Coglio Date: Mon, 16 Aug 2021 10:44:10 -0700 Subject: [PATCH 46/58] [RFC] Extend bit/byte conversion RFC. Add an alternative in which we go to methods directly. This seems more likely at this point, given that we seem to have a fairly simple and quick way to support methods on scalar types that does not involve turning scalar types into circuit types. --- docs/rfc/009-bit-byte-conversions.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/rfc/009-bit-byte-conversions.md b/docs/rfc/009-bit-byte-conversions.md index 513b408b94..586b6c40f8 100644 --- a/docs/rfc/009-bit-byte-conversions.md +++ b/docs/rfc/009-bit-byte-conversions.md @@ -263,3 +263,14 @@ such as `u64_to_u16s_le`, which would turn a `u64` into a `[u16; 4]`. In general, it makes sense to convert between `uN` or `iN` and `[uM; P]` when `N == M * P`. If Leo were extended with types `uN` and `iN` for all positive `N` as proposed elsewhere, there could be a family of all such conversions. + +## Methods Directly + +Given that we eventually plan to use methods on scalar types for these conversions, +it may make sense to do that right away. +This is predicated on having support for methods on scalar types, +for which a separate RFC is in the works. + +If we decide for this approach, we will revise the above proposal to reflect that. +The concepts and (essential) names and input/output types remain unchanged, +but the conversions are packaged in slightly different form. From 60478864460e9a880a72e57c2b90d5779c1572b8 Mon Sep 17 00:00:00 2001 From: Alessandro Coglio Date: Mon, 16 Aug 2021 10:48:24 -0700 Subject: [PATCH 47/58] [RFC] Extend bit/byte conversion RFC. Add a paragraph clarifying what an adequate implementation strategy could be. In any case, we are likely to go with methods on scalar types directly. --- docs/rfc/009-bit-byte-conversions.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/rfc/009-bit-byte-conversions.md b/docs/rfc/009-bit-byte-conversions.md index 586b6c40f8..ff3b4eb51d 100644 --- a/docs/rfc/009-bit-byte-conversions.md +++ b/docs/rfc/009-bit-byte-conversions.md @@ -203,6 +203,14 @@ function i128_from_bytes_le(x: [u8; 16]) -> i128; function i128_from_bytes_be(x: [u8; 16]) -> i128; ``` +## Handling of the Native Functions + +Given the relatively large number and regular structure of the functions above, +it makes sense to generate them programmatically (e.g. via Rust macros), +rather than enumerating all of them explicitly in the implementation. +It may also makes sense, at R1CS generation time, +to use generated or suitably parameterized code to recognize them and turn them into the corresponding gadgets. + ## Transition to Methods Once a separate proposal for adding methods to Leo scalar types is realized, From c140e666a56ad78d01bc60920efa7e4d939b3c19 Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Mon, 16 Aug 2021 11:38:01 -0700 Subject: [PATCH 48/58] make suggested changes, also renumber as it would conflict with 009 bits/bytes --- ...nd-methods.md => 011-scalar-type-accesses-and-methods.md} | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) rename docs/rfc/{009-scalar-type-accesses-and-methods.md => 011-scalar-type-accesses-and-methods.md} (90%) diff --git a/docs/rfc/009-scalar-type-accesses-and-methods.md b/docs/rfc/011-scalar-type-accesses-and-methods.md similarity index 90% rename from docs/rfc/009-scalar-type-accesses-and-methods.md rename to docs/rfc/011-scalar-type-accesses-and-methods.md index d359dd715b..02b1fb731d 100644 --- a/docs/rfc/009-scalar-type-accesses-and-methods.md +++ b/docs/rfc/011-scalar-type-accesses-and-methods.md @@ -1,4 +1,4 @@ -# Leo RFC 009: Scalar Type Accesses And Methods +# Leo RFC 011: Scalar Type Accesses And Methods ## Authors @@ -52,11 +52,12 @@ postfix-expression = primary-expression / identifier function-arguments / postfix-expression "." identifier function-arguments / named-type "::" identifier function-arguments ; this used to be a circuit-type + / named-type "::" identifier ; this is new to allow static members on / postfix-expression "[" expression "]" / postfix-expression "[" [expression] ".." [expression] "]" ``` -Now methods and static members would be first-class citizens of scalar types and their values. For example, in the following could be done: +Now methods and static members would be first-class citizens of scalar types and their values. For example, the following could be done: ```ts let x = 1u8.to_bits(); // A method call on on a scalar value itself From 20b0f4f2f896441c048b6207189597b64b64d5b3 Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Mon, 16 Aug 2021 15:12:36 -0700 Subject: [PATCH 49/58] fix canonicalization function type return bugs --- ast/src/reducer/canonicalization.rs | 38 ++++++++++--------- errors/src/asg/asg_errors.rs | 2 +- .../circuits/return_self_type_array.leo | 15 ++++++++ .../circuits/return_self_type_tuple.leo | 15 ++++++++ .../circuits/return_self_type_array.leo.out | 21 ++++++++++ .../circuits/return_self_type_tuple.leo.out | 21 ++++++++++ 6 files changed, 94 insertions(+), 18 deletions(-) create mode 100644 tests/compiler/circuits/return_self_type_array.leo create mode 100644 tests/compiler/circuits/return_self_type_tuple.leo create mode 100644 tests/expectations/compiler/compiler/circuits/return_self_type_array.leo.out create mode 100644 tests/expectations/compiler/compiler/circuits/return_self_type_tuple.leo.out diff --git a/ast/src/reducer/canonicalization.rs b/ast/src/reducer/canonicalization.rs index 9f281c8ccf..63bf895b59 100644 --- a/ast/src/reducer/canonicalization.rs +++ b/ast/src/reducer/canonicalization.rs @@ -104,8 +104,24 @@ impl Canonicalizer { } } - fn is_self_type(&mut self, type_option: Option<&Type>) -> bool { - matches!(type_option, Some(Type::SelfType)) + fn canonicalize_self_type(&self, type_option: Option<&Type>) -> Option { + match type_option { + Some(type_) => match type_ { + Type::SelfType => Some(Type::Circuit(self.circuit_name.as_ref().unwrap().clone())), + Type::Array(type_, dimensions) => Some(Type::Array( + Box::new(self.canonicalize_self_type(Some(type_)).unwrap()), + dimensions.clone(), + )), + Type::Tuple(types) => Some(Type::Tuple( + types + .iter() + .map(|type_| self.canonicalize_self_type(Some(type_)).unwrap()) + .collect(), + )), + _ => Some(type_.clone()), + }, + None => None, + } } fn canonicalize_expression(&mut self, expression: &Expression) -> Expression { @@ -145,11 +161,7 @@ impl Canonicalizer { Expression::Cast(cast) => { let inner = Box::new(self.canonicalize_expression(&cast.inner)); - let mut target_type = cast.target_type.clone(); - - if matches!(target_type, Type::SelfType) { - target_type = Type::Circuit(self.circuit_name.as_ref().unwrap().clone()); - } + let target_type = self.canonicalize_self_type(Some(&cast.target_type)).unwrap(); return Expression::Cast(CastExpression { inner, @@ -336,11 +348,7 @@ impl Canonicalizer { } Statement::Definition(definition) => { let value = self.canonicalize_expression(&definition.value); - let mut type_ = definition.type_.clone(); - - if self.is_self_type(type_.as_ref()) { - type_ = Some(Type::Circuit(self.circuit_name.as_ref().unwrap().clone())); - } + let type_ = self.canonicalize_self_type(definition.type_.as_ref()); Statement::Definition(DefinitionStatement { declaration_type: definition.declaration_type.clone(), @@ -434,13 +442,9 @@ impl Canonicalizer { CircuitMember::CircuitVariable(_, _) => {} CircuitMember::CircuitFunction(function) => { let input = function.input.clone(); - let mut output = function.output.clone(); + let output = self.canonicalize_self_type(function.output.as_ref()); let block = self.canonicalize_block(&function.block); - if self.is_self_type(output.as_ref()) { - output = Some(Type::Circuit(self.circuit_name.as_ref().unwrap().clone())); - } - return CircuitMember::CircuitFunction(Function { annotations: function.annotations.clone(), identifier: function.identifier.clone(), diff --git a/errors/src/asg/asg_errors.rs b/errors/src/asg/asg_errors.rs index c3076b243d..89a4f9bf12 100644 --- a/errors/src/asg/asg_errors.rs +++ b/errors/src/asg/asg_errors.rs @@ -409,6 +409,6 @@ create_errors!( unexpected_big_self { args: (), msg: "received a Self statement, which should never happen.", - help: Some("Something went wrong during canonicalization, or you ran the ASG uncanonicalized AST.".to_string()), + help: Some("Something went wrong during canonicalization, or you ran the ASG on an uncanonicalized AST.".to_string()), } ); diff --git a/tests/compiler/circuits/return_self_type_array.leo b/tests/compiler/circuits/return_self_type_array.leo new file mode 100644 index 0000000000..9ce1800a16 --- /dev/null +++ b/tests/compiler/circuits/return_self_type_array.leo @@ -0,0 +1,15 @@ +/* +namespace: Compile +expectation: Pass +input_file: input/dummy.in +*/ + +circuit Circ { + function fn () -> [Self; 1] { + return [Self {}]; + } +} + +function main (y: bool) -> bool { + return y; +} \ No newline at end of file diff --git a/tests/compiler/circuits/return_self_type_tuple.leo b/tests/compiler/circuits/return_self_type_tuple.leo new file mode 100644 index 0000000000..20fcae98c5 --- /dev/null +++ b/tests/compiler/circuits/return_self_type_tuple.leo @@ -0,0 +1,15 @@ +/* +namespace: Compile +expectation: Pass +input_file: input/dummy.in +*/ + +circuit Circ { + function fn () -> (Self,u8) { + return (Self {}, 1); + } +} + +function main (y: bool) -> bool { + return y; +} \ No newline at end of file diff --git a/tests/expectations/compiler/compiler/circuits/return_self_type_array.leo.out b/tests/expectations/compiler/compiler/circuits/return_self_type_array.leo.out new file mode 100644 index 0000000000..b5632884f5 --- /dev/null +++ b/tests/expectations/compiler/compiler/circuits/return_self_type_array.leo.out @@ -0,0 +1,21 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 + output: + - input_file: input/dummy.in + output: + registers: + r0: + type: bool + value: "true" + initial_ast: 0e091ebf70c2e190b09debae086753f0d032504419ae0bcf42836fa4963ce48e + canonicalized_ast: 290e223dacaff5c99f401c452e213c35acbba0452b24d9d590eb7c77f641cff5 + type_inferenced_ast: 5849fd77de59448ac443a392fc2124d2f5df4a896150f3175b7d0e3ba5d98354 diff --git a/tests/expectations/compiler/compiler/circuits/return_self_type_tuple.leo.out b/tests/expectations/compiler/compiler/circuits/return_self_type_tuple.leo.out new file mode 100644 index 0000000000..d85ebe08c5 --- /dev/null +++ b/tests/expectations/compiler/compiler/circuits/return_self_type_tuple.leo.out @@ -0,0 +1,21 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 + output: + - input_file: input/dummy.in + output: + registers: + r0: + type: bool + value: "true" + initial_ast: 691004b2affad4a5a06ad6e69ad3b8a279aee131b538d5f07b6a972e18bce22c + canonicalized_ast: c38d5fefdb424c8bac4b7684f50112bf3bfe776060895a4f95d8fe657f237c8b + type_inferenced_ast: 481ef7f98947c543be02395a827f08b5e0117df951129584661a249b4c76d144 From c3aa1ce77364f8561539e894632605e59082368b Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Mon, 16 Aug 2021 17:46:50 -0700 Subject: [PATCH 50/58] fix error message formatting in some instances --- errors/src/common/formatted.rs | 4 ++-- errors/src/common/span.rs | 18 +++++++++++++++--- .../compiler/compiler/address/branch.leo.out | 6 +++--- .../compiler/compiler/address/equal.leo.out | 6 +++--- .../compiler/compiler/address/index.leo.out | 6 +++--- .../compiler/compiler/address/ternary.leo.out | 6 +++--- .../compiler/array/complex_access.leo.out | 6 +++--- .../compiler/array/equal_initializer.leo.out | 6 +++--- .../compiler/array/equal_initializer_2.leo.out | 6 +++--- .../compiler/array/input_nested_3x2.leo.out | 6 +++--- .../compiler/array/input_tuple_3x2.leo.out | 6 +++--- .../compiler/array/multi_initializer.leo.out | 6 +++--- .../compiler/compiler/array/nested.leo.out | 6 +++--- .../compiler/array/nested_3x2_value.leo.out | 6 +++--- .../compiler/compiler/array/registers.leo.out | 6 +++--- .../compiler/compiler/array/slice.leo.out | 6 +++--- .../compiler/array/slice_lower.leo.out | 6 +++--- .../compiler/compiler/array/spread.leo.out | 6 +++--- .../compiler/array/ternary_in_array.leo.out | 6 +++--- .../compiler/array/tuple_3x2_value.leo.out | 6 +++--- .../compiler/array/type_input_3x2.leo.out | 6 +++--- .../compiler/array/type_input_4x3x2.leo.out | 6 +++--- .../array/type_nested_value_nested_3x2.leo.out | 6 +++--- .../type_nested_value_nested_4x3x2.leo.out | 6 +++--- .../array/type_nested_value_tuple_3x2.leo.out | 6 +++--- .../type_nested_value_tuple_4x3x2.leo.out | 6 +++--- .../array/type_tuple_value_nested_3x2.leo.out | 6 +++--- .../type_tuple_value_nested_4x3x2.leo.out | 6 +++--- .../array/type_tuple_value_tuple_3x2.leo.out | 6 +++--- .../array/type_tuple_value_tuple_4x3x2.leo.out | 6 +++--- .../compiler/compiler/boolean/and.leo.out | 6 +++--- .../compiler/boolean/conditional.leo.out | 6 +++--- .../compiler/compiler/boolean/equal.leo.out | 6 +++--- .../compiler/boolean/not_equal.leo.out | 6 +++--- .../compiler/compiler/boolean/or.leo.out | 6 +++--- .../compiler/compiler/char/circuit.leo.out | 6 +++--- .../compiler/compiler/char/neq.leo.out | 6 +++--- .../compiler/compiler/char/nonprinting.leo.out | 6 +++--- .../compiler/compiler/char/out.leo.out | 6 +++--- .../big_self_in_circuit_replacement.leo.out | 6 +++--- .../circuits/const_self_variable.leo.out | 6 +++--- ...ine_circuit_inside_circuit_function.leo.out | 6 +++--- .../circuits/duplicate_name_context.leo.out | 6 +++--- .../compiler/compiler/circuits/inline.leo.out | 6 +++--- .../circuits/inline_member_pass.leo.out | 6 +++--- .../compiler/circuits/member_function.leo.out | 6 +++--- .../circuits/member_function_nested.leo.out | 6 +++--- .../circuits/member_static_function.leo.out | 6 +++--- .../member_static_function_nested.leo.out | 6 +++--- .../compiler/circuits/member_variable.leo.out | 6 +++--- .../member_variable_and_function.leo.out | 6 +++--- .../circuits/mut_self_variable.leo.out | 6 +++--- .../circuits/mut_self_variable_branch.leo.out | 6 +++--- .../mut_self_variable_conditional.leo.out | 6 +++--- .../compiler/circuits/mut_variable.leo.out | 6 +++--- .../mutable_call_immutable_context.leo.out | 6 +++--- .../compiler/circuits/pedersen_mock.leo.out | 6 +++--- .../circuits/return_self_type_array.leo.out | 6 +++--- .../circuits/return_self_type_tuple.leo.out | 6 +++--- .../compiler/circuits/self_member.leo.out | 6 +++--- .../compiler/compiler/console/assert.leo.out | 6 +++--- .../console/conditional_assert.leo.out | 6 +++--- .../compiler/compiler/console/error.leo.out | 6 +++--- .../compiler/compiler/console/log.leo.out | 6 +++--- .../compiler/console/log_conditional.leo.out | 6 +++--- .../compiler/console/log_input.leo.out | 6 +++--- .../compiler/console/log_parameter.leo.out | 6 +++--- .../console/log_parameter_many.leo.out | 6 +++--- .../core/core_circuit_star_fail.leo.out | 2 +- .../compiler/core/core_package_invalid.leo.out | 2 +- .../core/core_unstable_package_invalid.leo.out | 2 +- .../compiler/definition/out_of_order.leo.out | 6 +++--- .../out_of_order_with_import.leo.out | 6 +++--- .../compiler/compiler/field/add.leo.out | 6 +++--- .../compiler/compiler/field/div.leo.out | 6 +++--- .../compiler/compiler/field/eq.leo.out | 6 +++--- .../compiler/compiler/field/field.leo.out | 6 +++--- .../compiler/compiler/field/mul.leo.out | 6 +++--- .../compiler/compiler/field/negate.leo.out | 6 +++--- .../compiler/function/array_input.leo.out | 6 +++--- .../function/array_params_direct_call.leo.out | 6 +++--- .../function/conditional_return.leo.out | 6 +++--- .../function/duplicate_definition_fail.leo.out | 2 +- .../compiler/compiler/function/empty.leo.out | 6 +++--- .../compiler/function/iteration.leo.out | 6 +++--- .../function/iteration_repeated.leo.out | 6 +++--- .../compiler/function/multiple_returns.leo.out | 6 +++--- .../function/multiple_returns_fail.leo.out | 2 +- .../multiple_returns_fail_conditional.leo.out | 2 +- .../function/multiple_returns_main.leo.out | 6 +++--- .../compiler/function/newlines.leo.out | 6 +++--- .../compiler/function/repeated.leo.out | 6 +++--- .../compiler/compiler/function/return.leo.out | 6 +++--- .../function/return_array_nested_pass.leo.out | 6 +++--- .../function/return_array_tuple_pass.leo.out | 6 +++--- .../compiler/function/return_tuple.leo.out | 6 +++--- .../function/return_tuple_conditional.leo.out | 6 +++--- .../compiler/function/value_unchanged.leo.out | 6 +++--- .../global_consts/global_const_types.leo.out | 6 +++--- .../tests/import_dependency_folder.leo.out | 6 +++--- .../compiler/import_local/import_all.leo.out | 6 +++--- .../compiler/import_local/import_as.leo.out | 6 +++--- .../compiler/import_local/import_dir.leo.out | 6 +++--- .../compiler/import_local/import_files.leo.out | 6 +++--- .../compiler/import_local/import_many.leo.out | 6 +++--- .../import_local/import_weird_names.leo.out | 6 +++--- .../import_weird_names_nested.leo.out | 6 +++--- .../input_files/program_input/main.leo.out | 6 +++--- .../program_input/main_array.leo.out | 6 +++--- .../program_input/main_char.leo.out | 6 +++--- .../program_input/main_field.leo.out | 6 +++--- .../program_input/main_group.leo.out | 6 +++--- .../main_multi_dimension_array.leo.out | 6 +++--- .../program_input/main_multiple.leo.out | 6 +++--- .../program_input/main_string.leo.out | 6 +++--- .../program_input/main_tuple.leo.out | 6 +++--- .../basic.leo.out | 6 +++--- .../token_withdraw.leo.out | 6 +++--- .../program_input_constants/main.leo.out | 6 +++--- .../program_input_constants/main_array.leo.out | 6 +++--- .../program_input_constants/main_char.leo.out | 6 +++--- .../program_input_constants/main_field.leo.out | 6 +++--- .../program_input_constants/main_group.leo.out | 6 +++--- .../main_multi_dimension_array.leo.out | 6 +++--- .../main_multiple.leo.out | 6 +++--- .../main_string.leo.out | 6 +++--- .../program_input_constants/main_tuple.leo.out | 6 +++--- .../program_registers/registers_array.leo.out | 6 +++--- .../program_registers/registers_fail.leo.out | 2 +- .../program_registers/registers_pass.leo.out | 6 +++--- .../program_state/access_all.leo.out | 6 +++--- .../program_state/access_state.leo.out | 6 +++--- .../input_files/program_state/basic.leo.out | 6 +++--- .../compiler/integers/i128/add.leo.out | 6 +++--- .../integers/i128/console_assert.leo.out | 6 +++--- .../compiler/integers/i128/div.leo.out | 6 +++--- .../compiler/compiler/integers/i128/eq.leo.out | 6 +++--- .../compiler/compiler/integers/i128/ge.leo.out | 6 +++--- .../compiler/compiler/integers/i128/gt.leo.out | 6 +++--- .../compiler/compiler/integers/i128/le.leo.out | 6 +++--- .../compiler/compiler/integers/i128/lt.leo.out | 6 +++--- .../compiler/integers/i128/max.leo.out | 6 +++--- .../compiler/integers/i128/min.leo.out | 6 +++--- .../compiler/integers/i128/mul.leo.out | 6 +++--- .../compiler/compiler/integers/i128/ne.leo.out | 6 +++--- .../compiler/integers/i128/negate.leo.out | 6 +++--- .../compiler/integers/i128/negate_min.leo.out | 6 +++--- .../compiler/integers/i128/negate_zero.leo.out | 6 +++--- .../compiler/integers/i128/sub.leo.out | 6 +++--- .../compiler/integers/i128/ternary.leo.out | 6 +++--- .../compiler/compiler/integers/i16/add.leo.out | 6 +++--- .../integers/i16/console_assert.leo.out | 6 +++--- .../compiler/compiler/integers/i16/div.leo.out | 6 +++--- .../compiler/compiler/integers/i16/eq.leo.out | 6 +++--- .../compiler/compiler/integers/i16/ge.leo.out | 6 +++--- .../compiler/compiler/integers/i16/gt.leo.out | 6 +++--- .../compiler/compiler/integers/i16/le.leo.out | 6 +++--- .../compiler/compiler/integers/i16/lt.leo.out | 6 +++--- .../compiler/compiler/integers/i16/max.leo.out | 6 +++--- .../compiler/compiler/integers/i16/min.leo.out | 6 +++--- .../compiler/compiler/integers/i16/mul.leo.out | 6 +++--- .../compiler/compiler/integers/i16/ne.leo.out | 6 +++--- .../compiler/integers/i16/negate.leo.out | 6 +++--- .../compiler/integers/i16/negate_min.leo.out | 6 +++--- .../compiler/integers/i16/negate_zero.leo.out | 6 +++--- .../compiler/compiler/integers/i16/sub.leo.out | 6 +++--- .../compiler/integers/i16/ternary.leo.out | 6 +++--- .../compiler/compiler/integers/i32/add.leo.out | 6 +++--- .../integers/i32/console_assert.leo.out | 6 +++--- .../compiler/compiler/integers/i32/div.leo.out | 6 +++--- .../compiler/compiler/integers/i32/eq.leo.out | 6 +++--- .../compiler/compiler/integers/i32/ge.leo.out | 6 +++--- .../compiler/compiler/integers/i32/gt.leo.out | 6 +++--- .../compiler/compiler/integers/i32/le.leo.out | 6 +++--- .../compiler/compiler/integers/i32/lt.leo.out | 6 +++--- .../compiler/compiler/integers/i32/max.leo.out | 6 +++--- .../compiler/compiler/integers/i32/min.leo.out | 6 +++--- .../compiler/compiler/integers/i32/mul.leo.out | 6 +++--- .../compiler/compiler/integers/i32/ne.leo.out | 6 +++--- .../compiler/integers/i32/negate.leo.out | 6 +++--- .../compiler/integers/i32/negate_min.leo.out | 6 +++--- .../compiler/integers/i32/negate_zero.leo.out | 6 +++--- .../compiler/compiler/integers/i32/sub.leo.out | 6 +++--- .../compiler/integers/i32/ternary.leo.out | 6 +++--- .../compiler/compiler/integers/i64/add.leo.out | 6 +++--- .../integers/i64/console_assert.leo.out | 6 +++--- .../compiler/compiler/integers/i64/div.leo.out | 6 +++--- .../compiler/compiler/integers/i64/eq.leo.out | 6 +++--- .../compiler/compiler/integers/i64/ge.leo.out | 6 +++--- .../compiler/compiler/integers/i64/gt.leo.out | 6 +++--- .../compiler/compiler/integers/i64/le.leo.out | 6 +++--- .../compiler/compiler/integers/i64/lt.leo.out | 6 +++--- .../compiler/compiler/integers/i64/max.leo.out | 6 +++--- .../compiler/compiler/integers/i64/min.leo.out | 6 +++--- .../compiler/compiler/integers/i64/mul.leo.out | 6 +++--- .../compiler/compiler/integers/i64/ne.leo.out | 6 +++--- .../compiler/integers/i64/negate.leo.out | 6 +++--- .../compiler/integers/i64/negate_min.leo.out | 6 +++--- .../compiler/integers/i64/negate_zero.leo.out | 6 +++--- .../compiler/compiler/integers/i64/sub.leo.out | 6 +++--- .../compiler/integers/i64/ternary.leo.out | 6 +++--- .../compiler/compiler/integers/i8/add.leo.out | 6 +++--- .../integers/i8/console_assert.leo.out | 6 +++--- .../compiler/compiler/integers/i8/div.leo.out | 6 +++--- .../compiler/compiler/integers/i8/eq.leo.out | 6 +++--- .../compiler/compiler/integers/i8/ge.leo.out | 6 +++--- .../compiler/compiler/integers/i8/gt.leo.out | 6 +++--- .../compiler/compiler/integers/i8/le.leo.out | 6 +++--- .../compiler/compiler/integers/i8/lt.leo.out | 6 +++--- .../compiler/compiler/integers/i8/max.leo.out | 6 +++--- .../compiler/compiler/integers/i8/min.leo.out | 6 +++--- .../compiler/compiler/integers/i8/mul.leo.out | 6 +++--- .../compiler/compiler/integers/i8/ne.leo.out | 6 +++--- .../compiler/integers/i8/negate.leo.out | 6 +++--- .../compiler/integers/i8/negate_zero.leo.out | 6 +++--- .../compiler/compiler/integers/i8/sub.leo.out | 6 +++--- .../compiler/integers/i8/ternary.leo.out | 6 +++--- .../compiler/integers/u128/add.leo.out | 6 +++--- .../integers/u128/console_assert.leo.out | 6 +++--- .../compiler/integers/u128/div.leo.out | 6 +++--- .../compiler/compiler/integers/u128/eq.leo.out | 6 +++--- .../compiler/compiler/integers/u128/ge.leo.out | 6 +++--- .../compiler/compiler/integers/u128/gt.leo.out | 6 +++--- .../compiler/integers/u128/input.leo.out | 6 +++--- .../compiler/compiler/integers/u128/le.leo.out | 6 +++--- .../compiler/compiler/integers/u128/lt.leo.out | 6 +++--- .../compiler/integers/u128/max.leo.out | 6 +++--- .../compiler/integers/u128/min.leo.out | 6 +++--- .../compiler/integers/u128/mul.leo.out | 6 +++--- .../compiler/compiler/integers/u128/ne.leo.out | 6 +++--- .../compiler/integers/u128/sub.leo.out | 6 +++--- .../compiler/integers/u128/ternary.leo.out | 6 +++--- .../compiler/compiler/integers/u16/add.leo.out | 6 +++--- .../integers/u16/console_assert.leo.out | 6 +++--- .../compiler/compiler/integers/u16/div.leo.out | 6 +++--- .../compiler/compiler/integers/u16/eq.leo.out | 6 +++--- .../compiler/compiler/integers/u16/ge.leo.out | 6 +++--- .../compiler/compiler/integers/u16/gt.leo.out | 6 +++--- .../compiler/integers/u16/input.leo.out | 6 +++--- .../compiler/compiler/integers/u16/le.leo.out | 6 +++--- .../compiler/compiler/integers/u16/lt.leo.out | 6 +++--- .../compiler/compiler/integers/u16/max.leo.out | 6 +++--- .../compiler/compiler/integers/u16/min.leo.out | 6 +++--- .../compiler/compiler/integers/u16/mul.leo.out | 6 +++--- .../compiler/compiler/integers/u16/ne.leo.out | 6 +++--- .../compiler/compiler/integers/u16/sub.leo.out | 6 +++--- .../compiler/integers/u16/ternary.leo.out | 6 +++--- .../compiler/compiler/integers/u32/add.leo.out | 6 +++--- .../integers/u32/console_assert.leo.out | 6 +++--- .../compiler/compiler/integers/u32/div.leo.out | 6 +++--- .../compiler/compiler/integers/u32/eq.leo.out | 6 +++--- .../compiler/compiler/integers/u32/ge.leo.out | 6 +++--- .../compiler/compiler/integers/u32/gt.leo.out | 6 +++--- .../compiler/integers/u32/input.leo.out | 6 +++--- .../compiler/compiler/integers/u32/le.leo.out | 6 +++--- .../compiler/compiler/integers/u32/lt.leo.out | 6 +++--- .../compiler/compiler/integers/u32/max.leo.out | 6 +++--- .../compiler/compiler/integers/u32/min.leo.out | 6 +++--- .../compiler/compiler/integers/u32/mul.leo.out | 6 +++--- .../compiler/compiler/integers/u32/ne.leo.out | 6 +++--- .../compiler/compiler/integers/u32/sub.leo.out | 6 +++--- .../compiler/integers/u32/ternary.leo.out | 6 +++--- .../compiler/compiler/integers/u64/add.leo.out | 6 +++--- .../integers/u64/console_assert.leo.out | 6 +++--- .../compiler/compiler/integers/u64/div.leo.out | 6 +++--- .../compiler/compiler/integers/u64/eq.leo.out | 6 +++--- .../compiler/compiler/integers/u64/ge.leo.out | 6 +++--- .../compiler/compiler/integers/u64/gt.leo.out | 6 +++--- .../compiler/integers/u64/input.leo.out | 6 +++--- .../compiler/compiler/integers/u64/le.leo.out | 6 +++--- .../compiler/compiler/integers/u64/lt.leo.out | 6 +++--- .../compiler/compiler/integers/u64/max.leo.out | 6 +++--- .../compiler/compiler/integers/u64/min.leo.out | 6 +++--- .../compiler/compiler/integers/u64/mul.leo.out | 6 +++--- .../compiler/compiler/integers/u64/ne.leo.out | 6 +++--- .../compiler/compiler/integers/u64/sub.leo.out | 6 +++--- .../compiler/integers/u64/ternary.leo.out | 6 +++--- .../compiler/compiler/integers/u8/add.leo.out | 6 +++--- .../integers/u8/console_assert.leo.out | 6 +++--- .../compiler/compiler/integers/u8/div.leo.out | 6 +++--- .../compiler/compiler/integers/u8/eq.leo.out | 6 +++--- .../compiler/compiler/integers/u8/ge.leo.out | 6 +++--- .../compiler/compiler/integers/u8/gt.leo.out | 6 +++--- .../compiler/integers/u8/input.leo.out | 6 +++--- .../compiler/compiler/integers/u8/le.leo.out | 6 +++--- .../compiler/compiler/integers/u8/lt.leo.out | 6 +++--- .../compiler/compiler/integers/u8/max.leo.out | 6 +++--- .../compiler/compiler/integers/u8/min.leo.out | 6 +++--- .../compiler/compiler/integers/u8/mul.leo.out | 6 +++--- .../compiler/compiler/integers/u8/ne.leo.out | 6 +++--- .../compiler/compiler/integers/u8/sub.leo.out | 6 +++--- .../compiler/integers/u8/ternary.leo.out | 6 +++--- .../compiler/mutability/array_dyn_mut.leo.out | 6 +++--- .../mutability/array_dyn_mut_indirect.leo.out | 6 +++--- .../compiler/mutability/array_mut.leo.out | 6 +++--- .../mutability/array_splice_mut.leo.out | 6 +++--- .../mutability/array_tuple_mut.leo.out | 6 +++--- .../mutability/circuit_function_mut.leo.out | 6 +++--- .../mutability/circuit_variable_mut.leo.out | 6 +++--- .../compiler/mutability/cond_mut.leo.out | 6 +++--- .../mutability/function_input_mut.leo.out | 6 +++--- .../compiler/mutability/let_mut.leo.out | 6 +++--- .../compiler/mutability/let_mut_nested.leo.out | 6 +++--- .../compiler/compiler/mutability/swap.leo.out | 6 +++--- .../compiler/statements/all_loops.leo.out | 6 +++--- .../compiler/compiler/statements/block.leo.out | 6 +++--- .../compiler/compiler/statements/chain.leo.out | 6 +++--- .../statements/compound_assignment.leo.out | 6 +++--- .../compiler/statements/for_loop.leo.out | 6 +++--- .../statements/iteration_basic.leo.out | 6 +++--- .../statements/iteration_variable.leo.out | 6 +++--- .../statements/multiple_returns.leo.out | 6 +++--- .../compiler/statements/mutate.leo.out | 6 +++--- .../compiler/statements/nested_mutate.leo.out | 6 +++--- .../compiler/statements/reverse_loops.leo.out | 6 +++--- .../compiler/statements/reverse_one.leo.out | 6 +++--- .../compiler/compiler/string/circuit.leo.out | 6 +++--- .../compiler/compiler/string/equality.leo.out | 6 +++--- .../compiler/compiler/string/replace.leo.out | 6 +++--- .../string/string_transformation.leo.out | 6 +++--- .../compiler/compiler/tuples/access.leo.out | 6 +++--- .../compiler/compiler/tuples/basic.leo.out | 6 +++--- .../compiler/compiler/tuples/dependent.leo.out | 6 +++--- .../compiler/tuples/destructured.leo.out | 6 +++--- .../compiler/tuples/nested_access.leo.out | 6 +++--- .../parser/parser/circuits/big_self.leo.out | 4 ++-- .../circuits/field_and_functions.leo.out | 8 ++++---- .../parser/parser/circuits/functions.leo.out | 8 ++++---- .../parser/parser/circuits/mut_self.leo.out | 4 ++-- .../parser/parser/circuits/self.leo.out | 4 ++-- .../parser/parser/functions/annotated.leo.out | 4 ++-- .../parser/functions/annotated_param.leo.out | 4 ++-- .../parser/functions/annotated_twice.leo.out | 4 ++-- .../parser/functions/const_param.leo.out | 8 ++++---- .../parser/functions/const_self_bad.leo.out | 4 ++-- .../parser/parser/functions/empty.leo.out | 4 ++-- .../parser/functions/param_array.leo.out | 4 ++-- .../parser/functions/param_circuit.leo.out | 4 ++-- .../parser/functions/param_tuple.leo.out | 4 ++-- .../parser/parser/functions/params.leo.out | 4 ++-- .../parser/functions/params_return.leo.out | 4 ++-- .../parser/parser/functions/return.leo.out | 4 ++-- .../parser/functions/return_tuple.leo.out | 4 ++-- .../parser/parser/import/many_import.leo.out | 8 ++++---- .../parser/parser/statement/block.leo.out | 12 ++++++------ .../parser/statement/conditional.leo.out | 16 ++++++++-------- .../parser/parser/statement/iteration.leo.out | 12 ++++++------ 347 files changed, 1038 insertions(+), 1026 deletions(-) diff --git a/errors/src/common/formatted.rs b/errors/src/common/formatted.rs index ee7b88ab92..f4262e0de4 100644 --- a/errors/src/common/formatted.rs +++ b/errors/src/common/formatted.rs @@ -118,7 +118,7 @@ impl fmt::Display for FormattedError { write!( f, "\n{indent }--> {path}:{line_start}:{start}\n\ - {indent } ", + {indent } |\n", indent = INDENT, path = &*self.span.path, line_start = self.span.line_start, @@ -128,7 +128,7 @@ impl fmt::Display for FormattedError { for (line_no, line) in self.span.content.lines().enumerate() { writeln!( f, - "|\n{line_no:width$} | {text}", + "{line_no:width$} | {text}", width = INDENT.len(), line_no = self.span.line_start + line_no, text = line, diff --git a/errors/src/common/span.rs b/errors/src/common/span.rs index e2d1d451f3..c10d259642 100644 --- a/errors/src/common/span.rs +++ b/errors/src/common/span.rs @@ -152,11 +152,23 @@ impl std::ops::Add for Span { let other_lines = other.content.lines().collect::>(); for line in self.line_start.min(other.line_start)..self.line_stop.max(other.line_stop) + 1 { if line >= self.line_start && line <= self.line_stop { - new_content.push(self_lines.get(line - self.line_start).copied().unwrap_or_default()); + new_content.push( + self_lines + .get(line - self.line_start) + .copied() + .unwrap_or_default() + .to_string(), + ); } else if line >= other.line_start && line <= other.line_stop { - new_content.push(other_lines.get(line - other.line_start).copied().unwrap_or_default()); + new_content.push( + other_lines + .get(line - other.line_start) + .copied() + .unwrap_or_default() + .to_string(), + ); } else if new_content.last().map(|x| *x != "...").unwrap_or(true) { - new_content.push("..."); + new_content.push(format!("{:<1$}...", " ", other.col_start + 4)); } } let new_content = new_content.join("\n").into(); diff --git a/tests/expectations/compiler/compiler/address/branch.leo.out b/tests/expectations/compiler/compiler/address/branch.leo.out index f820743540..3d0a5f4dce 100644 --- a/tests/expectations/compiler/compiler/address/branch.leo.out +++ b/tests/expectations/compiler/compiler/address/branch.leo.out @@ -16,6 +16,6 @@ outputs: a: type: bool value: "true" - initial_ast: 9c0c4094669cbb415b9d650a42335ba05a7026573e925d468de562577f90686b - canonicalized_ast: 9c0c4094669cbb415b9d650a42335ba05a7026573e925d468de562577f90686b - type_inferenced_ast: 1b636553844640391e976115df709060a44e64346cbf06b4207a6f4c443e36b1 + initial_ast: 0788eb39577304b655f147fe3045e1fad995b31811444afadc228bf99f505994 + canonicalized_ast: 0788eb39577304b655f147fe3045e1fad995b31811444afadc228bf99f505994 + type_inferenced_ast: 57aa71789a8ba7ac075f734ecc0450ae4b56b2343cff19e345cdab9c7715e1ee diff --git a/tests/expectations/compiler/compiler/address/equal.leo.out b/tests/expectations/compiler/compiler/address/equal.leo.out index 06d3c264e9..491c8bb576 100644 --- a/tests/expectations/compiler/compiler/address/equal.leo.out +++ b/tests/expectations/compiler/compiler/address/equal.leo.out @@ -22,6 +22,6 @@ outputs: a: type: bool value: "false" - initial_ast: a98138d9c59f7f9d7a6ed08713bc78a84059734eb5ee7479abeea88ce02da881 - canonicalized_ast: a98138d9c59f7f9d7a6ed08713bc78a84059734eb5ee7479abeea88ce02da881 - type_inferenced_ast: e0c1d57acb15679e25c78cc4fe3266b85ce26d4d7d23b55a78c49c33f0b3d550 + initial_ast: e057591dddc93027645e671870d9bb932a32647a600a452657e0a8a3748f0921 + canonicalized_ast: e057591dddc93027645e671870d9bb932a32647a600a452657e0a8a3748f0921 + type_inferenced_ast: 1d32fc5c118dc328274a6e2c4048c0efeea2b128fa2d2733ddf7d4fde4daf46f diff --git a/tests/expectations/compiler/compiler/address/index.leo.out b/tests/expectations/compiler/compiler/address/index.leo.out index 251698d31e..59194f6bf4 100644 --- a/tests/expectations/compiler/compiler/address/index.leo.out +++ b/tests/expectations/compiler/compiler/address/index.leo.out @@ -16,6 +16,6 @@ outputs: a: type: bool value: "true" - initial_ast: 87761daaf7a803becfc809b948e4f34a2c38e4bfe3b8f5184e6923ad707be714 - canonicalized_ast: 87761daaf7a803becfc809b948e4f34a2c38e4bfe3b8f5184e6923ad707be714 - type_inferenced_ast: 46539f9daa06cc132acaeeacf88a766d7f7673de8b9d2ea3ef01bb330520b00f + initial_ast: 76cba1a1eb179db8b21c2e05403861e133983feec9b987c764a5584da78c16fb + canonicalized_ast: 76cba1a1eb179db8b21c2e05403861e133983feec9b987c764a5584da78c16fb + type_inferenced_ast: 822de2e0c4fdf74f7b476666b6a8a38782bd828dc2d216a7a68bf70edc444fbf diff --git a/tests/expectations/compiler/compiler/address/ternary.leo.out b/tests/expectations/compiler/compiler/address/ternary.leo.out index 94d76dce8b..fb25d02dd7 100644 --- a/tests/expectations/compiler/compiler/address/ternary.leo.out +++ b/tests/expectations/compiler/compiler/address/ternary.leo.out @@ -22,6 +22,6 @@ outputs: a: type: bool value: "false" - initial_ast: 08a406e8214b12bec43b41364c4d19fd81b227915ab2deb9c572b140c43aeabe - canonicalized_ast: 08a406e8214b12bec43b41364c4d19fd81b227915ab2deb9c572b140c43aeabe - type_inferenced_ast: 5c194c9590eb53fa1a6af575e63bf54860befa24d3636610aa68c46b72d839a8 + initial_ast: 8a34bf070edd7585daad47802214b7df49b6df6dd9a6344644a4f121b320e449 + canonicalized_ast: 8a34bf070edd7585daad47802214b7df49b6df6dd9a6344644a4f121b320e449 + type_inferenced_ast: 2254abca31e4326444ef2066c8f85b3280505a3ecbaffaf7e472276a3034cc2f diff --git a/tests/expectations/compiler/compiler/array/complex_access.leo.out b/tests/expectations/compiler/compiler/array/complex_access.leo.out index b7f4e36e2a..d3cd24862e 100644 --- a/tests/expectations/compiler/compiler/array/complex_access.leo.out +++ b/tests/expectations/compiler/compiler/array/complex_access.leo.out @@ -16,6 +16,6 @@ outputs: out: type: bool value: "true" - initial_ast: 10f8520f03661d994c22d2c73d8049a1b2af19a9a0d75edd6af15a8979aa299a - canonicalized_ast: 3b8301335066fe2bfe8eba905ab33bc816e911591a7873d9ea4ce42ea1709aee - type_inferenced_ast: 380dcc1b3581ded8098020e5a311d98aa17c5b19259ea0b7a4457d417ac2fe5f + initial_ast: 589670c04ad13f8dbe2ea01562fa6bdff1c6dfaf118730e60d0a55e5bb2168b9 + canonicalized_ast: 82fd732401abaced235b6522298a454fd0491ea1dc0a80170773e1a129320657 + type_inferenced_ast: 14321d2bd1a2d9da60f52372feee4c8bf6aa98d516c01bf309d219c903b7f241 diff --git a/tests/expectations/compiler/compiler/array/equal_initializer.leo.out b/tests/expectations/compiler/compiler/array/equal_initializer.leo.out index 55b00f98ff..f593750149 100644 --- a/tests/expectations/compiler/compiler/array/equal_initializer.leo.out +++ b/tests/expectations/compiler/compiler/array/equal_initializer.leo.out @@ -22,6 +22,6 @@ outputs: x: type: bool value: "false" - initial_ast: fda944cb99bf4cedbfd531f2aafa9338f3d374ecbbfd40196cd82ccdfc462541 - canonicalized_ast: 5e78fec68f5bf00fcc574930106ebf0883cc6122e3378fa245294619e7b2dc84 - type_inferenced_ast: 7db6bf5aae7f4929e44e3d068c366a8917b937a43770b2f62ee35df4fb58eb81 + initial_ast: c4b7aca1f9002da95f8efab340d4dc5d38e64d97274b1815126e7f88f40e155a + canonicalized_ast: c8b633546058b56b76a0864ab0fce2aa7169554b716e17250ebc688708dcd206 + type_inferenced_ast: 9411e52e1ab1ddec7d5d1111aa8c10a5ec916b9d5e86d24ed5348462ec0adb71 diff --git a/tests/expectations/compiler/compiler/array/equal_initializer_2.leo.out b/tests/expectations/compiler/compiler/array/equal_initializer_2.leo.out index 6a76b09bed..2068f31405 100644 --- a/tests/expectations/compiler/compiler/array/equal_initializer_2.leo.out +++ b/tests/expectations/compiler/compiler/array/equal_initializer_2.leo.out @@ -22,6 +22,6 @@ outputs: x: type: bool value: "true" - initial_ast: 7c27f9b122c5bfdff2c53d5474e99c4e7da6a4a1454f43242c87e508ed564c72 - canonicalized_ast: 3d416efd3620b8851ac1ce3e14dc0b80baa7c11901beee61cc7e47ea7d177fe2 - type_inferenced_ast: 34042fc568040adc10883279bd68c7efd24ba63717013aca008eeaaef32bc1c9 + initial_ast: 2cbe00dbca8111c92a55dcb9a18766ddb9a407e71535ae62d3bf4d6ec409fca2 + canonicalized_ast: 75d8d33b9a5376fea14bb9821abe1bc5e1661cfccbf962f58facb42e539b1b04 + type_inferenced_ast: 45b1b5d994a229da8fb761d97c474778a65b8a5fdd87cfbd6e4aaa4a1ddef7a0 diff --git a/tests/expectations/compiler/compiler/array/input_nested_3x2.leo.out b/tests/expectations/compiler/compiler/array/input_nested_3x2.leo.out index 9d3c5d1d5d..bc64293f28 100644 --- a/tests/expectations/compiler/compiler/array/input_nested_3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/input_nested_3x2.leo.out @@ -16,6 +16,6 @@ outputs: x: type: bool value: "true" - initial_ast: 218388bf03161d2c04e5aeea2c86e9c81d2bec8f080a1cf8cdaf003c15598f23 - canonicalized_ast: dcc0c2c9f6acc9d8b565c0445e5e879ad76564c2b323587ae5d8ed84b5977d13 - type_inferenced_ast: 26266c1f1ddaf309dbead42e49f4e41752e5e1fe72cdc3a24953088d08df953a + initial_ast: 002647d1f55a3b5f358cbd27beff81736973fc142dc3d708f8df8d634c1e8fa4 + canonicalized_ast: b36a5f62c09093fcfce2797b89fe936c4bb94fe1e4aca6608cda4f529677b005 + type_inferenced_ast: 524e0682eec030dda6f12637fb92af0122a7cf3986a8d7c974a2bc8a1554552d diff --git a/tests/expectations/compiler/compiler/array/input_tuple_3x2.leo.out b/tests/expectations/compiler/compiler/array/input_tuple_3x2.leo.out index 30616ab39e..16b86824b3 100644 --- a/tests/expectations/compiler/compiler/array/input_tuple_3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/input_tuple_3x2.leo.out @@ -16,6 +16,6 @@ outputs: x: type: bool value: "true" - initial_ast: fda944cb99bf4cedbfd531f2aafa9338f3d374ecbbfd40196cd82ccdfc462541 - canonicalized_ast: 5e78fec68f5bf00fcc574930106ebf0883cc6122e3378fa245294619e7b2dc84 - type_inferenced_ast: 7db6bf5aae7f4929e44e3d068c366a8917b937a43770b2f62ee35df4fb58eb81 + initial_ast: c4b7aca1f9002da95f8efab340d4dc5d38e64d97274b1815126e7f88f40e155a + canonicalized_ast: c8b633546058b56b76a0864ab0fce2aa7169554b716e17250ebc688708dcd206 + type_inferenced_ast: 9411e52e1ab1ddec7d5d1111aa8c10a5ec916b9d5e86d24ed5348462ec0adb71 diff --git a/tests/expectations/compiler/compiler/array/multi_initializer.leo.out b/tests/expectations/compiler/compiler/array/multi_initializer.leo.out index cbda44a22b..b8fe56c3cb 100644 --- a/tests/expectations/compiler/compiler/array/multi_initializer.leo.out +++ b/tests/expectations/compiler/compiler/array/multi_initializer.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 32a53c1270d2a7384c5d1a0cbda49d9634db09dc2b69fae444fb4f36109bb8fa - canonicalized_ast: 88df9d661f84ad6650c5d81dd0ec07b5a07fbb2ceda5fde1ba545bc3391ac9ce - type_inferenced_ast: 5aaf153f3c03ac9e11e500a1e60f0ea11d1b5c736c3209118f3c67c0321a490b + initial_ast: 411fd383234eaff206ddb89e59c53eb3cf89cc0584065cbcc6a407f7b6c657da + canonicalized_ast: 8730ae623fae334d698ea4169b630365f3026e6b39264da353e194feb07c0863 + type_inferenced_ast: 48ede78fbd4de76d6693bc2a50b813f119024f80d0a6c73f174f1a7ba56a92ce diff --git a/tests/expectations/compiler/compiler/array/nested.leo.out b/tests/expectations/compiler/compiler/array/nested.leo.out index cc8839129d..a372f6cfae 100644 --- a/tests/expectations/compiler/compiler/array/nested.leo.out +++ b/tests/expectations/compiler/compiler/array/nested.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 8f10cab9e9d44f9e2bf63d3de712fbfd56e311fe1bf9a8cdd2d29d23acdca9bd - canonicalized_ast: f4516c7e913f38f8fcfe8be1061ea4960a44891e92f369f7a114ff87ae08385d - type_inferenced_ast: 530a5d13568caa8db612d73623d876294110f2d2ca4fa57f7dc67d7a8b6bb75b + initial_ast: 436ce80cb3f81cd43e5747a105b14947964f29c0c35070c394728cd2cd9b1fa3 + canonicalized_ast: 3097d80c877f857bd36f1e3ca56aefd7524a2fc46239959190ae9c5ef166ba9a + type_inferenced_ast: 873a71a8f9894e1967f0f750d63011597f17e0a51b5cd42ea0b74191ffa357a1 diff --git a/tests/expectations/compiler/compiler/array/nested_3x2_value.leo.out b/tests/expectations/compiler/compiler/array/nested_3x2_value.leo.out index 12dafb6498..5f11aa99e8 100644 --- a/tests/expectations/compiler/compiler/array/nested_3x2_value.leo.out +++ b/tests/expectations/compiler/compiler/array/nested_3x2_value.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 896fc62bde36645825dc69df4fadb323db666acf660708e94a699f1028fff42e - canonicalized_ast: 7ee6031329c67e55206272781e4b790372743eaf797585428417995e833ce6e0 - type_inferenced_ast: 37f276c62c7619fc7e541006b5d70f2d628419243b561b52352ea5d944f395bb + initial_ast: 33a39a0f27f018eee2f2986d1356bcc9354ce3128447a60859f4392b8a4e4f29 + canonicalized_ast: c227ab0a4e864f62af90e4b1d843dcd41e65b65354107558cf26383831010a1d + type_inferenced_ast: c2515f900d7b2ae04c80ed1f7a3bf5729fec502dffc910cae03ac8cf02530dce diff --git a/tests/expectations/compiler/compiler/array/registers.leo.out b/tests/expectations/compiler/compiler/array/registers.leo.out index a5e25dc509..f03de935e4 100644 --- a/tests/expectations/compiler/compiler/array/registers.leo.out +++ b/tests/expectations/compiler/compiler/array/registers.leo.out @@ -22,6 +22,6 @@ outputs: r: type: "[u8; 3]" value: "\"123\"" - initial_ast: 8081e76e99bf5f637adacbf3ebc7f55c0cce51add474de0bd53da72ea559f489 - canonicalized_ast: 8081e76e99bf5f637adacbf3ebc7f55c0cce51add474de0bd53da72ea559f489 - type_inferenced_ast: 7fdc1c08d6bc57661b15407868ca23940aea04ec9e4d36d9e41f151a8cf09461 + initial_ast: c6b18b6fca7fda77a9eba151f4d27d084e1ad7aa616e6ec9deb1ef5f4bff2d24 + canonicalized_ast: c6b18b6fca7fda77a9eba151f4d27d084e1ad7aa616e6ec9deb1ef5f4bff2d24 + type_inferenced_ast: 6f6e6b35b55543bc87589005ac9a47830e3f65680a4db82e3f17d9280d6fa4ad diff --git a/tests/expectations/compiler/compiler/array/slice.leo.out b/tests/expectations/compiler/compiler/array/slice.leo.out index b81968aa2f..4eb93da246 100644 --- a/tests/expectations/compiler/compiler/array/slice.leo.out +++ b/tests/expectations/compiler/compiler/array/slice.leo.out @@ -16,6 +16,6 @@ outputs: x: type: bool value: "true" - initial_ast: e29ed0519cc383934fa19fb0efb6d8789f973a26dbeef8d88859efb29624c3d9 - canonicalized_ast: e29ed0519cc383934fa19fb0efb6d8789f973a26dbeef8d88859efb29624c3d9 - type_inferenced_ast: 7051b05b956b9b30cd64b5e7fb93837b78731742431f3210e0b67cc308fd37f4 + initial_ast: e75ae154dab0f64ed38fc12e28289351e79787787e882847fbc020a780bc429f + canonicalized_ast: e75ae154dab0f64ed38fc12e28289351e79787787e882847fbc020a780bc429f + type_inferenced_ast: c5a14533d3c5d0751b98beb612a88eac2c7687ae77858dfcbc3424b160f1cd7d diff --git a/tests/expectations/compiler/compiler/array/slice_lower.leo.out b/tests/expectations/compiler/compiler/array/slice_lower.leo.out index 75eea7dc8e..a93da800f0 100644 --- a/tests/expectations/compiler/compiler/array/slice_lower.leo.out +++ b/tests/expectations/compiler/compiler/array/slice_lower.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 847923c2af8832e5f2e9b7ba33e6da05ce6b782fc49061817bf0e8c1f308af78 - canonicalized_ast: 847923c2af8832e5f2e9b7ba33e6da05ce6b782fc49061817bf0e8c1f308af78 - type_inferenced_ast: d9feb9d3324d32ade64eb50f2f49ba54f656430197085755558bc972f3d76252 + initial_ast: 748ad013543f1352f922fc5b566b38bf6a9de939a566c4484660f17460ef5cee + canonicalized_ast: 748ad013543f1352f922fc5b566b38bf6a9de939a566c4484660f17460ef5cee + type_inferenced_ast: 80f8d5b301bc982f189c63a4d908c7bf7a9a2d5ea351778d740035bad95f166a diff --git a/tests/expectations/compiler/compiler/array/spread.leo.out b/tests/expectations/compiler/compiler/array/spread.leo.out index 7e9446a229..09685b4e01 100644 --- a/tests/expectations/compiler/compiler/array/spread.leo.out +++ b/tests/expectations/compiler/compiler/array/spread.leo.out @@ -16,6 +16,6 @@ outputs: x: type: bool value: "true" - initial_ast: b213065cf9a69052aa42e5e2599ebbec19429b7c8f286dd29baefdd22de5ae11 - canonicalized_ast: b213065cf9a69052aa42e5e2599ebbec19429b7c8f286dd29baefdd22de5ae11 - type_inferenced_ast: 6cbb6af27980d61e07df3f9f54b77ca34463c79df3f4980870b9c184847eac27 + initial_ast: 97004d55104bcf3b6698926656fb23c849cc1c488e387d151c1f3e2be4438fe0 + canonicalized_ast: 97004d55104bcf3b6698926656fb23c849cc1c488e387d151c1f3e2be4438fe0 + type_inferenced_ast: 7294dc3dee9189573cbf54b90692869b2a02a78fb3bbb6fe3e2436d2cca377fc diff --git a/tests/expectations/compiler/compiler/array/ternary_in_array.leo.out b/tests/expectations/compiler/compiler/array/ternary_in_array.leo.out index 290104d615..360c7d70c1 100644 --- a/tests/expectations/compiler/compiler/array/ternary_in_array.leo.out +++ b/tests/expectations/compiler/compiler/array/ternary_in_array.leo.out @@ -16,6 +16,6 @@ outputs: x: type: bool value: "true" - initial_ast: d073d355e5dc63d782bf7511301b7d3460b1909f20cb951275b4160818f91e96 - canonicalized_ast: d073d355e5dc63d782bf7511301b7d3460b1909f20cb951275b4160818f91e96 - type_inferenced_ast: e896efa565b20c373020f3e3fb2ca68c2ee836512b4968d61b920e9ed6889fdb + initial_ast: aa978e3283733cfee6cef1e6eff20b4847cf56962ccb3501b6501d31cd42ddb5 + canonicalized_ast: aa978e3283733cfee6cef1e6eff20b4847cf56962ccb3501b6501d31cd42ddb5 + type_inferenced_ast: edcba3eea639506ff172054105ac6533c6d184c131240e73f896f307983ba3c2 diff --git a/tests/expectations/compiler/compiler/array/tuple_3x2_value.leo.out b/tests/expectations/compiler/compiler/array/tuple_3x2_value.leo.out index 4d05669210..e31f9bed5d 100644 --- a/tests/expectations/compiler/compiler/array/tuple_3x2_value.leo.out +++ b/tests/expectations/compiler/compiler/array/tuple_3x2_value.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: e2d243135efb97b9b091ce0e5c7286b71ff3561da860cae9db7af5cbeb696f6c - canonicalized_ast: 28d1ec3e1349fa7d140bbb51cdefbe85dc73ce6e1ef540fa4cf9ce7700411a8c - type_inferenced_ast: 9928c37278b67a3d0882f1cb7b2b1fe630ad0771ac1e95509028c3e9241a3bbf + initial_ast: f92dd478e6c8fdb9a7f0dfd3ad0cf9e6e0239c59e5ee1fda0851fdcdfb2ca589 + canonicalized_ast: 0ce7eb5522cc65d45b259560b138eca8750b7a4231435f6b5df21c906db4d5ba + type_inferenced_ast: 1aeacac3268aed9b99f7d5a7736e9f32cd1a65905d3234d11ec5f6027bd68c66 diff --git a/tests/expectations/compiler/compiler/array/type_input_3x2.leo.out b/tests/expectations/compiler/compiler/array/type_input_3x2.leo.out index c373102927..66d3e5d43c 100644 --- a/tests/expectations/compiler/compiler/array/type_input_3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_input_3x2.leo.out @@ -16,6 +16,6 @@ outputs: x: type: bool value: "true" - initial_ast: ddb20cbb9ecf52a8f9d61766f0bdf76d01d3a7854c5ca018f88e226592e44940 - canonicalized_ast: ddb20cbb9ecf52a8f9d61766f0bdf76d01d3a7854c5ca018f88e226592e44940 - type_inferenced_ast: c7c2205a1fb4587b6281f21d34a2cafae1583106e19af3beaead87b623cb61d6 + initial_ast: ab709670db7a5cc6642a175a78541054b53210f6be39a174d90ee57f3c5570f5 + canonicalized_ast: ab709670db7a5cc6642a175a78541054b53210f6be39a174d90ee57f3c5570f5 + type_inferenced_ast: f870e0b5181e4187da90ea8f7ea562596f0fea420425a403a972d761131718af diff --git a/tests/expectations/compiler/compiler/array/type_input_4x3x2.leo.out b/tests/expectations/compiler/compiler/array/type_input_4x3x2.leo.out index 4f5f0df1eb..03baa309e3 100644 --- a/tests/expectations/compiler/compiler/array/type_input_4x3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_input_4x3x2.leo.out @@ -16,6 +16,6 @@ outputs: x: type: bool value: "true" - initial_ast: 8b5cb35e1fe17071cd7aa404be247a325dde350d6954aaa1c58ee0bb0dd4d333 - canonicalized_ast: 8b5cb35e1fe17071cd7aa404be247a325dde350d6954aaa1c58ee0bb0dd4d333 - type_inferenced_ast: 4661ca8ff2e993ddae82000b6db73db86b63af8c4557d22975abbe9a63cb14e5 + initial_ast: 05ee62d30364f4d4ea3a6f680b049c3743d6fcb2cd7e751d798e61b38f1f0c70 + canonicalized_ast: 05ee62d30364f4d4ea3a6f680b049c3743d6fcb2cd7e751d798e61b38f1f0c70 + type_inferenced_ast: a1307016717f76519ff0f813ead70ed5460644e0e8414827665a1bd066159a76 diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2.leo.out index c1b8050f09..d77376c25f 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2.leo.out @@ -16,6 +16,6 @@ outputs: x: type: bool value: "true" - initial_ast: af5c8bc684c384ee78844b52c6752ba286378bb41218faf63446caf1d7d98c6f - canonicalized_ast: af5c8bc684c384ee78844b52c6752ba286378bb41218faf63446caf1d7d98c6f - type_inferenced_ast: c15b64210f2f8afad3f9819f877f287c2a6a08e2edd6adeb4375527c4d1f426b + initial_ast: 8caeaa858353e7f461b14364b898d538508c2e45c477c36dddc2960d4d626ed9 + canonicalized_ast: 8caeaa858353e7f461b14364b898d538508c2e45c477c36dddc2960d4d626ed9 + type_inferenced_ast: a61912871814695d648b0f176feaa0409b3d6bae3cb7c7a1234bf6543e015a5f diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2.leo.out index 370eac3c75..10106726b4 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 98381a0a6fe09deaba7e43c014332664b608098bed9855ce1c19b6494b26cebd - canonicalized_ast: 98381a0a6fe09deaba7e43c014332664b608098bed9855ce1c19b6494b26cebd - type_inferenced_ast: 40c047076318d5931ad0d3a3aaa6ddd8245a012b68f5ae3792c1b6334e444bbb + initial_ast: 77b015384e8f21d34eef7f56465605fa133e739863a6bc33b01315232a86647e + canonicalized_ast: 77b015384e8f21d34eef7f56465605fa133e739863a6bc33b01315232a86647e + type_inferenced_ast: 4be69d8478185f5b9d4dcee3fc16ad4af858b7a47122bbc8e757d0dbc4bf92d8 diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2.leo.out index e9b1149d19..97d78e0fef 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: e51e19607178661b8069b140d903234ad67047f876e428cd98577a317c1c63ea - canonicalized_ast: 9ece5eb8b7cfd8d9f46e1f5d56932463bfade9ed0dc7aa5cb4ea1a02710fabb6 - type_inferenced_ast: 75035a66a260d555fd66fc58a8c349cf77a88e649d9af5a21620b1d0ce69ab76 + initial_ast: ce12666930386785c7a5afe142793c47eae62145ff1d50c590dc82c2b4baded6 + canonicalized_ast: 8220bc2881fe07bbfa873376696618fc182aff993d2a7d1a23ace5cc00965ff8 + type_inferenced_ast: c14a7e89debd9289883db476fdbc814d14bfc410d40d1ac100bbece88d35b7c8 diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2.leo.out index 15843373df..4c0c8b246d 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: c7388d8c25c6c593bbf9df42442c773fde414f17c608ea3f44e7d2b1d2da742a - canonicalized_ast: 1f78e26797ec426580278599d668230e3ff5c73f8bfe5ee34aa2cfeb2bc8f501 - type_inferenced_ast: e1850f46b6a18ce3fdc6be9fe8cd71df61b47c11cf4b6904e9006feec39724a7 + initial_ast: 609dfd962592e1dbf90051979163cead865cb69c0722c641517fad4f3091ec57 + canonicalized_ast: 4d6b8380c844ac6655c7dcc4c4a2ff45f14001577c82f21d87b4546e04c7e776 + type_inferenced_ast: d86da787361b7cea05474815138f2a1f98642b93232641bf399647788c0d5ecd diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2.leo.out index e2d1fa8e57..621b4b1bed 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 5ef47c66a7103fb79151a128b79e270c775761f85ba7b600fa62feedb9d776a1 - canonicalized_ast: d85e3d11bcb9ea34f4c0115bc19ab6cc9706e24f337127a5deb76a23762b1cc7 - type_inferenced_ast: 4b484d40365dd5e0440645a4ae057979e008f58b9072977da44a4936d6844201 + initial_ast: 67cb2ae1b5b3e19a7c7aa8783d0f566b69bfb995e7848ec7746e1af0448c1aa8 + canonicalized_ast: 4aba053c866851bfcd22da037e0270ad43a7fabbdc263629af52eea38d577b7a + type_inferenced_ast: b44ceb7749802ff53c82221efad075565264531500665a01aa94f745e0c304cd diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2.leo.out index fcfdc4afa1..29a8a9c198 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 9c4ccc3962870de33739e88f016f9ad2a26fce1dd9d83777e75146a770a7c843 - canonicalized_ast: 342998b2e6b4e15992c0ae8f8f9e88fd61028b9f5251a1a44eb0a5e748fb914a - type_inferenced_ast: bcb57fa0c03974b04bab42f1000a0896442859aefed0b3da4122f9e2eb6d3bcb + initial_ast: 9867f722c5ce3ccbc3701238c216acc2b7e37bdc6163a8f7a4a4d88b7f19b73a + canonicalized_ast: d5f9deb2b7806ec665a6c6a5a6a0bee2c76310ecec4f34a8a479aa6934902b3a + type_inferenced_ast: ed9cee663a3a9dc51ba06a80e5f192fdcc49e62b8e4cb0ae9582f3a7f7b1de25 diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2.leo.out index 446db73b3b..20cd329a0c 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: f58024907a398764d1f82717bfb3c428f3bcaf199612fb58f57da612dc0f31d9 - canonicalized_ast: f08780773dfd122a26f9afb8a17ead2177a7741fe658510d4cb3e00e80ac43e6 - type_inferenced_ast: cfb5f5e51dede0eb87e637bfc6cf995c8f15c32fea3caf92c0a73b5af430a9fb + initial_ast: 222950738e89721363dd15b8f5d240befa46d434c45f486857ec4898806d0e84 + canonicalized_ast: b89098b4159b284f07be789cfb5b196515c9d33821be1411c4bc25ae3c90425f + type_inferenced_ast: 4e0acee05ff837a30c1057dec0c5cc18a6ce573e5891218990f88584fef683a7 diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2.leo.out index c467079faf..cb1620363c 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: aabfd4724373f68e44dac450426c84c619f8441e02f4cec46bf1a96b01d687c6 - canonicalized_ast: 2768446224453862bedd1449de91a6f9e82a06ce41a23dc4afef2e8bc2faf078 - type_inferenced_ast: 24346a907649334e87888b2744dfda551e8ca3248b1e357d432ce0d027f44a9b + initial_ast: a312fb26b99d2c4a7891d482079f0220663dba780bc68b9f651def2cd9bad960 + canonicalized_ast: 01c472ee0495bbb164f67159e86483a29421918178a7115ebd3b905d6909150f + type_inferenced_ast: ac2c37891e21027028b4a1e4b8f5972e5ee64f91f6b2ba6a85218c622192ce02 diff --git a/tests/expectations/compiler/compiler/boolean/and.leo.out b/tests/expectations/compiler/compiler/boolean/and.leo.out index 996e5e721a..5714d0de0b 100644 --- a/tests/expectations/compiler/compiler/boolean/and.leo.out +++ b/tests/expectations/compiler/compiler/boolean/and.leo.out @@ -34,6 +34,6 @@ outputs: x: type: bool value: "true" - initial_ast: e412bc079077d0894afdfb1b2bdcb0627216e64e05b93d53c065acaab6602648 - canonicalized_ast: e412bc079077d0894afdfb1b2bdcb0627216e64e05b93d53c065acaab6602648 - type_inferenced_ast: 8455cc489d00cc4c2efb999f238544d267605c78c4a3711f3968daff8b1b691f + initial_ast: 9f6929c30448a269b4a22f3001085be75f91bc91503978f2804f4d6bf7dd246f + canonicalized_ast: 9f6929c30448a269b4a22f3001085be75f91bc91503978f2804f4d6bf7dd246f + type_inferenced_ast: b41ada9ca834d73d94641fa3f28c95bea6e6862819bab431ac4b02cc342fb659 diff --git a/tests/expectations/compiler/compiler/boolean/conditional.leo.out b/tests/expectations/compiler/compiler/boolean/conditional.leo.out index d0f6d47bc6..0551b1c42f 100644 --- a/tests/expectations/compiler/compiler/boolean/conditional.leo.out +++ b/tests/expectations/compiler/compiler/boolean/conditional.leo.out @@ -34,6 +34,6 @@ outputs: x: type: bool value: "true" - initial_ast: 76acb7e9a4a70256e7a92d168c9455fed850a3773a9ea92ec5216456b2f3f5ca - canonicalized_ast: 76acb7e9a4a70256e7a92d168c9455fed850a3773a9ea92ec5216456b2f3f5ca - type_inferenced_ast: ae2c4bcde83fa9bddf1c0a7a2c32a910f7f8e43abf52bcb2275c8fce1349af1f + initial_ast: 3de9d88d40969c01145790a5903ab2dfa1a7614ec4f4d62c20b86b917653008e + canonicalized_ast: 3de9d88d40969c01145790a5903ab2dfa1a7614ec4f4d62c20b86b917653008e + type_inferenced_ast: 53a91ffe37b6a96f1c239669f04ab600f51d2a200a8aed2dee0dc50bb5fa4f7d diff --git a/tests/expectations/compiler/compiler/boolean/equal.leo.out b/tests/expectations/compiler/compiler/boolean/equal.leo.out index 52e543e167..8e0ba59214 100644 --- a/tests/expectations/compiler/compiler/boolean/equal.leo.out +++ b/tests/expectations/compiler/compiler/boolean/equal.leo.out @@ -34,6 +34,6 @@ outputs: x: type: bool value: "true" - initial_ast: 9ca546550b286113dcfe9e345b58f996e01e7f3429b33f4829bdeda7a09939a1 - canonicalized_ast: 9ca546550b286113dcfe9e345b58f996e01e7f3429b33f4829bdeda7a09939a1 - type_inferenced_ast: f5ad424921b7256fb2553793ee3a83d11cb70e2c6f7d6df99d93631bb534ab90 + initial_ast: 7fe0c7281b31c1f126d41c425f852930de3283b0deb54362fba0834b6eb83ae3 + canonicalized_ast: 7fe0c7281b31c1f126d41c425f852930de3283b0deb54362fba0834b6eb83ae3 + type_inferenced_ast: 5c851d6f023000766f370ec5bc048af431212368c68fb1ba674500ae7451a36e diff --git a/tests/expectations/compiler/compiler/boolean/not_equal.leo.out b/tests/expectations/compiler/compiler/boolean/not_equal.leo.out index 55e1086478..04575f4f5e 100644 --- a/tests/expectations/compiler/compiler/boolean/not_equal.leo.out +++ b/tests/expectations/compiler/compiler/boolean/not_equal.leo.out @@ -34,6 +34,6 @@ outputs: x: type: bool value: "false" - initial_ast: c220ba73f75ff1651a98991ee4f5ea021dabdde2a1c08e949deb2aa1ecb65390 - canonicalized_ast: c220ba73f75ff1651a98991ee4f5ea021dabdde2a1c08e949deb2aa1ecb65390 - type_inferenced_ast: 30507ab22a8ebd6bb0f239d34923201b6381a722e11649c0b1ee73acd9317902 + initial_ast: aae17ba5bd2ce376b5c440df42be442b0731feb499fa37b133b89f364a8790bf + canonicalized_ast: aae17ba5bd2ce376b5c440df42be442b0731feb499fa37b133b89f364a8790bf + type_inferenced_ast: 5b110c3aa3e0d65942f7a7fdbdccfc745aa810ea7d71137358f220d2bfecb0b7 diff --git a/tests/expectations/compiler/compiler/boolean/or.leo.out b/tests/expectations/compiler/compiler/boolean/or.leo.out index 06dddec499..19ef883621 100644 --- a/tests/expectations/compiler/compiler/boolean/or.leo.out +++ b/tests/expectations/compiler/compiler/boolean/or.leo.out @@ -34,6 +34,6 @@ outputs: x: type: bool value: "true" - initial_ast: b511fd260063b7d9608269bd67b0fdbe8ad9bd4ea1263fe1de4487ae071ce373 - canonicalized_ast: b511fd260063b7d9608269bd67b0fdbe8ad9bd4ea1263fe1de4487ae071ce373 - type_inferenced_ast: e1844ed06868262cb955e23c6844a44e64c156897ab166356a5ce4b1e0f6ce16 + initial_ast: 35fd6670d1c00d5c70861e58f988536f86dbe84d26cb1cdf601228a3b784296e + canonicalized_ast: 35fd6670d1c00d5c70861e58f988536f86dbe84d26cb1cdf601228a3b784296e + type_inferenced_ast: 3dd86ce4e1ecce14619b49e274f1c3275ec7561f82655eadda4752f20e771802 diff --git a/tests/expectations/compiler/compiler/char/circuit.leo.out b/tests/expectations/compiler/compiler/char/circuit.leo.out index db3bf3dd36..727dce531b 100644 --- a/tests/expectations/compiler/compiler/char/circuit.leo.out +++ b/tests/expectations/compiler/compiler/char/circuit.leo.out @@ -100,6 +100,6 @@ outputs: r: type: char value: "'\\u{1f62d}'" - initial_ast: cd951a04ce5ef7c9de242229574bea37ff8b7b9f74ab673b01c3d41527de2179 - canonicalized_ast: cd951a04ce5ef7c9de242229574bea37ff8b7b9f74ab673b01c3d41527de2179 - type_inferenced_ast: 3fe7acb8144387410019e5bdfaff1b87c7969a25f68184df6b11091ac1bf64bf + initial_ast: aa3eb0c4de0eebada9490b11e35c36923316559727a3afce28fe3852a805354a + canonicalized_ast: aa3eb0c4de0eebada9490b11e35c36923316559727a3afce28fe3852a805354a + type_inferenced_ast: 73309200d30bf2831847477f3da7ede4ba9f4aa377e6ebf15c9c34774f53bcb5 diff --git a/tests/expectations/compiler/compiler/char/neq.leo.out b/tests/expectations/compiler/compiler/char/neq.leo.out index 21321ccb74..b78933acc7 100644 --- a/tests/expectations/compiler/compiler/char/neq.leo.out +++ b/tests/expectations/compiler/compiler/char/neq.leo.out @@ -100,6 +100,6 @@ outputs: r: type: char value: "'a'" - initial_ast: be224a09ae4accb70784b57ed46907da9ffec12019023cd93d57c0496f508fd3 - canonicalized_ast: be224a09ae4accb70784b57ed46907da9ffec12019023cd93d57c0496f508fd3 - type_inferenced_ast: b287f08b3e9cf836b40d4ed75dc0195fa6e70e84051976e33529a7708790fc6f + initial_ast: d3a773c0b0555cc2c3a6d2fafb9e567488ea8fd91ea965f758ec9f58a4679dd7 + canonicalized_ast: d3a773c0b0555cc2c3a6d2fafb9e567488ea8fd91ea965f758ec9f58a4679dd7 + type_inferenced_ast: 460b284982e0fb9819768800b2c84ab682929bba1b6056f03e5e90bfe7f92420 diff --git a/tests/expectations/compiler/compiler/char/nonprinting.leo.out b/tests/expectations/compiler/compiler/char/nonprinting.leo.out index d56ddc3bbe..3ab1b59a50 100644 --- a/tests/expectations/compiler/compiler/char/nonprinting.leo.out +++ b/tests/expectations/compiler/compiler/char/nonprinting.leo.out @@ -19,6 +19,6 @@ outputs: r1: type: bool value: "true" - initial_ast: 740e6bb885f1daaa7fee1d7f54a885a46315be42cfbdc3ccce59e1c5fc9ca9f1 - canonicalized_ast: 740e6bb885f1daaa7fee1d7f54a885a46315be42cfbdc3ccce59e1c5fc9ca9f1 - type_inferenced_ast: fd2b61864849e92b4ff3ba2e6d116db22e260754db0cd4cc4f09396cb065387a + initial_ast: b03b0ea8ad821952fa64e477900b43c830e9fbd9693478018ad4b13abd12b027 + canonicalized_ast: b03b0ea8ad821952fa64e477900b43c830e9fbd9693478018ad4b13abd12b027 + type_inferenced_ast: 4ded1909fcd3fa1edf7de8111d3f7b97fced37b5b2d18b316f9fee3aad246f5e diff --git a/tests/expectations/compiler/compiler/char/out.leo.out b/tests/expectations/compiler/compiler/char/out.leo.out index 72630163a4..52b322b5b0 100644 --- a/tests/expectations/compiler/compiler/char/out.leo.out +++ b/tests/expectations/compiler/compiler/char/out.leo.out @@ -100,6 +100,6 @@ outputs: r: type: char value: "'\\u{1f62d}'" - initial_ast: d99f5828d608a8276317325e26e0160a8f715a3f12d336a1ad4c7a487665ab2b - canonicalized_ast: d99f5828d608a8276317325e26e0160a8f715a3f12d336a1ad4c7a487665ab2b - type_inferenced_ast: a183d62d41415685263e16f9f434b96b110421d5f9344e29f96f9a3ba6bdd63f + initial_ast: 2e1dc058de58dbe98a1f19e7b883fed916d58fc5087de2c2bd06bb98324411d5 + canonicalized_ast: 2e1dc058de58dbe98a1f19e7b883fed916d58fc5087de2c2bd06bb98324411d5 + type_inferenced_ast: 40d126753bfa96341a167671ffc7244c6430d8f40934d8197c969baa9b49c785 diff --git a/tests/expectations/compiler/compiler/circuits/big_self_in_circuit_replacement.leo.out b/tests/expectations/compiler/compiler/circuits/big_self_in_circuit_replacement.leo.out index d3ea62fbaf..25c76f1edc 100644 --- a/tests/expectations/compiler/compiler/circuits/big_self_in_circuit_replacement.leo.out +++ b/tests/expectations/compiler/compiler/circuits/big_self_in_circuit_replacement.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 12a3a0966e472cd150c9be3488ef8fa05c2acbd8e6bd7a8b4e60810060100717 - canonicalized_ast: 376cd2cd19920d2e08a647a65a94320e6921bb9bdd93307c3958fc25fa4d3073 - type_inferenced_ast: 85e9c164aea5fc92e5351b8bec47ec1e65620d56f01423e11fe034259b67d7da + initial_ast: 776ea4bb946bb5d56430c22be58f3539dbecb25a11ec07e5e8bd3db49be7f937 + canonicalized_ast: 6a95acbcb25193b7b9f9e7a2bbcaeafa83ec09163e097b12076ea512a9daaf14 + type_inferenced_ast: d71ab34660bf998f236dfe59e55050f9f5fba8671bacbbdde04b4902927ec571 diff --git a/tests/expectations/compiler/compiler/circuits/const_self_variable.leo.out b/tests/expectations/compiler/compiler/circuits/const_self_variable.leo.out index 0827822dbc..cd5036c8e5 100644 --- a/tests/expectations/compiler/compiler/circuits/const_self_variable.leo.out +++ b/tests/expectations/compiler/compiler/circuits/const_self_variable.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: e381c58c3d3af3336ded12b5db5a2f2a71b420cd1fdbbf7eaa2dbe0ec903d547 - canonicalized_ast: e381c58c3d3af3336ded12b5db5a2f2a71b420cd1fdbbf7eaa2dbe0ec903d547 - type_inferenced_ast: 208f0a2681d12c62b60bdd85c25c28c60b479c20846792d2a5b06426c045edc1 + initial_ast: b438fb664bd7b8683beabd5044efba7669d3fcab093994b1c386a30ad63fff14 + canonicalized_ast: b438fb664bd7b8683beabd5044efba7669d3fcab093994b1c386a30ad63fff14 + type_inferenced_ast: 9094424be690a804ae2e5d3ca2787104de01dc6bca89fe6d349db5709c5161ac diff --git a/tests/expectations/compiler/compiler/circuits/define_circuit_inside_circuit_function.leo.out b/tests/expectations/compiler/compiler/circuits/define_circuit_inside_circuit_function.leo.out index c3a06e4e34..cc4b1e0369 100644 --- a/tests/expectations/compiler/compiler/circuits/define_circuit_inside_circuit_function.leo.out +++ b/tests/expectations/compiler/compiler/circuits/define_circuit_inside_circuit_function.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 71afd59d48b7a5725c040ba4f5cbc217bd46d0fbaad0bd82047032b20dc1cea7 - canonicalized_ast: 71afd59d48b7a5725c040ba4f5cbc217bd46d0fbaad0bd82047032b20dc1cea7 - type_inferenced_ast: 47ad2c3e7620a0ae7b24169100607802fad08cf9f0ab595ebd78addbc5359d12 + initial_ast: 7221141253b1998cbddad5f0c1385e7b53450a535112c0eb112b5af01474ce20 + canonicalized_ast: 7221141253b1998cbddad5f0c1385e7b53450a535112c0eb112b5af01474ce20 + type_inferenced_ast: f208046c46de9c4a42c47079504791711c9b0c8b3fb35dd413243fcbfd7dbd90 diff --git a/tests/expectations/compiler/compiler/circuits/duplicate_name_context.leo.out b/tests/expectations/compiler/compiler/circuits/duplicate_name_context.leo.out index 86c27a6c27..ab25d96b9a 100644 --- a/tests/expectations/compiler/compiler/circuits/duplicate_name_context.leo.out +++ b/tests/expectations/compiler/compiler/circuits/duplicate_name_context.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 111c8bca8f07afa989ca6c7e90e66bf6951e04d59aa2ef60f64d0038f6bd06a6 - canonicalized_ast: 111c8bca8f07afa989ca6c7e90e66bf6951e04d59aa2ef60f64d0038f6bd06a6 - type_inferenced_ast: 19623dcb1932cbfa82b16d5708cbe3283c7ffce9d1af1e177276e7ebcbe7e951 + initial_ast: 46d600c5f3b64378fbdcff7b4097d54e3855eded01d642f5af25fa3aef44eede + canonicalized_ast: 46d600c5f3b64378fbdcff7b4097d54e3855eded01d642f5af25fa3aef44eede + type_inferenced_ast: e5cdf935d34157bdbc2eb228c94e2222887c91fc3bc1c9f24bc6e84fddde9730 diff --git a/tests/expectations/compiler/compiler/circuits/inline.leo.out b/tests/expectations/compiler/compiler/circuits/inline.leo.out index 7f814ccfb5..f5649f0b60 100644 --- a/tests/expectations/compiler/compiler/circuits/inline.leo.out +++ b/tests/expectations/compiler/compiler/circuits/inline.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: u32 value: "100" - initial_ast: 181f6d20025c125f510c3bbf9dab7936155b23a046e30663b602543262690efe - canonicalized_ast: 181f6d20025c125f510c3bbf9dab7936155b23a046e30663b602543262690efe - type_inferenced_ast: f6ab78af624e7e102515f1ee9f50a84e987db4584307141d526775cdb80da506 + initial_ast: ba821e922e3b934581e39a58e2ef08d14b6cb0355500ed79f017dc0ecd39651c + canonicalized_ast: ba821e922e3b934581e39a58e2ef08d14b6cb0355500ed79f017dc0ecd39651c + type_inferenced_ast: 03fadaa1772f83ffa18a67a2279a65bad0715a6077f7219ff8955b45707c0437 diff --git a/tests/expectations/compiler/compiler/circuits/inline_member_pass.leo.out b/tests/expectations/compiler/compiler/circuits/inline_member_pass.leo.out index 9d1e3faded..024e4f07b1 100644 --- a/tests/expectations/compiler/compiler/circuits/inline_member_pass.leo.out +++ b/tests/expectations/compiler/compiler/circuits/inline_member_pass.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: d5e8c08c6a19699ff2be86d39e9ebd41e323dc284576ba6f52c49a62eeab79c9 - canonicalized_ast: 2433daf73b2335fc2db4f00f8804ca516f04072e273a5e7217a5b290445043e1 - type_inferenced_ast: 3199daaafcb76155503937860b663a8a92162e84e0b4c942f94fd2b1dbe0dc66 + initial_ast: 58d028cbd020f04ef3b1025a07dabbc8bc4f5a2adf7e2ca4bb67cc229d4f64cd + canonicalized_ast: 5e72d67df40e8ecd2ae9999419888ade6ebf1c054f1f80f91a274360e294d361 + type_inferenced_ast: 177f3be4bed2ca8e1a9543b8bb71a75a751d6835dcac15910bc4bd5fa9e25897 diff --git a/tests/expectations/compiler/compiler/circuits/member_function.leo.out b/tests/expectations/compiler/compiler/circuits/member_function.leo.out index 47a0d09b00..0f4bb0e507 100644 --- a/tests/expectations/compiler/compiler/circuits/member_function.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_function.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 5289f23055d0851d8b154501acbbace2da9ae7d5064f78e9e870b3c0450ac3e1 - canonicalized_ast: 5289f23055d0851d8b154501acbbace2da9ae7d5064f78e9e870b3c0450ac3e1 - type_inferenced_ast: 53668b53579ae10c6299e4ef5ccdc459dab29b35b996476334022c24fe915958 + initial_ast: 681bcdc031155971ce0dab8c8ee659df3f09b97b4e6b4525d47f4a045765a57c + canonicalized_ast: 681bcdc031155971ce0dab8c8ee659df3f09b97b4e6b4525d47f4a045765a57c + type_inferenced_ast: 40920da878d0316ea8fd4d1963e53843b1d8933441fd568adba5f11e4ded7246 diff --git a/tests/expectations/compiler/compiler/circuits/member_function_nested.leo.out b/tests/expectations/compiler/compiler/circuits/member_function_nested.leo.out index 4297a6d213..7869be8c61 100644 --- a/tests/expectations/compiler/compiler/circuits/member_function_nested.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_function_nested.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 103ec635fd095c831e1b7dd0e89fb86f82380f85ac96df20e91a2f75ddb8b87d - canonicalized_ast: 103ec635fd095c831e1b7dd0e89fb86f82380f85ac96df20e91a2f75ddb8b87d - type_inferenced_ast: 43313200085be347f7429b294e8e5edc61f6a7698df689f5ca9f9740984c8534 + initial_ast: 05ea77fc193abe91954fc2fcd338d3ebfaff6bb7939339e9dcc78e514802dd42 + canonicalized_ast: 05ea77fc193abe91954fc2fcd338d3ebfaff6bb7939339e9dcc78e514802dd42 + type_inferenced_ast: 9827f4b622a95714f55620295e8ce9d9cf6fc85603a869b178825c818d64d768 diff --git a/tests/expectations/compiler/compiler/circuits/member_static_function.leo.out b/tests/expectations/compiler/compiler/circuits/member_static_function.leo.out index deb77ed8fb..997cb9340a 100644 --- a/tests/expectations/compiler/compiler/circuits/member_static_function.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_static_function.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: a09c26dcd49814e5df7dc933932bbcdcf502d3e40e5b9975a73f63f03bdbda21 - canonicalized_ast: a09c26dcd49814e5df7dc933932bbcdcf502d3e40e5b9975a73f63f03bdbda21 - type_inferenced_ast: 2b000c5f36d84015d02ee34afe409ba569090a3744786a7c6f7fff78d397120c + initial_ast: da39dd8a0b9ddb1304cfe1fd1dd555c01c43750524db4021d27e1425ec175322 + canonicalized_ast: da39dd8a0b9ddb1304cfe1fd1dd555c01c43750524db4021d27e1425ec175322 + type_inferenced_ast: 6cdc6a128cc2fb9220293b7c34ba4066cc63911f5ffbe00959142992f358e488 diff --git a/tests/expectations/compiler/compiler/circuits/member_static_function_nested.leo.out b/tests/expectations/compiler/compiler/circuits/member_static_function_nested.leo.out index d33254e205..65a10e56bf 100644 --- a/tests/expectations/compiler/compiler/circuits/member_static_function_nested.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_static_function_nested.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: b001d188b90cae9717d631d28e5d1863c439441e17d61b0be9560b2b3bbb1e0d - canonicalized_ast: fbb2e8a8462d2b2da2e445d1111d0e33f89e88cc5d20ddbd3af707616c5672d5 - type_inferenced_ast: ceb9c391dee91311bb2a5c7e48ac4cad327d9f1c502b559ba88df956727bd866 + initial_ast: 380f44a5f5d7c1ef76c593da32936d480e79240bb7cd17fce0122b18c9e7f722 + canonicalized_ast: 82f1edfa14a6e28b57828bf5f4be2aaaf21fb5468c0388088a56a4e44adb31fe + type_inferenced_ast: ab690a29d11e08699223ec4009174acdec23c3667d523af63556187d7396e66b diff --git a/tests/expectations/compiler/compiler/circuits/member_variable.leo.out b/tests/expectations/compiler/compiler/circuits/member_variable.leo.out index a43d211bcf..ff6d455507 100644 --- a/tests/expectations/compiler/compiler/circuits/member_variable.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_variable.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 3aa5764cbd902c2cc381caf3799f6444d8a751ac296d2df46836798c7c2516c7 - canonicalized_ast: 3aa5764cbd902c2cc381caf3799f6444d8a751ac296d2df46836798c7c2516c7 - type_inferenced_ast: 81579961aa1f500134365339e17642c1e18ef0fc7c4a2231c71bbd5136be81b1 + initial_ast: 0723285d6c4dac924f6c86e0a6fd57eb78947cfcecd45f2520b7b0f0029f3279 + canonicalized_ast: 0723285d6c4dac924f6c86e0a6fd57eb78947cfcecd45f2520b7b0f0029f3279 + type_inferenced_ast: c42738de8987ca76cacc30dbf86688ff11d5dbf7dccba67947cc78eb452460fd diff --git a/tests/expectations/compiler/compiler/circuits/member_variable_and_function.leo.out b/tests/expectations/compiler/compiler/circuits/member_variable_and_function.leo.out index 944eca671d..402638f498 100644 --- a/tests/expectations/compiler/compiler/circuits/member_variable_and_function.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_variable_and_function.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: c47b15931cf28e5e59b3d179a47fcc4587983b70ca759005a857453c672e2a9e - canonicalized_ast: c47b15931cf28e5e59b3d179a47fcc4587983b70ca759005a857453c672e2a9e - type_inferenced_ast: c3eb89894262dfa346936a88224a76a113faf0b260918a9d70b9cd9327f98ab3 + initial_ast: bbad7fd765dee42c9ebaca7e07201d61befefa5e7d5af700130954ac29cdd27c + canonicalized_ast: bbad7fd765dee42c9ebaca7e07201d61befefa5e7d5af700130954ac29cdd27c + type_inferenced_ast: cb8745ad419c19ad007a9d9d905f01c0d85d2e78cb82be0b82342c44015c322e diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_variable.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_variable.leo.out index e4e8062313..4dbac2b20a 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_self_variable.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_self_variable.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 88691b6324a60d5e0dd23b6afa9078c4e806395f9b5fc072b2d59c72d4e242f8 - canonicalized_ast: 9f92fbeecfc58a153d539735798e482a44deb5d1bf303463838f15639de24d7e - type_inferenced_ast: 0c1b51a5710965c5e07f9189775e7e2f9b0e9a6bc0e368ae1162547fbf55f993 + initial_ast: d2d5680f0e011b93b2e55aebb62f51b4e78cf68289ffd84a80f852d2a82a6723 + canonicalized_ast: 57c2e52b3f73e7052fdc92d0c668b598b282321cd390ed836f20b92bc528b6e0 + type_inferenced_ast: 4f8c32d94398d49ffb9b1eab3639076e77d77159411c1891d814b4946751e554 diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_variable_branch.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_variable_branch.leo.out index 9895e288ff..301d38f9ac 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_self_variable_branch.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_self_variable_branch.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 7c4442a07900405f1bb78d46068d1599b16183552f0878abf9c3e661b6cc5f41 - canonicalized_ast: d52ffd68c34f9cb3833c30936001f18de9a340873615bb5b911ef5df4e2ed5eb - type_inferenced_ast: 2422a89048dd0a5f6ee26a31a095f9cab777b14886a367be90ad78fe18e71523 + initial_ast: 15da2283babf7f4a490bd7bdc0331522107f7ce4c88949863178ba4a00419ead + canonicalized_ast: 96a167f8b897e9973bb7b9d13faa81da0b635a6611ef09124a5d12f817b35254 + type_inferenced_ast: 82c54a8e54820fc234a7029cb4c6018df99e7a3d4b47f418efc8835889b1c6cc diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_variable_conditional.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_variable_conditional.leo.out index 91f96d4963..b9b10201cb 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_self_variable_conditional.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_self_variable_conditional.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: e5d4fa7417a305e83e4af12e3dcc9e085d372068babbefa514ae9a28bc96a819 - canonicalized_ast: c588d34fa9b1fce593f783a68cd3effff86f7be33dc08a5fd7656daa3a48f208 - type_inferenced_ast: 7d2d688ad6f94b586fd60dab4dd072d66cfeadad9e61e3009e9d83bee93f2a42 + initial_ast: 6fd3b11431e3e71f2b628bc9c64cb51d04c77df08d7584503b76b3dff7bc90cc + canonicalized_ast: a7a942a8a40f7cf8bfd79fdea0ed81fb6b56cfd9009b01b3d0225b427ef583cd + type_inferenced_ast: d3cc0e19adac957e11d520bf727133bfcc85eef5f306373cb5057b840b1a41f6 diff --git a/tests/expectations/compiler/compiler/circuits/mut_variable.leo.out b/tests/expectations/compiler/compiler/circuits/mut_variable.leo.out index dbf432a628..8afebb1042 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_variable.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_variable.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: ed8aa86dd6afe56565d936044fec2b6c290e84637d27b09d25935b4c35fc70ee - canonicalized_ast: ed8aa86dd6afe56565d936044fec2b6c290e84637d27b09d25935b4c35fc70ee - type_inferenced_ast: 3d7bb92c36d453181318441e251d393fd5168de3c15441a744af9b5230420b0e + initial_ast: 48713617e0f06ade7b443ec779e646b0ff82e025f040c8a28bf2ea7eb37f3399 + canonicalized_ast: 48713617e0f06ade7b443ec779e646b0ff82e025f040c8a28bf2ea7eb37f3399 + type_inferenced_ast: 68e4f8baf01d452f42d0765f2819783adb55000238d5d57304a314fb5cff3c22 diff --git a/tests/expectations/compiler/compiler/circuits/mutable_call_immutable_context.leo.out b/tests/expectations/compiler/compiler/circuits/mutable_call_immutable_context.leo.out index ae3f5b6f97..5f12f27e1c 100644 --- a/tests/expectations/compiler/compiler/circuits/mutable_call_immutable_context.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mutable_call_immutable_context.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: a65aa4129ecc625f548f2eeaa411c3949f2f5b51db559842fe889b5a063981d9 - canonicalized_ast: 0fa4ca18f2103707d382cc926b3787ebee35d00a7e29692ecbb4158b87ddbb6e - type_inferenced_ast: 57c4afa4a03a741af17435b4f10907bcf65ef9f17a55a50cc779aa24af39a2dd + initial_ast: 2f6262df5e4a39a662b85cff0985d297fa2628d56fc3c036b5beb31d683a8574 + canonicalized_ast: 4bb2ac425c192058af2f97684019d74959bc40abc0f886a741894a89cc8e8d4f + type_inferenced_ast: 6c3c3d16ba595ab33902ece671d2460c3a25347e1e33e35ec82ff8622926afd2 diff --git a/tests/expectations/compiler/compiler/circuits/pedersen_mock.leo.out b/tests/expectations/compiler/compiler/circuits/pedersen_mock.leo.out index fd5ce09577..d77bccc2b7 100644 --- a/tests/expectations/compiler/compiler/circuits/pedersen_mock.leo.out +++ b/tests/expectations/compiler/compiler/circuits/pedersen_mock.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 56a342fe09244cea63c7ed0cf0b641d7347978abfc28e4f19e60b38cc94087a2 - canonicalized_ast: a44d595304cf53de81e57ede4bf038dbcc641d45d3776bf6fb475a0d48673b29 - type_inferenced_ast: 4eee3c5c2c191e3b9bd9acf8cf52836207712259f835ffa0ae9e63769fb4fb65 + initial_ast: 591aa0cc25f8c009c7df6425697003904e97e74c55f887c5ed3b27984fda4176 + canonicalized_ast: 7232353691a314166deb747de9046b05e507b581d35132479b01c6db41e72df6 + type_inferenced_ast: ae5cb090082e845a9a058a15de6345a672864bf2ad2061930922475cc2c3f8e1 diff --git a/tests/expectations/compiler/compiler/circuits/return_self_type_array.leo.out b/tests/expectations/compiler/compiler/circuits/return_self_type_array.leo.out index b5632884f5..43b372e66e 100644 --- a/tests/expectations/compiler/compiler/circuits/return_self_type_array.leo.out +++ b/tests/expectations/compiler/compiler/circuits/return_self_type_array.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 0e091ebf70c2e190b09debae086753f0d032504419ae0bcf42836fa4963ce48e - canonicalized_ast: 290e223dacaff5c99f401c452e213c35acbba0452b24d9d590eb7c77f641cff5 - type_inferenced_ast: 5849fd77de59448ac443a392fc2124d2f5df4a896150f3175b7d0e3ba5d98354 + initial_ast: f7e0f5bba37e3a25b8fdf655d2588054659ff212cade431c17bb548757a7781d + canonicalized_ast: 8425ce431117fc5d543a83ddde9e0cf946e0435146ede09096906a0f1fe9eff2 + type_inferenced_ast: da1985f44598222e3940c14fefed9ce269e43d474aaf15b622292cd63f3efe87 diff --git a/tests/expectations/compiler/compiler/circuits/return_self_type_tuple.leo.out b/tests/expectations/compiler/compiler/circuits/return_self_type_tuple.leo.out index d85ebe08c5..41f11b772c 100644 --- a/tests/expectations/compiler/compiler/circuits/return_self_type_tuple.leo.out +++ b/tests/expectations/compiler/compiler/circuits/return_self_type_tuple.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 691004b2affad4a5a06ad6e69ad3b8a279aee131b538d5f07b6a972e18bce22c - canonicalized_ast: c38d5fefdb424c8bac4b7684f50112bf3bfe776060895a4f95d8fe657f237c8b - type_inferenced_ast: 481ef7f98947c543be02395a827f08b5e0117df951129584661a249b4c76d144 + initial_ast: ab5c9ec7a0930713141b84e303355a1ddf69340f5222699c2192868e0e0dc8c4 + canonicalized_ast: 3442d75d2ced2e10abfde09306d9bf91046cecd295a5e48e66a1823abff28ffc + type_inferenced_ast: ace67f309b2535d71ec2b277b42569fa3f89e6bcb817e8b911f7a773c9c4186e diff --git a/tests/expectations/compiler/compiler/circuits/self_member.leo.out b/tests/expectations/compiler/compiler/circuits/self_member.leo.out index 01ca00717e..d51b0bc9b9 100644 --- a/tests/expectations/compiler/compiler/circuits/self_member.leo.out +++ b/tests/expectations/compiler/compiler/circuits/self_member.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 2b9656370d8c43247d8924222ec13e2f2ee988558b13b0e52e3b8fa0b9752115 - canonicalized_ast: 2b9656370d8c43247d8924222ec13e2f2ee988558b13b0e52e3b8fa0b9752115 - type_inferenced_ast: 0096338c25c3f93d38e41ae493fcb53396d95b83c4d277b97cca7f7692f0fefe + initial_ast: 6b54a642c55d3a7991a063c5346797a4d7facf21533c8ec7b2e22eb9394caba0 + canonicalized_ast: 6b54a642c55d3a7991a063c5346797a4d7facf21533c8ec7b2e22eb9394caba0 + type_inferenced_ast: 5b4b8ea9431aca05e19fcf8987c4f4c824c065e2ed6fc7198cd769b8829ee4f1 diff --git a/tests/expectations/compiler/compiler/console/assert.leo.out b/tests/expectations/compiler/compiler/console/assert.leo.out index a7e0c31461..6d42c7f054 100644 --- a/tests/expectations/compiler/compiler/console/assert.leo.out +++ b/tests/expectations/compiler/compiler/console/assert.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: dd4fe27f2213405f1261a5dd08619e96f2164c6984ce1efbc034ebeb0f8159f6 - canonicalized_ast: dd4fe27f2213405f1261a5dd08619e96f2164c6984ce1efbc034ebeb0f8159f6 - type_inferenced_ast: 72c60ddc90e6db8f7e97f9881813ece3d45d333ca4aa5d64368565113c42522f + initial_ast: 8a1b1671e3685c54d7974b31fbc758210d2cafd8443c33ed8a3b14ad3a1b9fc4 + canonicalized_ast: 8a1b1671e3685c54d7974b31fbc758210d2cafd8443c33ed8a3b14ad3a1b9fc4 + type_inferenced_ast: e60210b668a87ade79886bffd2ebc8ded95f47d12d5c8b67adfd896ea3a1009e diff --git a/tests/expectations/compiler/compiler/console/conditional_assert.leo.out b/tests/expectations/compiler/compiler/console/conditional_assert.leo.out index 492efd51f6..df7e07e181 100644 --- a/tests/expectations/compiler/compiler/console/conditional_assert.leo.out +++ b/tests/expectations/compiler/compiler/console/conditional_assert.leo.out @@ -16,6 +16,6 @@ outputs: - input_file: cond_2.in output: registers: {} - initial_ast: bf6d2879d4bd942a4ef5eef595f5770edb8f718eab43108bce52b5864c54cdf2 - canonicalized_ast: 0d7d8284630e9e3a72809d48b53cd178efe4cd5652ef37ecb01d366d0c21351e - type_inferenced_ast: 1cab3711be24468ea0c8291fc6ced605fc908220a52b6444c6b0fe00571d26a7 + initial_ast: 4bafaebf2c6733478fdff48ba2aca4892da0874d88a8cde9a9ea7299939cfa92 + canonicalized_ast: 036d49891c7d9eb0c713eb9eaf7a66321fdd32ff225fa1428f9a7184ebf3679e + type_inferenced_ast: 3d13c527af96ec05f92678c2009047200736e8799fd29875ba371fd34d95ce5a diff --git a/tests/expectations/compiler/compiler/console/error.leo.out b/tests/expectations/compiler/compiler/console/error.leo.out index 91f5bdbaff..d198e0551d 100644 --- a/tests/expectations/compiler/compiler/console/error.leo.out +++ b/tests/expectations/compiler/compiler/console/error.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: f65d7556d2d52b3e33bfd12a70350bc67ff21a55d470e8795700e7d3fad7d04d - canonicalized_ast: f65d7556d2d52b3e33bfd12a70350bc67ff21a55d470e8795700e7d3fad7d04d - type_inferenced_ast: 7b5616a0e84f7a6b0acfdd98a770832382914b1d3d16cbdf33605beb207475b1 + initial_ast: d9518f1fbefe56299388ca536aa8d0cc8070eb4ddebf824472d369111578f4ec + canonicalized_ast: d9518f1fbefe56299388ca536aa8d0cc8070eb4ddebf824472d369111578f4ec + type_inferenced_ast: f45369f6227b5fed3322d1d28718bc84382c1312214b6fa0b315b3e02c66f48b diff --git a/tests/expectations/compiler/compiler/console/log.leo.out b/tests/expectations/compiler/compiler/console/log.leo.out index 24587486a3..a03f02f37b 100644 --- a/tests/expectations/compiler/compiler/console/log.leo.out +++ b/tests/expectations/compiler/compiler/console/log.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: affca079b67e0869881ba79627ffd7ccd27ea8d5f189403d8427ef98e1056bd7 - canonicalized_ast: affca079b67e0869881ba79627ffd7ccd27ea8d5f189403d8427ef98e1056bd7 - type_inferenced_ast: 521fd1f1dbc9c68595e4bdbe1e9bad8e6c44710d145438fc35269e2f8c438df1 + initial_ast: aecf83a2f4aa6587964d65a38e106eb9547d25267fde72fcf078d2498944818b + canonicalized_ast: aecf83a2f4aa6587964d65a38e106eb9547d25267fde72fcf078d2498944818b + type_inferenced_ast: a5345a4bf0f979eef1166902ee0e70ba3635125f1793b0b0742162cc98f46681 diff --git a/tests/expectations/compiler/compiler/console/log_conditional.leo.out b/tests/expectations/compiler/compiler/console/log_conditional.leo.out index 758799b010..d11c386ccd 100644 --- a/tests/expectations/compiler/compiler/console/log_conditional.leo.out +++ b/tests/expectations/compiler/compiler/console/log_conditional.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: a5bd96138155ee38f07e7b41608868d053f06bb3e938fd5a90303028a8996fdd - canonicalized_ast: a5bd96138155ee38f07e7b41608868d053f06bb3e938fd5a90303028a8996fdd - type_inferenced_ast: ad95e7881e367efc029e79d2df541305add838367a6b03816c73aed641890740 + initial_ast: f8e35dfef4049fcb03445300a6c86627b4b2b3934e948d4e15849f0464ad318b + canonicalized_ast: f8e35dfef4049fcb03445300a6c86627b4b2b3934e948d4e15849f0464ad318b + type_inferenced_ast: 684c132f914cd9b2bbe55cc7fa868d9f4818a5951cefba287989d787c13c40d3 diff --git a/tests/expectations/compiler/compiler/console/log_input.leo.out b/tests/expectations/compiler/compiler/console/log_input.leo.out index 14c302e08d..bf67ccd495 100644 --- a/tests/expectations/compiler/compiler/console/log_input.leo.out +++ b/tests/expectations/compiler/compiler/console/log_input.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: ac8959bcbddd11b5df0b91b4986970098c022785b78391ba7e55386bdab41571 - canonicalized_ast: ac8959bcbddd11b5df0b91b4986970098c022785b78391ba7e55386bdab41571 - type_inferenced_ast: 427a709da8683a8ea6cc21c64d56d77d504b647600813f13c6d29586ee76f33d + initial_ast: 92825fee401d5b953f2fbb155a1069148ba9ceb7dc61efadd5b29bc2ac483ac7 + canonicalized_ast: 92825fee401d5b953f2fbb155a1069148ba9ceb7dc61efadd5b29bc2ac483ac7 + type_inferenced_ast: 0b2d12419a1f32d70683f171ddaad7c5d683fe7975e2315cb6167dbcd16f382d diff --git a/tests/expectations/compiler/compiler/console/log_parameter.leo.out b/tests/expectations/compiler/compiler/console/log_parameter.leo.out index 887ba57dc4..cea1bf46f7 100644 --- a/tests/expectations/compiler/compiler/console/log_parameter.leo.out +++ b/tests/expectations/compiler/compiler/console/log_parameter.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 84f235f5e82fd83c0d4ac44037b460ab8c4ee985e834f4cbb1cdf7ab0516bc8d - canonicalized_ast: 84f235f5e82fd83c0d4ac44037b460ab8c4ee985e834f4cbb1cdf7ab0516bc8d - type_inferenced_ast: cab71b6db461a948e4ce6de5f49976a50619e84de81e22f26f73b38f30db0e57 + initial_ast: ab38ae5a77b338e05dcf4554f9510f78d48277964a5f10fb58506967d9e4be8a + canonicalized_ast: ab38ae5a77b338e05dcf4554f9510f78d48277964a5f10fb58506967d9e4be8a + type_inferenced_ast: 0af520b7cbdb4f67914880e62a5ba7ead23ee6c3f173d4573b0d306532f4bf03 diff --git a/tests/expectations/compiler/compiler/console/log_parameter_many.leo.out b/tests/expectations/compiler/compiler/console/log_parameter_many.leo.out index 849ee610be..c8452bd882 100644 --- a/tests/expectations/compiler/compiler/console/log_parameter_many.leo.out +++ b/tests/expectations/compiler/compiler/console/log_parameter_many.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 8826a62285bb93b0aaacfda5ed2ae4cdef50948a7b2472700b72cfb328edc1dc - canonicalized_ast: 8826a62285bb93b0aaacfda5ed2ae4cdef50948a7b2472700b72cfb328edc1dc - type_inferenced_ast: 0c40ac594ca6adf8cf625b3ac63d9d925975be323bf358ca55aaa4f3aa39aa46 + initial_ast: 746e67c3c32b565a747779078d83f41197856a657b59eeb9cc9ea4e60677dac0 + canonicalized_ast: 746e67c3c32b565a747779078d83f41197856a657b59eeb9cc9ea4e60677dac0 + type_inferenced_ast: a586b22d1a595440d7a0262c959ae1b668be2980d131c056ebc6536827606454 diff --git a/tests/expectations/compiler/compiler/core/core_circuit_star_fail.leo.out b/tests/expectations/compiler/compiler/core/core_circuit_star_fail.leo.out index 4698b66c89..b3770394c0 100644 --- a/tests/expectations/compiler/compiler/core/core_circuit_star_fail.leo.out +++ b/tests/expectations/compiler/compiler/core/core_circuit_star_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error [EASG0373001]: failed to resolve import: 'core'\n --> :0:0\n |" + - "Error [EASG0373001]: failed to resolve import: 'core'\n --> :0:0\n |\n |" diff --git a/tests/expectations/compiler/compiler/core/core_package_invalid.leo.out b/tests/expectations/compiler/compiler/core/core_package_invalid.leo.out index 4698b66c89..b3770394c0 100644 --- a/tests/expectations/compiler/compiler/core/core_package_invalid.leo.out +++ b/tests/expectations/compiler/compiler/core/core_package_invalid.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error [EASG0373001]: failed to resolve import: 'core'\n --> :0:0\n |" + - "Error [EASG0373001]: failed to resolve import: 'core'\n --> :0:0\n |\n |" diff --git a/tests/expectations/compiler/compiler/core/core_unstable_package_invalid.leo.out b/tests/expectations/compiler/compiler/core/core_unstable_package_invalid.leo.out index 93668fe671..e118826f9b 100644 --- a/tests/expectations/compiler/compiler/core/core_unstable_package_invalid.leo.out +++ b/tests/expectations/compiler/compiler/core/core_unstable_package_invalid.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error [EASG0373001]: failed to resolve import: 'core.unstable'\n --> :0:0\n |" + - "Error [EASG0373001]: failed to resolve import: 'core.unstable'\n --> :0:0\n |\n |" diff --git a/tests/expectations/compiler/compiler/definition/out_of_order.leo.out b/tests/expectations/compiler/compiler/definition/out_of_order.leo.out index 82156e826e..e11f80b6f7 100644 --- a/tests/expectations/compiler/compiler/definition/out_of_order.leo.out +++ b/tests/expectations/compiler/compiler/definition/out_of_order.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 9a3c1d44f1c7e23b08441e6b429e0aaf96b9091a85884a892e046b6213872adf - canonicalized_ast: 52166ba1dada6040b5bb273a3778a719751baf263f27da2ebb43e4fcaff1707e - type_inferenced_ast: 8251d737314510e1f1d4d029dea6d3b529d64bd92714d006f1bfcb08539867f3 + initial_ast: 61087d13f528efabd02f9993e0e5ff23051fa0de9e93a96ef8835f3a0457d87c + canonicalized_ast: 36bde977c62949baf95dd50d0cfaadd1a4a926a2a4d7f55388b21beaefd5e43c + type_inferenced_ast: ab6c6ed97331a676348142fb242cf0f589468f893f97c3e4832f60d4736fc0ca diff --git a/tests/expectations/compiler/compiler/definition/out_of_order_with_import.leo.out b/tests/expectations/compiler/compiler/definition/out_of_order_with_import.leo.out index 3911df5905..6ce8d6fb90 100644 --- a/tests/expectations/compiler/compiler/definition/out_of_order_with_import.leo.out +++ b/tests/expectations/compiler/compiler/definition/out_of_order_with_import.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 1ee4aa8742bab66bd1342ff64083c537ebd3cc0bd2a7c27274129696c04d5523 - canonicalized_ast: 1bbf3438c4ab147d1fb3c76bdbe77fef1787c173376b8677485c30acf27561fb - type_inferenced_ast: 1b1ffd1f7a17e597fc1118606ddf872d363febf800e6d84dfaa7bacfdff63c61 + initial_ast: e1792bcb7fe5be2fdb8ca2abd21feb63c9aadbc367d2cba1750fff1b34b8d1b2 + canonicalized_ast: 9badf16677c761fbcb56ea79f0e67b46f8e12c3dc83a9c3fc35559cbc509ff88 + type_inferenced_ast: 571f7723bd45c3e54c04038aa20707640282efe293ba23dfff65b1b318a3a173 diff --git a/tests/expectations/compiler/compiler/field/add.leo.out b/tests/expectations/compiler/compiler/field/add.leo.out index a7a4fa7cb9..7f7f43887e 100644 --- a/tests/expectations/compiler/compiler/field/add.leo.out +++ b/tests/expectations/compiler/compiler/field/add.leo.out @@ -16,6 +16,6 @@ outputs: r: type: bool value: "true" - initial_ast: 41ce88a99d310e57e8e58fed720ecd68fd372944aa309541fb75b5eda51a9f39 - canonicalized_ast: 41ce88a99d310e57e8e58fed720ecd68fd372944aa309541fb75b5eda51a9f39 - type_inferenced_ast: 3047d9e127644a596e0836ebe715098c1bf7dedbd8a4cdbf3443ee91612298f6 + initial_ast: ade887261346e7629dcda78e09b43be2bf742af8cf7aa5e8d3f22d1d9c2c2f24 + canonicalized_ast: ade887261346e7629dcda78e09b43be2bf742af8cf7aa5e8d3f22d1d9c2c2f24 + type_inferenced_ast: af10005d855a2c6277340bd98a1a8893dbc90827eda252f9956e25b131a4dc6c diff --git a/tests/expectations/compiler/compiler/field/div.leo.out b/tests/expectations/compiler/compiler/field/div.leo.out index 0932fd91ee..7d881df6d0 100644 --- a/tests/expectations/compiler/compiler/field/div.leo.out +++ b/tests/expectations/compiler/compiler/field/div.leo.out @@ -16,6 +16,6 @@ outputs: r: type: bool value: "true" - initial_ast: ebb9776abaaf0b45d2c83013db7decbf4c71e9844be91a435d9bca6f0956465e - canonicalized_ast: ebb9776abaaf0b45d2c83013db7decbf4c71e9844be91a435d9bca6f0956465e - type_inferenced_ast: 1aab2a3f766a4216073d86ec4c3dd1444459863c16e2db69890f9d7662eea006 + initial_ast: 150c20bc77cda0c046ef9c2f77fe3db7887722125912ee4bc45e61aca3b3275a + canonicalized_ast: 150c20bc77cda0c046ef9c2f77fe3db7887722125912ee4bc45e61aca3b3275a + type_inferenced_ast: 3c72b501b373df6d34d8c9a20c7d73e1e1e6f61cbaa3713b3324c157036f866e diff --git a/tests/expectations/compiler/compiler/field/eq.leo.out b/tests/expectations/compiler/compiler/field/eq.leo.out index 016deb5fe7..804084d676 100644 --- a/tests/expectations/compiler/compiler/field/eq.leo.out +++ b/tests/expectations/compiler/compiler/field/eq.leo.out @@ -16,6 +16,6 @@ outputs: r: type: bool value: "true" - initial_ast: a15fced3bedb13d55187bb839abbb5db8ea20e23bb8ceb4e24ee8636a43c22da - canonicalized_ast: a15fced3bedb13d55187bb839abbb5db8ea20e23bb8ceb4e24ee8636a43c22da - type_inferenced_ast: 083d96a04074a68d7cbaba40c460e743e6ff6fcd37994730914d4a1345f524d9 + initial_ast: 00df32b9a2a3cc1c3b8ec2e4b7f1a15e38d4539992e4a805764814062fd3614e + canonicalized_ast: 00df32b9a2a3cc1c3b8ec2e4b7f1a15e38d4539992e4a805764814062fd3614e + type_inferenced_ast: 786b1a7c74542185e90e6690d6034487b19b1ba7047e3985cc9b85824c98b26f diff --git a/tests/expectations/compiler/compiler/field/field.leo.out b/tests/expectations/compiler/compiler/field/field.leo.out index ee0b350350..ebfa1d2868 100644 --- a/tests/expectations/compiler/compiler/field/field.leo.out +++ b/tests/expectations/compiler/compiler/field/field.leo.out @@ -16,6 +16,6 @@ outputs: r: type: bool value: "true" - initial_ast: ac26e1ea6dcfa33791349731ab9cf1481764a0b365feffb261f96f24f92b5534 - canonicalized_ast: ac26e1ea6dcfa33791349731ab9cf1481764a0b365feffb261f96f24f92b5534 - type_inferenced_ast: e4e48995001316d9851878018c999cd5babec0c5396d0eb0136f3e0a7469a4c9 + initial_ast: 2fcfda40a52babd238ce5125a6a0b2b829ade39f94d2ce0b216387939c59431e + canonicalized_ast: 2fcfda40a52babd238ce5125a6a0b2b829ade39f94d2ce0b216387939c59431e + type_inferenced_ast: b63f0f712a535d3f14f8c1a443568c3af9f140440e6b115de23e463a1728debf diff --git a/tests/expectations/compiler/compiler/field/mul.leo.out b/tests/expectations/compiler/compiler/field/mul.leo.out index 5890df0840..0218d43581 100644 --- a/tests/expectations/compiler/compiler/field/mul.leo.out +++ b/tests/expectations/compiler/compiler/field/mul.leo.out @@ -16,6 +16,6 @@ outputs: r: type: bool value: "false" - initial_ast: b0f186baff2a170ec1cc2400380ecf7fc7e9b5ce16765eadc5bde530a9d14a85 - canonicalized_ast: b0f186baff2a170ec1cc2400380ecf7fc7e9b5ce16765eadc5bde530a9d14a85 - type_inferenced_ast: 5bf8ce5327801fc84fe90818827c733f0be2794e2feeaa8dee27ad5e1d9a3cdf + initial_ast: 2635739c604a7ae3a3555480bb442b819af18179044e24bf19faf5ba546c307a + canonicalized_ast: 2635739c604a7ae3a3555480bb442b819af18179044e24bf19faf5ba546c307a + type_inferenced_ast: 813b8fb791cf91468b34722fb4cb8b2a0005cddb135eee6e1688675104794ab5 diff --git a/tests/expectations/compiler/compiler/field/negate.leo.out b/tests/expectations/compiler/compiler/field/negate.leo.out index 7f240198da..e5ea188c6a 100644 --- a/tests/expectations/compiler/compiler/field/negate.leo.out +++ b/tests/expectations/compiler/compiler/field/negate.leo.out @@ -16,6 +16,6 @@ outputs: r: type: bool value: "true" - initial_ast: c6944601ce98355c6050683c7efeccca59566b281dc9e33d364ea5eaeeede8aa - canonicalized_ast: c6944601ce98355c6050683c7efeccca59566b281dc9e33d364ea5eaeeede8aa - type_inferenced_ast: a807a5420a071df5a2c1281cf44cf98bd32a3066ad35c1ebd2cf585405e7e044 + initial_ast: 3584ba6c06f32660612d44e78a7d8a83075046a49ff4cd47a6165d603ebf85c3 + canonicalized_ast: 3584ba6c06f32660612d44e78a7d8a83075046a49ff4cd47a6165d603ebf85c3 + type_inferenced_ast: 336ecb6f4ead5395c4c5ad52fa5eb29993aa7db2ab65749acdb39c068961e64b diff --git a/tests/expectations/compiler/compiler/function/array_input.leo.out b/tests/expectations/compiler/compiler/function/array_input.leo.out index 0e3f93e6e0..ede2412315 100644 --- a/tests/expectations/compiler/compiler/function/array_input.leo.out +++ b/tests/expectations/compiler/compiler/function/array_input.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 50cc91a73be6ea74dab65fa196daf6931f84a56896a4a8e398aedba47f4cf005 - canonicalized_ast: e2421a0ffcef3eb9f57640168d92313c9b6b95b5dcf55ccdee6807327b418eed - type_inferenced_ast: 4b0f0827da9e66d8acdc11415820a06dc4fd2ada3ab3b29f1553bfde827565da + initial_ast: f57c7199a6f40d6f898133390fc69cc7ac17c6522adc2653eba92635eddad340 + canonicalized_ast: 6402aa395f7030e58a146ed91755220ee495693e59b9b544f7db59e190b3ef17 + type_inferenced_ast: 94a3c2e3632d3ab5fd7af3ea51b9f8bedb82f00762686a10764d103b35787261 diff --git a/tests/expectations/compiler/compiler/function/array_params_direct_call.leo.out b/tests/expectations/compiler/compiler/function/array_params_direct_call.leo.out index 1462960ab9..27d44cf87f 100644 --- a/tests/expectations/compiler/compiler/function/array_params_direct_call.leo.out +++ b/tests/expectations/compiler/compiler/function/array_params_direct_call.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: e2001b1f9372ef49090e86f4a1dcaac8e2cc0492f5eaa3650cb9823b809c17e0 - canonicalized_ast: 57c23bdefab42e9a131f70d784df69646dfc4e0c2963981e6bc52223c81db63b - type_inferenced_ast: edcb6ee24685782a3c1fb8fd0eb98ad095288bd7afa87ae4349267a6eb65c7c1 + initial_ast: 8e231f37db8feb5d0490f9ee8ad1b4844327cc213238b849b9250dcd416c578c + canonicalized_ast: 63c46bc9757274e52cecf05bdab4b2adaa2177ccc3ced0a8e6a6e0d3ec73038d + type_inferenced_ast: 958cf68742c142d071df29899bb8b81f66e9c5d325325b71d94543762c804001 diff --git a/tests/expectations/compiler/compiler/function/conditional_return.leo.out b/tests/expectations/compiler/compiler/function/conditional_return.leo.out index 1ebc3249bd..decebbaae1 100644 --- a/tests/expectations/compiler/compiler/function/conditional_return.leo.out +++ b/tests/expectations/compiler/compiler/function/conditional_return.leo.out @@ -16,6 +16,6 @@ outputs: a: type: u32 value: "4" - initial_ast: f26cde6c2a1b4b3a97821353bdbfdc9d56ef657a478e9a25624f66c564cc5eee - canonicalized_ast: f26cde6c2a1b4b3a97821353bdbfdc9d56ef657a478e9a25624f66c564cc5eee - type_inferenced_ast: 84a23e71e8a617ff4446a4183fba5fa8fdb410f876ee6ca97c93cc26085c0884 + initial_ast: 606414e516d1f59459d71c58f650c63cea9e3213ab59ebbcc617001677d9eea3 + canonicalized_ast: 606414e516d1f59459d71c58f650c63cea9e3213ab59ebbcc617001677d9eea3 + type_inferenced_ast: 74c63a94510e5e000a5b6fb213f34c89bc1d35c69a549eea3b5aad627dd7c43a diff --git a/tests/expectations/compiler/compiler/function/duplicate_definition_fail.leo.out b/tests/expectations/compiler/compiler/function/duplicate_definition_fail.leo.out index 9a1ad26683..c8c2dd729f 100644 --- a/tests/expectations/compiler/compiler/function/duplicate_definition_fail.leo.out +++ b/tests/expectations/compiler/compiler/function/duplicate_definition_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error [EASG0373016]: a function named \"main\" already exists in this scope\n --> compiler-test:8:1\n |\n 8 | function main() {\n|\n 9 | ...\n|\n 10 | }\n | ^" + - "Error [EASG0373016]: a function named \"main\" already exists in this scope\n --> compiler-test:8:1\n |\n 8 | function main() {\n 9 | ...\n 10 | }\n | ^" diff --git a/tests/expectations/compiler/compiler/function/empty.leo.out b/tests/expectations/compiler/compiler/function/empty.leo.out index 5b5bab8a81..40c161337f 100644 --- a/tests/expectations/compiler/compiler/function/empty.leo.out +++ b/tests/expectations/compiler/compiler/function/empty.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 25dcbe87acec22191a60e99bb9abff5d6502b398b2cff423565af816f1e13544 - canonicalized_ast: c6623025e0169b5548d537b9d6bef8fa8aa1d3aa5bf7ede5f90fbf159b511e34 - type_inferenced_ast: 00a616f64800ec97e30df10fedef4993adc14368cad2e4be757e46ff6052d055 + initial_ast: 2dd3bd6fa202a0356e48f757a1e745888aafab1c89721e272eb65534f658a8ef + canonicalized_ast: 689cc7ed7957d488050014971ea55b69970e43a8863fe36176f95224fa601323 + type_inferenced_ast: c8b358ff7af51a9f0e11db6ceb465ff36142bbc14159a7aaeefba55ce9c18a69 diff --git a/tests/expectations/compiler/compiler/function/iteration.leo.out b/tests/expectations/compiler/compiler/function/iteration.leo.out index 2c81b753c6..b2a2865bb1 100644 --- a/tests/expectations/compiler/compiler/function/iteration.leo.out +++ b/tests/expectations/compiler/compiler/function/iteration.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 3f4e82eda9825e87ed21e40d62213aedaf757134c41a204dad8e81e89341db52 - canonicalized_ast: 509f630dfca7c3b33cad307f42342005c1c0519fdf5ab444dc147ddbfe35a3f2 - type_inferenced_ast: 6358553eed92aa8c1ae4fd2a8712d95bc198a40b96fa6e6ff8ada4a9d98fb453 + initial_ast: bce6dc51b76cc0f285be76d5c35f28dc1121a2b814e60e0094c858d58e83272e + canonicalized_ast: ac7e9987e1a6c30c0ee21665fa824e201b58e186b2d662b6f3817eab3ac3dfa9 + type_inferenced_ast: bd8524c62243e04203ac7b1f1ce7f22c7969c8511463eef2d63ae55ea5d21b69 diff --git a/tests/expectations/compiler/compiler/function/iteration_repeated.leo.out b/tests/expectations/compiler/compiler/function/iteration_repeated.leo.out index 354d3d7f1d..94c85ceefe 100644 --- a/tests/expectations/compiler/compiler/function/iteration_repeated.leo.out +++ b/tests/expectations/compiler/compiler/function/iteration_repeated.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 4ae2929cc0c72fd75f38a87f49b83e37b29e2131f2cf15db7e55a4da5b007f10 - canonicalized_ast: 1a0c36ef1c6108a7a84dc7c43d012d0e9f0bcf3ae15634128a98ea04c4f335ed - type_inferenced_ast: 3c270a3472eb019d1426c8c1a8e184f6b4dda7c88bb8d136cb59bd94120d1ca8 + initial_ast: e00d6916d7234d7ed9f405c02e281301bc5482800ca70c5b6d3f72e84ea22f58 + canonicalized_ast: bfba19b1a25966ba895c0b318845f4e0e2bf32eb98cba02c1a332fb6f211c532 + type_inferenced_ast: f6c7f08d785a0dc516a4ffd1165e63b54b7e04c6e9d4b22c12ffd3c282562d0b diff --git a/tests/expectations/compiler/compiler/function/multiple_returns.leo.out b/tests/expectations/compiler/compiler/function/multiple_returns.leo.out index 048bbefff5..800cc96588 100644 --- a/tests/expectations/compiler/compiler/function/multiple_returns.leo.out +++ b/tests/expectations/compiler/compiler/function/multiple_returns.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: c4d98a91631a78bb154e70846486e0ff12472f7cdf0dba1ff706fadafdcc4424 - canonicalized_ast: c4d98a91631a78bb154e70846486e0ff12472f7cdf0dba1ff706fadafdcc4424 - type_inferenced_ast: 0eb7c97884a7b1cd58e40cd51d0707892654c1083819ba1653767876b8b6aa27 + initial_ast: 8bbbd1ddbb1a616fb3b6cc813734f6dec1989f305dcf2b1580c66c91e023e3db + canonicalized_ast: 8bbbd1ddbb1a616fb3b6cc813734f6dec1989f305dcf2b1580c66c91e023e3db + type_inferenced_ast: 88fbd7fea3a02a091f2f00347f1e862710a621898f80d8acc91d4041e3adc9f2 diff --git a/tests/expectations/compiler/compiler/function/multiple_returns_fail.leo.out b/tests/expectations/compiler/compiler/function/multiple_returns_fail.leo.out index f1d0427062..68c53fc358 100644 --- a/tests/expectations/compiler/compiler/function/multiple_returns_fail.leo.out +++ b/tests/expectations/compiler/compiler/function/multiple_returns_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error [EASG0373035]: function 'main' failed to validate return path: 'cannot have asymmetrical return in if statement'\n --> compiler-test:4:5\n |\n 4 | if true {\n|\n 5 | ...\n|\n 6 | }\n | ^" + - "Error [EASG0373035]: function 'main' failed to validate return path: 'cannot have asymmetrical return in if statement'\n --> compiler-test:4:5\n |\n 4 | if true {\n 5 | ...\n 6 | }\n | ^" diff --git a/tests/expectations/compiler/compiler/function/multiple_returns_fail_conditional.leo.out b/tests/expectations/compiler/compiler/function/multiple_returns_fail_conditional.leo.out index 814f563ee2..a8b0dfd0c9 100644 --- a/tests/expectations/compiler/compiler/function/multiple_returns_fail_conditional.leo.out +++ b/tests/expectations/compiler/compiler/function/multiple_returns_fail_conditional.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error [EASG0373034]: function 'main' missing return for all paths\n --> compiler-test:3:1\n |\n 3 | function main() -> bool {\n|\n 4 | ...\n|\n 5 | }\n|\n 6 | \n|\n 7 | \n|\n 8 | \n|\n 9 | \n|\n 10 | \n | ^" + - "Error [EASG0373034]: function 'main' missing return for all paths\n --> compiler-test:3:1\n |\n 3 | function main() -> bool {\n 4 | ...\n 5 | ...\n 6 | ...\n 7 | ...\n 8 | ...\n 9 | ...\n 10 | ...\n 11 | }\n | ^" diff --git a/tests/expectations/compiler/compiler/function/multiple_returns_main.leo.out b/tests/expectations/compiler/compiler/function/multiple_returns_main.leo.out index 0a6d8c54cc..208288b578 100644 --- a/tests/expectations/compiler/compiler/function/multiple_returns_main.leo.out +++ b/tests/expectations/compiler/compiler/function/multiple_returns_main.leo.out @@ -19,6 +19,6 @@ outputs: r1: type: bool value: "true" - initial_ast: c571bc844b073f4a4c66ab9b0bdcee6745271a80298dc5d871e1036d13213187 - canonicalized_ast: c571bc844b073f4a4c66ab9b0bdcee6745271a80298dc5d871e1036d13213187 - type_inferenced_ast: 89a7dcde1fb148fed4f5bcc6412b4275a1c2b0009e7960b7df8db0217da14e5e + initial_ast: f982480cc10a58594b1ed75be2d2dcd29ed874fa666497f2c14b58c338a4443f + canonicalized_ast: f982480cc10a58594b1ed75be2d2dcd29ed874fa666497f2c14b58c338a4443f + type_inferenced_ast: f70e1d694f99f56777ac863e764615c6bc496ebb4f476c2faf8356e9246f4d24 diff --git a/tests/expectations/compiler/compiler/function/newlines.leo.out b/tests/expectations/compiler/compiler/function/newlines.leo.out index 8941d57016..7dfc3aefb5 100644 --- a/tests/expectations/compiler/compiler/function/newlines.leo.out +++ b/tests/expectations/compiler/compiler/function/newlines.leo.out @@ -19,6 +19,6 @@ outputs: b: type: u32 value: "0" - initial_ast: 1cd1942f945063ca28425deb842703edaf7c9c41101a06b0b8471ef47fd3ae88 - canonicalized_ast: 1cd1942f945063ca28425deb842703edaf7c9c41101a06b0b8471ef47fd3ae88 - type_inferenced_ast: 865cad30a2aeae6615efb2f4dbaed8c7fd6c6b0a5adc0d0050ee4617ec393866 + initial_ast: 15f65ebeef2a1394bad8e787b7f85b4ce097c92d4f83723d2f04fc94a2f704fe + canonicalized_ast: 15f65ebeef2a1394bad8e787b7f85b4ce097c92d4f83723d2f04fc94a2f704fe + type_inferenced_ast: 80d4650ca4846bc858164dc5d39d8e9333046ed58a655a0c739a5fb2b3018b90 diff --git a/tests/expectations/compiler/compiler/function/repeated.leo.out b/tests/expectations/compiler/compiler/function/repeated.leo.out index ea5312e1ac..871d97f0fb 100644 --- a/tests/expectations/compiler/compiler/function/repeated.leo.out +++ b/tests/expectations/compiler/compiler/function/repeated.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: e0ed84f76e2a79b3b784ed989db10d1893968fd0ae07eb3b28eafb45afa3762f - canonicalized_ast: e0ed84f76e2a79b3b784ed989db10d1893968fd0ae07eb3b28eafb45afa3762f - type_inferenced_ast: c9f98a09d0a48fbbaaf43032a7050ea4e01e90595b321ec70b7fdabb4a6322dd + initial_ast: 500b33c3ca695738a761854a5c97d7d46ef4689e80fcf0c2dc4694ab09499b7f + canonicalized_ast: 500b33c3ca695738a761854a5c97d7d46ef4689e80fcf0c2dc4694ab09499b7f + type_inferenced_ast: 1383b0311db00a303f411f023eb3d87c8c29b95776bcf09d8b9622ab3af789f6 diff --git a/tests/expectations/compiler/compiler/function/return.leo.out b/tests/expectations/compiler/compiler/function/return.leo.out index 4330aeb266..8561fede33 100644 --- a/tests/expectations/compiler/compiler/function/return.leo.out +++ b/tests/expectations/compiler/compiler/function/return.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 7e9cf69f95600d12d299b37a52a2ba19e1194da8349d2aa4b9d082a0c90c36c8 - canonicalized_ast: 7e9cf69f95600d12d299b37a52a2ba19e1194da8349d2aa4b9d082a0c90c36c8 - type_inferenced_ast: 21ea10f8ab44c8c521ac7216555775d7c8e23439e21ae25a4fe142a39df891fa + initial_ast: bb569604b5c03343d63deca1fb42fbfb2a275a78d22009e24c58dfc3ac0156ab + canonicalized_ast: bb569604b5c03343d63deca1fb42fbfb2a275a78d22009e24c58dfc3ac0156ab + type_inferenced_ast: fb793f59586351711471dd75136a8c380c154690feccf9cf7174cef82591e6f7 diff --git a/tests/expectations/compiler/compiler/function/return_array_nested_pass.leo.out b/tests/expectations/compiler/compiler/function/return_array_nested_pass.leo.out index 3e3df80380..a26c9321b3 100644 --- a/tests/expectations/compiler/compiler/function/return_array_nested_pass.leo.out +++ b/tests/expectations/compiler/compiler/function/return_array_nested_pass.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 2cb5bb420cacd6ac0012ed38f3081a124842fe7b4ccc37a21a009e2353049b2b - canonicalized_ast: eeb7d6efb45cfffe4d11bf2235fac0c5ad44693aad4935053ad3d964af342d70 - type_inferenced_ast: 643e5e8709c1d8c473a42906fa549d893839506cbc138313d6e3dbdf1299b8a0 + initial_ast: 0d5b759de15703ed61e503ca8d70f2f8423e29dc817d2612ca384fb29d204f15 + canonicalized_ast: 9698b926f7b85ac3fbb6183a37a08b4681eeea8ccae65aeaa66e691f62487d0b + type_inferenced_ast: 3bf56872a33b1c61d71dd0141acb87050cef59915ea7dbf6559f15345c9d6736 diff --git a/tests/expectations/compiler/compiler/function/return_array_tuple_pass.leo.out b/tests/expectations/compiler/compiler/function/return_array_tuple_pass.leo.out index 6bcd7c7b42..8123254983 100644 --- a/tests/expectations/compiler/compiler/function/return_array_tuple_pass.leo.out +++ b/tests/expectations/compiler/compiler/function/return_array_tuple_pass.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 6625f9dae21c9ee661f29e7b22c466f9ed4d7bcd9571e4e8b4d451fb052d4bfa - canonicalized_ast: 15f43abb1cab938d6c93efcfb37774cb40a489aa33f8d40a7bdeaa2e08236876 - type_inferenced_ast: 22bdd3e29298099053079c14ecf002ffd51bb60c8fceca2441b7cf95058c5d02 + initial_ast: 3c4dacd555f9a91ffe40ddc302bb764ef757462cfad20f6461707b8bf6005196 + canonicalized_ast: 5913a06c38457b98f8aac60740450faf1ebc25760ccb8d6cb86edefd0c217cc6 + type_inferenced_ast: 697c8ad6d1d6ecff77818d3ee92733cd9210c2d151ec8b15093e54ef21cd3b64 diff --git a/tests/expectations/compiler/compiler/function/return_tuple.leo.out b/tests/expectations/compiler/compiler/function/return_tuple.leo.out index 560491c6b3..984cb65bbc 100644 --- a/tests/expectations/compiler/compiler/function/return_tuple.leo.out +++ b/tests/expectations/compiler/compiler/function/return_tuple.leo.out @@ -19,6 +19,6 @@ outputs: r1: type: u32 value: "103" - initial_ast: 8f5a723bcf45dfefb932723af97f4aeccfdd8e14ede2011a07b6499c517f87e0 - canonicalized_ast: 8f5a723bcf45dfefb932723af97f4aeccfdd8e14ede2011a07b6499c517f87e0 - type_inferenced_ast: f10f80d86887b764f5177202c36f538eaa7d255216be58fda9804f3bfb370251 + initial_ast: 05733c81aa57b7c0c2f89d6ab74b31df49d78414ad354a707ae3474e54fd7951 + canonicalized_ast: 05733c81aa57b7c0c2f89d6ab74b31df49d78414ad354a707ae3474e54fd7951 + type_inferenced_ast: 81ba2fb5f7c788306b516c750361f7984a1a04ef35d72a47ed8ea0c3acf3cb7f diff --git a/tests/expectations/compiler/compiler/function/return_tuple_conditional.leo.out b/tests/expectations/compiler/compiler/function/return_tuple_conditional.leo.out index eb2d1b1057..30f2a3f58a 100644 --- a/tests/expectations/compiler/compiler/function/return_tuple_conditional.leo.out +++ b/tests/expectations/compiler/compiler/function/return_tuple_conditional.leo.out @@ -19,6 +19,6 @@ outputs: b: type: u32 value: "1" - initial_ast: 3313971add9f81c5da70cdd66fc134e8bab9437d8ca7a50f41721250d5fa0225 - canonicalized_ast: 3313971add9f81c5da70cdd66fc134e8bab9437d8ca7a50f41721250d5fa0225 - type_inferenced_ast: 0a9387bf11f5c88d719463b8b0c3fa1b935a83ef3a382b575de21d3aafa955e6 + initial_ast: 91fd89c2d91693622b5305b302c762d139bca3ff839dc5352be5ab694300ad8b + canonicalized_ast: 91fd89c2d91693622b5305b302c762d139bca3ff839dc5352be5ab694300ad8b + type_inferenced_ast: bfefba5d47f28d8939c2f296d1a52559fbcefc88d75cedde390233f4d4db1e98 diff --git a/tests/expectations/compiler/compiler/function/value_unchanged.leo.out b/tests/expectations/compiler/compiler/function/value_unchanged.leo.out index 5f341dbb00..ca20b3c22e 100644 --- a/tests/expectations/compiler/compiler/function/value_unchanged.leo.out +++ b/tests/expectations/compiler/compiler/function/value_unchanged.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 65b078bf25edb054039cb244fbef0316a865274d6c44a2ceea72d3aefa90626b - canonicalized_ast: 7ec00e4ae76e7ed97f272ef523a462662bb6032cfafeeb9e8f11c266f45835f5 - type_inferenced_ast: 77195eeb9765908133dec5cf01abd1ad744a5a61139d808f91218706487f9fdd + initial_ast: d3d54367b0fcc1b5a01185aec3cfe669941bd0a1b6f4218a73a1928f9dea5dbc + canonicalized_ast: eb82bb09e23368391dca2472a6838bb7f9d704a9bb1ca53169550fafb79b6eed + type_inferenced_ast: eeae07f387addad134aca399c105f020006f79fa64e4d1395abd2e27d42e0ae8 diff --git a/tests/expectations/compiler/compiler/global_consts/global_const_types.leo.out b/tests/expectations/compiler/compiler/global_consts/global_const_types.leo.out index 407bbb6de5..bfc4883877 100644 --- a/tests/expectations/compiler/compiler/global_consts/global_const_types.leo.out +++ b/tests/expectations/compiler/compiler/global_consts/global_const_types.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "false" - initial_ast: 9347e76e49daae38da61524f6c0ec6c2e4b0384a01c8c7773c6dae9aa75e20dd - canonicalized_ast: c9e8250d4cfe44fcb7f3e836aae5753b9a87a58bf20d13c4d712a6181e486f90 - type_inferenced_ast: 3b8b47a915814590af43fc237a72bfb976ead7485b2b2a901571cbb29be55976 + initial_ast: 97024a9c26e890afe8f4dc64b727a72e837f46b27ff56cddc1231c29671dc2b4 + canonicalized_ast: 8674af05f953dfda5eb360e367447912e9d0ec5abf513eaba14444bd66bd9cae + type_inferenced_ast: 33017f3824095dcb4431f73db16a3fe1e845d30d7a6366182b247a23445eb26d diff --git a/tests/expectations/compiler/compiler/import_dependency/tests/import_dependency_folder.leo.out b/tests/expectations/compiler/compiler/import_dependency/tests/import_dependency_folder.leo.out index f8592604fc..afd08250f6 100644 --- a/tests/expectations/compiler/compiler/import_dependency/tests/import_dependency_folder.leo.out +++ b/tests/expectations/compiler/compiler/import_dependency/tests/import_dependency_folder.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 3f359dbec82cacf3b542a67b0e90fa59ae410b9c2eaa2f2e4ce71746176c6049 - canonicalized_ast: 2c036d46e9e8ee9278fdce6c0b11297e1e74f36c320f94eec6c3bc85025a19ef - type_inferenced_ast: e21be9e68e24ccefe83cd5a8ea330fe9931b3fa8b2a9c4298d798c2429c78907 + initial_ast: 3f1b8c03ff4676240e6a1deaf46094a95f87b0c5375b7af09b9fd796ee9d7639 + canonicalized_ast: d677dff4951f6b48675b4b38c3725b21914619c5af9494510f0ea9fdb50bec74 + type_inferenced_ast: e053cf66b0a4b1ed0208c18d45566d8cd6277bbcb56f3547a28ef095deb25153 diff --git a/tests/expectations/compiler/compiler/import_local/import_all.leo.out b/tests/expectations/compiler/compiler/import_local/import_all.leo.out index 60979b84a4..3b261da032 100644 --- a/tests/expectations/compiler/compiler/import_local/import_all.leo.out +++ b/tests/expectations/compiler/compiler/import_local/import_all.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 313c0094a00da55fdda3dade0bfa021056e0469852b9113a46d91d1c831b73e4 - canonicalized_ast: 313c0094a00da55fdda3dade0bfa021056e0469852b9113a46d91d1c831b73e4 - type_inferenced_ast: d94a5e74d7f1d2d467eb221277139efa6ba6983588ab854d84a7868b61f93de9 + initial_ast: b01c46ace6ae994f48ca0042be1a1ec06bf844211f5a29a30594f74fdd6ccb90 + canonicalized_ast: b01c46ace6ae994f48ca0042be1a1ec06bf844211f5a29a30594f74fdd6ccb90 + type_inferenced_ast: 0b46b4b8fe6e9a397d8e9a64761f0f7c84f50a4be2f4ac3f08770183f27b6565 diff --git a/tests/expectations/compiler/compiler/import_local/import_as.leo.out b/tests/expectations/compiler/compiler/import_local/import_as.leo.out index d16688ea2d..66be5fc42c 100644 --- a/tests/expectations/compiler/compiler/import_local/import_as.leo.out +++ b/tests/expectations/compiler/compiler/import_local/import_as.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: a5e1be713c8c75cdaa001bc621958e83eec76d9ff25f23e14268eeb973b66d35 - canonicalized_ast: 17f236ac4931259059f7f9470af948691131eb57d76d254e90a678c2e88e79e2 - type_inferenced_ast: 751a6eda60bd0fd88d8fdc6a693ac410b944d449b27b62e9179304df0183baf1 + initial_ast: 09ae5023ca083bbf3e4cd4634d83b4cb5d5b4ad44b51c6f849273540b74c05bf + canonicalized_ast: d12f6315280c12a7052e08f635d41e8d81d89c98ae6f760fbc3885da42224c4a + type_inferenced_ast: cd79fce9b7c1325a1d992159466c1dfba53a123f383aefa34940ceb2593fa483 diff --git a/tests/expectations/compiler/compiler/import_local/import_dir.leo.out b/tests/expectations/compiler/compiler/import_local/import_dir.leo.out index 9e1118b449..9b6756ecd2 100644 --- a/tests/expectations/compiler/compiler/import_local/import_dir.leo.out +++ b/tests/expectations/compiler/compiler/import_local/import_dir.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: dc0d2962e432e48bb90aa3a780ca5996fd3ace2345e3050d9c25d920a7a3ccaf - canonicalized_ast: a32ad043e10c6c28e93c35a34190fa2476be891e3eb9c46ba04dd13ebc83c7ca - type_inferenced_ast: d835ff6b3ce1467d70ca008a8d741374ea7b92b99cb5f54061aee7eb1b069b87 + initial_ast: 326263da73e6edfe8788d5d6db70ee879999bf0339690fdbb3d3c27508966125 + canonicalized_ast: b81f83d7d31ec610e10e52f89a21e268664cf95cc6fb08bf2153403dc9c2f37f + type_inferenced_ast: 69402330a4fb2015c1ba2990104d3c8c43e05bc5d701c79587066092d3aabfa1 diff --git a/tests/expectations/compiler/compiler/import_local/import_files.leo.out b/tests/expectations/compiler/compiler/import_local/import_files.leo.out index f487b27323..6859d46ba1 100644 --- a/tests/expectations/compiler/compiler/import_local/import_files.leo.out +++ b/tests/expectations/compiler/compiler/import_local/import_files.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 923ff9c192722eef3feee2a5b17f7b7dcea646aa6685bc54297bf1eb974295fb - canonicalized_ast: d0f68c4594e44e7695eab4716cb38a1808921e1265789263f053b91c32a26a38 - type_inferenced_ast: e5ee9ff2838905ca61bfbafe24dfdf726d0da0567ea22bea9436ff9106d764e2 + initial_ast: 1e48fe05ca987660d68c6166f45097631ac3a900da03ed1ff66a9f5410f7b817 + canonicalized_ast: 567ae9a9f0641d4805d14ce57cbe7beb3fc33115e11187b1087d34c14f86b270 + type_inferenced_ast: 3a934ed3696b799ce020a7d51db12af1039ea94608bf909804664521828348e3 diff --git a/tests/expectations/compiler/compiler/import_local/import_many.leo.out b/tests/expectations/compiler/compiler/import_local/import_many.leo.out index e061af4cc7..3ca9429193 100644 --- a/tests/expectations/compiler/compiler/import_local/import_many.leo.out +++ b/tests/expectations/compiler/compiler/import_local/import_many.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: db01ccd5aaf375bfe49f9e95cde47adf741353ebb60c0463ea5f8b3477716edd - canonicalized_ast: db01ccd5aaf375bfe49f9e95cde47adf741353ebb60c0463ea5f8b3477716edd - type_inferenced_ast: 0718585fcc9d9b7922abb93e0162461d6e04c5b7fb03f729187443d75f8357af + initial_ast: 64f447a80a88cb665651c9d4a8d6c195d4f9529c0157d6c2f3c6557062b9361b + canonicalized_ast: 64f447a80a88cb665651c9d4a8d6c195d4f9529c0157d6c2f3c6557062b9361b + type_inferenced_ast: a31ce23735af584c7c21b27ba0b3e27cea01dbdb50efb87f690fdd5e0fa94547 diff --git a/tests/expectations/compiler/compiler/import_local/import_weird_names.leo.out b/tests/expectations/compiler/compiler/import_local/import_weird_names.leo.out index d8403e37d6..ac8ce750b5 100644 --- a/tests/expectations/compiler/compiler/import_local/import_weird_names.leo.out +++ b/tests/expectations/compiler/compiler/import_local/import_weird_names.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: ee9ec4ceedf5f1f7326b00e1a74af44fb04faae128ebf01d4517c903f9b827b1 - canonicalized_ast: ee9ec4ceedf5f1f7326b00e1a74af44fb04faae128ebf01d4517c903f9b827b1 - type_inferenced_ast: 0f89a0317173e34f2ca3c65654ac6b5f99108468eb274c3552b9e9829aaf9d4c + initial_ast: e58bc13bf652921c07e471122832498fa2b5fc317976fab07e34e9bb62e6ddca + canonicalized_ast: e58bc13bf652921c07e471122832498fa2b5fc317976fab07e34e9bb62e6ddca + type_inferenced_ast: 4e807d6d0dc3435ca3d6a1ab34b7d9f819664837cf32b5b26a81b027bbc05d71 diff --git a/tests/expectations/compiler/compiler/import_local/import_weird_names_nested.leo.out b/tests/expectations/compiler/compiler/import_local/import_weird_names_nested.leo.out index 41eac9ad44..6598931551 100644 --- a/tests/expectations/compiler/compiler/import_local/import_weird_names_nested.leo.out +++ b/tests/expectations/compiler/compiler/import_local/import_weird_names_nested.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: f786b67e5542f66910d8548c8185197a6d49b4dcbf9c5d9a738b0c94ab6f8b73 - canonicalized_ast: f786b67e5542f66910d8548c8185197a6d49b4dcbf9c5d9a738b0c94ab6f8b73 - type_inferenced_ast: ecda036eab96446fe84286c610eba0297edb6522e0ea1ef724d83013adb41fdc + initial_ast: e1b0fc42c16ba92201081238a603e1a1c9a464882a274613cc8f99465d80334e + canonicalized_ast: e1b0fc42c16ba92201081238a603e1a1c9a464882a274613cc8f99465d80334e + type_inferenced_ast: 0f876207fdc179cc01db6d4b65350454dc0be5e20f6de2356eb53e0ff0e8ee97 diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main.leo.out index daa2b626b9..3bc9bbd98a 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 069cfa9c7178060bf3c0230f31d64b9bd22be6a88447568018dec560aa32e500 - canonicalized_ast: 069cfa9c7178060bf3c0230f31d64b9bd22be6a88447568018dec560aa32e500 - type_inferenced_ast: e30a262885a2dbd047409a5f7fd2de81fd9cc91686de88fe39a03e835e3580ea + initial_ast: fd5d65f5f25616d2b3ebb6ee863f8f5099544e19448534131299fca6dc090387 + canonicalized_ast: fd5d65f5f25616d2b3ebb6ee863f8f5099544e19448534131299fca6dc090387 + type_inferenced_ast: 20cc52c351fcacc3321fd3b56a79d81824e475e2c4bf9c63451e39d2545b7c05 diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_array.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_array.leo.out index ba1a8c378e..a3522c3118 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_array.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_array.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: d47db8120f5667f5afd0ce44f515bdd2d41f1153b79972fb4d8763b62840324d - canonicalized_ast: d47db8120f5667f5afd0ce44f515bdd2d41f1153b79972fb4d8763b62840324d - type_inferenced_ast: 48192d8f242cdeac6855df7c92d1c60e008314d2e25fb6c33d5963b238a743b6 + initial_ast: 75de104d23e3eda322cf8335ea2b72ca32c26fe79b9c7b8946f1b957a5a58b5d + canonicalized_ast: 75de104d23e3eda322cf8335ea2b72ca32c26fe79b9c7b8946f1b957a5a58b5d + type_inferenced_ast: 86e9c692a93d08c3d6ff7ffb82d885e6df78fb6c477c1efc6627881b5db02402 diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_char.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_char.leo.out index 516003f667..5e72920d14 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_char.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_char.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 4ccdfaed84d17ced4a459baea27898dc165cc898f25ba5db9def1faf9aebc9ff - canonicalized_ast: 4ccdfaed84d17ced4a459baea27898dc165cc898f25ba5db9def1faf9aebc9ff - type_inferenced_ast: 00355f5036d0a753fe0b3486dadc06fdacb6f5eedc0d40b9c2f85b26314ac182 + initial_ast: 79d9c8c5681e8eda47e4cc625e555cdc25de8b46f359db004ec2b5408d740f84 + canonicalized_ast: 79d9c8c5681e8eda47e4cc625e555cdc25de8b46f359db004ec2b5408d740f84 + type_inferenced_ast: 6a25166a63b0ef30ed2beb723ce9bca0b848da95ab633889409fd797f18a8fef diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_field.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_field.leo.out index f533a62956..82f0893667 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_field.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_field.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "false" - initial_ast: e32fc158d0d4e25d5512f6a407b12ba50a6ea73f9f0598ec8c9e5d1ffc4843d0 - canonicalized_ast: e32fc158d0d4e25d5512f6a407b12ba50a6ea73f9f0598ec8c9e5d1ffc4843d0 - type_inferenced_ast: a3fd6659f4619343eff16cb73005a13c4207412160088b06f9a9d0dd3acd7dd8 + initial_ast: f1c4e2b8a27e2575293486977b41988a4fdc9195c40ac70b703cd6b34c52e526 + canonicalized_ast: f1c4e2b8a27e2575293486977b41988a4fdc9195c40ac70b703cd6b34c52e526 + type_inferenced_ast: 38bf188ec70371f03856ec64b1df460cd3217a1565040f143aff30f1c3740c70 diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_group.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_group.leo.out index 8805bcb07c..942216f150 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_group.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_group.leo.out @@ -13,6 +13,6 @@ outputs: - input_file: input/main_group.in output: registers: {} - initial_ast: 781f09b5cb574e4aebd1eb0c9c2ebc02a81ca52b869ed16f1a451d1dacea4112 - canonicalized_ast: 0c9813c834d335045cf71a6a5b543814ebaaec1be366ef48854b8b6985a7c710 - type_inferenced_ast: c99f3db5fda1e4aed85a5aca1ffa87e7bc4560658736e04d3338091acd3d177d + initial_ast: 734254f32edba7e044d3d9f73dd222a0dd967707d51f4a6fdc3c89af9bc79f6c + canonicalized_ast: 8e37317e62d5c398c84aa4470c96a2bef33e63b5bb1a0e469a4cf1a49c565a74 + type_inferenced_ast: 6f5a6a68f766ee45ea2f4b3e16a6f85ac13fe60fbe3a27cea90e5da7bd7982c4 diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_multi_dimension_array.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_multi_dimension_array.leo.out index 62a37208eb..32b62ddcee 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_multi_dimension_array.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_multi_dimension_array.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 4745f2ae8312973d7391eef93452656a16e1f2edabd1a1518da9e644e510dcc3 - canonicalized_ast: d2bccd8f77fcc43c8c4a2431e12ec7cfc9c28bc140d3e8b43b7e40f030aa86d3 - type_inferenced_ast: f88787d3f406ee8822fc36faa0a976d72b6c90b616e006b4bb86a95ddda7c51b + initial_ast: da5236e9a81e2048dacfd3004db8a370a342ca2fb966b3d8ba6535ba4d3fae17 + canonicalized_ast: f65c8486c62ea1df95bb7ef70577388da94d200ceba32ce15620e5498ce245e9 + type_inferenced_ast: dca62cb02813f4047d5f69c1b70d945902dc99044c980f74e7789611dc6968b1 diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_multiple.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_multiple.leo.out index 24b63542df..6d17836eeb 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_multiple.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_multiple.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: c220ba73f75ff1651a98991ee4f5ea021dabdde2a1c08e949deb2aa1ecb65390 - canonicalized_ast: c220ba73f75ff1651a98991ee4f5ea021dabdde2a1c08e949deb2aa1ecb65390 - type_inferenced_ast: 30507ab22a8ebd6bb0f239d34923201b6381a722e11649c0b1ee73acd9317902 + initial_ast: aae17ba5bd2ce376b5c440df42be442b0731feb499fa37b133b89f364a8790bf + canonicalized_ast: aae17ba5bd2ce376b5c440df42be442b0731feb499fa37b133b89f364a8790bf + type_inferenced_ast: 5b110c3aa3e0d65942f7a7fdbdccfc745aa810ea7d71137358f220d2bfecb0b7 diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_string.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_string.leo.out index bf86c50e30..9f50a60077 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_string.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_string.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: cd2766745f0e89484a8699958dfa1d34465a7ae76985581ff5cedb64b1af358d - canonicalized_ast: 1aed123b79d7c26d8d10f05883a5daca1d87c1a5874cf74cf8889fce7b0a448d - type_inferenced_ast: 1ef118bd57f7a113f9cf1f8990fb29ee61b018e0142e33ecf940566b86cd71a2 + initial_ast: febb53aab48ab8b14c5254dbabd4962986633cd1d8e835cb2cd37273eb679f19 + canonicalized_ast: 87a760c60ea690797600988e8bb9e3f767aea097d226e1c4975f96103c2de8b6 + type_inferenced_ast: 43c510a75ca27431f2f85be85e1cc7a92cd4c6da43cd38e74bb3d3fd1fa525b5 diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_tuple.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_tuple.leo.out index 8113b455de..1a5835c8e8 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_tuple.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_tuple.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 89629e72caced78aff784b485cbcce3afaf9fbb3d87031df0c29f06998ae7ed1 - canonicalized_ast: 89629e72caced78aff784b485cbcce3afaf9fbb3d87031df0c29f06998ae7ed1 - type_inferenced_ast: f3b74fe5acc0245c6db719848b4326a59997528e82f149c57890cb66aec3f310 + initial_ast: f7d08c7f104e732a04c7a71522a04d8a781afd3b67b28db8978a41d34c7ae472 + canonicalized_ast: f7d08c7f104e732a04c7a71522a04d8a781afd3b67b28db8978a41d34c7ae472 + type_inferenced_ast: 358265a83714b484456d92d5ccc15e4259e94bdd28072914628c5ac9773adfd8 diff --git a/tests/expectations/compiler/compiler/input_files/program_input_and_program_state/basic.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_and_program_state/basic.leo.out index 1d5f514839..1b01d3a1c3 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_and_program_state/basic.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_and_program_state/basic.leo.out @@ -16,6 +16,6 @@ outputs: b: type: bool value: "true" - initial_ast: ec6cdda564d981bedb77ad0180a3d6f32fb5e5f35e50e116de4f2b9337d6f4e1 - canonicalized_ast: ec6cdda564d981bedb77ad0180a3d6f32fb5e5f35e50e116de4f2b9337d6f4e1 - type_inferenced_ast: 57655819a50e4ee7d73fd9ec5dfbd92116d47bc9026beee48ba91c4df416bd15 + initial_ast: 2cfed669110dc972ec11a67149117c6dd2f4d09d7791d7d3cdfe334c32bfc3eb + canonicalized_ast: 2cfed669110dc972ec11a67149117c6dd2f4d09d7791d7d3cdfe334c32bfc3eb + type_inferenced_ast: 4df0dad517cafd4f8f4e9a9717e0b4d3decd2c07091338cd65fe97fdcc5e8778 diff --git a/tests/expectations/compiler/compiler/input_files/program_input_and_program_state/token_withdraw.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_and_program_state/token_withdraw.leo.out index 0780b72788..f3559fa361 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_and_program_state/token_withdraw.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_and_program_state/token_withdraw.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 57c1127a90a478f057ca43c10d8b729c8c61229467ea730da014b678874d3320 - canonicalized_ast: 57c1127a90a478f057ca43c10d8b729c8c61229467ea730da014b678874d3320 - type_inferenced_ast: 910fc1e704a7aa20a5e3b1e6fa316d9e2d52596e1be016e502dd8d50ce9196e9 + initial_ast: 2a87c1d20941f840d6e6535b0145568e8aea7f87466c5e313329e3844efeef82 + canonicalized_ast: 2a87c1d20941f840d6e6535b0145568e8aea7f87466c5e313329e3844efeef82 + type_inferenced_ast: 34a0270bb47f0ba1b72f8789a1223084b6719933dd937f6703759502ace7a346 diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main.leo.out index 990eee377e..d7047044c2 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 77097dfd19148cfb6cd04a2dc41f0fbaa87be222facb9e7b3409543257e4c13a - canonicalized_ast: 77097dfd19148cfb6cd04a2dc41f0fbaa87be222facb9e7b3409543257e4c13a - type_inferenced_ast: cd4e2c77e83b9e88b1ed9c68656db0020f78c4cff5762f22eb5bfcd5ae7bfc3b + initial_ast: e007051c65717fe114d8886204b8c097d81c38144ab4afc1ab1bc382e5773dd8 + canonicalized_ast: e007051c65717fe114d8886204b8c097d81c38144ab4afc1ab1bc382e5773dd8 + type_inferenced_ast: a22c5c90adcd19441b5fef47a637f1dc1b1f849a31a1c8adcbe377897dc292ca diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array.leo.out index 9c8acc2541..33588fcfe7 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 948bb28600521fd994c66f618131a3ed94f65cbe11a0a93a3dc5c5d7a1042827 - canonicalized_ast: 948bb28600521fd994c66f618131a3ed94f65cbe11a0a93a3dc5c5d7a1042827 - type_inferenced_ast: 4e80b126a79870ca02d171ec0af332d0811860e57f16bea68e35fdb348dc157d + initial_ast: 9957e99bb4cb4b2b9b4c8a49435f05773cdae1bdaf20ea6b98aa1e77b804d94c + canonicalized_ast: 9957e99bb4cb4b2b9b4c8a49435f05773cdae1bdaf20ea6b98aa1e77b804d94c + type_inferenced_ast: 3a1dcb5ea333c1dfc1b1ceb5516c59a449cd882d22a7439833c1d3a0a3eca3f3 diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_char.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_char.leo.out index e3d4b19f28..b6a5b28c2e 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_char.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_char.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 09c3ff107f188d9e074cccea5e1d0c0b70e77f3b072e6e2cafbad0bcb926cdd2 - canonicalized_ast: 09c3ff107f188d9e074cccea5e1d0c0b70e77f3b072e6e2cafbad0bcb926cdd2 - type_inferenced_ast: f551e1f4c578a8686d6a2e6b5e018b23974298b10ccbbce6f9be7a74250f7383 + initial_ast: a1518e5bbc6ee7140232bb483f4dd6ec53455aff8aa8c517c5e27921ebeab3af + canonicalized_ast: a1518e5bbc6ee7140232bb483f4dd6ec53455aff8aa8c517c5e27921ebeab3af + type_inferenced_ast: 0940493f8d297c71d9286c980ce74405a10115412a16c6a5247c03280747e76f diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_field.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_field.leo.out index 503603ee14..f3dfc7b125 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_field.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_field.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "false" - initial_ast: 2da9d8687c2f9a42663f5afde33486393b497cf247dfd43441e649a91e41a927 - canonicalized_ast: 2da9d8687c2f9a42663f5afde33486393b497cf247dfd43441e649a91e41a927 - type_inferenced_ast: 5f5a16af0989e4c786a31756509e034f747b9b04431c206d0d079ba097f54ba4 + initial_ast: 8c41518bf856943776335f7134085d5ec579fcd3f074c684bf15a088d5706cc5 + canonicalized_ast: 8c41518bf856943776335f7134085d5ec579fcd3f074c684bf15a088d5706cc5 + type_inferenced_ast: 0e64948c43c40dc90e3256093e0d5ee21d03593c38331febf90d6ef3ac381b7a diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_group.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_group.leo.out index ed8d7308a3..033fa39be3 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_group.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_group.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 3c34a303e6cd914e00b8f2d89afc9139336d29c44df72bf6e0e3850b7f9d4329 - canonicalized_ast: 3c34a303e6cd914e00b8f2d89afc9139336d29c44df72bf6e0e3850b7f9d4329 - type_inferenced_ast: 5e846f4809259c1a1b17da2ed86beaa849e04dc30a0fb9c3befefd9a530d74b3 + initial_ast: d23e3cc53865b5079111a5f568576fcc760b7ab3d97261b7d8c6c26a1dbc3da3 + canonicalized_ast: d23e3cc53865b5079111a5f568576fcc760b7ab3d97261b7d8c6c26a1dbc3da3 + type_inferenced_ast: dbfabbf984c9ff0741ed1d00ff5ef3a2e3408ccc16270ec835a5781f206edc7b diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multi_dimension_array.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multi_dimension_array.leo.out index c325f638d9..3fb727c90a 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multi_dimension_array.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multi_dimension_array.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: dc7f5b9419e039b9c72df637b656a2a040157b3345da403add0f228998314482 - canonicalized_ast: 5f12bde4c55c0e3d90beeb6863bccfeddfd197dc8da962b35c7a296729f65fe8 - type_inferenced_ast: ea3c5083990d249fbe307c4cfa4009f667ba7edc447e17340ee84600b694f36b + initial_ast: fc34aa149a013b9dc5b89b37e19a9ab4b8c721bfb0194332b18491354005c757 + canonicalized_ast: 70e54f09c930683fdf01d942fbf818de72f73fe17de4bc06c428bb3166fca7b6 + type_inferenced_ast: 8eb214fdbd3319530abbbbf834c99fd5339513d6be7aed84490fae01b5e9ca47 diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multiple.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multiple.leo.out index d70ebb5838..3d3e03bbdb 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multiple.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multiple.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: f9e01e97c1be1bd3991cbc552cefbe185237369cedb02bb69b1ed4bcd115f258 - canonicalized_ast: f9e01e97c1be1bd3991cbc552cefbe185237369cedb02bb69b1ed4bcd115f258 - type_inferenced_ast: 44148dcb760268261352c9f97fa511d4250f9814869073b892bb636f0516a48c + initial_ast: 6ca86b141b3b3ca7236fa991bf26c91e9451208080803c05878229721adece7e + canonicalized_ast: 6ca86b141b3b3ca7236fa991bf26c91e9451208080803c05878229721adece7e + type_inferenced_ast: 466038c7c7bc66b05eb0e58ffff56a491e754aa315b4b75779012236ff1f1c1c diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_string.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_string.leo.out index 844eff4aa3..a442df980a 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_string.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_string.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 94fc54750aa6600e97e134680399cdd196dd8ff3a52d84598027e4d8a9c73f15 - canonicalized_ast: 463ff0dcd4188c31383c22334d1517c09a9eca308476c91f9c0fd9b2e45d48ec - type_inferenced_ast: 543f04ccfe58b08618cf2d537a76787e0ce4f6d53f0668d54dac8ee63c0d26a1 + initial_ast: 613d2bc2c09f5bc83f69f1a412e95d0131111bc74b60b9ed7d1fa8bb2006120c + canonicalized_ast: a6601205f9b1deb01c7029664cc1074a5c4497be5e4702fa66886f7791b20d94 + type_inferenced_ast: bc5f71c3a2a6918c75cb361514d4bdaecbb54f294ba20ec16ccecd20b582fbd5 diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple.leo.out index 8575cf1522..424015348d 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: c8ea02057486165df1e3cdbea322408b7eb59226d3914effb358fb1d8ab6aa85 - canonicalized_ast: c8ea02057486165df1e3cdbea322408b7eb59226d3914effb358fb1d8ab6aa85 - type_inferenced_ast: 2eabb38706b4136d3c3404107cb20e9e72408a45e97e01f54c79d7d83eee432e + initial_ast: fae106810af4f4f1778934609b37de40b91e8f813b66b745c50343e3ff862dde + canonicalized_ast: fae106810af4f4f1778934609b37de40b91e8f813b66b745c50343e3ff862dde + type_inferenced_ast: 8ec29af283c7f3e23ee77643cc0fd7b7e8fe07639870b87ecd952ca187e4fc20 diff --git a/tests/expectations/compiler/compiler/input_files/program_registers/registers_array.leo.out b/tests/expectations/compiler/compiler/input_files/program_registers/registers_array.leo.out index c0e3a4dbd8..56cb3f6df3 100644 --- a/tests/expectations/compiler/compiler/input_files/program_registers/registers_array.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_registers/registers_array.leo.out @@ -16,6 +16,6 @@ outputs: r2: type: "[[u8; 4]; 2]" value: "\"[0, 0, 0, 0][0, 0, 0, 0]\"" - initial_ast: 5327d26979b458288e0e2cf6ce1a4def74216c233e2440f2963ffde9955921a8 - canonicalized_ast: 5327d26979b458288e0e2cf6ce1a4def74216c233e2440f2963ffde9955921a8 - type_inferenced_ast: bd6c9906e9a5c5df4dd141325d91746a09ec87f7daee7d4dce58af968c8803b0 + initial_ast: fc0375f232a4a8d600789df4c17c872438ae3e918c7a617364085c62b9873c8e + canonicalized_ast: fc0375f232a4a8d600789df4c17c872438ae3e918c7a617364085c62b9873c8e + type_inferenced_ast: 8566dcec6a7bb0a0105c25331486c7a69d03bf12734f62b9136b3179d7f22432 diff --git a/tests/expectations/compiler/compiler/input_files/program_registers/registers_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_registers/registers_fail.leo.out index f79dfeeb70..3fd558ebfb 100644 --- a/tests/expectations/compiler/compiler/input_files/program_registers/registers_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_registers/registers_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error [ECMP0376037]: Mismatched types. Expected register output type `u8`, found type `bool`.\n --> compiler-test:3:1\n |\n 3 | function main() -> bool {\n|\n 4 | ...\n|\n 5 | }\n | ^" + - "Error [ECMP0376037]: Mismatched types. Expected register output type `u8`, found type `bool`.\n --> compiler-test:3:1\n |\n 3 | function main() -> bool {\n 4 | ...\n 5 | }\n | ^" diff --git a/tests/expectations/compiler/compiler/input_files/program_registers/registers_pass.leo.out b/tests/expectations/compiler/compiler/input_files/program_registers/registers_pass.leo.out index da5546034d..f6ec6ba7c5 100644 --- a/tests/expectations/compiler/compiler/input_files/program_registers/registers_pass.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_registers/registers_pass.leo.out @@ -16,6 +16,6 @@ outputs: r: type: u8 value: "101" - initial_ast: 7f4fc74c20ba6f2aefead777b0230cee03af4922a9dbf9e77b90baea3649f3f1 - canonicalized_ast: 7f4fc74c20ba6f2aefead777b0230cee03af4922a9dbf9e77b90baea3649f3f1 - type_inferenced_ast: 871513e8b5723b79065dd4f56aae315854e4798fb26973af95e0a34c415e9b65 + initial_ast: cf6a76290b73851a3ed589650d1a25ffbb75e663f510dfe3274b66600678bc64 + canonicalized_ast: cf6a76290b73851a3ed589650d1a25ffbb75e663f510dfe3274b66600678bc64 + type_inferenced_ast: ce87463df0f9dee5d06d1d872340e8f40ca5cab1bc5a9dbb4e422165714798d4 diff --git a/tests/expectations/compiler/compiler/input_files/program_state/access_all.leo.out b/tests/expectations/compiler/compiler/input_files/program_state/access_all.leo.out index 30fe6e1a0b..e53c68cb4a 100644 --- a/tests/expectations/compiler/compiler/input_files/program_state/access_all.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_state/access_all.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: dbafd64b73c9e5c7f9abe597a14c99d53b819cf81fcd02e95936e2559c2fc903 - canonicalized_ast: dbafd64b73c9e5c7f9abe597a14c99d53b819cf81fcd02e95936e2559c2fc903 - type_inferenced_ast: fc41b1ddef2242c578b80e746574cebb208a4b72692136241a1d55f55f825d92 + initial_ast: 6fd4f46e0a795fd0edef840925c6a152c8b69685f30b42b1dc5aeaf2e0f1296a + canonicalized_ast: 6fd4f46e0a795fd0edef840925c6a152c8b69685f30b42b1dc5aeaf2e0f1296a + type_inferenced_ast: ad948d43d662198b33e752ac1c20807b5d79525c4cc61f15d41155f31ade71c4 diff --git a/tests/expectations/compiler/compiler/input_files/program_state/access_state.leo.out b/tests/expectations/compiler/compiler/input_files/program_state/access_state.leo.out index 719ce75894..e5a5c707d0 100644 --- a/tests/expectations/compiler/compiler/input_files/program_state/access_state.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_state/access_state.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 8dd720153c3f27d9c23174d3a15281819020e58ea02e8996a6db4716087bef82 - canonicalized_ast: 8dd720153c3f27d9c23174d3a15281819020e58ea02e8996a6db4716087bef82 - type_inferenced_ast: 3d9814fb189ffb1699e820ebaf194959654932f061cdfc2052e249433bb3aafb + initial_ast: 14d707805bc7e51b4b01dc9272ce7e7f1018c52a885a14177acb4e7ca34174f5 + canonicalized_ast: 14d707805bc7e51b4b01dc9272ce7e7f1018c52a885a14177acb4e7ca34174f5 + type_inferenced_ast: b399e663877ab10bb59844997e4a6a94e53c67cec20112a125906087a91f3a32 diff --git a/tests/expectations/compiler/compiler/input_files/program_state/basic.leo.out b/tests/expectations/compiler/compiler/input_files/program_state/basic.leo.out index 00ccad0091..2cef53b2e9 100644 --- a/tests/expectations/compiler/compiler/input_files/program_state/basic.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_state/basic.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 31353a3e583defe93fffe28828c3b43de3477006a2dbfbcad230be651e6f31a8 - canonicalized_ast: 31353a3e583defe93fffe28828c3b43de3477006a2dbfbcad230be651e6f31a8 - type_inferenced_ast: 3c989502fc45d58e2356ae71fbe816a24d132f9f6916e9fa91dc16741a9514eb + initial_ast: 4f9380a273ae5ba7862fd6b8f8be1a46cf6595c6f89d7538760239e7b99dc3d0 + canonicalized_ast: 4f9380a273ae5ba7862fd6b8f8be1a46cf6595c6f89d7538760239e7b99dc3d0 + type_inferenced_ast: 92e14566897c6c2d06f9044837878814b75995beed268edf3f36b4691819bc7c diff --git a/tests/expectations/compiler/compiler/integers/i128/add.leo.out b/tests/expectations/compiler/compiler/integers/i128/add.leo.out index 0956c89cc9..c1d7276af8 100644 --- a/tests/expectations/compiler/compiler/integers/i128/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/add.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: ac462de11506c6dca67eb4f68d1d3ab28212305b9d51019a8ba034678491e430 - canonicalized_ast: ac462de11506c6dca67eb4f68d1d3ab28212305b9d51019a8ba034678491e430 - type_inferenced_ast: 7ab77561ac7c95a290f91b50fc0861511102a9ef640f8af145d0e8b290958c32 + initial_ast: c473f0dfff63bc3a34b3da6eba52325b9eb84899d5adabfddab819f13f3d5c12 + canonicalized_ast: c473f0dfff63bc3a34b3da6eba52325b9eb84899d5adabfddab819f13f3d5c12 + type_inferenced_ast: 9aacff57a9dc5e20202d0caf861d3b221291e9b24b55dae3d6af7cae0d462523 diff --git a/tests/expectations/compiler/compiler/integers/i128/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/i128/console_assert.leo.out index 25dc663b17..f003bd352f 100644 --- a/tests/expectations/compiler/compiler/integers/i128/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/console_assert.leo.out @@ -13,6 +13,6 @@ outputs: - input_file: i128.in output: registers: {} - initial_ast: 62a53d49c0d37f9560c418178f61c1d128189b72755c3f742eede96d26ca5130 - canonicalized_ast: 029b66864f067b5b2eff38d6754adf60346502b797eb96ef669f679a2b70421c - type_inferenced_ast: 3c16f03f281e074f0bc8783836b1b757a8daa6f0f224ea8de959ff9168c1ea92 + initial_ast: 9179994f97bb644f2398fb05b40a3a953f07131cde0835661ddf13c02b9a79ff + canonicalized_ast: 84d32c3262b3ae07914ddfc44ff21be8e1ba8750e8a36dca109d615db2393f85 + type_inferenced_ast: e0a51a2a919c8fbd7225bac172d55a1f03592b4355b7f7894a3b7ad2816f36bf diff --git a/tests/expectations/compiler/compiler/integers/i128/div.leo.out b/tests/expectations/compiler/compiler/integers/i128/div.leo.out index a198c2aa9e..ae5b136f59 100644 --- a/tests/expectations/compiler/compiler/integers/i128/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/div.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: f1291dcd53d870f53667970ff090bb123ccbf46fc1695e53c9e783404dac680a - canonicalized_ast: f1291dcd53d870f53667970ff090bb123ccbf46fc1695e53c9e783404dac680a - type_inferenced_ast: 2317beb358f489c2de51c7a2ab3ea6564c6043a6cd293e61205c89c2c0d2af5a + initial_ast: ccff1bd7ccdd4deb2856d537f9662b07c2b095f5ee46f7161c2b6a51b9ebb85b + canonicalized_ast: ccff1bd7ccdd4deb2856d537f9662b07c2b095f5ee46f7161c2b6a51b9ebb85b + type_inferenced_ast: 9e2e24001539561dbe1dbecfa55b0c7b8d92f8c85de213a144d0c5fcd505204a diff --git a/tests/expectations/compiler/compiler/integers/i128/eq.leo.out b/tests/expectations/compiler/compiler/integers/i128/eq.leo.out index b4b52f098e..392d47b56f 100644 --- a/tests/expectations/compiler/compiler/integers/i128/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/eq.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: a356099c735cfc2aadee33e79a876df32d77b2eeedd2a5e3114432fc85f250c8 - canonicalized_ast: a356099c735cfc2aadee33e79a876df32d77b2eeedd2a5e3114432fc85f250c8 - type_inferenced_ast: 5f6e79b8b2023fee6377cda103a0c9e115f4043456f5b5b52f43a141b044fcc6 + initial_ast: 193c20aaf2312cc8408d2c9e38af8db7cfc77765a2c0f550f75fe36bf893ddb6 + canonicalized_ast: 193c20aaf2312cc8408d2c9e38af8db7cfc77765a2c0f550f75fe36bf893ddb6 + type_inferenced_ast: 4a6b35a5d378b03e2c4f342d8fee17b06ae117a8c2c67e3e694da0ca82fceefe diff --git a/tests/expectations/compiler/compiler/integers/i128/ge.leo.out b/tests/expectations/compiler/compiler/integers/i128/ge.leo.out index dd709c20d6..8dd73b9917 100644 --- a/tests/expectations/compiler/compiler/integers/i128/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/ge.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: e23e1934b9dd1e6eb4f5ab61a38aa2b8b08fd611dce862b964c7d2c9276e5d27 - canonicalized_ast: e23e1934b9dd1e6eb4f5ab61a38aa2b8b08fd611dce862b964c7d2c9276e5d27 - type_inferenced_ast: cd1420b2695d013f43bd78a5c2310b1399bb03831019b8f65598c453801fb43e + initial_ast: 41a3c24f3843caa402b24c4efadfbdd439613a0dadacc2c4c4fbb14eecdd3012 + canonicalized_ast: 41a3c24f3843caa402b24c4efadfbdd439613a0dadacc2c4c4fbb14eecdd3012 + type_inferenced_ast: 080a3cda9504d930a392811175a4d3960667e2eb6c3a1ed0ba0ef784adbe74ca diff --git a/tests/expectations/compiler/compiler/integers/i128/gt.leo.out b/tests/expectations/compiler/compiler/integers/i128/gt.leo.out index ffc6e2e597..671fb45330 100644 --- a/tests/expectations/compiler/compiler/integers/i128/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/gt.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 83d601d1b35665b459726420ecbe77108b9ff2e2c9213c5160e77b7d3065a5e8 - canonicalized_ast: 83d601d1b35665b459726420ecbe77108b9ff2e2c9213c5160e77b7d3065a5e8 - type_inferenced_ast: 9d7a01a5dd805625f7d8f32718ff0e4657a3e2453d64ec72de3c05ca0df4a7b3 + initial_ast: 8fde7a555355f0cb3109c38e6708590f0cf23440c95f498d9ff1b63ef8ac7fbb + canonicalized_ast: 8fde7a555355f0cb3109c38e6708590f0cf23440c95f498d9ff1b63ef8ac7fbb + type_inferenced_ast: 4ed1fc29250d7175f812cfd956ea7641676f9216e8d66ba22f2fe2b8fceaafaa diff --git a/tests/expectations/compiler/compiler/integers/i128/le.leo.out b/tests/expectations/compiler/compiler/integers/i128/le.leo.out index eda04f2526..cf0cf15ae4 100644 --- a/tests/expectations/compiler/compiler/integers/i128/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/le.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: b42ac7802bbd024bce3cdeab0fc177910f4a02f719fd820c4e98623b07c4a0eb - canonicalized_ast: b42ac7802bbd024bce3cdeab0fc177910f4a02f719fd820c4e98623b07c4a0eb - type_inferenced_ast: 858f318b38f76968d917f163fb49e7695916390ebe04f8b91230ca39656feb7a + initial_ast: 78d701153a1bd0e37caffd3623672bbc15eef30013f0d6945622e3c773b0e40b + canonicalized_ast: 78d701153a1bd0e37caffd3623672bbc15eef30013f0d6945622e3c773b0e40b + type_inferenced_ast: bcc72ba644e3e085e4fb7ec5ad81cad31c8a3e52ca695c508a5a974084557fa5 diff --git a/tests/expectations/compiler/compiler/integers/i128/lt.leo.out b/tests/expectations/compiler/compiler/integers/i128/lt.leo.out index bdcfe4f15e..c7e449d401 100644 --- a/tests/expectations/compiler/compiler/integers/i128/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/lt.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: d2e54559c35ba0233d44d6ee1e298325c669513272423537181b86ce4233e7cb - canonicalized_ast: d2e54559c35ba0233d44d6ee1e298325c669513272423537181b86ce4233e7cb - type_inferenced_ast: d56adb188c2c3df0b8f2e97116c13808e1308abb1c1aee1bbfdf3168662b4bf8 + initial_ast: a525dab584b9e4cf919db4362ae18124ecb4b75870aa1f221764a8a16f0eed77 + canonicalized_ast: a525dab584b9e4cf919db4362ae18124ecb4b75870aa1f221764a8a16f0eed77 + type_inferenced_ast: 462717ffba89b46c65e2452dadc959f14fcebb49b78c60172f223c1c4bb0ebe8 diff --git a/tests/expectations/compiler/compiler/integers/i128/max.leo.out b/tests/expectations/compiler/compiler/integers/i128/max.leo.out index 599b11f873..cdd1782c75 100644 --- a/tests/expectations/compiler/compiler/integers/i128/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/max.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: bcaa1e94d6d9f6cc6e30076890e8cf3426d514859decc3a63aa7296e88c5a53e - canonicalized_ast: bcaa1e94d6d9f6cc6e30076890e8cf3426d514859decc3a63aa7296e88c5a53e - type_inferenced_ast: d9e1540c6e87be7a291866eb9dc27a4faa88ccb74c061ccaa03b3cecb64b3ad6 + initial_ast: 8b2ac26a6a27f74b2f7a9f7523972083a5caad1fd95597cfb15ac21d58bc32e9 + canonicalized_ast: 8b2ac26a6a27f74b2f7a9f7523972083a5caad1fd95597cfb15ac21d58bc32e9 + type_inferenced_ast: 7f01c95106c222834c49509fdc88b7cf3b9d74cf2ff4923f0000968535859fa1 diff --git a/tests/expectations/compiler/compiler/integers/i128/min.leo.out b/tests/expectations/compiler/compiler/integers/i128/min.leo.out index 5a3ed9a6b2..007e2a219d 100644 --- a/tests/expectations/compiler/compiler/integers/i128/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/min.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 81f19c70aa243402136cb83389766503933b4a16af54eb267e3beca47b39c3fd - canonicalized_ast: 81f19c70aa243402136cb83389766503933b4a16af54eb267e3beca47b39c3fd - type_inferenced_ast: 68075edede17cbaaac7f6a13d690a8c387c39883aaee642e91f7b79f0c399a93 + initial_ast: ca4b9ce444b0d445a84d26e4711d25c9f8670b8cae8ce0c456680b9ddd49663a + canonicalized_ast: ca4b9ce444b0d445a84d26e4711d25c9f8670b8cae8ce0c456680b9ddd49663a + type_inferenced_ast: 122e02aff2e30b825b64251f34dd01ef81429e5cf7807e18b5f33adc9709e67e diff --git a/tests/expectations/compiler/compiler/integers/i128/mul.leo.out b/tests/expectations/compiler/compiler/integers/i128/mul.leo.out index f7528c303f..ed9d73e5d7 100644 --- a/tests/expectations/compiler/compiler/integers/i128/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/mul.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 186ffdd352b08c5c49d88c75c33aa7c11ef19d378025b30e7c90e415244fe167 - canonicalized_ast: 186ffdd352b08c5c49d88c75c33aa7c11ef19d378025b30e7c90e415244fe167 - type_inferenced_ast: 713e660370a3ccd00762874b730882ac8f4057b489a6a187f5408a3ccad150af + initial_ast: 228b473e19bbba4b71e7d157b704e89d6ef8aa446663844077719db104d1569b + canonicalized_ast: 228b473e19bbba4b71e7d157b704e89d6ef8aa446663844077719db104d1569b + type_inferenced_ast: 06a3d13f280995c019cb81a4e5de4457815a45c6f507d27911bda75ffd2e0f98 diff --git a/tests/expectations/compiler/compiler/integers/i128/ne.leo.out b/tests/expectations/compiler/compiler/integers/i128/ne.leo.out index 67798c24c7..2dbbe9130f 100644 --- a/tests/expectations/compiler/compiler/integers/i128/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/ne.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 7fab027642da486a2f3ea3dd8556179e75568a61144b5662dd260493852eeba3 - canonicalized_ast: 7fab027642da486a2f3ea3dd8556179e75568a61144b5662dd260493852eeba3 - type_inferenced_ast: 6ecdad348f6f23553bbabe8b30835e9c898d9d97f0a5aa1366f5acb94d8f6b3a + initial_ast: 0c0a73b6892c05a8e28baeb86e1d18d28af3b602f7e6de4adba4ae28335ca509 + canonicalized_ast: 0c0a73b6892c05a8e28baeb86e1d18d28af3b602f7e6de4adba4ae28335ca509 + type_inferenced_ast: b2a1e5f4428e37b0c5ae52cc63ed3f4c0908885c6732d4f353825b816fa6136c diff --git a/tests/expectations/compiler/compiler/integers/i128/negate.leo.out b/tests/expectations/compiler/compiler/integers/i128/negate.leo.out index e0611ad1bc..6d4fa039ec 100644 --- a/tests/expectations/compiler/compiler/integers/i128/negate.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/negate.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: fa78dc309cc81c6c96b9fac180fad7870e5262f79fda6cee57290154ea48f7ac - canonicalized_ast: fa78dc309cc81c6c96b9fac180fad7870e5262f79fda6cee57290154ea48f7ac - type_inferenced_ast: 086c21d92666126135c7800554648b1edfa596262878fb3ee3ccdbd3a4d67493 + initial_ast: d059629756c072e44c3ca938339712f85b2b69fb0649051bf76d1908e4b2eade + canonicalized_ast: d059629756c072e44c3ca938339712f85b2b69fb0649051bf76d1908e4b2eade + type_inferenced_ast: 9b3f2561a65416b13d6409492bfc989bae6bc67976faba9825fb02f1451a4c17 diff --git a/tests/expectations/compiler/compiler/integers/i128/negate_min.leo.out b/tests/expectations/compiler/compiler/integers/i128/negate_min.leo.out index f47709e3dd..ab4f777fed 100644 --- a/tests/expectations/compiler/compiler/integers/i128/negate_min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/negate_min.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 1b6248de2bf261e167aac374a03f0d4457a72b1db5a0ea82bcded1ef35d15228 - canonicalized_ast: 1b6248de2bf261e167aac374a03f0d4457a72b1db5a0ea82bcded1ef35d15228 - type_inferenced_ast: c088d9226acf93203adb5f50e2eaa04df39804ab0d07ecf8c79d95637ac6c079 + initial_ast: a0009b59b8ff05ebb3309395250a94e675663417730aceed483ce2338880d8fd + canonicalized_ast: a0009b59b8ff05ebb3309395250a94e675663417730aceed483ce2338880d8fd + type_inferenced_ast: 5140944155158eba88db7a3c6614dac1b50ba37a30d906b10d6c86729dc1c923 diff --git a/tests/expectations/compiler/compiler/integers/i128/negate_zero.leo.out b/tests/expectations/compiler/compiler/integers/i128/negate_zero.leo.out index bff2338f7e..26d7c1642a 100644 --- a/tests/expectations/compiler/compiler/integers/i128/negate_zero.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/negate_zero.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: d1750fe6b12ccdce3369a1d4731ee246d03dc1bde628373d549bc5f3381d8930 - canonicalized_ast: d1750fe6b12ccdce3369a1d4731ee246d03dc1bde628373d549bc5f3381d8930 - type_inferenced_ast: 26b0d2e0de90d256c74ad90d9a1953a62c08d27e7213eca59563774114efc142 + initial_ast: c9e977ef13cd2c8e6b6c3e50ce14888865d51e858e6fa8660076015986692978 + canonicalized_ast: c9e977ef13cd2c8e6b6c3e50ce14888865d51e858e6fa8660076015986692978 + type_inferenced_ast: b59d18c7f15c7b4cdadd36feb0c4da91ff5d72d362be4e8c69039bbcd6d262d0 diff --git a/tests/expectations/compiler/compiler/integers/i128/sub.leo.out b/tests/expectations/compiler/compiler/integers/i128/sub.leo.out index 6d450e56c3..f95190326a 100644 --- a/tests/expectations/compiler/compiler/integers/i128/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/sub.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 084ac84295a8f4fda5e3511fee4068a96934fe4521aea5540f9e0a40ae1a7d60 - canonicalized_ast: 084ac84295a8f4fda5e3511fee4068a96934fe4521aea5540f9e0a40ae1a7d60 - type_inferenced_ast: a6d6b276dda67099e6cbb7d5188befb863cf61d15073dc1730112c858fe31276 + initial_ast: 94fc493ab84b819b8c12f68a7c4d01e9adfd7eaa1cc533bafcbcce10b547cddb + canonicalized_ast: 94fc493ab84b819b8c12f68a7c4d01e9adfd7eaa1cc533bafcbcce10b547cddb + type_inferenced_ast: 6238710e4e6696f1020a31763f3edaa17be46f9ba4fd55bd72497e5c4bfe1cd7 diff --git a/tests/expectations/compiler/compiler/integers/i128/ternary.leo.out b/tests/expectations/compiler/compiler/integers/i128/ternary.leo.out index 4d9ad31975..76111474a5 100644 --- a/tests/expectations/compiler/compiler/integers/i128/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/ternary.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 3e8596a265aa5e71ae65161316ed3d789fec123d775f2d40a4c1311b224d1561 - canonicalized_ast: 3e8596a265aa5e71ae65161316ed3d789fec123d775f2d40a4c1311b224d1561 - type_inferenced_ast: 4e3d21eb9358220080cc24ed3bafe3873e41713cf543e375b29cf3ef779837ad + initial_ast: eee17d124eb8d460f62417c1af0bbbe424cc14a6751250c6f606df1b28d191d3 + canonicalized_ast: eee17d124eb8d460f62417c1af0bbbe424cc14a6751250c6f606df1b28d191d3 + type_inferenced_ast: c37cd2aa068f66eb9debcda671ad096b852639b3d074f11deced4d2e93dba370 diff --git a/tests/expectations/compiler/compiler/integers/i16/add.leo.out b/tests/expectations/compiler/compiler/integers/i16/add.leo.out index d572444b26..6f0ee352a9 100644 --- a/tests/expectations/compiler/compiler/integers/i16/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/add.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: ae4527e4325ed14332c6ccf66f317d048b042e3b81c3f3e91d639ab1509b72f9 - canonicalized_ast: ae4527e4325ed14332c6ccf66f317d048b042e3b81c3f3e91d639ab1509b72f9 - type_inferenced_ast: 3fb4bd89f41f243b8bcf0961a9c5993520dcc1bd0c66fd71388b99b462dd0e71 + initial_ast: 4fd0a999f8398beef7f71c3315355df0bd1124f66a6fda726db6830442a9069f + canonicalized_ast: 4fd0a999f8398beef7f71c3315355df0bd1124f66a6fda726db6830442a9069f + type_inferenced_ast: d7a93d56836cb99a113174804450f53e19096901e14b4ec31acbfab389df7eed diff --git a/tests/expectations/compiler/compiler/integers/i16/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/i16/console_assert.leo.out index 506271fa0b..95d01494f5 100644 --- a/tests/expectations/compiler/compiler/integers/i16/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/console_assert.leo.out @@ -13,6 +13,6 @@ outputs: - input_file: i16.in output: registers: {} - initial_ast: 9fd06d094a4c40e018572aa89322695cc5a6d04f0e5ab496b6b53b3dc9584f6b - canonicalized_ast: b3a66c2d4b7e3784731a43e42c32e77a7823b13b0426b3dbf368e465cd56fdda - type_inferenced_ast: 3cb58466b051cebe768038210691299387219dad2616af6063515c20aad6a996 + initial_ast: b2877669171aea3b2c3f020ba997de1fe6c5a64328f041620a502fad992f820f + canonicalized_ast: 33d960627a5a40386fcf1fc1edd259379bca4517a77155440f5417919e69c6b3 + type_inferenced_ast: e03a6ef7557c36c6c2a57306d1d4ff1d6f7c5d1955d938af2a64ed5a37cc257d diff --git a/tests/expectations/compiler/compiler/integers/i16/div.leo.out b/tests/expectations/compiler/compiler/integers/i16/div.leo.out index 58c1256bf4..388f0f87f1 100644 --- a/tests/expectations/compiler/compiler/integers/i16/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/div.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 9fea4fb63e9c60ae1090363860ba64d29159064580aa750920d2369e047c3760 - canonicalized_ast: 9fea4fb63e9c60ae1090363860ba64d29159064580aa750920d2369e047c3760 - type_inferenced_ast: 8d19db9384105c6aa8dd86de7443dbb7926928847094049fee40088404ed5fda + initial_ast: d50e609d7e88ef14c86c8a72cdff0c92106ed4580a06faf3705c789141181782 + canonicalized_ast: d50e609d7e88ef14c86c8a72cdff0c92106ed4580a06faf3705c789141181782 + type_inferenced_ast: 78f3ab4058104f17d002e8baedea424719e8ef6f99666e68042b89326cbb4916 diff --git a/tests/expectations/compiler/compiler/integers/i16/eq.leo.out b/tests/expectations/compiler/compiler/integers/i16/eq.leo.out index b48fee5c60..29e49a0c30 100644 --- a/tests/expectations/compiler/compiler/integers/i16/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/eq.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: e459cff3f061bfcaf69f5d7e9079a12b00a7f8a5ded25f90419846daa1d4b087 - canonicalized_ast: e459cff3f061bfcaf69f5d7e9079a12b00a7f8a5ded25f90419846daa1d4b087 - type_inferenced_ast: dec3a94ef9e82ae84e93a20ca17a4b3dfddf69f475d8e104bcb8d6ab05ab50a3 + initial_ast: 9a4e11bacd644fd08dd1bce9b88fde724b357dfc1ec5f8d123f8c0479de36e71 + canonicalized_ast: 9a4e11bacd644fd08dd1bce9b88fde724b357dfc1ec5f8d123f8c0479de36e71 + type_inferenced_ast: 56798e8bcbbda12ea8540466cf8e25051000cb66c8bb15bae72c106ec8a8e0e5 diff --git a/tests/expectations/compiler/compiler/integers/i16/ge.leo.out b/tests/expectations/compiler/compiler/integers/i16/ge.leo.out index da6c631d5d..36c60c60ac 100644 --- a/tests/expectations/compiler/compiler/integers/i16/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/ge.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 5345c5b3e64e283ec690a7c8fb8d83f1233447a9bf00d75abb66e5c2bacd75ca - canonicalized_ast: 5345c5b3e64e283ec690a7c8fb8d83f1233447a9bf00d75abb66e5c2bacd75ca - type_inferenced_ast: c7ecefa4bbcb107758fcc016ec46eff5b63faea2cb0f4c7312f6883db29075e7 + initial_ast: 57a7f4ea91f1b8168f64c44bbc972451f1b928f0b24a3fe2ae54d140db200e11 + canonicalized_ast: 57a7f4ea91f1b8168f64c44bbc972451f1b928f0b24a3fe2ae54d140db200e11 + type_inferenced_ast: c36a49da5d76dfd83be7fae709163ca9055a7561f1e4c0dd0ea45cacb50ff5fc diff --git a/tests/expectations/compiler/compiler/integers/i16/gt.leo.out b/tests/expectations/compiler/compiler/integers/i16/gt.leo.out index d09ee34a5a..7b4e62e28c 100644 --- a/tests/expectations/compiler/compiler/integers/i16/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/gt.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 0c681b6733c860b010e2022e7513c62d1a8ff0fe767410650c4974cea18b0329 - canonicalized_ast: 0c681b6733c860b010e2022e7513c62d1a8ff0fe767410650c4974cea18b0329 - type_inferenced_ast: d0e9ec10e9ebf832d7654ff0d78fb72db7b24833bbc56eed92efb82dacda154f + initial_ast: d04f1a60245b6bbb02ed550a9f1a7d39d6ed52a8b096fa19196992f79f1118f8 + canonicalized_ast: d04f1a60245b6bbb02ed550a9f1a7d39d6ed52a8b096fa19196992f79f1118f8 + type_inferenced_ast: c1e6bf995eebfaf0c4615af2657876836001e793d5eee5701dac65374a98a452 diff --git a/tests/expectations/compiler/compiler/integers/i16/le.leo.out b/tests/expectations/compiler/compiler/integers/i16/le.leo.out index dda445625c..7ab8abb8d1 100644 --- a/tests/expectations/compiler/compiler/integers/i16/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/le.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: cab9fabdb4694c4c07a5d9a3479071e05f94947fdaab130aba71fa15c225fb36 - canonicalized_ast: cab9fabdb4694c4c07a5d9a3479071e05f94947fdaab130aba71fa15c225fb36 - type_inferenced_ast: 850e28561df02d13dfa38c6a92febde2484ad8cc4b3cba8fc8f84df52eb40b67 + initial_ast: 1791b30d366c1380e67e6526ce5c33a532937d2315b9c73c18066200dfe9f3d2 + canonicalized_ast: 1791b30d366c1380e67e6526ce5c33a532937d2315b9c73c18066200dfe9f3d2 + type_inferenced_ast: 52fbb77cfe63d3736526f72032c784fc9d854e6b7ab20e3951ea9a7171dd3265 diff --git a/tests/expectations/compiler/compiler/integers/i16/lt.leo.out b/tests/expectations/compiler/compiler/integers/i16/lt.leo.out index 456a6e9676..d3dc3fdd7c 100644 --- a/tests/expectations/compiler/compiler/integers/i16/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/lt.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: e33908f5fd9f81857edc0e304476592aaee18dc36464e9b6200b41f13133c21c - canonicalized_ast: e33908f5fd9f81857edc0e304476592aaee18dc36464e9b6200b41f13133c21c - type_inferenced_ast: 2cbe62e95746f6ca3d4edcd58cfa8f58454d05e2df0d9082202e6170560775a7 + initial_ast: ddb410ad0b9d0a078744b5ff1f8bdb7991f46f2dde53e754b69b163e4ab60d27 + canonicalized_ast: ddb410ad0b9d0a078744b5ff1f8bdb7991f46f2dde53e754b69b163e4ab60d27 + type_inferenced_ast: b560aa7679b75616a300f942a2d863e58715227703b6d7c17bbd11ab02840944 diff --git a/tests/expectations/compiler/compiler/integers/i16/max.leo.out b/tests/expectations/compiler/compiler/integers/i16/max.leo.out index 029cbed454..529dfe111e 100644 --- a/tests/expectations/compiler/compiler/integers/i16/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/max.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 2c75f41bf231656d8c5e37856218ec865072a6c2ef6127f7129a8bc902c4e561 - canonicalized_ast: 2c75f41bf231656d8c5e37856218ec865072a6c2ef6127f7129a8bc902c4e561 - type_inferenced_ast: d75251e96176eddced5662c52107b01a7546757e39061a4af85063a5ac6f8f90 + initial_ast: f156257ed496945bb2c1c3453c6abadb8cf83ee3db1943932fd381eb63d7172d + canonicalized_ast: f156257ed496945bb2c1c3453c6abadb8cf83ee3db1943932fd381eb63d7172d + type_inferenced_ast: b398428451e40f14d765e57cefd7b500df7eb14b84589545ef772b4d08bca9cc diff --git a/tests/expectations/compiler/compiler/integers/i16/min.leo.out b/tests/expectations/compiler/compiler/integers/i16/min.leo.out index 7e00f95861..b5baabb2c8 100644 --- a/tests/expectations/compiler/compiler/integers/i16/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/min.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 9d8422ea1b1b3b958945accea6123bc08195e5142554c22d84593efc6a122eb4 - canonicalized_ast: 9d8422ea1b1b3b958945accea6123bc08195e5142554c22d84593efc6a122eb4 - type_inferenced_ast: c75cbfa758ad820de51cf36b88a7090c6d96c8ed7c9f9ddc8a40cde8680499b6 + initial_ast: b5cd4df2823d12fa01257069c35fb1385cba00c646822bc0fd9fa660d1edc085 + canonicalized_ast: b5cd4df2823d12fa01257069c35fb1385cba00c646822bc0fd9fa660d1edc085 + type_inferenced_ast: 6d3fcd70910f98e8980782b2d87ac394debd331dc54167df5cc8f58ea1f4477d diff --git a/tests/expectations/compiler/compiler/integers/i16/mul.leo.out b/tests/expectations/compiler/compiler/integers/i16/mul.leo.out index b2b7d3c9fb..213c7903ac 100644 --- a/tests/expectations/compiler/compiler/integers/i16/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/mul.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: c8d52b9372a99a546d481f6c4591c271f93b866d0ab52f476e78bb504759298a - canonicalized_ast: c8d52b9372a99a546d481f6c4591c271f93b866d0ab52f476e78bb504759298a - type_inferenced_ast: 44225cf9afb1fb954fe022c8a1522149c39272af12e56ce3c93fa147c2495460 + initial_ast: 8ada3ff469df0290e1dbb7f3fa12d094710cd68249fb6083c27eaea7f95a1cbb + canonicalized_ast: 8ada3ff469df0290e1dbb7f3fa12d094710cd68249fb6083c27eaea7f95a1cbb + type_inferenced_ast: 83c7e2a44566f7829e05668d44f940c045e3174db2729508d711b7eb8f848753 diff --git a/tests/expectations/compiler/compiler/integers/i16/ne.leo.out b/tests/expectations/compiler/compiler/integers/i16/ne.leo.out index 0b9387375e..86e717f877 100644 --- a/tests/expectations/compiler/compiler/integers/i16/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/ne.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 94b4015d8da05386aa665ec4b08ac25fa233d5f1ea0077f9d365ccd61963e3b5 - canonicalized_ast: 94b4015d8da05386aa665ec4b08ac25fa233d5f1ea0077f9d365ccd61963e3b5 - type_inferenced_ast: 1cd8bc86facc3512ce1dbc3fdb9cc9ef247523546ac99d39b3e9d14edad585b2 + initial_ast: 6fdf2386103f6bf3d5f551149b5f565f60ceb5181caca425668127be3e945884 + canonicalized_ast: 6fdf2386103f6bf3d5f551149b5f565f60ceb5181caca425668127be3e945884 + type_inferenced_ast: 4c373148bcec4f7d483cc9c560eb079746765c00a5e51c303449a9181696fae0 diff --git a/tests/expectations/compiler/compiler/integers/i16/negate.leo.out b/tests/expectations/compiler/compiler/integers/i16/negate.leo.out index 505c09c9f8..4129d6126a 100644 --- a/tests/expectations/compiler/compiler/integers/i16/negate.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/negate.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: d3769cf2fe2c68d0d3d6efa85eb78227470f321fff28a1fb09eecd887f1d9377 - canonicalized_ast: d3769cf2fe2c68d0d3d6efa85eb78227470f321fff28a1fb09eecd887f1d9377 - type_inferenced_ast: 4b73146b8f8a1a663122fda1b28610e66a37cae020eb3e4a714c58e6e906bbb5 + initial_ast: 78b70e6ae55381a259898d0ffbc671c24841583e81b57e2f354bc1de69060818 + canonicalized_ast: 78b70e6ae55381a259898d0ffbc671c24841583e81b57e2f354bc1de69060818 + type_inferenced_ast: d38e16eaab8936e730c5aed27b7bcdee553374dc14879e2007137e529aea1a71 diff --git a/tests/expectations/compiler/compiler/integers/i16/negate_min.leo.out b/tests/expectations/compiler/compiler/integers/i16/negate_min.leo.out index edb3d47847..67eb91d545 100644 --- a/tests/expectations/compiler/compiler/integers/i16/negate_min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/negate_min.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 6cf050d7488737deb6ac639e9d35ed7237d951318330ff2843c8f5bc8dced47e - canonicalized_ast: 6cf050d7488737deb6ac639e9d35ed7237d951318330ff2843c8f5bc8dced47e - type_inferenced_ast: 0f53280293d48fd77a456e4824dd3c7cc9fddef7848cef1fcddebe57957f984e + initial_ast: 4a65eba57cd4644e8470ab20438d6777573f513b1f5d922cd99d4114eac64c8c + canonicalized_ast: 4a65eba57cd4644e8470ab20438d6777573f513b1f5d922cd99d4114eac64c8c + type_inferenced_ast: bc8a7a7ea6867eadfdc5fe662239f591b6d2d2dfc46af9021376338294eeccea diff --git a/tests/expectations/compiler/compiler/integers/i16/negate_zero.leo.out b/tests/expectations/compiler/compiler/integers/i16/negate_zero.leo.out index cb76c33eaf..9b9a95d776 100644 --- a/tests/expectations/compiler/compiler/integers/i16/negate_zero.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/negate_zero.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: dae33b99995f0c9a93f013ff9e86b32147ceca3aacf46b98e0b2bef8f3b9737d - canonicalized_ast: dae33b99995f0c9a93f013ff9e86b32147ceca3aacf46b98e0b2bef8f3b9737d - type_inferenced_ast: 18fdbd89358b33dde12e670258801b963366a931028228c7f2ad1b08ee200638 + initial_ast: 59f05a78cd18913660f463f5ee7bc407f5a3893fb36049fabf385b7ad0b826d3 + canonicalized_ast: 59f05a78cd18913660f463f5ee7bc407f5a3893fb36049fabf385b7ad0b826d3 + type_inferenced_ast: 0d90246cadbc95713dc45b0d09330d532cc9e6fd206b4c9426876f8ba25f2bd2 diff --git a/tests/expectations/compiler/compiler/integers/i16/sub.leo.out b/tests/expectations/compiler/compiler/integers/i16/sub.leo.out index 19b54f7e66..51a8b60107 100644 --- a/tests/expectations/compiler/compiler/integers/i16/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/sub.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: b99849ab9fda79207a1d127b21832deb2519516e289bc662fbcc310af3865c88 - canonicalized_ast: b99849ab9fda79207a1d127b21832deb2519516e289bc662fbcc310af3865c88 - type_inferenced_ast: fdbce14f1e4d7392b6113638a35c3fea10c731061661cf29cc7c435cd935491d + initial_ast: 385d1b0ffca199ec557e28fc9b51b40414c458b01ab549f67772f45064da727f + canonicalized_ast: 385d1b0ffca199ec557e28fc9b51b40414c458b01ab549f67772f45064da727f + type_inferenced_ast: af05a924222674c6d50fec716217083cd675424c6e04840ece1d1c2f39fd5345 diff --git a/tests/expectations/compiler/compiler/integers/i16/ternary.leo.out b/tests/expectations/compiler/compiler/integers/i16/ternary.leo.out index 0b9f2eeb4a..d943b090db 100644 --- a/tests/expectations/compiler/compiler/integers/i16/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/ternary.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: cf779aa13cc10a2d75005bc9e00f2bc7f05e6ce36bea5811866da0d87d4c51ad - canonicalized_ast: cf779aa13cc10a2d75005bc9e00f2bc7f05e6ce36bea5811866da0d87d4c51ad - type_inferenced_ast: c05c5c84b6a83abb65aaf4c089737a1ebd86a6486083bf2128c2bca12958d33a + initial_ast: b77183d532a218611aff8db0203b9a043a2e8f5acacf5e03b79a27c75d566d26 + canonicalized_ast: b77183d532a218611aff8db0203b9a043a2e8f5acacf5e03b79a27c75d566d26 + type_inferenced_ast: 88c4cd08d33755f4990b5dacd9884730499781a128ebc01b616e3b93897476c4 diff --git a/tests/expectations/compiler/compiler/integers/i32/add.leo.out b/tests/expectations/compiler/compiler/integers/i32/add.leo.out index 2a77444462..ebaa4dc882 100644 --- a/tests/expectations/compiler/compiler/integers/i32/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/add.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: ed7931aecce4acc246c5fcc70e0264b5b573e0a3c73aac23bad0db0cdefd6f7c - canonicalized_ast: ed7931aecce4acc246c5fcc70e0264b5b573e0a3c73aac23bad0db0cdefd6f7c - type_inferenced_ast: 9d835982907623f63204f1b181f14baf4d8b51bf2a274b1035fcc7d100d80f9c + initial_ast: e867242ead014273d3c7f6829e55851b9e2b01883b55499dfdce94b45c9ebb7d + canonicalized_ast: e867242ead014273d3c7f6829e55851b9e2b01883b55499dfdce94b45c9ebb7d + type_inferenced_ast: 3575a9b8ffa5f5ec96c86dab2230e3333d6525b38789b0b1b8cbc44df3d9c190 diff --git a/tests/expectations/compiler/compiler/integers/i32/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/i32/console_assert.leo.out index 8f5275b762..095005acde 100644 --- a/tests/expectations/compiler/compiler/integers/i32/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/console_assert.leo.out @@ -13,6 +13,6 @@ outputs: - input_file: i32.in output: registers: {} - initial_ast: b09faa2b600e664eca4d5ebcb1365ee0c71c814755ecefe0f13b39400cab881f - canonicalized_ast: dec0b5748739766befb71f405fb73d5bcb6cddc693bde5c92976c48aa291ff72 - type_inferenced_ast: 224d5e773b39805a5f4f7cee153ac46af1a1c4793774eb9cab0f921131a3447f + initial_ast: c2a72c4ab80cce9d171a487cfaf2a930a4ee9191298786335af894d483e58857 + canonicalized_ast: 4cea550893a8ccb47451f8c54a8f568c2ca29c8a73a4d4a6e6c3fe69ea081e20 + type_inferenced_ast: c7c946c493772f30c641a53a56a410c9a17af557b24fa6411af7162b8cf49394 diff --git a/tests/expectations/compiler/compiler/integers/i32/div.leo.out b/tests/expectations/compiler/compiler/integers/i32/div.leo.out index a720017153..c1bad5b24c 100644 --- a/tests/expectations/compiler/compiler/integers/i32/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/div.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: d5d18e03b5cfafc01eced52338728703c4e0f3a8ead4ecd879c7d7656b3e1f1a - canonicalized_ast: d5d18e03b5cfafc01eced52338728703c4e0f3a8ead4ecd879c7d7656b3e1f1a - type_inferenced_ast: 3a5000a6619cd8f5a55da7cab198e3bf26989c4767d6897c59df5b92ca2008ff + initial_ast: aeb8257825486463ebfd0b8f24c68960cbe1d214841e28233f9971c61fa869cb + canonicalized_ast: aeb8257825486463ebfd0b8f24c68960cbe1d214841e28233f9971c61fa869cb + type_inferenced_ast: 68e6a4be72ecc4d11831756e72591474765077951f919f7bc511fa37fd40ac24 diff --git a/tests/expectations/compiler/compiler/integers/i32/eq.leo.out b/tests/expectations/compiler/compiler/integers/i32/eq.leo.out index 98a9432ca6..abbda763bb 100644 --- a/tests/expectations/compiler/compiler/integers/i32/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/eq.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 24e9d0ebbf651ed584519189bfe7aee59199997204c58cfd3c4f14cea0f7f628 - canonicalized_ast: 24e9d0ebbf651ed584519189bfe7aee59199997204c58cfd3c4f14cea0f7f628 - type_inferenced_ast: 8536be9c3a56f295d1d8cf9c5c034b5ea8c51f384245f222f6809336e96d4324 + initial_ast: 2398622edbbd3f627a9d39f056c359fb00ca8d4ff393ac784ab809ebbe2dbc87 + canonicalized_ast: 2398622edbbd3f627a9d39f056c359fb00ca8d4ff393ac784ab809ebbe2dbc87 + type_inferenced_ast: 6492773ea5bdcbcdfb0b846a8e5446cefe7a1417033a07c0207308c7870c5753 diff --git a/tests/expectations/compiler/compiler/integers/i32/ge.leo.out b/tests/expectations/compiler/compiler/integers/i32/ge.leo.out index f4ffb50e81..759df606c9 100644 --- a/tests/expectations/compiler/compiler/integers/i32/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/ge.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 64d73d49eb1fcb14180456031975ca5eced3950c1ce187a1c031308d9f15faa7 - canonicalized_ast: 64d73d49eb1fcb14180456031975ca5eced3950c1ce187a1c031308d9f15faa7 - type_inferenced_ast: 147f1c62f5fa78d12dad891ebaebb13f8a72466f360531eba7c06a4c64ae86e7 + initial_ast: d48fecdcedb16ee73c9206b370c525c1e76fed03e8465eb3a139deef81d74c1e + canonicalized_ast: d48fecdcedb16ee73c9206b370c525c1e76fed03e8465eb3a139deef81d74c1e + type_inferenced_ast: 0542e9c4cae0e395a5b0bfc0b190064a4f8cbf1ea1d87be62943a8b8f4ef1503 diff --git a/tests/expectations/compiler/compiler/integers/i32/gt.leo.out b/tests/expectations/compiler/compiler/integers/i32/gt.leo.out index b65b2c3ac7..618d4d6b96 100644 --- a/tests/expectations/compiler/compiler/integers/i32/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/gt.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: ab52dcf22b3b470626bf2ddf4f37671d64a889ad4f4d59e7d919a89c0dbfc2e3 - canonicalized_ast: ab52dcf22b3b470626bf2ddf4f37671d64a889ad4f4d59e7d919a89c0dbfc2e3 - type_inferenced_ast: 0f5bd273b878011c7faa012bfe0f52103b1b46fcb3b95f9179b564f0c8b083f4 + initial_ast: 2400dfd1d48a4543a52a23ddb2f8da736d42dbfbd6a7d9831b7751e4cb278125 + canonicalized_ast: 2400dfd1d48a4543a52a23ddb2f8da736d42dbfbd6a7d9831b7751e4cb278125 + type_inferenced_ast: 5e5227aff1ba94756a53585d4f6f0749216ae54e2e33fa30f268fe774025933d diff --git a/tests/expectations/compiler/compiler/integers/i32/le.leo.out b/tests/expectations/compiler/compiler/integers/i32/le.leo.out index 538cc5ff58..42b1744479 100644 --- a/tests/expectations/compiler/compiler/integers/i32/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/le.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 75bfd668757f4cecc7332c3b838e0f5ff9ef2096ae697877f1bc2eddbdfdb956 - canonicalized_ast: 75bfd668757f4cecc7332c3b838e0f5ff9ef2096ae697877f1bc2eddbdfdb956 - type_inferenced_ast: fa14d06e8d288439bf48b1345b2dfc294012d927624466331b152f6d90d4717e + initial_ast: 79661a6c772991cbf0784607b942ddb356b8af566e3faa5cf1f8865edaeed36e + canonicalized_ast: 79661a6c772991cbf0784607b942ddb356b8af566e3faa5cf1f8865edaeed36e + type_inferenced_ast: c4c7a350f77be14beb28f65218146d4cb9dc1e93b43d14cbd5c2b177b21ed4d6 diff --git a/tests/expectations/compiler/compiler/integers/i32/lt.leo.out b/tests/expectations/compiler/compiler/integers/i32/lt.leo.out index 64769c6a5a..880956d247 100644 --- a/tests/expectations/compiler/compiler/integers/i32/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/lt.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 311be6e4af216210e43dbee415bd65fc2cf1b16cfc91a7f6037fa0ed91356a0d - canonicalized_ast: 311be6e4af216210e43dbee415bd65fc2cf1b16cfc91a7f6037fa0ed91356a0d - type_inferenced_ast: d77aa422e72ba19be49de7aeba1445b6e335edb7f76731f57fc95558aff9793c + initial_ast: 6b82c3a9c3cea936a71ba9e75aac084cbfebe9ebb69483dd40e4ed8996705699 + canonicalized_ast: 6b82c3a9c3cea936a71ba9e75aac084cbfebe9ebb69483dd40e4ed8996705699 + type_inferenced_ast: e27449f028c9e2fd55193bc63ed828fbb4b570847d4c3abf6332d80150963474 diff --git a/tests/expectations/compiler/compiler/integers/i32/max.leo.out b/tests/expectations/compiler/compiler/integers/i32/max.leo.out index 099495f33c..357397ce29 100644 --- a/tests/expectations/compiler/compiler/integers/i32/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/max.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 5ffa08f1bd05a2f9fccb47a59ab3156ea74052976dd53757b6264b4183bfe1e9 - canonicalized_ast: 5ffa08f1bd05a2f9fccb47a59ab3156ea74052976dd53757b6264b4183bfe1e9 - type_inferenced_ast: 30cb87c5b554a4e2a60702a7e5931a2a421dcf3b47a08d21cb79e164377f3c31 + initial_ast: 7781647f89d8ee15673130bce176dc295ae269680f6b8283dc40e188233a6522 + canonicalized_ast: 7781647f89d8ee15673130bce176dc295ae269680f6b8283dc40e188233a6522 + type_inferenced_ast: 3b4c83cf724723beece52d8beca13295a41b94b07c9fe6ded1b1ce06ee58d525 diff --git a/tests/expectations/compiler/compiler/integers/i32/min.leo.out b/tests/expectations/compiler/compiler/integers/i32/min.leo.out index c02fee0f9d..1907b6427e 100644 --- a/tests/expectations/compiler/compiler/integers/i32/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/min.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 96905722f145d9ca26364477885f5a02ba6f610b3cd704ca458ad30affcd1099 - canonicalized_ast: 96905722f145d9ca26364477885f5a02ba6f610b3cd704ca458ad30affcd1099 - type_inferenced_ast: 3393f70f2cad4ad7793a732d29a46006c60a53e33bd651aa4475fa1423436c0e + initial_ast: 7a10c1da523c0929e30db9ffda38a23978a8ec6114db4c5745f6acd766c8b861 + canonicalized_ast: 7a10c1da523c0929e30db9ffda38a23978a8ec6114db4c5745f6acd766c8b861 + type_inferenced_ast: 33d60b91125897d8efb05c8df8df7f2eb6f10f9f74a69f7b954933916f3e2937 diff --git a/tests/expectations/compiler/compiler/integers/i32/mul.leo.out b/tests/expectations/compiler/compiler/integers/i32/mul.leo.out index 7d83874237..f592780112 100644 --- a/tests/expectations/compiler/compiler/integers/i32/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/mul.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 7ff114251124c9ab97133a9adf375c1d8ce4365399ac95776aec0cb336b66857 - canonicalized_ast: 7ff114251124c9ab97133a9adf375c1d8ce4365399ac95776aec0cb336b66857 - type_inferenced_ast: 748f269f5eb1f5a0d278c122d810151a662dae5bc175ff0f33f203b5a72dc16e + initial_ast: 685076ff4cb6847b0c44552796371d14bc6a0edc1d1cb78c98c84134345bb7ac + canonicalized_ast: 685076ff4cb6847b0c44552796371d14bc6a0edc1d1cb78c98c84134345bb7ac + type_inferenced_ast: e064f9845933cccaccc411d9837ffa1e36d158cac25dc9529ab940532211add3 diff --git a/tests/expectations/compiler/compiler/integers/i32/ne.leo.out b/tests/expectations/compiler/compiler/integers/i32/ne.leo.out index c8dcac7d7d..e6a4a8d212 100644 --- a/tests/expectations/compiler/compiler/integers/i32/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/ne.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: a09ebf839675ddc42a32b7f2fa4ea2d7e0d343c2c572259a5127015bf233ba3c - canonicalized_ast: a09ebf839675ddc42a32b7f2fa4ea2d7e0d343c2c572259a5127015bf233ba3c - type_inferenced_ast: e5fceb3e11ffb4e44578e1dc7ce0f84fb75f8c1167ddb2229355dc5348d6230e + initial_ast: b01fb5830de1334b20c40a846a0f5097059e1f23f7e03a93344b01a85daf45c0 + canonicalized_ast: b01fb5830de1334b20c40a846a0f5097059e1f23f7e03a93344b01a85daf45c0 + type_inferenced_ast: 9dee212732866b561e7543608592425fd8a70ae2d7e286cb56037bff66eb2714 diff --git a/tests/expectations/compiler/compiler/integers/i32/negate.leo.out b/tests/expectations/compiler/compiler/integers/i32/negate.leo.out index e4fb159445..52194d22a7 100644 --- a/tests/expectations/compiler/compiler/integers/i32/negate.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/negate.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: bcf180202292e16413e1a74fdecec6cf0e94aba79f6ca27f7be198ee34def8b4 - canonicalized_ast: bcf180202292e16413e1a74fdecec6cf0e94aba79f6ca27f7be198ee34def8b4 - type_inferenced_ast: 32ed0dbf2810896e4d9c0d2708fb35a1624a1422af814619cd93e613e2d2a3bf + initial_ast: 6d1ee39de9724740815e6ae902cc6d554c68b25d52c46e8a083891edd44d5115 + canonicalized_ast: 6d1ee39de9724740815e6ae902cc6d554c68b25d52c46e8a083891edd44d5115 + type_inferenced_ast: d79fcaaf02bff685eab7de7678089cbcf5a2094cc2e93572f666439aeaad48ab diff --git a/tests/expectations/compiler/compiler/integers/i32/negate_min.leo.out b/tests/expectations/compiler/compiler/integers/i32/negate_min.leo.out index cf4aadd6f1..a5095f76da 100644 --- a/tests/expectations/compiler/compiler/integers/i32/negate_min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/negate_min.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: a09954841faa5b5bf932a11ce8f7cfe70ed071d142f84d739097af575e37ebc7 - canonicalized_ast: a09954841faa5b5bf932a11ce8f7cfe70ed071d142f84d739097af575e37ebc7 - type_inferenced_ast: 25d96687492f697cc03d2e33ea72e9002dc2a2f8883bae8c2b860059ed5f096c + initial_ast: 405c4feb62723fd057a5c48607083f5f4b1759d00ff8cdc5f98c94d32fa9e85e + canonicalized_ast: 405c4feb62723fd057a5c48607083f5f4b1759d00ff8cdc5f98c94d32fa9e85e + type_inferenced_ast: 6afa590ff464ad10a01dfb115a6975cafde1ee3a69c03a97e1226512bf8679ed diff --git a/tests/expectations/compiler/compiler/integers/i32/negate_zero.leo.out b/tests/expectations/compiler/compiler/integers/i32/negate_zero.leo.out index 771f4234a3..393e6d292d 100644 --- a/tests/expectations/compiler/compiler/integers/i32/negate_zero.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/negate_zero.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 72cdb12999123312de44506f69f9af9ed7b3ef81e45a95e250d8f2789ac5cc00 - canonicalized_ast: 72cdb12999123312de44506f69f9af9ed7b3ef81e45a95e250d8f2789ac5cc00 - type_inferenced_ast: 6243dd13bbba533d36f4e229665e4f3d1b1dbac9a937d97b128128ec61020093 + initial_ast: 3c96a559318d5e876326f4ceef8db9b0f90330206b0be63cc1fcd33963b8db3a + canonicalized_ast: 3c96a559318d5e876326f4ceef8db9b0f90330206b0be63cc1fcd33963b8db3a + type_inferenced_ast: e33caf2a6323f9e4926a29ebe4f566a1a4959afc48eaf50d80be3be8c3e18373 diff --git a/tests/expectations/compiler/compiler/integers/i32/sub.leo.out b/tests/expectations/compiler/compiler/integers/i32/sub.leo.out index ac620bcb46..439b852dab 100644 --- a/tests/expectations/compiler/compiler/integers/i32/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/sub.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 4f93499d651e663a396044e2b971aaeefb824f6f828ad0512d027bab667c4b51 - canonicalized_ast: 4f93499d651e663a396044e2b971aaeefb824f6f828ad0512d027bab667c4b51 - type_inferenced_ast: 67e4684b11d2ca84c5227b9cf691c7f0a8f1697a5bd9b0b1430fcc3176d6f19d + initial_ast: b8bc1c1d83f538c7f2627dda8c7a274586cab99dcc8c819fca0f1985a39c9a0e + canonicalized_ast: b8bc1c1d83f538c7f2627dda8c7a274586cab99dcc8c819fca0f1985a39c9a0e + type_inferenced_ast: 0462f78b7aedf61b4f79b2cd3b8c61bc58782d79496188f4ad00bcb5026a6eaf diff --git a/tests/expectations/compiler/compiler/integers/i32/ternary.leo.out b/tests/expectations/compiler/compiler/integers/i32/ternary.leo.out index c29a29d1af..483edb8ccf 100644 --- a/tests/expectations/compiler/compiler/integers/i32/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/ternary.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: e3eab05143c98c60086cf18f88916a24ff216a432ce8f6d4066bee7fcbb122f4 - canonicalized_ast: e3eab05143c98c60086cf18f88916a24ff216a432ce8f6d4066bee7fcbb122f4 - type_inferenced_ast: c4dac1a181bc4434de50d58b486d070462828381a70e47d1ea89362e1a6b6368 + initial_ast: a3f58f20e2b332bf45444ee4b14b9c5e3680bb64301595bd9da7cc615aea117b + canonicalized_ast: a3f58f20e2b332bf45444ee4b14b9c5e3680bb64301595bd9da7cc615aea117b + type_inferenced_ast: b60128ddfb24ca1130e67082e31ffab0802b4b9ffd164cacc730390349237ee1 diff --git a/tests/expectations/compiler/compiler/integers/i64/add.leo.out b/tests/expectations/compiler/compiler/integers/i64/add.leo.out index efee455256..1c6882b2ad 100644 --- a/tests/expectations/compiler/compiler/integers/i64/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/add.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: a19d8f1eac8720b384e8e665854dd581c6e5965fc3e1134ca0deec3d8b92e270 - canonicalized_ast: a19d8f1eac8720b384e8e665854dd581c6e5965fc3e1134ca0deec3d8b92e270 - type_inferenced_ast: 4d1f7ccc44cc7a660a526b217896b37eaa419a3c7bba3be4d480472632fc5169 + initial_ast: 043a24e3e8b53b5f647e12862256dc3bd2219d02cc51d746e4c9e85a57d152d7 + canonicalized_ast: 043a24e3e8b53b5f647e12862256dc3bd2219d02cc51d746e4c9e85a57d152d7 + type_inferenced_ast: b8e4f7de1c4065b327f08317bb9adef204cd09e9fe2cf0ee0875fa9f80e0334a diff --git a/tests/expectations/compiler/compiler/integers/i64/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/i64/console_assert.leo.out index 455faacdae..f63fef5b87 100644 --- a/tests/expectations/compiler/compiler/integers/i64/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/console_assert.leo.out @@ -13,6 +13,6 @@ outputs: - input_file: i64.in output: registers: {} - initial_ast: 7ba4c48f6d8235115072db500e4cb0b597ab7e70e351dce7e52af13deb62441d - canonicalized_ast: 8cd5a43be85a978ece3350162fb6e641d2751ca2deb5907df0721e43fa77930c - type_inferenced_ast: ae2673cc191cdf939bc04e83416ad1c00f145e811a38a2ed04929ff4bcccfcda + initial_ast: 28b6e3766452fc6f1ee10ae35662ede0a0f5c4d1b9ac2c619a17a6bc649f963a + canonicalized_ast: be257d374b10905b8737b8910364057fed4c9ec7e1bb80430b8e09b484d2089f + type_inferenced_ast: 2cbe65a1aa234a9157553e9bc2838c6115f080108cdd4b30a3a467d183e0f5ef diff --git a/tests/expectations/compiler/compiler/integers/i64/div.leo.out b/tests/expectations/compiler/compiler/integers/i64/div.leo.out index b99b261785..2e038dbea8 100644 --- a/tests/expectations/compiler/compiler/integers/i64/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/div.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: a0adad68f7569e1150bd68f7d7f0b3324abbc5aee347224da28bf506cebeef6f - canonicalized_ast: a0adad68f7569e1150bd68f7d7f0b3324abbc5aee347224da28bf506cebeef6f - type_inferenced_ast: f79424932fe13d4fc5f1a8ff596baca4f203a879b44a8da07972d916c6d49642 + initial_ast: b90fd305c5208bf3eaebfda1df40384bbcdc840104f9b235caa01529deb7c05c + canonicalized_ast: b90fd305c5208bf3eaebfda1df40384bbcdc840104f9b235caa01529deb7c05c + type_inferenced_ast: f4061210d2c0607e84ff49b75e28cb3181dda81da611701d0ad9879860d973b6 diff --git a/tests/expectations/compiler/compiler/integers/i64/eq.leo.out b/tests/expectations/compiler/compiler/integers/i64/eq.leo.out index 354a5da6fc..bf5e107e7c 100644 --- a/tests/expectations/compiler/compiler/integers/i64/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/eq.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 6143bf42f68598d1ae4c6c10bec3c788589702de33f33363b4a85d204e8c2977 - canonicalized_ast: 6143bf42f68598d1ae4c6c10bec3c788589702de33f33363b4a85d204e8c2977 - type_inferenced_ast: a45fb0563c20062943b0d3fe9bb5a8f24d598b5b0c05c01faa34440c3ff526e2 + initial_ast: 00666c43ec1897cd0758ef4c5fc5ac25dce6330abdd10da33c5546a9c05de888 + canonicalized_ast: 00666c43ec1897cd0758ef4c5fc5ac25dce6330abdd10da33c5546a9c05de888 + type_inferenced_ast: 58ebc8997dec1f429496dcf539b93ce08b4ddbd85b83f741153bd0bd6631db2c diff --git a/tests/expectations/compiler/compiler/integers/i64/ge.leo.out b/tests/expectations/compiler/compiler/integers/i64/ge.leo.out index 86446744dd..99893272b7 100644 --- a/tests/expectations/compiler/compiler/integers/i64/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/ge.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 3b96e46e730d9a2fc0d95818b8f35af66eeb84fcd08cb328ff47d6b6f77455fb - canonicalized_ast: 3b96e46e730d9a2fc0d95818b8f35af66eeb84fcd08cb328ff47d6b6f77455fb - type_inferenced_ast: 6f50970ff4132830a9f55e31bd8293459bbc1859869325f3c8d69eb15e92f579 + initial_ast: f0ce8ad04c21417acd9b86eadabee54c3e63e1d902607883596e849aeffa51f9 + canonicalized_ast: f0ce8ad04c21417acd9b86eadabee54c3e63e1d902607883596e849aeffa51f9 + type_inferenced_ast: e38e74a0510712dda0b0e50b205a5ab31132dcb0e8622d215d1b3a1f7370844b diff --git a/tests/expectations/compiler/compiler/integers/i64/gt.leo.out b/tests/expectations/compiler/compiler/integers/i64/gt.leo.out index 0369121a94..fb0e09f293 100644 --- a/tests/expectations/compiler/compiler/integers/i64/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/gt.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 172a1c3edcc6927668e1c5f38528b1f78c728874440adccd8c87f4b6a7ccc6af - canonicalized_ast: 172a1c3edcc6927668e1c5f38528b1f78c728874440adccd8c87f4b6a7ccc6af - type_inferenced_ast: 42573daadf62d4df3a9974a97edcd921d593cfb680723b4932c4bfe5baf1b432 + initial_ast: 8bb288b0ec5e1330ccf9fef1a26a872295a79bf128fd566e3c14cdc4dbfc0bc4 + canonicalized_ast: 8bb288b0ec5e1330ccf9fef1a26a872295a79bf128fd566e3c14cdc4dbfc0bc4 + type_inferenced_ast: 96fdeedf1a1af69369792208228d4df5f3f2bfa98e33a026d658278470071bc9 diff --git a/tests/expectations/compiler/compiler/integers/i64/le.leo.out b/tests/expectations/compiler/compiler/integers/i64/le.leo.out index cdc58215c4..9b6cef7e16 100644 --- a/tests/expectations/compiler/compiler/integers/i64/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/le.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 0cc8b97a18efb078bd2b7c2bee2e7631d0a083ece45daa941329ec19763b8181 - canonicalized_ast: 0cc8b97a18efb078bd2b7c2bee2e7631d0a083ece45daa941329ec19763b8181 - type_inferenced_ast: eba243640565380ffe415b2cfe4a2abdcdb19c0d0d1f403751850d2e058eb2fc + initial_ast: 1f2b2def4134a9c6b6e4c1d2763c75ec517926fe8842e500b337da8e91e8d118 + canonicalized_ast: 1f2b2def4134a9c6b6e4c1d2763c75ec517926fe8842e500b337da8e91e8d118 + type_inferenced_ast: 26bf92382ad5c5dfbe5ad3b80fd3223398727da3cb1c46e5651fb09ce28370bf diff --git a/tests/expectations/compiler/compiler/integers/i64/lt.leo.out b/tests/expectations/compiler/compiler/integers/i64/lt.leo.out index ce06fd1d10..db0628ead8 100644 --- a/tests/expectations/compiler/compiler/integers/i64/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/lt.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 9e3ed2af071e49a800025960397ae2d5333fee559f0000af9ee0b4419a6f920c - canonicalized_ast: 9e3ed2af071e49a800025960397ae2d5333fee559f0000af9ee0b4419a6f920c - type_inferenced_ast: 5e14fe658cd961cd01024f00b47600963130f734511c28ac2a88e2433284096e + initial_ast: 7a72ead766ad1d8c40478170a0fb368b02a2f717030340d34c52a9ab078d106b + canonicalized_ast: 7a72ead766ad1d8c40478170a0fb368b02a2f717030340d34c52a9ab078d106b + type_inferenced_ast: 4e277d241e9083c6d49f07a0f7b923eeda50b3868953dbecd2d5e9ecccf873fb diff --git a/tests/expectations/compiler/compiler/integers/i64/max.leo.out b/tests/expectations/compiler/compiler/integers/i64/max.leo.out index 8eb7c50d12..3df49b0549 100644 --- a/tests/expectations/compiler/compiler/integers/i64/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/max.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: e2d6aeb825b3874930df4869f06158fa083e579e993eb763501b9697baf1f357 - canonicalized_ast: e2d6aeb825b3874930df4869f06158fa083e579e993eb763501b9697baf1f357 - type_inferenced_ast: f710ae7aa8fcfd5d24a8308b12f43d6cd026766019195d6b6c2a1a59ab967253 + initial_ast: d9658434c1b68f4d19bb9e68696f2f8abd4669f5f199a526161dff7d01f3603d + canonicalized_ast: d9658434c1b68f4d19bb9e68696f2f8abd4669f5f199a526161dff7d01f3603d + type_inferenced_ast: 3be7d4fac8f7d61e044038ae0b93599b6293bb108f39244c3a60ea25426b0014 diff --git a/tests/expectations/compiler/compiler/integers/i64/min.leo.out b/tests/expectations/compiler/compiler/integers/i64/min.leo.out index 66ecb017a3..0ee662b3c0 100644 --- a/tests/expectations/compiler/compiler/integers/i64/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/min.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 4e494a93f55d05a995e91a89ccfc91fad59fdec2591a450c86ccef6be8bbe8c2 - canonicalized_ast: 4e494a93f55d05a995e91a89ccfc91fad59fdec2591a450c86ccef6be8bbe8c2 - type_inferenced_ast: f83643f132cef898952fd3881dbebd34bdc6bc985c8c51c21444786185850dda + initial_ast: 95db7e46acbe1f4ef5a0050a2920f642b8ca12b5583126c0d41ad70dd527eab7 + canonicalized_ast: 95db7e46acbe1f4ef5a0050a2920f642b8ca12b5583126c0d41ad70dd527eab7 + type_inferenced_ast: 0a8aa38462d6c8388a5f90de48118bf4639276aaee62982befff0fc2c315a6e5 diff --git a/tests/expectations/compiler/compiler/integers/i64/mul.leo.out b/tests/expectations/compiler/compiler/integers/i64/mul.leo.out index cd32086493..93d2f34237 100644 --- a/tests/expectations/compiler/compiler/integers/i64/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/mul.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 3bbc44a1b7f01881acadbcd6d894866fa9ed3c59396a57a00daf5cba1ba876ef - canonicalized_ast: 3bbc44a1b7f01881acadbcd6d894866fa9ed3c59396a57a00daf5cba1ba876ef - type_inferenced_ast: 5e5a00fe1293154a9fe59b4e9cd5aa3f534ba8ee0ea6a008af3c4d1581ec55ef + initial_ast: 08ed84d4fdd3cc1e18811bfd7e4ebd6470b77db0320156190fcc1633ea75d185 + canonicalized_ast: 08ed84d4fdd3cc1e18811bfd7e4ebd6470b77db0320156190fcc1633ea75d185 + type_inferenced_ast: 3745fc6450f24bd989409077819614e9188f9a0f7af9e8cdd0d6eed11bebca9f diff --git a/tests/expectations/compiler/compiler/integers/i64/ne.leo.out b/tests/expectations/compiler/compiler/integers/i64/ne.leo.out index e97c90e28c..d5b477955a 100644 --- a/tests/expectations/compiler/compiler/integers/i64/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/ne.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: fd372935c57e3b86ed7129f416049611bfd61aab5a1e758e2ad822900d707f20 - canonicalized_ast: fd372935c57e3b86ed7129f416049611bfd61aab5a1e758e2ad822900d707f20 - type_inferenced_ast: a0a016da3010338983bec3d55e4c94235b086f95ef0b56d26590c6f5ed960786 + initial_ast: c1e15e7bf0b3a581f1740c3bc13a7f3b65018efee79a0fd2df8a9083ffe3fd8b + canonicalized_ast: c1e15e7bf0b3a581f1740c3bc13a7f3b65018efee79a0fd2df8a9083ffe3fd8b + type_inferenced_ast: 004a04b4a76998b0dbb3746af430587608229db3d7c6caec82f705abfdbf8d7f diff --git a/tests/expectations/compiler/compiler/integers/i64/negate.leo.out b/tests/expectations/compiler/compiler/integers/i64/negate.leo.out index fd435b1852..9ddbf30cfa 100644 --- a/tests/expectations/compiler/compiler/integers/i64/negate.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/negate.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 8ee56c3231d8e560ab6f6a3dae0171574e19ec5216cf30d0cda89f3a0cab90d9 - canonicalized_ast: 8ee56c3231d8e560ab6f6a3dae0171574e19ec5216cf30d0cda89f3a0cab90d9 - type_inferenced_ast: 1c15a351f8c97ddcea85e4c801bdf1d404fec0c7ffc33418d91a281386a644df + initial_ast: 4c2f1403554f27f5e437477dc86db86bc7888d0faa60983ce66a451ec08c5c6f + canonicalized_ast: 4c2f1403554f27f5e437477dc86db86bc7888d0faa60983ce66a451ec08c5c6f + type_inferenced_ast: a043ffc8fb3f8505916b04e51fbdb753ede14f012e838b267fa3f35c70b61fc4 diff --git a/tests/expectations/compiler/compiler/integers/i64/negate_min.leo.out b/tests/expectations/compiler/compiler/integers/i64/negate_min.leo.out index d8734bb928..a17009a849 100644 --- a/tests/expectations/compiler/compiler/integers/i64/negate_min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/negate_min.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 6deec000571afa23c066c2a3931468d7ed3e9bcb69e5322a8b99cd523beac2a2 - canonicalized_ast: 6deec000571afa23c066c2a3931468d7ed3e9bcb69e5322a8b99cd523beac2a2 - type_inferenced_ast: 806d1130f86aca58a3fe5b9cf34ebb901c54f358c70543cd50bc6e084f17c877 + initial_ast: 49b9ce4d8db36da75cc9d1c219de09544211bb798ed732cf4e7ab3c3020bef46 + canonicalized_ast: 49b9ce4d8db36da75cc9d1c219de09544211bb798ed732cf4e7ab3c3020bef46 + type_inferenced_ast: 9b99d299dc2cf83b1f7d42b65f1c608cf2d8b643998519f86279c52ce753c9aa diff --git a/tests/expectations/compiler/compiler/integers/i64/negate_zero.leo.out b/tests/expectations/compiler/compiler/integers/i64/negate_zero.leo.out index f86b09048a..ccf10ad146 100644 --- a/tests/expectations/compiler/compiler/integers/i64/negate_zero.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/negate_zero.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 5679ed50a7a7ed7f1ab6a1d942ce24191fd29a6030daa5edf945e83879fdd6d9 - canonicalized_ast: 5679ed50a7a7ed7f1ab6a1d942ce24191fd29a6030daa5edf945e83879fdd6d9 - type_inferenced_ast: c93b0a2aa90366daf46f8fee9c13e8d83962222e14ac4aa844b229c5f467e12c + initial_ast: 080706861414ec2965a7d5cb3a9d09e8870fdf18ab9521f31b6f50f868b18d71 + canonicalized_ast: 080706861414ec2965a7d5cb3a9d09e8870fdf18ab9521f31b6f50f868b18d71 + type_inferenced_ast: 0fbe33071492a89813a64102acb80b8e55c2f5cc6710fe9a7b43fd514429d7cc diff --git a/tests/expectations/compiler/compiler/integers/i64/sub.leo.out b/tests/expectations/compiler/compiler/integers/i64/sub.leo.out index 621938508a..a2d9a8de4c 100644 --- a/tests/expectations/compiler/compiler/integers/i64/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/sub.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 9037d67a80b33da1f5ae77c7a29d0af5c8db3b5e7bcfac6793166acb65c500dc - canonicalized_ast: 9037d67a80b33da1f5ae77c7a29d0af5c8db3b5e7bcfac6793166acb65c500dc - type_inferenced_ast: 6deffd2dc3870849f06ffc0e2475931663d37e5137e4f41f4b0654b752c7e19f + initial_ast: 5570bb473f58cc6a5ddb788adf577cae71d57672bf185873faf1f1609472e4a2 + canonicalized_ast: 5570bb473f58cc6a5ddb788adf577cae71d57672bf185873faf1f1609472e4a2 + type_inferenced_ast: cb4a8e39015b686e3784c3e52ae2720168888b4d099136efb3459a0cbb49ebf1 diff --git a/tests/expectations/compiler/compiler/integers/i64/ternary.leo.out b/tests/expectations/compiler/compiler/integers/i64/ternary.leo.out index 5732e45ebe..1e0c828501 100644 --- a/tests/expectations/compiler/compiler/integers/i64/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/ternary.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: e14c37158974d8f108e5fd14e798ad1932f9f5c2996dc0179423ce32b7e87aac - canonicalized_ast: e14c37158974d8f108e5fd14e798ad1932f9f5c2996dc0179423ce32b7e87aac - type_inferenced_ast: 40d390225e762348d072fb46f81a57f35e117a0827701f83e52ef14bf4edbd00 + initial_ast: ccb0e39c6789d3484f5511d3dfa2797deb2bc06d72d741f6782c8926a1de9c85 + canonicalized_ast: ccb0e39c6789d3484f5511d3dfa2797deb2bc06d72d741f6782c8926a1de9c85 + type_inferenced_ast: 80dae2513fecac5b28781bb03dea1f5e84325d8b7e09d89eb6415a2c55ef0544 diff --git a/tests/expectations/compiler/compiler/integers/i8/add.leo.out b/tests/expectations/compiler/compiler/integers/i8/add.leo.out index 536c64ce09..294e8ba6d7 100644 --- a/tests/expectations/compiler/compiler/integers/i8/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/add.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 03abb91b9b5fd679775bb9898ffc6fdd80db136c1cf61e3676760a90c673691d - canonicalized_ast: 03abb91b9b5fd679775bb9898ffc6fdd80db136c1cf61e3676760a90c673691d - type_inferenced_ast: f1defb3b6cedd0f81a7b7b95cfeab974445db3e9c6667864293e7cd0f42919e1 + initial_ast: 0345f356aa7f85a3f9ed679c405d7821e3f8e33cc0c2e384f6f363249d9ed1a7 + canonicalized_ast: 0345f356aa7f85a3f9ed679c405d7821e3f8e33cc0c2e384f6f363249d9ed1a7 + type_inferenced_ast: a26548a04ecbf21ebec0bbc0e82b6f4c90ed64fe8dd77f93262a92a9117d4308 diff --git a/tests/expectations/compiler/compiler/integers/i8/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/i8/console_assert.leo.out index 924579e3c9..01a72303c7 100644 --- a/tests/expectations/compiler/compiler/integers/i8/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/console_assert.leo.out @@ -13,6 +13,6 @@ outputs: - input_file: i8.in output: registers: {} - initial_ast: 563e73d37eb34f862f8a2ba022712de63ce4b128f11a1ca95190e12406d9a691 - canonicalized_ast: dcd71e3aa1d17917027474135e3063600603963ffae4b67c2ea19f29f7e82a04 - type_inferenced_ast: 77dd4a7149f281d27dabf27255eb448c8230ed3beffeb21d30420ad8a5a66d63 + initial_ast: 4d01f64027709ac40a2582307fdd9420e8b20bfd2cdb26d134b740e00e1f2d1a + canonicalized_ast: f01b1c5294c1f84e31961e0a55595f8bc3fcb213b979c47ff714d4999d157d47 + type_inferenced_ast: 220a44664b251324980f86daba0146c3cb9bd42d315447a9348e3b7c25a2ee92 diff --git a/tests/expectations/compiler/compiler/integers/i8/div.leo.out b/tests/expectations/compiler/compiler/integers/i8/div.leo.out index d685eae49e..45817a7d12 100644 --- a/tests/expectations/compiler/compiler/integers/i8/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/div.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 8f8dedc9afb8ccf7cc795b498debab5e8d91f0f843e42fd879d41d69ef34f761 - canonicalized_ast: 8f8dedc9afb8ccf7cc795b498debab5e8d91f0f843e42fd879d41d69ef34f761 - type_inferenced_ast: 2ed36192a93a23d1a2902d0f81c157ee52f6743da7c857e8ca823ca853de7bd6 + initial_ast: f045abe3e527251101929855c56f8e0ecac819cd98761f001f6361717518734d + canonicalized_ast: f045abe3e527251101929855c56f8e0ecac819cd98761f001f6361717518734d + type_inferenced_ast: 1d2512703b9c82f65115ef34db4272f744007eee3a45412267de55b88b8843ad diff --git a/tests/expectations/compiler/compiler/integers/i8/eq.leo.out b/tests/expectations/compiler/compiler/integers/i8/eq.leo.out index e70100770c..02704bad5e 100644 --- a/tests/expectations/compiler/compiler/integers/i8/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/eq.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 00436aa2bdee5663abd3f9725ac5a67fd79aa302a84f4fe4e26d2c476e743aee - canonicalized_ast: 00436aa2bdee5663abd3f9725ac5a67fd79aa302a84f4fe4e26d2c476e743aee - type_inferenced_ast: 2b76542525989ed3b4ac13c4b38d987b99a050ee7540b202c5916964f722f39f + initial_ast: ff86399699f200f582d18157f4be094385b35b074b4e0a53db3a42903aa14865 + canonicalized_ast: ff86399699f200f582d18157f4be094385b35b074b4e0a53db3a42903aa14865 + type_inferenced_ast: 44a3ca635d4bee4bb390aaf0cd557bc7877df42eba9d2250a7a68b938ff30a7d diff --git a/tests/expectations/compiler/compiler/integers/i8/ge.leo.out b/tests/expectations/compiler/compiler/integers/i8/ge.leo.out index 6585a2b939..96123ae89c 100644 --- a/tests/expectations/compiler/compiler/integers/i8/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/ge.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 990b0a7a061f5432965367871993fa98cdf83373a69682fa2444cc52d7327069 - canonicalized_ast: 990b0a7a061f5432965367871993fa98cdf83373a69682fa2444cc52d7327069 - type_inferenced_ast: 4920f0e45b73d43529d067fd2f2c0b3ee5713a9360f58d4f8ef68efde17613db + initial_ast: 22a0abfda74c125e32189496642194c191e2cd635324e218eb1d7a35266fef73 + canonicalized_ast: 22a0abfda74c125e32189496642194c191e2cd635324e218eb1d7a35266fef73 + type_inferenced_ast: 520d467a0676f3e7853c564f20c75493320d87f0858cc91ffa2ac432bb2cfa59 diff --git a/tests/expectations/compiler/compiler/integers/i8/gt.leo.out b/tests/expectations/compiler/compiler/integers/i8/gt.leo.out index b854fc9b27..8da60e8cbe 100644 --- a/tests/expectations/compiler/compiler/integers/i8/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/gt.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 6580d2762f944bbcf73e69c371ee05a96e69e708a6397dce07cf68dbe984e1ff - canonicalized_ast: 6580d2762f944bbcf73e69c371ee05a96e69e708a6397dce07cf68dbe984e1ff - type_inferenced_ast: 79aada4a751c922cde858c31664deb51420e7236770729a6b954f436fe6518ba + initial_ast: 13935de7dc4809be1f09d9c2cc29b7f7123a90314d57f65be88eb606048d1dfa + canonicalized_ast: 13935de7dc4809be1f09d9c2cc29b7f7123a90314d57f65be88eb606048d1dfa + type_inferenced_ast: 45861e982dcab54a21b4d6042593a6d1b59f4307bc5214e3449d25ce573a0698 diff --git a/tests/expectations/compiler/compiler/integers/i8/le.leo.out b/tests/expectations/compiler/compiler/integers/i8/le.leo.out index e8adb81228..5acd05f876 100644 --- a/tests/expectations/compiler/compiler/integers/i8/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/le.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 227a6821696967ec327032ca376e2a1535513c264f6cdc77935da9082b3ae829 - canonicalized_ast: 227a6821696967ec327032ca376e2a1535513c264f6cdc77935da9082b3ae829 - type_inferenced_ast: a0db98f872904d19812e1dea13b1fa545fdaaf62fdfd55dc61eba543b1528de5 + initial_ast: 9e0661c28ed13a8f8d98c47be3ac659c42a9a1051e137bf47cf9ba5d454a553d + canonicalized_ast: 9e0661c28ed13a8f8d98c47be3ac659c42a9a1051e137bf47cf9ba5d454a553d + type_inferenced_ast: 4c9a74a84f87ccf73f441b5a8e369037b4656e6951fe27866ec7a10d486571e4 diff --git a/tests/expectations/compiler/compiler/integers/i8/lt.leo.out b/tests/expectations/compiler/compiler/integers/i8/lt.leo.out index d9b903c42c..cd08676f9b 100644 --- a/tests/expectations/compiler/compiler/integers/i8/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/lt.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 0a92bdd56f315cf3e5bd49ba178995f2408f6ac26ec8389acbff79f75ec9987f - canonicalized_ast: 0a92bdd56f315cf3e5bd49ba178995f2408f6ac26ec8389acbff79f75ec9987f - type_inferenced_ast: 5575f689ce5d3e63ea05c159232a48b180b073ea9a1624191d65bf5fa5524dce + initial_ast: 0436a1435096db772c51a2914abe88d5134df442371a113ecee51027fa6a8041 + canonicalized_ast: 0436a1435096db772c51a2914abe88d5134df442371a113ecee51027fa6a8041 + type_inferenced_ast: c609d452b7b36ac987ad8dd5893d3a82f75c74f4f8e72b3d5c03c343057150df diff --git a/tests/expectations/compiler/compiler/integers/i8/max.leo.out b/tests/expectations/compiler/compiler/integers/i8/max.leo.out index f50c3bbde6..b3ad88b9a8 100644 --- a/tests/expectations/compiler/compiler/integers/i8/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/max.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 25e7d0d30e781463bb5b95c3161cc6305fdb5bfe421489988a7cef76c27f9937 - canonicalized_ast: 25e7d0d30e781463bb5b95c3161cc6305fdb5bfe421489988a7cef76c27f9937 - type_inferenced_ast: 62efb6a42bea2b21af94c1bd9f16c0dacbb3d94d62964b18b92cd41fa0bd83df + initial_ast: 2540c69850521a04ce3f38303681df3331c89bc47322658d68d3605ff0c19253 + canonicalized_ast: 2540c69850521a04ce3f38303681df3331c89bc47322658d68d3605ff0c19253 + type_inferenced_ast: 1bf81474ffebc0bbc04a09366353dc6120baf4b68bfafa2c9c56ba9a3091801a diff --git a/tests/expectations/compiler/compiler/integers/i8/min.leo.out b/tests/expectations/compiler/compiler/integers/i8/min.leo.out index c34b18b7fa..d489352194 100644 --- a/tests/expectations/compiler/compiler/integers/i8/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/min.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: d9d99a5a68f5a5d514408205bc6e605e1426e554fc2e7dc2fe58a628284495b2 - canonicalized_ast: d9d99a5a68f5a5d514408205bc6e605e1426e554fc2e7dc2fe58a628284495b2 - type_inferenced_ast: eeb312bfef9e872c6b4507dcfb1cc4a9768b98e1242f72688e542cdb211671fb + initial_ast: 848bcd581f4f7b58b7eeccd1b9df9a8c37f66afe79681cdd7945c6b22603e1b9 + canonicalized_ast: 848bcd581f4f7b58b7eeccd1b9df9a8c37f66afe79681cdd7945c6b22603e1b9 + type_inferenced_ast: 1b18368ab78736280c3778888c21f08eee137611fb104ab5baee58a2843f7c35 diff --git a/tests/expectations/compiler/compiler/integers/i8/mul.leo.out b/tests/expectations/compiler/compiler/integers/i8/mul.leo.out index f5b0ae431a..010598c77d 100644 --- a/tests/expectations/compiler/compiler/integers/i8/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/mul.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: af68b638aa0a1d52ca6e81445822106602c1257045abe1141c547849c8bce988 - canonicalized_ast: af68b638aa0a1d52ca6e81445822106602c1257045abe1141c547849c8bce988 - type_inferenced_ast: 0aa3e4958301c364370a1fe5ea519a6b60689c8d5d76a5cfecb013a9a00deca3 + initial_ast: f3888a0d49212fcfa415eed868ffd2a1101a406739ac71dab681be85c695ea86 + canonicalized_ast: f3888a0d49212fcfa415eed868ffd2a1101a406739ac71dab681be85c695ea86 + type_inferenced_ast: 00f94b33b1d62bf8519729caaea90f61b6c6ba5f3d0cbb8af4502fc52b334dc1 diff --git a/tests/expectations/compiler/compiler/integers/i8/ne.leo.out b/tests/expectations/compiler/compiler/integers/i8/ne.leo.out index 2501744a22..ee78c1ce50 100644 --- a/tests/expectations/compiler/compiler/integers/i8/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/ne.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 17fc07482f194dad40e690f5530568186aaef49e968a94ee4b9852e11e60072d - canonicalized_ast: 17fc07482f194dad40e690f5530568186aaef49e968a94ee4b9852e11e60072d - type_inferenced_ast: 7c7c88bdbe33f1697af94d955e89b2e33147f7d90cab39781c2a6de61a7b7ca1 + initial_ast: 67a54d8e773b571783cd1f1a7adf30c1eb91cf371435e0c3ee8c1d036da7ff00 + canonicalized_ast: 67a54d8e773b571783cd1f1a7adf30c1eb91cf371435e0c3ee8c1d036da7ff00 + type_inferenced_ast: 93c7565072976d98e8084210cedd004dedc66dfc405eb2836ce9c014d851a232 diff --git a/tests/expectations/compiler/compiler/integers/i8/negate.leo.out b/tests/expectations/compiler/compiler/integers/i8/negate.leo.out index 981dddd021..7205e418ae 100644 --- a/tests/expectations/compiler/compiler/integers/i8/negate.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/negate.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: f86abf581e24bd0b1bda4e24718e3a9da7d17c4e8248ee9be1ca1e71bd05855a - canonicalized_ast: f86abf581e24bd0b1bda4e24718e3a9da7d17c4e8248ee9be1ca1e71bd05855a - type_inferenced_ast: 1cb290d220e8d58a4f5b4f2122ad8684ae7ecf78314cbb8755fea46aa6a158b2 + initial_ast: 8c288dff00a92efd14f4da90c3f49acb793ba083a4d2c209f00bb66237cfae86 + canonicalized_ast: 8c288dff00a92efd14f4da90c3f49acb793ba083a4d2c209f00bb66237cfae86 + type_inferenced_ast: 52153c3e1725d62fc6392a640ecbc35e37f977c17685ee556b3b5a26c0435b8a diff --git a/tests/expectations/compiler/compiler/integers/i8/negate_zero.leo.out b/tests/expectations/compiler/compiler/integers/i8/negate_zero.leo.out index 4f519f59d3..7e7a3b3695 100644 --- a/tests/expectations/compiler/compiler/integers/i8/negate_zero.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/negate_zero.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 23002c8eab7438ce4a9a35d388536767e8ed8b83b019d756a4065e8f9e90090c - canonicalized_ast: 23002c8eab7438ce4a9a35d388536767e8ed8b83b019d756a4065e8f9e90090c - type_inferenced_ast: 875a3b4d1f341aab98aac5acba238576242129c69479c6a4c4c24485e690e5d8 + initial_ast: f8995a120800a95ddaf61dfe7e4f31d5140b655d4a5b9e6a616c83b65092fe61 + canonicalized_ast: f8995a120800a95ddaf61dfe7e4f31d5140b655d4a5b9e6a616c83b65092fe61 + type_inferenced_ast: bc9ba5ac09deede1a1960236a1f20c0954c0fb4e06c2b54905d9b5f2cf877adf diff --git a/tests/expectations/compiler/compiler/integers/i8/sub.leo.out b/tests/expectations/compiler/compiler/integers/i8/sub.leo.out index 93942ccd19..d79a4f0422 100644 --- a/tests/expectations/compiler/compiler/integers/i8/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/sub.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: b48b706ace1cdb4e11fd9297d062646ea06eed8ae53fd8ce6e7a52d5f28a9a1e - canonicalized_ast: b48b706ace1cdb4e11fd9297d062646ea06eed8ae53fd8ce6e7a52d5f28a9a1e - type_inferenced_ast: 568f43a697e38a57740ae0b851641fe7db2ca8c7bd1a3306abb3f911bf8b9baf + initial_ast: 6ff82e799e64834c43399e51589e5b110a8ab179a1a7cf3a4210ae780515df54 + canonicalized_ast: 6ff82e799e64834c43399e51589e5b110a8ab179a1a7cf3a4210ae780515df54 + type_inferenced_ast: ec57c434abe046a57b5ae80b94f7118ee25ed52ce54e61f5210dba094591c17e diff --git a/tests/expectations/compiler/compiler/integers/i8/ternary.leo.out b/tests/expectations/compiler/compiler/integers/i8/ternary.leo.out index b278447991..3915ad46e9 100644 --- a/tests/expectations/compiler/compiler/integers/i8/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/ternary.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 7ece294857f694a972ec04ad5bff2442b29d1fae512dfed73ffe3f7ae3318869 - canonicalized_ast: 7ece294857f694a972ec04ad5bff2442b29d1fae512dfed73ffe3f7ae3318869 - type_inferenced_ast: 528359e44c48a02b8b81b91e805ae47a8b18e323e71cbc87408e62b255ca5e8d + initial_ast: 256d3ed102c8a18d29515bbaea00dd9d1deb16d12474c5d75aa76f64cf7d691d + canonicalized_ast: 256d3ed102c8a18d29515bbaea00dd9d1deb16d12474c5d75aa76f64cf7d691d + type_inferenced_ast: fb3d90dac9be745eeb2ac5eb29f9ea91994cc074d3720d54cbc4f6d9bea8a26e diff --git a/tests/expectations/compiler/compiler/integers/u128/add.leo.out b/tests/expectations/compiler/compiler/integers/u128/add.leo.out index e49f57c943..a2dbfa3408 100644 --- a/tests/expectations/compiler/compiler/integers/u128/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/add.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: fe567609ec0ee635d21cd1a1ba79fa2375f5e621c5ba2bbe9a1d80a84d2b8958 - canonicalized_ast: fe567609ec0ee635d21cd1a1ba79fa2375f5e621c5ba2bbe9a1d80a84d2b8958 - type_inferenced_ast: 020e42ad9c63628d0ef78d6d9dfdc1d700515b794d7166ae837833a4f8c48fd0 + initial_ast: bc7eadb66a46463e9516afcdad00914bd3f17efe7bd100f839839c54e52d13a4 + canonicalized_ast: bc7eadb66a46463e9516afcdad00914bd3f17efe7bd100f839839c54e52d13a4 + type_inferenced_ast: b6f70ec62b9f4048cf7ca2990eb893dc940c6d3917718c13fb1a3df0eaf3543d diff --git a/tests/expectations/compiler/compiler/integers/u128/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/u128/console_assert.leo.out index d5443bdaef..d5cd5e0a3d 100644 --- a/tests/expectations/compiler/compiler/integers/u128/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/console_assert.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: b2bd9e6bc99154e37c1eee5e8f4c13dddfcd427410a286ae9e100ea77eba9cf7 - canonicalized_ast: b2bd9e6bc99154e37c1eee5e8f4c13dddfcd427410a286ae9e100ea77eba9cf7 - type_inferenced_ast: 6a075c36725495700c1fdc78fab877419a3ebc1ec470e2b11d6138ffaf626e0b + initial_ast: 8e4d20b04881c26b369dc2a68ed15ed06d1b54d5459543cdb689f806bd1aa1d9 + canonicalized_ast: 8e4d20b04881c26b369dc2a68ed15ed06d1b54d5459543cdb689f806bd1aa1d9 + type_inferenced_ast: 9531660b5018c2f43a3d1ba0a40e029df6a50898ea3c74e469b1ab5634313df8 diff --git a/tests/expectations/compiler/compiler/integers/u128/div.leo.out b/tests/expectations/compiler/compiler/integers/u128/div.leo.out index dabdbf2a84..3014858d27 100644 --- a/tests/expectations/compiler/compiler/integers/u128/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/div.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: aba286166cd3b380bdbb4ca3b10f8fed86b6a8bcfa0dc2a5d098d0e2b654cdd6 - canonicalized_ast: aba286166cd3b380bdbb4ca3b10f8fed86b6a8bcfa0dc2a5d098d0e2b654cdd6 - type_inferenced_ast: 6b652bb32bbb2eaf78d118683a51a5fcf7efb1da857347ae653e7d6032ba43b8 + initial_ast: 2e06804b600a35de30eaaf59f33a28872576b91a5f09f1203893f02f1277b08a + canonicalized_ast: 2e06804b600a35de30eaaf59f33a28872576b91a5f09f1203893f02f1277b08a + type_inferenced_ast: 695abf8d7f279e561b4a89ca764c94ee730bdf8f653414664d7d664eb59fe830 diff --git a/tests/expectations/compiler/compiler/integers/u128/eq.leo.out b/tests/expectations/compiler/compiler/integers/u128/eq.leo.out index a0b3b7384a..bd0f5a7899 100644 --- a/tests/expectations/compiler/compiler/integers/u128/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/eq.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: e8c09b425ef479076a22b423ce8fa547ad6829174f4c88ad86112f272164dc01 - canonicalized_ast: e8c09b425ef479076a22b423ce8fa547ad6829174f4c88ad86112f272164dc01 - type_inferenced_ast: 1aad0e51263bcac3073431b7c045592e2955b3c8331f1903bb2ce44553c280a2 + initial_ast: c7b25869dfb1c128c5ff8f0f484e3b6de1a7dc5381b2f8807c943d0c92603669 + canonicalized_ast: c7b25869dfb1c128c5ff8f0f484e3b6de1a7dc5381b2f8807c943d0c92603669 + type_inferenced_ast: f6bafa99d7e108411b4e71edb2a981e0f9e730707a9ac2e2fce87100fb35ebf8 diff --git a/tests/expectations/compiler/compiler/integers/u128/ge.leo.out b/tests/expectations/compiler/compiler/integers/u128/ge.leo.out index 892eeb96b1..7c3a463282 100644 --- a/tests/expectations/compiler/compiler/integers/u128/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/ge.leo.out @@ -28,6 +28,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 6b79b1e4adea96ee82d19853a98f39c3e7b5cdbd043457e7cfba88c7c4fb47b1 - canonicalized_ast: 6b79b1e4adea96ee82d19853a98f39c3e7b5cdbd043457e7cfba88c7c4fb47b1 - type_inferenced_ast: 3fb57a72a3d0d62abf08d9aee73652c7e264a69e36812b2dc741370b53e386eb + initial_ast: bec3606816632c3ec6b912dedb2d10149380b68d6159792c603b866698175b2a + canonicalized_ast: bec3606816632c3ec6b912dedb2d10149380b68d6159792c603b866698175b2a + type_inferenced_ast: 440e113b6ebcf6ecbe2db5caa41e8f8b23538db7e0e7112ecc86629c0e9c7eab diff --git a/tests/expectations/compiler/compiler/integers/u128/gt.leo.out b/tests/expectations/compiler/compiler/integers/u128/gt.leo.out index ad566d770f..6afc52a0ea 100644 --- a/tests/expectations/compiler/compiler/integers/u128/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/gt.leo.out @@ -16,6 +16,6 @@ outputs: - input_file: u128_f.in output: registers: {} - initial_ast: dcd89e09aa062ee35b00b58bb51e23c8d0316737e9c54fcd5e07d81414f1bafe - canonicalized_ast: 099ace0a1b90c06fceb549acea884d3b0bc4426ff1fe5c926d7018c7b5399713 - type_inferenced_ast: 1b885f2c6093c3f22216f8d718d9cd1ed7ad1883140623917344520558de08b7 + initial_ast: 61af6f965b2525b4ce424fdea87e53ca1e8e1b037bf5b50fc63d5d3ddf1ed877 + canonicalized_ast: 5d9465b3594defa551a4573815c23600809c968ead6289253fd6e7de88f4f532 + type_inferenced_ast: 57bd5776b3700331bee92e3bfafbe17fccf3a3acb13b943e2dda42a0600cd817 diff --git a/tests/expectations/compiler/compiler/integers/u128/input.leo.out b/tests/expectations/compiler/compiler/integers/u128/input.leo.out index d1241ea29a..e903add2ae 100644 --- a/tests/expectations/compiler/compiler/integers/u128/input.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/input.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: e2d09b206478dd800312afca22ff247abb8ea46014aac2bfd6e4761ffd4f8d9b - canonicalized_ast: e2d09b206478dd800312afca22ff247abb8ea46014aac2bfd6e4761ffd4f8d9b - type_inferenced_ast: 9ea1c092a8ddced73f80cdf4aa8743e4cfd632291921e9b8ccacc12041127763 + initial_ast: 9b6300874e2e40af3eeb288a3b0e2c96d77ed7b7819ebe4bdea4cf536d6e0f37 + canonicalized_ast: 9b6300874e2e40af3eeb288a3b0e2c96d77ed7b7819ebe4bdea4cf536d6e0f37 + type_inferenced_ast: 98799a27c60065022928365b4cf62115242d8071f5cc6a5ba2535c6edbae2c3a diff --git a/tests/expectations/compiler/compiler/integers/u128/le.leo.out b/tests/expectations/compiler/compiler/integers/u128/le.leo.out index 06384bc0b6..e5b917c83c 100644 --- a/tests/expectations/compiler/compiler/integers/u128/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/le.leo.out @@ -28,6 +28,6 @@ outputs: r0: type: bool value: "false" - initial_ast: ebf9b66f8d0bb28e5da8d9abc664f49750ce7be8b8602bff34abd2f7637e84bc - canonicalized_ast: ebf9b66f8d0bb28e5da8d9abc664f49750ce7be8b8602bff34abd2f7637e84bc - type_inferenced_ast: 67e6bfa690f71aa50956375169cafd0cd9de325e6a48a25255b5c7ac6e7c8bf4 + initial_ast: e71204309379c09b99849308c8fe2bcd4aca2b6d8795e6af2be608c6744ad8bb + canonicalized_ast: e71204309379c09b99849308c8fe2bcd4aca2b6d8795e6af2be608c6744ad8bb + type_inferenced_ast: 30318da869e64a0db90a17fd031d553fc5534922202f9c118989e9b3ebd53a60 diff --git a/tests/expectations/compiler/compiler/integers/u128/lt.leo.out b/tests/expectations/compiler/compiler/integers/u128/lt.leo.out index eaa00972ed..f1997649e0 100644 --- a/tests/expectations/compiler/compiler/integers/u128/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/lt.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "false" - initial_ast: 666249d417516ecca2153f4d6ca2ff6abfb842542920e899cf8e435f7c6da73a - canonicalized_ast: 666249d417516ecca2153f4d6ca2ff6abfb842542920e899cf8e435f7c6da73a - type_inferenced_ast: a8c70e3d1db9b8cd3cd0de5fc0d042ccf9800878c43bfdff0bc05c16d91b2462 + initial_ast: 7db17e7a9cebbd8b889a36531da1af576816e9f679c23cedece8b0209c79001b + canonicalized_ast: 7db17e7a9cebbd8b889a36531da1af576816e9f679c23cedece8b0209c79001b + type_inferenced_ast: 291efe204cc4fedaf6b15248be5b9c621eb8f62e8b2033e206c0af3894c9c488 diff --git a/tests/expectations/compiler/compiler/integers/u128/max.leo.out b/tests/expectations/compiler/compiler/integers/u128/max.leo.out index cf0b0e393a..5293a8d37b 100644 --- a/tests/expectations/compiler/compiler/integers/u128/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/max.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 61b3183a8f258e9803da2549ecb69c68044b89b761eccc039a04570db7e1ed91 - canonicalized_ast: 61b3183a8f258e9803da2549ecb69c68044b89b761eccc039a04570db7e1ed91 - type_inferenced_ast: 10130f28b069d75d40df1c0cf198139aa86c7b6187cd9aa2326f9e7c40ab8a0f + initial_ast: 01d2d7a3271585174c439fd0b9e23be0f81139f44853fcae1c894f575a4d6d15 + canonicalized_ast: 01d2d7a3271585174c439fd0b9e23be0f81139f44853fcae1c894f575a4d6d15 + type_inferenced_ast: fc8cdcdf563aa94a281b4430dae898510666cc7dd39b60faba6d29039b971522 diff --git a/tests/expectations/compiler/compiler/integers/u128/min.leo.out b/tests/expectations/compiler/compiler/integers/u128/min.leo.out index 5828836c24..2c78c8f42c 100644 --- a/tests/expectations/compiler/compiler/integers/u128/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/min.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 880411caefc9b28a124fe351589e5ce4fb33536869cbe7ef452adc710f199fa8 - canonicalized_ast: 880411caefc9b28a124fe351589e5ce4fb33536869cbe7ef452adc710f199fa8 - type_inferenced_ast: d1b01670488ba52d693f049ba422c64ca332f32b6941840c322db2ab1515d93d + initial_ast: da001a51242f61b13d47e7ffc39908bf62ad3f7a48aebe2d0988d36c55216b00 + canonicalized_ast: da001a51242f61b13d47e7ffc39908bf62ad3f7a48aebe2d0988d36c55216b00 + type_inferenced_ast: cd24eeefb2a9af2bd3b320ed579b4c24e5b98a7fcef5ccf50b6a5406202676a7 diff --git a/tests/expectations/compiler/compiler/integers/u128/mul.leo.out b/tests/expectations/compiler/compiler/integers/u128/mul.leo.out index d74fd91081..abeb69d5eb 100644 --- a/tests/expectations/compiler/compiler/integers/u128/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/mul.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "false" - initial_ast: a440dd468128a87613b72eba073c62aab90fd57a4341d01435ae64bcb80b7a69 - canonicalized_ast: a440dd468128a87613b72eba073c62aab90fd57a4341d01435ae64bcb80b7a69 - type_inferenced_ast: 744fe06d570fe2961da52b3cf7bab14c0698478012e01ecc130414b1b00edb1f + initial_ast: 1687f3a384ae14199fe9e97c2be6601457bb6a343cd35f8830ce0930a574f185 + canonicalized_ast: 1687f3a384ae14199fe9e97c2be6601457bb6a343cd35f8830ce0930a574f185 + type_inferenced_ast: bb06537b55adf805c601edaecc8d28e564fb366bb0e7274ba4c7b8198cd7d35e diff --git a/tests/expectations/compiler/compiler/integers/u128/ne.leo.out b/tests/expectations/compiler/compiler/integers/u128/ne.leo.out index 25a5f225ee..ccde2780fe 100644 --- a/tests/expectations/compiler/compiler/integers/u128/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/ne.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 0c784a865d913f926dabc2d843d7268dbf8b8f1a3ed110dfdcab986e2c0755ca - canonicalized_ast: 0c784a865d913f926dabc2d843d7268dbf8b8f1a3ed110dfdcab986e2c0755ca - type_inferenced_ast: f8aa6597e9bd71db4aa5c12c4cca6225339b769f0296ca4bd94be94fccb43502 + initial_ast: ad54acce2fc40331a9b47e756375a8b56ba391c5f9ad6d46c5931d532bfba5a8 + canonicalized_ast: ad54acce2fc40331a9b47e756375a8b56ba391c5f9ad6d46c5931d532bfba5a8 + type_inferenced_ast: 136a6ca5ef187b479084e29e2a081146865f03b39a1e9c01cbf90644e20a0c8c diff --git a/tests/expectations/compiler/compiler/integers/u128/sub.leo.out b/tests/expectations/compiler/compiler/integers/u128/sub.leo.out index 5a4e130b53..4dfc46516a 100644 --- a/tests/expectations/compiler/compiler/integers/u128/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/sub.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 243f793f61ca54672961816f4d771108cdd5dc2db37a555f28b12e40ca4fb72a - canonicalized_ast: 243f793f61ca54672961816f4d771108cdd5dc2db37a555f28b12e40ca4fb72a - type_inferenced_ast: 1f781a44e5883f5b455f4ea2eade31c8fcdd8e7db7437ead2963779457678f97 + initial_ast: e76614a31a739252199317d02de4090bf38d89406e145239076c13f65af3d3bd + canonicalized_ast: e76614a31a739252199317d02de4090bf38d89406e145239076c13f65af3d3bd + type_inferenced_ast: 3ed54255089ab10b26df5429b5109d90b27fa6306b84e26018eca7659efe35c4 diff --git a/tests/expectations/compiler/compiler/integers/u128/ternary.leo.out b/tests/expectations/compiler/compiler/integers/u128/ternary.leo.out index cbe675dab0..2e3d53d6ba 100644 --- a/tests/expectations/compiler/compiler/integers/u128/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/ternary.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: f33e65c7ad580d9405880c08a744f20db103d859b79fe7e3310737e083597820 - canonicalized_ast: f33e65c7ad580d9405880c08a744f20db103d859b79fe7e3310737e083597820 - type_inferenced_ast: ee9b2f9b84de4498f6d484d879a24111ad8a0bc5ed321f6c21adf89e1761df21 + initial_ast: 8e008c8133e8646f2fb89938541e8af8709de4e692c44cf7f8bea367f6225733 + canonicalized_ast: 8e008c8133e8646f2fb89938541e8af8709de4e692c44cf7f8bea367f6225733 + type_inferenced_ast: 124baed45ba7d5e053acf041a444d70348f15c01f4a374fa6bb42290d0bd1012 diff --git a/tests/expectations/compiler/compiler/integers/u16/add.leo.out b/tests/expectations/compiler/compiler/integers/u16/add.leo.out index 0adc7c1436..c8cb53965c 100644 --- a/tests/expectations/compiler/compiler/integers/u16/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/add.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: dbeb70f3b7bf7c602ee46098e75eedb0cc993c03eb8082043cb8c19ed877e707 - canonicalized_ast: dbeb70f3b7bf7c602ee46098e75eedb0cc993c03eb8082043cb8c19ed877e707 - type_inferenced_ast: 8c9c392f5b837b5048ed7e101aff3aacef235353501229e05acfacccbf57e213 + initial_ast: e8e48cba56241044305c14a0d8e871b1be2495d271ba2a0f7ea3435dd75ad7b0 + canonicalized_ast: e8e48cba56241044305c14a0d8e871b1be2495d271ba2a0f7ea3435dd75ad7b0 + type_inferenced_ast: b004dc4f07683a68734b50e5a3ffb9ddb286be4f568cf78ac8d4fba71a910b48 diff --git a/tests/expectations/compiler/compiler/integers/u16/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/u16/console_assert.leo.out index 229e5fe457..f188189f86 100644 --- a/tests/expectations/compiler/compiler/integers/u16/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/console_assert.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: c74459109699fa5955e779a43d07d1ad6ce7781d89df58494a3b9bc1924d131b - canonicalized_ast: c74459109699fa5955e779a43d07d1ad6ce7781d89df58494a3b9bc1924d131b - type_inferenced_ast: 7e41b516a0a67492806b160982c162169a2df8e087f130a7b12103b0ea304851 + initial_ast: a2bb9e2530828f0a8eb3e85b167e5041bdafe32da9b96e2b1eab20eb40b241bb + canonicalized_ast: a2bb9e2530828f0a8eb3e85b167e5041bdafe32da9b96e2b1eab20eb40b241bb + type_inferenced_ast: 075f11e9cbf0068748b01f5d0bfc405810af20119dbbd9093a1b2bd22203bd6d diff --git a/tests/expectations/compiler/compiler/integers/u16/div.leo.out b/tests/expectations/compiler/compiler/integers/u16/div.leo.out index 341eb581af..9484be103c 100644 --- a/tests/expectations/compiler/compiler/integers/u16/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/div.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 4b431ad0fab5435693eb0248c0afe99bdb1c6967b499f2ce4aa9ba39e826679a - canonicalized_ast: 4b431ad0fab5435693eb0248c0afe99bdb1c6967b499f2ce4aa9ba39e826679a - type_inferenced_ast: 753f51cd6e1ab4f49d30a4183c93604b7d96c5474eb7533dbddc38b91eeaf882 + initial_ast: fba1d259e91ced687201093a13bdb2a64a8619de11181dae8e678bafb266ab26 + canonicalized_ast: fba1d259e91ced687201093a13bdb2a64a8619de11181dae8e678bafb266ab26 + type_inferenced_ast: 6040d336454b607e2cb7d74b7acf7dec241b6cad880f8380f521d8f8528fa898 diff --git a/tests/expectations/compiler/compiler/integers/u16/eq.leo.out b/tests/expectations/compiler/compiler/integers/u16/eq.leo.out index dd464fde09..8dc08afd48 100644 --- a/tests/expectations/compiler/compiler/integers/u16/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/eq.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 59b976b8e20a63533044f18a1c7fd2388711d116853f497bb17b92c4926d6c28 - canonicalized_ast: 59b976b8e20a63533044f18a1c7fd2388711d116853f497bb17b92c4926d6c28 - type_inferenced_ast: 455417a0db81ae36be8fce9d119c91ef937f934268e4abaf5d980d571dfe10af + initial_ast: 7211ca407cddb5609fa674f2f1fb9b46c271f4ba84313a0e9b36cc577d8177f8 + canonicalized_ast: 7211ca407cddb5609fa674f2f1fb9b46c271f4ba84313a0e9b36cc577d8177f8 + type_inferenced_ast: 7a147bb829943a07cc27567a68da910bb308aae325566a2325e0c2705ff99f4f diff --git a/tests/expectations/compiler/compiler/integers/u16/ge.leo.out b/tests/expectations/compiler/compiler/integers/u16/ge.leo.out index b078dc9c90..bbdf8c36c5 100644 --- a/tests/expectations/compiler/compiler/integers/u16/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/ge.leo.out @@ -28,6 +28,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 7eb3e99636c3d1887e756e274c2ef7444949413c0a3b538de691a2dfd72bf44a - canonicalized_ast: 7eb3e99636c3d1887e756e274c2ef7444949413c0a3b538de691a2dfd72bf44a - type_inferenced_ast: 9db0a393fbe80b0a1f8c3023a50dbd58102c983708fe8e486c4db5860255c3bb + initial_ast: 4277f9a10e6d860833a3a8913496647e8dae5c4c9a7f245aa90751c87eb86005 + canonicalized_ast: 4277f9a10e6d860833a3a8913496647e8dae5c4c9a7f245aa90751c87eb86005 + type_inferenced_ast: 4b164a7ae7660d5faffaabc481a6f15534971f72bed26ef32e180d4c2b5751c1 diff --git a/tests/expectations/compiler/compiler/integers/u16/gt.leo.out b/tests/expectations/compiler/compiler/integers/u16/gt.leo.out index 0e0c57ec02..c64d0300c3 100644 --- a/tests/expectations/compiler/compiler/integers/u16/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/gt.leo.out @@ -16,6 +16,6 @@ outputs: - input_file: u16_f.in output: registers: {} - initial_ast: 2eef468c77bb445336fdb1c2cf1039ea163f79a209fe90dc68d8d8e79f6f098c - canonicalized_ast: 53950c5ddba3a4ab20a27c1eb0f667edf43fb8bd976dd13f9bbb8d6acc0658f2 - type_inferenced_ast: 0353a321ea76026c6ba7ff8894f2b1aa0313a76de9d7e2f64e766e772b91624b + initial_ast: 715529d38ecc6658e030e3cc9e4d102ab5639ba4fcd04d5d89f71d2fdce0c0bd + canonicalized_ast: 9ba94d2edcb9a646caf0c03096a519dda36756a621e1248a564c79e6643e50ef + type_inferenced_ast: a5ad7e6424b4e8e936757d419b7cefdae68a6fa0dcff9133bf74cfe65133142d diff --git a/tests/expectations/compiler/compiler/integers/u16/input.leo.out b/tests/expectations/compiler/compiler/integers/u16/input.leo.out index 9b9e9e995b..98333bc834 100644 --- a/tests/expectations/compiler/compiler/integers/u16/input.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/input.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 25a98772dac7dd54e8ccc1f0a42782d1fff42800388dad29176483d8972af586 - canonicalized_ast: 25a98772dac7dd54e8ccc1f0a42782d1fff42800388dad29176483d8972af586 - type_inferenced_ast: fa2197e6e6ba2544f769b83ee098f4c07f47e5ada53081c9c055834c76473f12 + initial_ast: 03ec5058648376b68253f8e1a2b62d5d00af93669195be90da09193f7cf249b8 + canonicalized_ast: 03ec5058648376b68253f8e1a2b62d5d00af93669195be90da09193f7cf249b8 + type_inferenced_ast: ca7657b4ec4e3df526a37c3168d74a76e043530e56f56491ff73a95590d6e608 diff --git a/tests/expectations/compiler/compiler/integers/u16/le.leo.out b/tests/expectations/compiler/compiler/integers/u16/le.leo.out index 89cd8354cf..4c0864f655 100644 --- a/tests/expectations/compiler/compiler/integers/u16/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/le.leo.out @@ -28,6 +28,6 @@ outputs: r0: type: bool value: "false" - initial_ast: dbf11e2743c493f58c608e22c3685bb4ad9edbda72521c6c4f288faf0188f5e6 - canonicalized_ast: dbf11e2743c493f58c608e22c3685bb4ad9edbda72521c6c4f288faf0188f5e6 - type_inferenced_ast: 21dd413a29bc3eb5973b235ff3fac74f5f5a71c95dce0b961002b3ecd24fe86f + initial_ast: 718c99fee53e9add1aafaf1692140151e05f6bbda2c91f28dff583591c25f885 + canonicalized_ast: 718c99fee53e9add1aafaf1692140151e05f6bbda2c91f28dff583591c25f885 + type_inferenced_ast: 9139f4ac9593bdc96d477f02270ca3e57949ce1503fe1db9113b45103c81fa5f diff --git a/tests/expectations/compiler/compiler/integers/u16/lt.leo.out b/tests/expectations/compiler/compiler/integers/u16/lt.leo.out index 16502c6b1f..7a6db1753f 100644 --- a/tests/expectations/compiler/compiler/integers/u16/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/lt.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "false" - initial_ast: 70744f6edd0cdabceeaee3db5dd1d3c47be5ee41d6677225a28f234a11f2b6d2 - canonicalized_ast: 70744f6edd0cdabceeaee3db5dd1d3c47be5ee41d6677225a28f234a11f2b6d2 - type_inferenced_ast: afcf35c2c73786a005391d8546fdc24573593997076052ebdbc1c305f2d22012 + initial_ast: 3f4455e62c862742538a8ea67eb3cdc88492aa7616a1691cad42e670fca20fc3 + canonicalized_ast: 3f4455e62c862742538a8ea67eb3cdc88492aa7616a1691cad42e670fca20fc3 + type_inferenced_ast: 3efe28c45a9fc97592c7d4ec7c36a6ca0cbb54be2dccc923e68021fbfbeedb1e diff --git a/tests/expectations/compiler/compiler/integers/u16/max.leo.out b/tests/expectations/compiler/compiler/integers/u16/max.leo.out index 1632b67a3f..6a24e327b0 100644 --- a/tests/expectations/compiler/compiler/integers/u16/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/max.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 5a54d9671bf46db1449c140807e9f88fcecdb3f2656a5c231119663c24d10f1c - canonicalized_ast: 5a54d9671bf46db1449c140807e9f88fcecdb3f2656a5c231119663c24d10f1c - type_inferenced_ast: aa7ffec6855e0a3c9cfa17ec7cf35cdf3e60fb547e8655c254ced9df7a8bd5c9 + initial_ast: 48357892c03a4ed6bfc71fbee106bef0c57939aa3f90d0b902e26133373d90d0 + canonicalized_ast: 48357892c03a4ed6bfc71fbee106bef0c57939aa3f90d0b902e26133373d90d0 + type_inferenced_ast: 6d33448fcb77a5789544c32ef26bdf9cb5dc357dea9e99c6444e137644e837ff diff --git a/tests/expectations/compiler/compiler/integers/u16/min.leo.out b/tests/expectations/compiler/compiler/integers/u16/min.leo.out index 0dc9b54457..988ad9e314 100644 --- a/tests/expectations/compiler/compiler/integers/u16/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/min.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 92782e1cf3fceb2a3859abb64e0f520ee139612904757ab74b1258fd9f705ceb - canonicalized_ast: 92782e1cf3fceb2a3859abb64e0f520ee139612904757ab74b1258fd9f705ceb - type_inferenced_ast: 4bd0d3b5fe5f5396db4e5a0a9f4cf3a4fabd061ff4f33dcaf8be098d41be594f + initial_ast: 7400309603e4020cc0652a55937fd70bdf280ba8f7ae1fb9150b0da6c5024040 + canonicalized_ast: 7400309603e4020cc0652a55937fd70bdf280ba8f7ae1fb9150b0da6c5024040 + type_inferenced_ast: 6c842e1f5b09f2d65ebddc1ff0a32656184920b9e408cda403f801b43dceec1a diff --git a/tests/expectations/compiler/compiler/integers/u16/mul.leo.out b/tests/expectations/compiler/compiler/integers/u16/mul.leo.out index acd358c36c..a95b30f04e 100644 --- a/tests/expectations/compiler/compiler/integers/u16/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/mul.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "false" - initial_ast: 73789d280de5b73d9a0137d330590e0886ce768e6f260ca50d4a7af9d6a0d3c8 - canonicalized_ast: 73789d280de5b73d9a0137d330590e0886ce768e6f260ca50d4a7af9d6a0d3c8 - type_inferenced_ast: 09669befc9ccf54752cdced15d4a619bac4ac2c2fdde47a135d858375d1f2ee7 + initial_ast: c2e0b9bb222645fdaea216b5238168b32a41f7a84cf5ab438b566fb8a5de8a07 + canonicalized_ast: c2e0b9bb222645fdaea216b5238168b32a41f7a84cf5ab438b566fb8a5de8a07 + type_inferenced_ast: ed2bfbd8422254e12d01329641853001fef94e8de97bd71dba95d0f7c05763c8 diff --git a/tests/expectations/compiler/compiler/integers/u16/ne.leo.out b/tests/expectations/compiler/compiler/integers/u16/ne.leo.out index 70650185e7..78866a8993 100644 --- a/tests/expectations/compiler/compiler/integers/u16/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/ne.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 9eb8bb18c17ed1572677d922d47497aad8ff73d477de9955e4970c2453537e14 - canonicalized_ast: 9eb8bb18c17ed1572677d922d47497aad8ff73d477de9955e4970c2453537e14 - type_inferenced_ast: 1a7da1e44bcd6750d5d1212bb5d105dbf51fa5c133013919b728e9feb016d7f8 + initial_ast: ce9bcbfa9b4a9445b5df9fd95765c97572fc9c0c8ec07619711bceb84685e972 + canonicalized_ast: ce9bcbfa9b4a9445b5df9fd95765c97572fc9c0c8ec07619711bceb84685e972 + type_inferenced_ast: 1bf0be499a5225eed5505672c01840fada9784d29430a9cbebbb2beb931cdf90 diff --git a/tests/expectations/compiler/compiler/integers/u16/sub.leo.out b/tests/expectations/compiler/compiler/integers/u16/sub.leo.out index 0450c95270..a0137217f5 100644 --- a/tests/expectations/compiler/compiler/integers/u16/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/sub.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: dc90daedac67b5f69d3b2881a4f31039b4d2214199c07c86bb80fae9f4759afb - canonicalized_ast: dc90daedac67b5f69d3b2881a4f31039b4d2214199c07c86bb80fae9f4759afb - type_inferenced_ast: a068b733628016d3ae9d98a7ca6e6d4ce513543f5324b8ae5d42f9a05a60d7d0 + initial_ast: b67a2e773d463a9a22023e35db7533c2eb7d3114d945389869ab9652858ef86b + canonicalized_ast: b67a2e773d463a9a22023e35db7533c2eb7d3114d945389869ab9652858ef86b + type_inferenced_ast: 3b23e1f8b696bc24776da8bc0255aa12ea92d30853ab4fd65cd1ef6a9b2a4eae diff --git a/tests/expectations/compiler/compiler/integers/u16/ternary.leo.out b/tests/expectations/compiler/compiler/integers/u16/ternary.leo.out index 581d7231b6..7541604642 100644 --- a/tests/expectations/compiler/compiler/integers/u16/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/ternary.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: fb84b0f1790b33d4b739f72640977dbc975b86e2f55cec95320836805ba1aea8 - canonicalized_ast: fb84b0f1790b33d4b739f72640977dbc975b86e2f55cec95320836805ba1aea8 - type_inferenced_ast: 8c8286872318a8d18411f34942b03debb7f2c50a653260cd12b9ad44fffeee20 + initial_ast: e441bec546c1972253e0ebf895c44a50f708139e5dbf89416cc05dabf4f4a6c4 + canonicalized_ast: e441bec546c1972253e0ebf895c44a50f708139e5dbf89416cc05dabf4f4a6c4 + type_inferenced_ast: ba45b5d07a22a70e60b431c4b1f592c4e363a1b6dab1e1c08729781eeafc6f17 diff --git a/tests/expectations/compiler/compiler/integers/u32/add.leo.out b/tests/expectations/compiler/compiler/integers/u32/add.leo.out index 78a330eeec..a070a8fb31 100644 --- a/tests/expectations/compiler/compiler/integers/u32/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/add.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 2d519bd1754db4a0cb0470f0ad905bc9cf703baa104b5d484e4fde38adab53ea - canonicalized_ast: 2d519bd1754db4a0cb0470f0ad905bc9cf703baa104b5d484e4fde38adab53ea - type_inferenced_ast: 371cd54fb4f7bde322f21b098f9e97d494ef7a64b8d6d326aadaff0ca5ab2dec + initial_ast: f10819ad044f53a8a3b671d0591b6e3a8f555080687525e06adc95188a80f71e + canonicalized_ast: f10819ad044f53a8a3b671d0591b6e3a8f555080687525e06adc95188a80f71e + type_inferenced_ast: 9cec0b625c5a8c2de17452989238aa20db015ae707d4a3042974b50381360224 diff --git a/tests/expectations/compiler/compiler/integers/u32/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/u32/console_assert.leo.out index 3b18dd87ef..42e33e1842 100644 --- a/tests/expectations/compiler/compiler/integers/u32/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/console_assert.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 1482da89f4793474ab4f940664b3ef5bac212ddbeda85203bb7166eca83387f7 - canonicalized_ast: 1482da89f4793474ab4f940664b3ef5bac212ddbeda85203bb7166eca83387f7 - type_inferenced_ast: e6965184cd858e73e3dc103228503e9935fcb5608a7b46a26044fe4a06d40fb0 + initial_ast: 3d1a9a1636ee03ed67340d77be57cbfe6f90937af1a244eaf060d102ddab7e51 + canonicalized_ast: 3d1a9a1636ee03ed67340d77be57cbfe6f90937af1a244eaf060d102ddab7e51 + type_inferenced_ast: 484e7e0cff2392a2d43275369e22167a6d2cf5a0370961001cf99316c7873907 diff --git a/tests/expectations/compiler/compiler/integers/u32/div.leo.out b/tests/expectations/compiler/compiler/integers/u32/div.leo.out index d93a1894c5..88e64d268b 100644 --- a/tests/expectations/compiler/compiler/integers/u32/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/div.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: f240ea6127d832612096ee79cc3cf50476be0f022dc05976801784a89a8c1070 - canonicalized_ast: f240ea6127d832612096ee79cc3cf50476be0f022dc05976801784a89a8c1070 - type_inferenced_ast: 5b8938ae4ea7c64d8ef2c069047271b9e28cbe29893e029e69f922525e339109 + initial_ast: 798cc70fe6a9278982e9a909162a64607c18320d67f2b69c986f12013c747015 + canonicalized_ast: 798cc70fe6a9278982e9a909162a64607c18320d67f2b69c986f12013c747015 + type_inferenced_ast: 39db1d36fd3893d40b5ab07a9e9cfa68a7cfe740d125ea86761f315cd49af950 diff --git a/tests/expectations/compiler/compiler/integers/u32/eq.leo.out b/tests/expectations/compiler/compiler/integers/u32/eq.leo.out index 0eb8c32d4e..557e311e1b 100644 --- a/tests/expectations/compiler/compiler/integers/u32/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/eq.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 0a775de041dad61c1a1cd248a03b85f269737c4dbf0a7f2af51f6e56c2c3d5d8 - canonicalized_ast: 0a775de041dad61c1a1cd248a03b85f269737c4dbf0a7f2af51f6e56c2c3d5d8 - type_inferenced_ast: fba47a79c600f4641e675368ff9ee647601e4f9dda0831992d588a9168d7c421 + initial_ast: ecd942a96ad98756ca2fa708167e33843806613ba636818e23d0991c165fb131 + canonicalized_ast: ecd942a96ad98756ca2fa708167e33843806613ba636818e23d0991c165fb131 + type_inferenced_ast: d654592bf733d63af723b43c0a08e5b93d8cd6e73ad25f1ec4ba1d44ce79e8c6 diff --git a/tests/expectations/compiler/compiler/integers/u32/ge.leo.out b/tests/expectations/compiler/compiler/integers/u32/ge.leo.out index 6f92e43121..2dae0372fb 100644 --- a/tests/expectations/compiler/compiler/integers/u32/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/ge.leo.out @@ -28,6 +28,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 26d459f12f63580de5afe9f1d44622be8e61907cd85771084517a015c72eccdb - canonicalized_ast: 26d459f12f63580de5afe9f1d44622be8e61907cd85771084517a015c72eccdb - type_inferenced_ast: 166f31eef197184851db7780c9e5d46d810398a9efd0586c28e0f6beff5455f4 + initial_ast: e6b610505dd516b2b145961540e2426d0e75c8b1f81b837cbda77f99edb4cbc4 + canonicalized_ast: e6b610505dd516b2b145961540e2426d0e75c8b1f81b837cbda77f99edb4cbc4 + type_inferenced_ast: a92ae1efacdcf3737670c23301dcb3fd45ccb65bf07327587f3bcb891544df17 diff --git a/tests/expectations/compiler/compiler/integers/u32/gt.leo.out b/tests/expectations/compiler/compiler/integers/u32/gt.leo.out index 6c1c8bb7ee..4debf3e335 100644 --- a/tests/expectations/compiler/compiler/integers/u32/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/gt.leo.out @@ -16,6 +16,6 @@ outputs: - input_file: u32_f.in output: registers: {} - initial_ast: 46369ff45f2a685122ba2af387cb95cc7c25d5a4575b0ef24e25a620dabe9a87 - canonicalized_ast: ca7847ff8f13024b51b623c394aeeb6ec61abd6b4bf8f0f295044ef36c72eab6 - type_inferenced_ast: 8055d5c155301f0bcef11d75d902f8469641e9467de9386812cd6b6d27a303b1 + initial_ast: 7ff355da2848c6f06892c90a93e1f12095a329dd9fe935ea5c8e1b009b21fa13 + canonicalized_ast: 31547c73b8283e8dc9007834657c9c8de55a0fe50f94d984e93569b9453bc9e7 + type_inferenced_ast: 55d7111ec36845c585d6280723e495df997c058fdf4067c923df944f4903a76a diff --git a/tests/expectations/compiler/compiler/integers/u32/input.leo.out b/tests/expectations/compiler/compiler/integers/u32/input.leo.out index 67f3f3cffc..053af4bb9f 100644 --- a/tests/expectations/compiler/compiler/integers/u32/input.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/input.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 7f820d31196b8c2d03bd0947593bb474375ec8d84c10f76ef050f07ad3e17ec2 - canonicalized_ast: 7f820d31196b8c2d03bd0947593bb474375ec8d84c10f76ef050f07ad3e17ec2 - type_inferenced_ast: d87f2d54e9b9bdfe20ef6d7ab202c596555986a391be48060676d203058105e1 + initial_ast: 090c66945914ad5529e831599c526737da325f6a8a2850ca5b77e2b7e773765e + canonicalized_ast: 090c66945914ad5529e831599c526737da325f6a8a2850ca5b77e2b7e773765e + type_inferenced_ast: 8ce7db653b5ec60f5defef5c12bc6786c6177cef85f847a3420254803d1334ef diff --git a/tests/expectations/compiler/compiler/integers/u32/le.leo.out b/tests/expectations/compiler/compiler/integers/u32/le.leo.out index 54d8751aef..48d355f00e 100644 --- a/tests/expectations/compiler/compiler/integers/u32/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/le.leo.out @@ -28,6 +28,6 @@ outputs: r0: type: bool value: "false" - initial_ast: ae892c06154d9f48a36358c7fdeaa0dd0f4bdbc2ee89deb89d2c7f7050acae98 - canonicalized_ast: ae892c06154d9f48a36358c7fdeaa0dd0f4bdbc2ee89deb89d2c7f7050acae98 - type_inferenced_ast: 541ac177e769d46f361b0dc5e0543ffcbfa1e42ed7a5e3f42ef328b8723837e2 + initial_ast: fa56d415b885a524625c80c4ecb8b5248b7c0e9fc97e635940621bc35edd644c + canonicalized_ast: fa56d415b885a524625c80c4ecb8b5248b7c0e9fc97e635940621bc35edd644c + type_inferenced_ast: d7858764eaf0c79969bed850e695949547e7f728478f24f04cf7a129b8aae23c diff --git a/tests/expectations/compiler/compiler/integers/u32/lt.leo.out b/tests/expectations/compiler/compiler/integers/u32/lt.leo.out index cb3dde5410..bccd5c9570 100644 --- a/tests/expectations/compiler/compiler/integers/u32/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/lt.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "false" - initial_ast: 0c7cf26ac46d09b65ad19ea51c972281a7e5db71cba2724e69ab1ab1ba59ea86 - canonicalized_ast: 0c7cf26ac46d09b65ad19ea51c972281a7e5db71cba2724e69ab1ab1ba59ea86 - type_inferenced_ast: cec211d394cc6ae0b95189332c89acbebd6c0a7421bdff5c797e757c5251e802 + initial_ast: ddeff838aaf5674520256362240e9d5429ddf81c3fef3e0fabd649355ee835b4 + canonicalized_ast: ddeff838aaf5674520256362240e9d5429ddf81c3fef3e0fabd649355ee835b4 + type_inferenced_ast: 8c346798879aa2297adb5345d00f7f397e06f9470c9d0bf6ac7400045689adb7 diff --git a/tests/expectations/compiler/compiler/integers/u32/max.leo.out b/tests/expectations/compiler/compiler/integers/u32/max.leo.out index 3dfa14a592..f476068aa3 100644 --- a/tests/expectations/compiler/compiler/integers/u32/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/max.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 0c99fd8ada0a44dd6bf589736d091b1f197c2b19a0c077e9f51dfefebb53c7cf - canonicalized_ast: 0c99fd8ada0a44dd6bf589736d091b1f197c2b19a0c077e9f51dfefebb53c7cf - type_inferenced_ast: a924a7713d2ab905403d3b83dd3613c9d54271d3aa798c18b472a1eb79de4078 + initial_ast: aeb0761c396b19a2d4067ecfc8a7291e8391935c7573d02fa78cba8950573321 + canonicalized_ast: aeb0761c396b19a2d4067ecfc8a7291e8391935c7573d02fa78cba8950573321 + type_inferenced_ast: 899d5481e2f648e246c22e0118919721aa3289e307558695083e1a1d81178bc1 diff --git a/tests/expectations/compiler/compiler/integers/u32/min.leo.out b/tests/expectations/compiler/compiler/integers/u32/min.leo.out index 2833e959b7..cafb7cf89e 100644 --- a/tests/expectations/compiler/compiler/integers/u32/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/min.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: bab8be36b2fde5dd6972b0690d4a62ab19852729228a0b87c316e638ea85e583 - canonicalized_ast: bab8be36b2fde5dd6972b0690d4a62ab19852729228a0b87c316e638ea85e583 - type_inferenced_ast: 8b3e5c9c47063e3d3e48df8a8dab81b32af1afa3e90481692063533f3b9a966b + initial_ast: 9c2ffa0ce38d27afc091a6f70b06ac873bd8d8a1ac729581f1e8dded22bbc21e + canonicalized_ast: 9c2ffa0ce38d27afc091a6f70b06ac873bd8d8a1ac729581f1e8dded22bbc21e + type_inferenced_ast: a744410c84202b558cd1047c21fcc9d9a9a264dccc4320ffdd14c0794ac01fb7 diff --git a/tests/expectations/compiler/compiler/integers/u32/mul.leo.out b/tests/expectations/compiler/compiler/integers/u32/mul.leo.out index f328ce7bb6..a652fb8dac 100644 --- a/tests/expectations/compiler/compiler/integers/u32/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/mul.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "false" - initial_ast: bc2a52c86f9c54151e95ab2fd8cc64e0df657924f813e6c3069422d544aaa3ce - canonicalized_ast: bc2a52c86f9c54151e95ab2fd8cc64e0df657924f813e6c3069422d544aaa3ce - type_inferenced_ast: 4a84eb2502cdbbbede712f2d9b404c49b769a25b4800b40c33f1f7eac87c2bbb + initial_ast: e30fe6132ab7cc5d0c379a8efa1b5d2cc11804aab0dc1f1e418669177b14a221 + canonicalized_ast: e30fe6132ab7cc5d0c379a8efa1b5d2cc11804aab0dc1f1e418669177b14a221 + type_inferenced_ast: 66befce06d14b7d2177435336a1b1a8cf8188ca87de6179d73d8fa50460a287b diff --git a/tests/expectations/compiler/compiler/integers/u32/ne.leo.out b/tests/expectations/compiler/compiler/integers/u32/ne.leo.out index d8f923c177..43629c277b 100644 --- a/tests/expectations/compiler/compiler/integers/u32/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/ne.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: b40043966d8d3db9a7e505a77241fc57394cb58df1da123282d66256a844a5a0 - canonicalized_ast: b40043966d8d3db9a7e505a77241fc57394cb58df1da123282d66256a844a5a0 - type_inferenced_ast: 77f17401240baeba8d17d1d750b54b0eec7dbc1a41761c0375ffa0a8f5d1ab3c + initial_ast: 44c8fedb883b67bedc8f0d89acd32fd9d89adff22c297e6e916c23f73ba2f658 + canonicalized_ast: 44c8fedb883b67bedc8f0d89acd32fd9d89adff22c297e6e916c23f73ba2f658 + type_inferenced_ast: 79c741c6750d6b62567323c5d03683afc13fe873bed95fbccd0a1afff0e05b77 diff --git a/tests/expectations/compiler/compiler/integers/u32/sub.leo.out b/tests/expectations/compiler/compiler/integers/u32/sub.leo.out index 3a5f714402..98c34dec75 100644 --- a/tests/expectations/compiler/compiler/integers/u32/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/sub.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: c51728b8c0193bf27571d7ca9d97c2bef7acd86f026ded5d729fd596f892f499 - canonicalized_ast: c51728b8c0193bf27571d7ca9d97c2bef7acd86f026ded5d729fd596f892f499 - type_inferenced_ast: b868b0c6673817781f4d44040e1be98585904dd6995a0d55c1ccc8753c795d5c + initial_ast: 9363bcdbcf89167438f75e5b5ae11f8e5968c4272dacecdb85d67d6627b38577 + canonicalized_ast: 9363bcdbcf89167438f75e5b5ae11f8e5968c4272dacecdb85d67d6627b38577 + type_inferenced_ast: edcb1c406e76f79ebf13bb46ce327e7cb9b0b8e86b1bc3affeaf69d574da9f06 diff --git a/tests/expectations/compiler/compiler/integers/u32/ternary.leo.out b/tests/expectations/compiler/compiler/integers/u32/ternary.leo.out index e33b2f2ac1..5623951925 100644 --- a/tests/expectations/compiler/compiler/integers/u32/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/ternary.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 406cd139beeca292853b57e2677f3ca9caf0995482d64e9f0ea45c78a09dd374 - canonicalized_ast: 406cd139beeca292853b57e2677f3ca9caf0995482d64e9f0ea45c78a09dd374 - type_inferenced_ast: 6223cf0231143cbddb83eabaa72e4a12222be88a22f77e6920367b6db3367836 + initial_ast: f9ef32ac860724ac62be23d9a9059a2b65cd19decda7e133e478951c9b2d220f + canonicalized_ast: f9ef32ac860724ac62be23d9a9059a2b65cd19decda7e133e478951c9b2d220f + type_inferenced_ast: 3ca5c353bf2c9b669e16c01055e96643b3ce99bd9cbb6932d97c2d4560d9f518 diff --git a/tests/expectations/compiler/compiler/integers/u64/add.leo.out b/tests/expectations/compiler/compiler/integers/u64/add.leo.out index c843b0c85a..226962df02 100644 --- a/tests/expectations/compiler/compiler/integers/u64/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/add.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 0c0e16e52f66b4d5a90408eef1b6e5d7dcdc0c992306524624f3c2beb96bebe2 - canonicalized_ast: 0c0e16e52f66b4d5a90408eef1b6e5d7dcdc0c992306524624f3c2beb96bebe2 - type_inferenced_ast: a2508e316b68aa7f001e34d65a7723efdfa2b02848dc0bd81dfe7c9f265b636d + initial_ast: 8ed9caa46664d975d35eb60f780cc2d3544924d0458b5cd2005262f42cb92120 + canonicalized_ast: 8ed9caa46664d975d35eb60f780cc2d3544924d0458b5cd2005262f42cb92120 + type_inferenced_ast: 1c5761507087bc2a5357df29e0a19f9ed1c5aeb4c72ccd314456d46a02704d3d diff --git a/tests/expectations/compiler/compiler/integers/u64/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/u64/console_assert.leo.out index 204e574c8a..99fc709a17 100644 --- a/tests/expectations/compiler/compiler/integers/u64/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/console_assert.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: d2aaf9fa46481d0d0d7291e692c3a0f86f3e629664afd0e9e6efb0335fda7e8c - canonicalized_ast: d2aaf9fa46481d0d0d7291e692c3a0f86f3e629664afd0e9e6efb0335fda7e8c - type_inferenced_ast: 0a48472881b2d7b4680e0f8023dcce19e59a13aacfef6c9929779313d6edef72 + initial_ast: daf304ae1131ed48f9ca749a7499f095d934bc2ad94cbefe314d0f86fdb4300c + canonicalized_ast: daf304ae1131ed48f9ca749a7499f095d934bc2ad94cbefe314d0f86fdb4300c + type_inferenced_ast: ce627c98acedf9702277dd9bd4d288afe7802a6a4ee5acac4b1f44ee24065800 diff --git a/tests/expectations/compiler/compiler/integers/u64/div.leo.out b/tests/expectations/compiler/compiler/integers/u64/div.leo.out index cb59a37515..f6f571b6cd 100644 --- a/tests/expectations/compiler/compiler/integers/u64/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/div.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 1ccae10c849bdba01024286582cdfa3c3c6176675d26b550f0f9a2cce4b6c393 - canonicalized_ast: 1ccae10c849bdba01024286582cdfa3c3c6176675d26b550f0f9a2cce4b6c393 - type_inferenced_ast: f61c02608fcf3ac5e6000d0f140f6e7cd895e17f27481e1db0e26666cc6d8464 + initial_ast: eb289b91dade0e281729f77e79d0ab874871c55e6691545fb71d335710564ea3 + canonicalized_ast: eb289b91dade0e281729f77e79d0ab874871c55e6691545fb71d335710564ea3 + type_inferenced_ast: 59b56c3679803203430078cb0b7f8cb43cc687fb10255186493dd94336f93fcd diff --git a/tests/expectations/compiler/compiler/integers/u64/eq.leo.out b/tests/expectations/compiler/compiler/integers/u64/eq.leo.out index 53ae460c20..888715eae6 100644 --- a/tests/expectations/compiler/compiler/integers/u64/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/eq.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 0ab7e622869b60a383e3cab939244c22f10ec8fc11e603ce2bb6d8ebd69abc1f - canonicalized_ast: 0ab7e622869b60a383e3cab939244c22f10ec8fc11e603ce2bb6d8ebd69abc1f - type_inferenced_ast: 268372bc0a392e6ae2478f9a6790ea1c6d38230f8a228fde60345ebc5f34140d + initial_ast: 53edaeebce5575703624feee65798bfd25e4df0797a91d16108dc4843f1be02b + canonicalized_ast: 53edaeebce5575703624feee65798bfd25e4df0797a91d16108dc4843f1be02b + type_inferenced_ast: 79b5ea87295fa54684abace26c0557d87f3966ec08b887cff117bd7c35cb2754 diff --git a/tests/expectations/compiler/compiler/integers/u64/ge.leo.out b/tests/expectations/compiler/compiler/integers/u64/ge.leo.out index d59b7d1155..8bbf4fec1f 100644 --- a/tests/expectations/compiler/compiler/integers/u64/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/ge.leo.out @@ -28,6 +28,6 @@ outputs: r0: type: bool value: "true" - initial_ast: e63406cde78c9b3ab82462fc9b3e2bf2ebb740c9052aa08d5a07db521ff447e9 - canonicalized_ast: e63406cde78c9b3ab82462fc9b3e2bf2ebb740c9052aa08d5a07db521ff447e9 - type_inferenced_ast: 9cb61e96972f963bbfa5db20f0f7d57c2235db4aff62421cdeeabeb00552589a + initial_ast: 1754afabf1a32941b5b59c8c3e6fd6299067d6cec13d9a0e9e2a4bebb48113e7 + canonicalized_ast: 1754afabf1a32941b5b59c8c3e6fd6299067d6cec13d9a0e9e2a4bebb48113e7 + type_inferenced_ast: a2c0598451ec27d8297cd1348eb7b459d021e8a0a57111cef5afbb27952995b2 diff --git a/tests/expectations/compiler/compiler/integers/u64/gt.leo.out b/tests/expectations/compiler/compiler/integers/u64/gt.leo.out index ef48bf0900..8088a00842 100644 --- a/tests/expectations/compiler/compiler/integers/u64/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/gt.leo.out @@ -16,6 +16,6 @@ outputs: - input_file: u64_f.in output: registers: {} - initial_ast: e322befdec803036a054560f3a342cec2f619d6a112cef46a642959564e9c573 - canonicalized_ast: 2dcd2aa3225e4426040fa610e5dfc340c4f22fbb686a5243101c038a53c1fb86 - type_inferenced_ast: b417887c713a50ae745031234ee5d12ef1c408b08cc921df7203fde12500d387 + initial_ast: 384354a0bccb67829fa7f3fd0e4dc1a1366678284e840d65e0c595828d0544ae + canonicalized_ast: 88e2646b980419e191f5423ee2fe73c863135c460cd36540f152c04a6d5a3a84 + type_inferenced_ast: c1fbef1103029da2f839684e2d8472adafa83b3d666953d37dd24f1a964f05a9 diff --git a/tests/expectations/compiler/compiler/integers/u64/input.leo.out b/tests/expectations/compiler/compiler/integers/u64/input.leo.out index f9a75e2dba..37fafee1b5 100644 --- a/tests/expectations/compiler/compiler/integers/u64/input.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/input.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: e64a301f3ad6d2c06a0819ab92f7588ade4f9d2302dfc91b01df47b337e63733 - canonicalized_ast: e64a301f3ad6d2c06a0819ab92f7588ade4f9d2302dfc91b01df47b337e63733 - type_inferenced_ast: c14ff2200ef60d38e3b15ad7c31d2a308be388b0c287f794ffca3f049ca498bc + initial_ast: c99357fe991d4e17756a7efcc2770a693dc53e47a3fcfcdb44c2996b844c8cb2 + canonicalized_ast: c99357fe991d4e17756a7efcc2770a693dc53e47a3fcfcdb44c2996b844c8cb2 + type_inferenced_ast: f5bf4f3724634571b2b4f5f15402c0da5665983bf35d0e0724fb246e48fb8606 diff --git a/tests/expectations/compiler/compiler/integers/u64/le.leo.out b/tests/expectations/compiler/compiler/integers/u64/le.leo.out index c7b704b672..bdbb9e034c 100644 --- a/tests/expectations/compiler/compiler/integers/u64/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/le.leo.out @@ -28,6 +28,6 @@ outputs: r0: type: bool value: "false" - initial_ast: 6a33a9ff988b31eef42228b68625f1e8a97516615fe8380d98eeff85969834a9 - canonicalized_ast: 6a33a9ff988b31eef42228b68625f1e8a97516615fe8380d98eeff85969834a9 - type_inferenced_ast: fb7052e33efbef5dff337f921217f32fc51935d747ab9549061814a7c97e499a + initial_ast: c2d16b3c14420d013ff5b1531c0a4e461053fd5e507f0031f428ae1b7ff213f5 + canonicalized_ast: c2d16b3c14420d013ff5b1531c0a4e461053fd5e507f0031f428ae1b7ff213f5 + type_inferenced_ast: 586cb64af9fadad9c01a4ea8b17655a8ef39a8362770a27d7ea280b030c49063 diff --git a/tests/expectations/compiler/compiler/integers/u64/lt.leo.out b/tests/expectations/compiler/compiler/integers/u64/lt.leo.out index d56834a50a..716f94923c 100644 --- a/tests/expectations/compiler/compiler/integers/u64/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/lt.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "false" - initial_ast: 3eed4192151567524d2c0c9e3002bedbb992e9b4195afedcf08c7315fbf86628 - canonicalized_ast: 3eed4192151567524d2c0c9e3002bedbb992e9b4195afedcf08c7315fbf86628 - type_inferenced_ast: 7b19c51fc009c5fc66c336b4d511ce02f9c99596ce78a999f5d5e14f4d53a548 + initial_ast: d77a1d0ca39da7cd1b08d4f7ee064cd1592edd78fca87fbe633a92e8013c7010 + canonicalized_ast: d77a1d0ca39da7cd1b08d4f7ee064cd1592edd78fca87fbe633a92e8013c7010 + type_inferenced_ast: 5710ebb9c5ef7bf328a4f9a272a311bce64192f423097a707f08e55ae98915bc diff --git a/tests/expectations/compiler/compiler/integers/u64/max.leo.out b/tests/expectations/compiler/compiler/integers/u64/max.leo.out index da6b45c35f..329bfca76c 100644 --- a/tests/expectations/compiler/compiler/integers/u64/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/max.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 1d39069e0c4dc73a6c8176092ab4738e7c8d89cb7bc7821b2be9a88c25e5df56 - canonicalized_ast: 1d39069e0c4dc73a6c8176092ab4738e7c8d89cb7bc7821b2be9a88c25e5df56 - type_inferenced_ast: 279d5a452c5525321a74c992ede7d2c50731b81bf186c7c3f953fdcba8a8aab1 + initial_ast: 450969fc4516c60af9708bdee8269cd5c69c28e2e3cc6169a73d13b992ba21bc + canonicalized_ast: 450969fc4516c60af9708bdee8269cd5c69c28e2e3cc6169a73d13b992ba21bc + type_inferenced_ast: 2e352f853185b84705dcc4b42090bee3d7c9a8f4cf637fd0513c7f0091a5cd33 diff --git a/tests/expectations/compiler/compiler/integers/u64/min.leo.out b/tests/expectations/compiler/compiler/integers/u64/min.leo.out index e7afbb4507..30843ae5e3 100644 --- a/tests/expectations/compiler/compiler/integers/u64/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/min.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: bacf1be9937eae3e8cf7950483e942bc534d7d22759dd95a80325ad1de679380 - canonicalized_ast: bacf1be9937eae3e8cf7950483e942bc534d7d22759dd95a80325ad1de679380 - type_inferenced_ast: ab087e5fb0a831a6854912d7092e49961cab6b2ad96cf571af61e277254a03a2 + initial_ast: d7b255884235b2a8e507621b310294d3ebbf875fecc7c5322df3251cab6ded9c + canonicalized_ast: d7b255884235b2a8e507621b310294d3ebbf875fecc7c5322df3251cab6ded9c + type_inferenced_ast: 6933f229d9a8b5d464f20d8efa88354d82fb51e868db11ad37c32f12dc328540 diff --git a/tests/expectations/compiler/compiler/integers/u64/mul.leo.out b/tests/expectations/compiler/compiler/integers/u64/mul.leo.out index efc021cfed..79538fd5ac 100644 --- a/tests/expectations/compiler/compiler/integers/u64/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/mul.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "false" - initial_ast: ca99df266c5790f8cda429674c08e860553206e92b86f199d0c96284791cd65d - canonicalized_ast: ca99df266c5790f8cda429674c08e860553206e92b86f199d0c96284791cd65d - type_inferenced_ast: 4f67ecbe147319f147980d7e7e6009acca7dd64b816905de0ae8a9236ccd7892 + initial_ast: 036bcdf2738560a69431e37b7635bfcf562ca871a4bd13362b77a4e1e90cc0fd + canonicalized_ast: 036bcdf2738560a69431e37b7635bfcf562ca871a4bd13362b77a4e1e90cc0fd + type_inferenced_ast: 59d590d7091eb0c740a60de9895b98b9d70bd775f2fd00d9fe25beb3f39b0a8f diff --git a/tests/expectations/compiler/compiler/integers/u64/ne.leo.out b/tests/expectations/compiler/compiler/integers/u64/ne.leo.out index b4fadf3c32..8799e20d99 100644 --- a/tests/expectations/compiler/compiler/integers/u64/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/ne.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 8886fef054b4cac1edd6a33d239299d43f6ac400e12008179121e4ea0ee94147 - canonicalized_ast: 8886fef054b4cac1edd6a33d239299d43f6ac400e12008179121e4ea0ee94147 - type_inferenced_ast: 94d957c091c065a8e79d6f5d2b3855d6e06abe4d12f197fe164165ebdf1bb153 + initial_ast: 434048732d4e8ecf3ef871e262ab4349bca9184130868fc6f81bdb2f9f279eff + canonicalized_ast: 434048732d4e8ecf3ef871e262ab4349bca9184130868fc6f81bdb2f9f279eff + type_inferenced_ast: 0891a175cee05291ce0160ea7bd4d9a89e05bc8ad11aeb6854d5686ddc68b8c0 diff --git a/tests/expectations/compiler/compiler/integers/u64/sub.leo.out b/tests/expectations/compiler/compiler/integers/u64/sub.leo.out index 452a624c4c..697bec4ddc 100644 --- a/tests/expectations/compiler/compiler/integers/u64/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/sub.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: f0c0d33e8d540c5e86751de9b2277756eb1e23692d6493ed14772fd2fb6dfcd8 - canonicalized_ast: f0c0d33e8d540c5e86751de9b2277756eb1e23692d6493ed14772fd2fb6dfcd8 - type_inferenced_ast: cfe146004d2b0ee005eb43d3d0ccc0d220004b6bfc2ad57bf85cef4b00bea822 + initial_ast: e3d9d7e0777882927c0d62f969a00971eac702cc120a7228d495770b0508c8e2 + canonicalized_ast: e3d9d7e0777882927c0d62f969a00971eac702cc120a7228d495770b0508c8e2 + type_inferenced_ast: 1e073af4c2e020522743b359f27e62b2cdfef990ef3efde2e45eca72d1458694 diff --git a/tests/expectations/compiler/compiler/integers/u64/ternary.leo.out b/tests/expectations/compiler/compiler/integers/u64/ternary.leo.out index 97924efdc7..8e564366c0 100644 --- a/tests/expectations/compiler/compiler/integers/u64/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/ternary.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 4d198dc2eadde9ee692f73b4a168e81ee53afb6d8e87516d7b80b8f83ce5d700 - canonicalized_ast: 4d198dc2eadde9ee692f73b4a168e81ee53afb6d8e87516d7b80b8f83ce5d700 - type_inferenced_ast: aa8a249857023d1abec61d807ba3eec677428fd7b17eee256455bb388792473c + initial_ast: 0f1eb365e0b6533a4f9e6ebd6915a66945409beeab6b534e9aa4ebfd7429bf98 + canonicalized_ast: 0f1eb365e0b6533a4f9e6ebd6915a66945409beeab6b534e9aa4ebfd7429bf98 + type_inferenced_ast: 0726efa0b131dc2baa5662ced11c1a1da0424496b853cb7a44f8f30682a9b9b8 diff --git a/tests/expectations/compiler/compiler/integers/u8/add.leo.out b/tests/expectations/compiler/compiler/integers/u8/add.leo.out index 4f9f8eda4b..5bb2bdc182 100644 --- a/tests/expectations/compiler/compiler/integers/u8/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/add.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: d53c9a614e6526855cf93a203ddfc3c57bf71373facbbe12e26ce01b8cc5e62a - canonicalized_ast: d53c9a614e6526855cf93a203ddfc3c57bf71373facbbe12e26ce01b8cc5e62a - type_inferenced_ast: 47ed01052c149963c7895068e5fb25d190d36ba2e7b26e67620da6e4647bddcf + initial_ast: ac6f907e0bde03b050a6a400ec75c9ba36c8ef71e7229b74f6584ca8d2b91947 + canonicalized_ast: ac6f907e0bde03b050a6a400ec75c9ba36c8ef71e7229b74f6584ca8d2b91947 + type_inferenced_ast: dbbc25669e47bc45b3de20bbfb30b2b0a08558a0cfd738a5cadc8ac7b439a822 diff --git a/tests/expectations/compiler/compiler/integers/u8/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/u8/console_assert.leo.out index b65c5ed5a1..63e75d5d83 100644 --- a/tests/expectations/compiler/compiler/integers/u8/console_assert.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/console_assert.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: f3b07f0e3421f20b94732dbf4303444f642c4b9c9e333426aa9576cc423a69e7 - canonicalized_ast: f3b07f0e3421f20b94732dbf4303444f642c4b9c9e333426aa9576cc423a69e7 - type_inferenced_ast: 04e635a435e144bca1a442bbbfe9a37feb83239d7c18f564d5dd5aef4c5b5430 + initial_ast: 0d844d1f940b60507bf4756f3ec5d3ee7927c1b35f8625e6973da1c1cb7fc599 + canonicalized_ast: 0d844d1f940b60507bf4756f3ec5d3ee7927c1b35f8625e6973da1c1cb7fc599 + type_inferenced_ast: 6f643a6f222e06eb2f588ccecff5fe1dd4b037a9ac5ff340056dfd33093ae7a7 diff --git a/tests/expectations/compiler/compiler/integers/u8/div.leo.out b/tests/expectations/compiler/compiler/integers/u8/div.leo.out index ebc70777c2..7b8f66a81b 100644 --- a/tests/expectations/compiler/compiler/integers/u8/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/div.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 234e75c599118d8348a795f453d72a0edc2366473aa108616862ba95d15e4d40 - canonicalized_ast: 234e75c599118d8348a795f453d72a0edc2366473aa108616862ba95d15e4d40 - type_inferenced_ast: dc38b28d319513687def3402ffea1b66fe736ea883341f98f793d9dd32f99392 + initial_ast: b89d99a49767212fe042121c854f22669329d9c73b08894fe49e54b1d5364d20 + canonicalized_ast: b89d99a49767212fe042121c854f22669329d9c73b08894fe49e54b1d5364d20 + type_inferenced_ast: 51638eb70f7dddd16f8b12b97cd047b1c01161111e001aac2b578b697e15e375 diff --git a/tests/expectations/compiler/compiler/integers/u8/eq.leo.out b/tests/expectations/compiler/compiler/integers/u8/eq.leo.out index 248f080e0b..727b23fe74 100644 --- a/tests/expectations/compiler/compiler/integers/u8/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/eq.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 3cf870e5df71d351108f466e6f08e1f57f3a4629e3d63cc0c8d329637351ffd5 - canonicalized_ast: 3cf870e5df71d351108f466e6f08e1f57f3a4629e3d63cc0c8d329637351ffd5 - type_inferenced_ast: d11bae54b9eae60af1c4edf986b76406d7ea076ade6125850a128218c85bbdf0 + initial_ast: e5f1208c5eeddea9529cb7d94abd8402deea7fb99403d30b993d20455c486005 + canonicalized_ast: e5f1208c5eeddea9529cb7d94abd8402deea7fb99403d30b993d20455c486005 + type_inferenced_ast: 4262889173a452f869821a1c5156b16df25938323a1029b9ac16b2d851f590ab diff --git a/tests/expectations/compiler/compiler/integers/u8/ge.leo.out b/tests/expectations/compiler/compiler/integers/u8/ge.leo.out index 5557bb66b6..f788e88307 100644 --- a/tests/expectations/compiler/compiler/integers/u8/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/ge.leo.out @@ -28,6 +28,6 @@ outputs: r0: type: bool value: "true" - initial_ast: b48e11d86e676e24af8601694a5c4d30c3b4fdbfb1f81edd418c43f860685ad9 - canonicalized_ast: b48e11d86e676e24af8601694a5c4d30c3b4fdbfb1f81edd418c43f860685ad9 - type_inferenced_ast: 03f30c07a95050083325fe8745a3872509a9f753ac36afc40375624ef119bab6 + initial_ast: e112fdcf1e2d652ade77b4a66808e252bf380f9e0db3d4766828ea062fc4653f + canonicalized_ast: e112fdcf1e2d652ade77b4a66808e252bf380f9e0db3d4766828ea062fc4653f + type_inferenced_ast: 96f3e51cdf1f213854d70c733044bb1157391380fa4614e3ad604ce588ee2cfc diff --git a/tests/expectations/compiler/compiler/integers/u8/gt.leo.out b/tests/expectations/compiler/compiler/integers/u8/gt.leo.out index ae1da1d538..2d889a0bb7 100644 --- a/tests/expectations/compiler/compiler/integers/u8/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/gt.leo.out @@ -16,6 +16,6 @@ outputs: - input_file: u8_f.in output: registers: {} - initial_ast: cc6c8863fef25605109d3ba3a8068102df07e66bf786e777c60f78d685dca8ed - canonicalized_ast: d2221d06c782fb9e312722bd29b778b92a859b61d69f1a0026a75554f9f13b8e - type_inferenced_ast: c685412a9dd2c684134cd21084cada1ad4140a153a27bd562c15b8739c5700d6 + initial_ast: 367bd7c0e5be94e791a9d837ffd38b75346a717b6819180ac3f9de72252d27d5 + canonicalized_ast: 6d52d5232ccd2c88404b6fa137aecb9d40b02c6330995f1060e5f27f5b8ca224 + type_inferenced_ast: bdf5ecebb6a1522b6f2b94a2aab91550473604de2db6dc8d32ec19c2ab6ca590 diff --git a/tests/expectations/compiler/compiler/integers/u8/input.leo.out b/tests/expectations/compiler/compiler/integers/u8/input.leo.out index 6cd836f14d..a11b91c799 100644 --- a/tests/expectations/compiler/compiler/integers/u8/input.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/input.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 0ecf577b271c6170017f61b86a6b7788dfefe2b80cdf9c06eff54b0d8c6182c8 - canonicalized_ast: 0ecf577b271c6170017f61b86a6b7788dfefe2b80cdf9c06eff54b0d8c6182c8 - type_inferenced_ast: 6dfe6118b1c0efac72eb0716cedb8208df836f760ead632752b071e0833ad1e9 + initial_ast: 531f048a2b98e742368e050951fecd924e86bddc2434861a71727e9f56ef79cd + canonicalized_ast: 531f048a2b98e742368e050951fecd924e86bddc2434861a71727e9f56ef79cd + type_inferenced_ast: 2cd1ea5a7a527232d6b433796b486672bdd1eb9f29bedd492ddd88bc118bfac6 diff --git a/tests/expectations/compiler/compiler/integers/u8/le.leo.out b/tests/expectations/compiler/compiler/integers/u8/le.leo.out index b2da7f0464..c330c95df0 100644 --- a/tests/expectations/compiler/compiler/integers/u8/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/le.leo.out @@ -28,6 +28,6 @@ outputs: r0: type: bool value: "false" - initial_ast: 0a29783034e0298e8c0d26c92bbc72eda04124f49ab636208d8448fb80a19462 - canonicalized_ast: 0a29783034e0298e8c0d26c92bbc72eda04124f49ab636208d8448fb80a19462 - type_inferenced_ast: ed636957ef1a7920d8d1071f93cc463ae51dda0c5bbde1e77336b556e2a3e436 + initial_ast: 90d394dcd275a98675d2dd533d85387205c32197f34dac27bf926eadf260c3a4 + canonicalized_ast: 90d394dcd275a98675d2dd533d85387205c32197f34dac27bf926eadf260c3a4 + type_inferenced_ast: 9ecdb7705455bb31f65809c1eb79f31d2b68f17e6aea5d1c4d6038c730e4f6a2 diff --git a/tests/expectations/compiler/compiler/integers/u8/lt.leo.out b/tests/expectations/compiler/compiler/integers/u8/lt.leo.out index 1cbfeb4117..a3a0faa275 100644 --- a/tests/expectations/compiler/compiler/integers/u8/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/lt.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "false" - initial_ast: 4b4f8d0a77d3ccf56596af66ae7611ebe996ad3f46878c1858ce40e0190390a4 - canonicalized_ast: 4b4f8d0a77d3ccf56596af66ae7611ebe996ad3f46878c1858ce40e0190390a4 - type_inferenced_ast: be01b71586f5bd0158c5df8ddd2b1c31984a38252e73d16181dc5529f7532b22 + initial_ast: 61afedce9bcf1d0018a083b81bc3355cb161e9a92ed7519e52d027b83c2c0930 + canonicalized_ast: 61afedce9bcf1d0018a083b81bc3355cb161e9a92ed7519e52d027b83c2c0930 + type_inferenced_ast: 5f3d7fa99b36f82a7660a7ba7b6331c8eb2b805b1a46ea04c5b74ff1c32b6b93 diff --git a/tests/expectations/compiler/compiler/integers/u8/max.leo.out b/tests/expectations/compiler/compiler/integers/u8/max.leo.out index ee46afe0e7..6149ce792d 100644 --- a/tests/expectations/compiler/compiler/integers/u8/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/max.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 88c4d3735a0b8415c10ec173efb4777410d202ae6bb2264aacbf9e4633c9b548 - canonicalized_ast: 88c4d3735a0b8415c10ec173efb4777410d202ae6bb2264aacbf9e4633c9b548 - type_inferenced_ast: 5aba842dcded3dcba755c2804ab26be94e1077f549bfe59aef5a3cabe6abcc62 + initial_ast: 6342b402bd6699b8bc7b7ae840c4d3812f8ee1f8b59913ab66353d54e5972893 + canonicalized_ast: 6342b402bd6699b8bc7b7ae840c4d3812f8ee1f8b59913ab66353d54e5972893 + type_inferenced_ast: e9db0cb3f6a2537b42553b4b998c746fb8eb65f8ad1af2e2dfb0ee60243f1418 diff --git a/tests/expectations/compiler/compiler/integers/u8/min.leo.out b/tests/expectations/compiler/compiler/integers/u8/min.leo.out index ae74474b54..de61365e09 100644 --- a/tests/expectations/compiler/compiler/integers/u8/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/min.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 2278587c13e7154a718aac3621073ace474d3d9d896aefd7d59de753dd294b7d - canonicalized_ast: 2278587c13e7154a718aac3621073ace474d3d9d896aefd7d59de753dd294b7d - type_inferenced_ast: 6b04630df2ab8c3aa55229faf594feb3e1217122ef0ce4caa1e1f3236f46183c + initial_ast: ab129b038cecc6772d826b2cf0ee5ed5379cff8550d245602e599ac25a894d86 + canonicalized_ast: ab129b038cecc6772d826b2cf0ee5ed5379cff8550d245602e599ac25a894d86 + type_inferenced_ast: b7bc9ee14a8d2e35faa657e8fb739494b6e76f04bffbb91072185049d51d1ecf diff --git a/tests/expectations/compiler/compiler/integers/u8/mul.leo.out b/tests/expectations/compiler/compiler/integers/u8/mul.leo.out index 851e22672c..acbba34889 100644 --- a/tests/expectations/compiler/compiler/integers/u8/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/mul.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "false" - initial_ast: 3eaec0cbc660ca46f281a8bc7eab93cfd24069398498f25ee98b16d9f29b5aac - canonicalized_ast: 3eaec0cbc660ca46f281a8bc7eab93cfd24069398498f25ee98b16d9f29b5aac - type_inferenced_ast: 1c69cac9522b266de322a52070cb342ab322c366997c7b9ce21ca6d28f73c413 + initial_ast: 4ddfc75bb5e02c95e9a0063a7252f710a762826edbf18a6e66f856a1952225aa + canonicalized_ast: 4ddfc75bb5e02c95e9a0063a7252f710a762826edbf18a6e66f856a1952225aa + type_inferenced_ast: fb7db5e925bdfd5819e60f9e62d550e212956bf9848e5c4396ffda535b73fd48 diff --git a/tests/expectations/compiler/compiler/integers/u8/ne.leo.out b/tests/expectations/compiler/compiler/integers/u8/ne.leo.out index d4a9957d25..84570433b9 100644 --- a/tests/expectations/compiler/compiler/integers/u8/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/ne.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 6f017c906c07634ec46321c2d1c74512f5524533c433511ae41a6adb3d2e5645 - canonicalized_ast: 6f017c906c07634ec46321c2d1c74512f5524533c433511ae41a6adb3d2e5645 - type_inferenced_ast: b3c0792ab0be67554511d9849c1165da800afc23ffedce35b2e8adbcd9fd2f9b + initial_ast: cac942dae68f28bb032dee1b20345d38c4c1b948b1d9c77e02af98f2b17d3296 + canonicalized_ast: cac942dae68f28bb032dee1b20345d38c4c1b948b1d9c77e02af98f2b17d3296 + type_inferenced_ast: 9bd574d7862a1d10bdd1ca1096381d1fc2f1070433f189e48c8bfef3587da83f diff --git a/tests/expectations/compiler/compiler/integers/u8/sub.leo.out b/tests/expectations/compiler/compiler/integers/u8/sub.leo.out index dcd55bd33f..50ff8321c7 100644 --- a/tests/expectations/compiler/compiler/integers/u8/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/sub.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 116e9f1d4cc0924eb66f7b41baf832fbe184289d49d724bc033184fabb032233 - canonicalized_ast: 116e9f1d4cc0924eb66f7b41baf832fbe184289d49d724bc033184fabb032233 - type_inferenced_ast: 6eab8576e793f71d3881be971921315f1950b5da913aee290adc3a792bd9cd15 + initial_ast: 37f312fca99e18c20fc3b915d5e9691183e9c8a26facea674c94d18439f76419 + canonicalized_ast: 37f312fca99e18c20fc3b915d5e9691183e9c8a26facea674c94d18439f76419 + type_inferenced_ast: 184d52c1e60496d84b8ea7c99d47c4d61c54462ec876eb1ad9087d921e4bf4c2 diff --git a/tests/expectations/compiler/compiler/integers/u8/ternary.leo.out b/tests/expectations/compiler/compiler/integers/u8/ternary.leo.out index 63524a0159..0556332f0b 100644 --- a/tests/expectations/compiler/compiler/integers/u8/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/ternary.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: bool value: "true" - initial_ast: d4f8e4e36924eb918382114af6c9685fc3468889ad4441c1f319e92f27472683 - canonicalized_ast: d4f8e4e36924eb918382114af6c9685fc3468889ad4441c1f319e92f27472683 - type_inferenced_ast: 2fdd7be19e953011c14ac5d646d37d1a4c6d0897ff84b62e953e5053596e8131 + initial_ast: 12081a6268bceeb4d14340427a7d8786dee79834e8d0639530bda36405519f89 + canonicalized_ast: 12081a6268bceeb4d14340427a7d8786dee79834e8d0639530bda36405519f89 + type_inferenced_ast: 1dc21f41bccb8261f4d52ed0ea64b3dbea0a51b685afddb46692ccb3abd0aaef diff --git a/tests/expectations/compiler/compiler/mutability/array_dyn_mut.leo.out b/tests/expectations/compiler/compiler/mutability/array_dyn_mut.leo.out index f34cae6da4..0b62259bc4 100644 --- a/tests/expectations/compiler/compiler/mutability/array_dyn_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/array_dyn_mut.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: "[u32; 3]" value: "\"150\"" - initial_ast: 14716b7665f37b1f24d1fa17a63d40f5b5530177ba3d46c978760f9780a80634 - canonicalized_ast: 7cd7637f36b946909847129cbbbf55bb918a71496175580945965fb97b51f00b - type_inferenced_ast: 2b74a553d28c57a943f392ffc0331ab7dd8fe7ce18a3a9778346ac8b39fc8836 + initial_ast: 1b9dd4d93877ba82b0f45fa9512946bbf07683c6ab239d93c4a9a18530cc1eb7 + canonicalized_ast: 7b38858ddb99fd0e62727f508609aa05e68c7daf27429db5f2e0c59f137543ec + type_inferenced_ast: c492d1e3ec39f64c403105c5da177e6593c97ba93e71d187b040a095b1916f47 diff --git a/tests/expectations/compiler/compiler/mutability/array_dyn_mut_indirect.leo.out b/tests/expectations/compiler/compiler/mutability/array_dyn_mut_indirect.leo.out index 8205e3d502..e583f33d7e 100644 --- a/tests/expectations/compiler/compiler/mutability/array_dyn_mut_indirect.leo.out +++ b/tests/expectations/compiler/compiler/mutability/array_dyn_mut_indirect.leo.out @@ -22,6 +22,6 @@ outputs: r0: type: "[(u32, u32); 3]" value: "\"(1, 1)(2, 2)(0, 1)\"" - initial_ast: eb582af3ced3976038599fbc9f2f24e79704e72c1ef57954134dce9e40f99d00 - canonicalized_ast: eb582af3ced3976038599fbc9f2f24e79704e72c1ef57954134dce9e40f99d00 - type_inferenced_ast: c64b4a21fbb3085952141dcd7d1239cbdb7dcda5169832de724dbab9f7a1ac9b + initial_ast: 1c99d10e887a1d5127c01ea8e30b83e1ff063074c995dbfe4be8600af27e46be + canonicalized_ast: 1c99d10e887a1d5127c01ea8e30b83e1ff063074c995dbfe4be8600af27e46be + type_inferenced_ast: f78c73953ee24462f3f623cad8661e2a892901193ffedd93f030c49a7225cfe7 diff --git a/tests/expectations/compiler/compiler/mutability/array_mut.leo.out b/tests/expectations/compiler/compiler/mutability/array_mut.leo.out index 09d058b480..540a93fedf 100644 --- a/tests/expectations/compiler/compiler/mutability/array_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/array_mut.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: a16958d522d28eaf7afc55a5f44ed2c49511e50e58aa8d32b9eb6620a0e5ee55 - canonicalized_ast: a16958d522d28eaf7afc55a5f44ed2c49511e50e58aa8d32b9eb6620a0e5ee55 - type_inferenced_ast: 8a2d6cad8ed06b84a38478d024c9577b14398b04705484ecd3662b1fc7d6b174 + initial_ast: d1d84eaa70d3a5bc85b399d5cd16f62d78566638c9840e85c0eaed2c6a7218ac + canonicalized_ast: d1d84eaa70d3a5bc85b399d5cd16f62d78566638c9840e85c0eaed2c6a7218ac + type_inferenced_ast: 0c2bda504db5b7d1d4868ad20a3c70fa0e86dd1ec90c514c7a67161997495970 diff --git a/tests/expectations/compiler/compiler/mutability/array_splice_mut.leo.out b/tests/expectations/compiler/compiler/mutability/array_splice_mut.leo.out index ac9836c789..b0bf42402a 100644 --- a/tests/expectations/compiler/compiler/mutability/array_splice_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/array_splice_mut.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 722145cd544cd78e7fe71e1ddfc3e760c4f59aee292321f88c9f00833d2fce11 - canonicalized_ast: 722145cd544cd78e7fe71e1ddfc3e760c4f59aee292321f88c9f00833d2fce11 - type_inferenced_ast: b5f94d881dfe06f9ed969e2f5764ddc7be2078926283580425fbbe516d27f119 + initial_ast: 319d0e6e9e914b85e84803c5ac0c0bee32e5238e89fdcf2e7ac28c88b3386f3c + canonicalized_ast: 319d0e6e9e914b85e84803c5ac0c0bee32e5238e89fdcf2e7ac28c88b3386f3c + type_inferenced_ast: afce2509e7ecc4c7edb35a0d7536fd425171d9b0477c5f7ad731f7bba716c310 diff --git a/tests/expectations/compiler/compiler/mutability/array_tuple_mut.leo.out b/tests/expectations/compiler/compiler/mutability/array_tuple_mut.leo.out index 9d06c1e290..4ad3154498 100644 --- a/tests/expectations/compiler/compiler/mutability/array_tuple_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/array_tuple_mut.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 1df058bb963cf38b415c8b39484070d90fcbf0f97e2527c10e4c48aacb1968e5 - canonicalized_ast: 1df058bb963cf38b415c8b39484070d90fcbf0f97e2527c10e4c48aacb1968e5 - type_inferenced_ast: ba6c50a419d25aa6e21161ab194da0f2867363c1808b182ed70abd3e230b3767 + initial_ast: c34cb6ced1870107558689bad9fcf1a6ec465b0db85c2b6f10ddcecf9d5cae25 + canonicalized_ast: c34cb6ced1870107558689bad9fcf1a6ec465b0db85c2b6f10ddcecf9d5cae25 + type_inferenced_ast: 984811782861d636221d6b3ee89f13e8489d0b4ff8ec2f4a01feb5c940ebb8a7 diff --git a/tests/expectations/compiler/compiler/mutability/circuit_function_mut.leo.out b/tests/expectations/compiler/compiler/mutability/circuit_function_mut.leo.out index f304799cf3..fe01ab791e 100644 --- a/tests/expectations/compiler/compiler/mutability/circuit_function_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/circuit_function_mut.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: a761274f02370204ee81f13ec53e70e546a3af708f2c4dbd57301d83ad943921 - canonicalized_ast: 684b991ce89ec7a9b0a3ff9a69928f4fce8f1f7311e64e39bf628f0d6d74cc70 - type_inferenced_ast: 740e913caef569001b77d13319647af4b4449375349dc186621152825f3f1b3f + initial_ast: afde0187f805e33f804917815a52421a2662aa029b182be76c39f4ce5f3f453a + canonicalized_ast: 9dfd8d93fa20899e9d146d65b2564f1275cfb73158d8d96ed09f7157ff327e39 + type_inferenced_ast: e59a2cba730871aba6258b78f469b9df7763f8d78ad6bbda5c6026a989bc3d88 diff --git a/tests/expectations/compiler/compiler/mutability/circuit_variable_mut.leo.out b/tests/expectations/compiler/compiler/mutability/circuit_variable_mut.leo.out index e05be96986..2658736d93 100644 --- a/tests/expectations/compiler/compiler/mutability/circuit_variable_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/circuit_variable_mut.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 873238c253123be620267b8fdd74d9412fbbdd6796f7d32be76a3a72c47b6050 - canonicalized_ast: 873238c253123be620267b8fdd74d9412fbbdd6796f7d32be76a3a72c47b6050 - type_inferenced_ast: b46d7dcca53a2ea800751e5458ec69252c16b7a55190da89d40d548973782b8b + initial_ast: db9400fc979f1cfd8eea30945594b0e8d2f4138bb32021b9086021b492e2e246 + canonicalized_ast: db9400fc979f1cfd8eea30945594b0e8d2f4138bb32021b9086021b492e2e246 + type_inferenced_ast: 24783ef52315a02bb2f2e34f5a4020f09f4573ae6d182cab699bf45235e1c4a3 diff --git a/tests/expectations/compiler/compiler/mutability/cond_mut.leo.out b/tests/expectations/compiler/compiler/mutability/cond_mut.leo.out index 9bb7092c9c..2c8c19daca 100644 --- a/tests/expectations/compiler/compiler/mutability/cond_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/cond_mut.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 75d40f30a5bee2f28540b9741ac13501a0e78052dc3940492316b98355c88300 - canonicalized_ast: b43e5e2155e81c0de944ce44e7f0019fc5459bc132dd559567e3fe72058a6778 - type_inferenced_ast: 249d5ef9db2e4764dc27ce4c327e34b36852cfc96375db80aed1bb1364beabc5 + initial_ast: 1f9ad1f3e19f31a5e7195eb91ec9617e07d5eaf146fd1654eb4a5188f0268cbd + canonicalized_ast: 5ff794b8a47377190bb0a834df5c858bee7b6136204677e71db99b395a158d41 + type_inferenced_ast: 1555a60ba172865b0689ca934416a7840a678950f800a33825cb455fa101627c diff --git a/tests/expectations/compiler/compiler/mutability/function_input_mut.leo.out b/tests/expectations/compiler/compiler/mutability/function_input_mut.leo.out index 5c6952b579..c397be906c 100644 --- a/tests/expectations/compiler/compiler/mutability/function_input_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/function_input_mut.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: df85a5635f1dd8a74a62dbdab2c14d287541854ff27eb85c236576dcdc3e998f - canonicalized_ast: df85a5635f1dd8a74a62dbdab2c14d287541854ff27eb85c236576dcdc3e998f - type_inferenced_ast: 4491ad6b2e1875671bc35e62917044ac9eb6e82a7f042a83eaab63a79b552c48 + initial_ast: 198667d742dfeb7ff2e5a4aff4effeb9290682574faa7c4aa16ea9ea1f63975a + canonicalized_ast: 198667d742dfeb7ff2e5a4aff4effeb9290682574faa7c4aa16ea9ea1f63975a + type_inferenced_ast: 27b6e28e2f604e34e860b2c380efeed816b5c5009acc4072deb006d3efcd005f diff --git a/tests/expectations/compiler/compiler/mutability/let_mut.leo.out b/tests/expectations/compiler/compiler/mutability/let_mut.leo.out index a13754c8fa..8861d55252 100644 --- a/tests/expectations/compiler/compiler/mutability/let_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/let_mut.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 820a5f784b2654fda078f6c456830e270c0596f3e4e5a9502a3d3b55909bb696 - canonicalized_ast: 820a5f784b2654fda078f6c456830e270c0596f3e4e5a9502a3d3b55909bb696 - type_inferenced_ast: 307f4fb80f5f7753972056c6e88caa399cf4ca9cbb3e70b77dc925f5951e8f45 + initial_ast: fe19b0b255803d40b89cc69970126c016c9978a529472be4bfdb71af6bf74128 + canonicalized_ast: fe19b0b255803d40b89cc69970126c016c9978a529472be4bfdb71af6bf74128 + type_inferenced_ast: fc8cc3c7fbad2d163ad8f78a4c4deeebbc062df3b26a4388fd8550ad51ac0ece diff --git a/tests/expectations/compiler/compiler/mutability/let_mut_nested.leo.out b/tests/expectations/compiler/compiler/mutability/let_mut_nested.leo.out index 2497d4073c..7d3f3d7992 100644 --- a/tests/expectations/compiler/compiler/mutability/let_mut_nested.leo.out +++ b/tests/expectations/compiler/compiler/mutability/let_mut_nested.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 6040f153585cfa3c3a1d3f6adf7f99689ed815374d3df0a3cc6d7390e60fd5ec - canonicalized_ast: 6040f153585cfa3c3a1d3f6adf7f99689ed815374d3df0a3cc6d7390e60fd5ec - type_inferenced_ast: b377d1df3d92d9ee05907088ae131454b48bbc7f36f9b6f1a17ceb3b53f25f64 + initial_ast: 372f591679b8d314412a010f32be0082aa999c7016e761499da8317c12b13750 + canonicalized_ast: 372f591679b8d314412a010f32be0082aa999c7016e761499da8317c12b13750 + type_inferenced_ast: 8409be43d93bebe4ba303fc14b55ef95f987f8723051ddc963febebaeeb75e79 diff --git a/tests/expectations/compiler/compiler/mutability/swap.leo.out b/tests/expectations/compiler/compiler/mutability/swap.leo.out index 06cde2a2d7..289ab26c8a 100644 --- a/tests/expectations/compiler/compiler/mutability/swap.leo.out +++ b/tests/expectations/compiler/compiler/mutability/swap.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "false" - initial_ast: 7ebc13e9db4a339cbfb42c90ba4b642ef0aae43741f13309f6388ec3da9a7404 - canonicalized_ast: 7ebc13e9db4a339cbfb42c90ba4b642ef0aae43741f13309f6388ec3da9a7404 - type_inferenced_ast: 6e8bc8c404188408836a85f7a0342857c321c80cc199da5d9d66e26e06644d14 + initial_ast: d242fc681e75003adf2e36aecbca50f8c338f8b40b4cf53342857cc672c753a2 + canonicalized_ast: d242fc681e75003adf2e36aecbca50f8c338f8b40b4cf53342857cc672c753a2 + type_inferenced_ast: 21e2566f3ed62dc1bd39cb3b9a7b37bb84c5a621bbb5ee77c4af08412e321e94 diff --git a/tests/expectations/compiler/compiler/statements/all_loops.leo.out b/tests/expectations/compiler/compiler/statements/all_loops.leo.out index 4e1594057f..b2a11d740c 100644 --- a/tests/expectations/compiler/compiler/statements/all_loops.leo.out +++ b/tests/expectations/compiler/compiler/statements/all_loops.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: ef03a9e7eeed0a80db7460f7f20472bfd001e456242d1abc746a02ea75d524fa - canonicalized_ast: 540da0a1cad9e3d08f8b4db729452fd65a057fde6a3e2bad7cbe4470ba1d8570 - type_inferenced_ast: 7934657497349fe137be1f4b3afd8933028718c28f9ab6ebcbe7a6d831ec75e0 + initial_ast: 16484d1177234086a3e8a1c32d2b82e0f1b8d3d93a659aba714d6cd5479bbe8b + canonicalized_ast: da9bcca9fe3e363b62bec3be7f446dd416f72a18aeb91e83c30d2314d67b1881 + type_inferenced_ast: 6d31a33082f9dd2e9a54dcbb90bca315ac328cd93d7979d48b696ba39f6e6f38 diff --git a/tests/expectations/compiler/compiler/statements/block.leo.out b/tests/expectations/compiler/compiler/statements/block.leo.out index 0afd92c39f..3d0900fcc5 100644 --- a/tests/expectations/compiler/compiler/statements/block.leo.out +++ b/tests/expectations/compiler/compiler/statements/block.leo.out @@ -16,6 +16,6 @@ outputs: a: type: bool value: "true" - initial_ast: 4ac2ff62513f6a6fd4e7c241a46c8392778d49837983372e93629e98a4611ee8 - canonicalized_ast: 2954fd2f74fe8eca3cb6d1f50fbf664649831eb042a514eee72f98a8d29d3b81 - type_inferenced_ast: 19815ae04b63a15c84151aeecb658534923ef87749ecc7d6b031be21f4da9eac + initial_ast: 0126e151faacae24bc508e67a5c8d1d78024fed8da226238ad6436851e5b025e + canonicalized_ast: 34e85a0c78e50ee4718fa07458bbdb433399f71833479af414cdb7e7f6b482c2 + type_inferenced_ast: f92fcf546c8559c31db54cf6b19b17f955e568132a12280f7c3804f57fb339d4 diff --git a/tests/expectations/compiler/compiler/statements/chain.leo.out b/tests/expectations/compiler/compiler/statements/chain.leo.out index 40213ebf81..a16e4872ea 100644 --- a/tests/expectations/compiler/compiler/statements/chain.leo.out +++ b/tests/expectations/compiler/compiler/statements/chain.leo.out @@ -28,6 +28,6 @@ outputs: a: type: bool value: "false" - initial_ast: b39f1f2b4c314bb3dde18560288d2aff8db93c0e13f1fb429260bac821eea521 - canonicalized_ast: b39f1f2b4c314bb3dde18560288d2aff8db93c0e13f1fb429260bac821eea521 - type_inferenced_ast: 272d80f0d95469b8b0d304eb59c062d8df55793ea175f97fe09da9e6b495c2f3 + initial_ast: 07fb0d55368685050d065a7b7cc7e19e7fa119754bbf10a4aab46580ae74c51a + canonicalized_ast: 07fb0d55368685050d065a7b7cc7e19e7fa119754bbf10a4aab46580ae74c51a + type_inferenced_ast: eaa4797908d50053ba52f7ead813fe071aeacf4a24d1b57ed77188f58c3f5348 diff --git a/tests/expectations/compiler/compiler/statements/compound_assignment.leo.out b/tests/expectations/compiler/compiler/statements/compound_assignment.leo.out index 3497d6802f..c171430d72 100644 --- a/tests/expectations/compiler/compiler/statements/compound_assignment.leo.out +++ b/tests/expectations/compiler/compiler/statements/compound_assignment.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 6ed63ca447d6b2929e4fcda22f691c0c28b4370b98ea7cad2c2c7c2906f0a931 - canonicalized_ast: 29a6c2fa33aa9163c17c8a607b0e7e560d91288360023f45400f442e4d14653d - type_inferenced_ast: 07d7177148120b72e4c1ba53feddc4d52124cc8a2e5252afd759b0cf3c7c321a + initial_ast: b260517dc70a401c68acfc09bd6434b55b61446e27bd940ad339987eb22ff85e + canonicalized_ast: eb5f37501878e5f97180a6f289f29795e09cb2da6fb031ed7ccb83681b407123 + type_inferenced_ast: 3abe1f8136d17844e2d11db603945fc06365cf91b51b9df0a2f700be94df8766 diff --git a/tests/expectations/compiler/compiler/statements/for_loop.leo.out b/tests/expectations/compiler/compiler/statements/for_loop.leo.out index b88dd41663..55dd2ce7ba 100644 --- a/tests/expectations/compiler/compiler/statements/for_loop.leo.out +++ b/tests/expectations/compiler/compiler/statements/for_loop.leo.out @@ -16,6 +16,6 @@ outputs: a: type: bool value: "true" - initial_ast: a890e3e551566e2cdd795853886d77b6f2c51aba81a29a632a30f53db42e5681 - canonicalized_ast: 7d6c6159c6616e37524747ce2f286f676d1414bd6afae0593ab48541b4a51454 - type_inferenced_ast: ef79ca5cb8dee89b6df046cb15fb5bdc82ad22b7f3450aff1376178f46731dbd + initial_ast: 15072d280d783640c9810be541201c6f71708687ffe7242503ec03012cf9ab67 + canonicalized_ast: 26d817bfd0168ac3aa31b7f197cf8f9273ca4c94b25b9df5a7112c228047cc7b + type_inferenced_ast: 1f5484f5993b7993ac6f10aaef884fbf502ae0efeabf5c9044c38bc7a4dc3011 diff --git a/tests/expectations/compiler/compiler/statements/iteration_basic.leo.out b/tests/expectations/compiler/compiler/statements/iteration_basic.leo.out index b32b9446e2..8958ce64ff 100644 --- a/tests/expectations/compiler/compiler/statements/iteration_basic.leo.out +++ b/tests/expectations/compiler/compiler/statements/iteration_basic.leo.out @@ -16,6 +16,6 @@ outputs: a: type: bool value: "true" - initial_ast: 84dd73f4b7a624d7dc4decd0c5d8d700a117d47202ea1fe306baf8eb1539bebb - canonicalized_ast: 2dc3cfabebd95eee40315bc8d5235bee1972453be6f95e722fb109e0740ec946 - type_inferenced_ast: 07e46085a75fb8660fe12b9f01b26455f09cda3f0ef809c90e0b51e8b4fd3550 + initial_ast: 7352861b3e7107ec349b2fd905e95fd78bdc79829ecec90eafa2c3bfa36e0716 + canonicalized_ast: bcb00069768d5ce3902d0ee802aa8b1f23132619ca627b5aadc01200565870c1 + type_inferenced_ast: 35cc981849af0cb83ed968b6dd466efbf7c7733cf9fed2e9a0880e2771640ce1 diff --git a/tests/expectations/compiler/compiler/statements/iteration_variable.leo.out b/tests/expectations/compiler/compiler/statements/iteration_variable.leo.out index caa8f9ffee..811d97f278 100644 --- a/tests/expectations/compiler/compiler/statements/iteration_variable.leo.out +++ b/tests/expectations/compiler/compiler/statements/iteration_variable.leo.out @@ -16,6 +16,6 @@ outputs: a: type: bool value: "true" - initial_ast: 7cc6d6722d1660082ac6becc9f67c7b1cfd3f62a9fdfe38e2ddbe92c194588d5 - canonicalized_ast: ad5b7a770161132b7c6908d9fabc6722bb8bee73c33a970712d55f35b75aa017 - type_inferenced_ast: 1385fa17eb53b0ba18f9afde2d338a86d10955011da087e75f5e3a27edeb9d5b + initial_ast: 4c020866d910371924bfa7f24761e022b658ac7f38ff6348fc837fb026b43b22 + canonicalized_ast: dfc10c9e46558ebf7654a49fb87a61bae5fa3d5f8384b4e144761518a762f0d1 + type_inferenced_ast: 3aef844b36c18ec04f9f6cacf679182b752a720ac038b71569791e7e12e5eca5 diff --git a/tests/expectations/compiler/compiler/statements/multiple_returns.leo.out b/tests/expectations/compiler/compiler/statements/multiple_returns.leo.out index afb4279519..8ed2ee0809 100644 --- a/tests/expectations/compiler/compiler/statements/multiple_returns.leo.out +++ b/tests/expectations/compiler/compiler/statements/multiple_returns.leo.out @@ -22,6 +22,6 @@ outputs: a: type: bool value: "false" - initial_ast: ce2d4c3eed6d94b96094e3adcf736b38630e99733effb290b6f67b9a9f4bcc45 - canonicalized_ast: ce2d4c3eed6d94b96094e3adcf736b38630e99733effb290b6f67b9a9f4bcc45 - type_inferenced_ast: 75cf948d34c6d4b4ccff5489c0f86f6cffcaf949b89bd445e70dbe47e8dfce3a + initial_ast: 3e1bc14f1bc7e4b083bde21cfd0e833333142bfbcf247b60e77d0ffb8a159e98 + canonicalized_ast: 3e1bc14f1bc7e4b083bde21cfd0e833333142bfbcf247b60e77d0ffb8a159e98 + type_inferenced_ast: 927f1640868f0a50f30ac3a9604dc99f9ec5e7906884007cfea7a10333bb06d8 diff --git a/tests/expectations/compiler/compiler/statements/mutate.leo.out b/tests/expectations/compiler/compiler/statements/mutate.leo.out index 8bc7ac5893..030ff12ccd 100644 --- a/tests/expectations/compiler/compiler/statements/mutate.leo.out +++ b/tests/expectations/compiler/compiler/statements/mutate.leo.out @@ -22,6 +22,6 @@ outputs: a: type: bool value: "true" - initial_ast: af885844f2423d9694fc10c0ced30fa121e5c829ff6a47bee110b20e9d6a0109 - canonicalized_ast: af885844f2423d9694fc10c0ced30fa121e5c829ff6a47bee110b20e9d6a0109 - type_inferenced_ast: ecaa5694f982748c5ec885ce21cff5c67bb64b1683797b2818749f0cb09dc4ef + initial_ast: 2ac096dbb8840a8a71cb14365272088509094ffae32f1bcd44618a5fa9abc35e + canonicalized_ast: 2ac096dbb8840a8a71cb14365272088509094ffae32f1bcd44618a5fa9abc35e + type_inferenced_ast: cb7037b631e1a9994a7dc347bf834804acd1e28e5f4ace536aef36ae41695e20 diff --git a/tests/expectations/compiler/compiler/statements/nested_mutate.leo.out b/tests/expectations/compiler/compiler/statements/nested_mutate.leo.out index c042238389..ebb4ab1cce 100644 --- a/tests/expectations/compiler/compiler/statements/nested_mutate.leo.out +++ b/tests/expectations/compiler/compiler/statements/nested_mutate.leo.out @@ -28,6 +28,6 @@ outputs: a: type: bool value: "false" - initial_ast: 376b076978ab1dc197db1e883eb303af4f54e4c5da42f3f70b813689a7020de1 - canonicalized_ast: 57f161fb0212d024f63298577379f57ad88a91677106c282c2bd2073a3ba1b06 - type_inferenced_ast: 78a0a8ade96e6d1e1e20668b5f78884f108c956ae717890d442ea0e723aaf502 + initial_ast: 45eb01ab83d086d7e6a07c03e47b01d6e0d07f668e3b76138283a64b1e0c5760 + canonicalized_ast: 6c426c224bd59f40be37e044750db2de10527168924a85aae9c90bb6d8fd7c5f + type_inferenced_ast: 7510f5f6eba668e63befb0b9f4119e28382caac699d0da21587a62fe4746b6c9 diff --git a/tests/expectations/compiler/compiler/statements/reverse_loops.leo.out b/tests/expectations/compiler/compiler/statements/reverse_loops.leo.out index 59b218a195..fe35d557f9 100644 --- a/tests/expectations/compiler/compiler/statements/reverse_loops.leo.out +++ b/tests/expectations/compiler/compiler/statements/reverse_loops.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 172cb3ca8dadc4f2f7a67e77a00e8d3e832ed15f8996a6b57352d9e98fd11d36 - canonicalized_ast: 64bd366c390e2837d2c739cbd4175fa71846ddd228fb1e0a612ae80539d50b89 - type_inferenced_ast: 2d4a666a45c4c6ecccd922bf5166c8db2eb49a600519fca68e751d4b763ab1ab + initial_ast: 6bbf937830bb2dfbd2f308f47ca8ff50a405aed0cec27aca4de4f83ed1ee8186 + canonicalized_ast: 0ba1c0416d295b92a9747cbf7f9d263c9b45b269bce23a0ab4afd932219b7950 + type_inferenced_ast: f00d268715b94de26102bc7d54b7238fec08fc7c4a01a713e1162b9d52e097e3 diff --git a/tests/expectations/compiler/compiler/statements/reverse_one.leo.out b/tests/expectations/compiler/compiler/statements/reverse_one.leo.out index 2f76e5c829..7517a30218 100644 --- a/tests/expectations/compiler/compiler/statements/reverse_one.leo.out +++ b/tests/expectations/compiler/compiler/statements/reverse_one.leo.out @@ -16,6 +16,6 @@ outputs: r0: type: bool value: "true" - initial_ast: 0314ac2650bd7cad7f90f929a21a643e895de24da72829a22c2d481e3fe16bcc - canonicalized_ast: 7cb323958fb7b3e91f8b0c7da7b6354a85ab9ea0123b32a34d389f03883fc457 - type_inferenced_ast: 01dfade707b4f836382f40f3fba760a96febfde52b26931508eede793aed28f9 + initial_ast: fef6eef9955869631e3cc48ce5127e519a8f3483a440d243e12ff241f0f24b67 + canonicalized_ast: 88939f0afb3e09a85f48ae2022c97128a260bd4eee667dc26e32f48d8b3253e5 + type_inferenced_ast: c10090137663610771d6e8144806b5899f23a881dd810432559848bf3e48bc82 diff --git a/tests/expectations/compiler/compiler/string/circuit.leo.out b/tests/expectations/compiler/compiler/string/circuit.leo.out index 93de89e7f8..00776b17f3 100644 --- a/tests/expectations/compiler/compiler/string/circuit.leo.out +++ b/tests/expectations/compiler/compiler/string/circuit.leo.out @@ -16,6 +16,6 @@ outputs: out: type: "[char; 13]" value: "\"Hello, World!\"" - initial_ast: de12485742001f61c8b7cf50385def19389159ce135576a9249244cb10e28af5 - canonicalized_ast: 93e31f5eb6d4d5f74895f649c4f2fca337000548860f395ec2b1ab5f2a75a815 - type_inferenced_ast: bdab7de3392691c4193c83543cb7290c191830164b6007038a798110306d0ceb + initial_ast: 3ece39236ca03d9f6e4a89ae1a5f27cdbc8036eb1485913a2043d1e0a44beb3c + canonicalized_ast: b3df972e5b9658b6addba6f82e972043620a591f5981ac009b56fb6965742695 + type_inferenced_ast: 22fdc2ba01f04dbe8140df231d6f8c77ad4b5e62a12dfb45a67686830ebee455 diff --git a/tests/expectations/compiler/compiler/string/equality.leo.out b/tests/expectations/compiler/compiler/string/equality.leo.out index b1d5215766..75e85e5ed4 100644 --- a/tests/expectations/compiler/compiler/string/equality.leo.out +++ b/tests/expectations/compiler/compiler/string/equality.leo.out @@ -22,6 +22,6 @@ outputs: out: type: bool value: "false" - initial_ast: 1f5b8fda209b42fc4a299a77e5184a4929b8a1d734e60ad459a167e5446f53b0 - canonicalized_ast: c30505d9da2a178268c2d4ff45816a90bfa487266bb6f68a660cb6ccf9c91863 - type_inferenced_ast: 3fd2d61cfd97263dc8dc0476d42be3d897a0d201b61ed602e8aaad1ec56827bf + initial_ast: cb656e2f6fdbf4250957c867db059168afb7240fb085f8a850a0f0d7857a80e9 + canonicalized_ast: 7b67543fdb551982c7da1eb3f89ef5c68a4c85de9c6e01259df61532c763e236 + type_inferenced_ast: 4b4fe877cfe562d1c86b0936025390241a26cf21956d2a00cab1c04e0c5ea73b diff --git a/tests/expectations/compiler/compiler/string/replace.leo.out b/tests/expectations/compiler/compiler/string/replace.leo.out index bc62d1e934..34c380ca0e 100644 --- a/tests/expectations/compiler/compiler/string/replace.leo.out +++ b/tests/expectations/compiler/compiler/string/replace.leo.out @@ -22,6 +22,6 @@ outputs: out: type: bool value: "true" - initial_ast: 62f1928217809d9ad03b4a7b33e57f958a94e2ae8fd30e651528d859aa3555b5 - canonicalized_ast: 837f6eac27b9b50729f94095b3bc3d3529b3362834fa7769b228a8ea0bcde0d2 - type_inferenced_ast: 623248c36159cba2b448fdf1fde3b17f0c6e6ffd5e6dbd60ef1509bbb4571b33 + initial_ast: c0e04242e6a567cdfb4df87912d8c7ab31a19883c3cf0d953b29a767304adba9 + canonicalized_ast: 98bfa17b9e22ad3a06ff41acd60be67b8f34597d89d38abb3b122b22a38f52d8 + type_inferenced_ast: 6598fc525d9b2fed0db8c741ce90820196d1514d6cc739b957f4f133c46592f4 diff --git a/tests/expectations/compiler/compiler/string/string_transformation.leo.out b/tests/expectations/compiler/compiler/string/string_transformation.leo.out index b2ecc72e58..e504e3b6bb 100644 --- a/tests/expectations/compiler/compiler/string/string_transformation.leo.out +++ b/tests/expectations/compiler/compiler/string/string_transformation.leo.out @@ -16,6 +16,6 @@ outputs: out: type: bool value: "true" - initial_ast: 31a98820f6b162317a3fa69924df8b8d784a9d5ded3c790622f64f0dfa438997 - canonicalized_ast: 0bc86b996359a0767253e1ec18c09ffc83da3d71b1dadbde9e22846751f8e0bc - type_inferenced_ast: 142e9fd6e7009bf840f0bb08365cad239008b66510eb2c1015ca0afc8455be60 + initial_ast: 09f60770cc5c2d3765eaaaff677e6b0241693db4fb2355859a8787fc837e3b6d + canonicalized_ast: 38b83b23c154e103c0a8564a1845ff75bf270519a87a2d36db659ba616adea38 + type_inferenced_ast: 8090cc48aa49d2a70270c3d2aa8614830a73be2369a1ad91fe57d83aeb7afbb8 diff --git a/tests/expectations/compiler/compiler/tuples/access.leo.out b/tests/expectations/compiler/compiler/tuples/access.leo.out index 682a7ca359..a8a592cf15 100644 --- a/tests/expectations/compiler/compiler/tuples/access.leo.out +++ b/tests/expectations/compiler/compiler/tuples/access.leo.out @@ -19,6 +19,6 @@ outputs: c: type: bool value: "false" - initial_ast: 4a7cf5f45f1dd0ed886ade721c89a238da47f2387069de9d0557aad4b9a1b75b - canonicalized_ast: 4a7cf5f45f1dd0ed886ade721c89a238da47f2387069de9d0557aad4b9a1b75b - type_inferenced_ast: 20cec96ebfe04679ebb9f3082316d13bfea9b58ae966f9d89b3706d523f63068 + initial_ast: 26ccb648c843da2de819fa0451bb2aff8e187d2cda920aaccf43e1d2d7f0e95b + canonicalized_ast: 26ccb648c843da2de819fa0451bb2aff8e187d2cda920aaccf43e1d2d7f0e95b + type_inferenced_ast: 7bba16bcec82e82bce1892a9401b2a7c7529f20d25a32c77d727251e2844869d diff --git a/tests/expectations/compiler/compiler/tuples/basic.leo.out b/tests/expectations/compiler/compiler/tuples/basic.leo.out index 3e5e39622d..e0bad6c1f6 100644 --- a/tests/expectations/compiler/compiler/tuples/basic.leo.out +++ b/tests/expectations/compiler/compiler/tuples/basic.leo.out @@ -19,6 +19,6 @@ outputs: c: type: bool value: "false" - initial_ast: 16df9dc4ece6b3514b5c61a4b6a28a8a679e1746cc8f74cd34cedd276568a640 - canonicalized_ast: 16df9dc4ece6b3514b5c61a4b6a28a8a679e1746cc8f74cd34cedd276568a640 - type_inferenced_ast: 94ab82dfdc57d744e56bcc405e94449a6702f22045a8bcd3f1b20da312655bce + initial_ast: b8ecc455d0eb34031adea3dd2f74dc4eaeecd0a47fb3143db786c672015383ca + canonicalized_ast: b8ecc455d0eb34031adea3dd2f74dc4eaeecd0a47fb3143db786c672015383ca + type_inferenced_ast: 77ece65393296b71964354ac6915049d5f40d5a22288c3c47bb3889e17cca692 diff --git a/tests/expectations/compiler/compiler/tuples/dependent.leo.out b/tests/expectations/compiler/compiler/tuples/dependent.leo.out index 9b8f204ff1..2663bf4676 100644 --- a/tests/expectations/compiler/compiler/tuples/dependent.leo.out +++ b/tests/expectations/compiler/compiler/tuples/dependent.leo.out @@ -19,6 +19,6 @@ outputs: c: type: bool value: "false" - initial_ast: 153f83411b21a2696171a6eab83c81b40643fe9608ae61291858fbc0e256ea93 - canonicalized_ast: 153f83411b21a2696171a6eab83c81b40643fe9608ae61291858fbc0e256ea93 - type_inferenced_ast: 075b22f579fb7bebf6ed9af1e0cfddf27756d78ae5f39205b34898359658359c + initial_ast: a2a6a6b41de694d8203c33d3f90fc2c1526b604fb57ee4883b993e446b81e648 + canonicalized_ast: a2a6a6b41de694d8203c33d3f90fc2c1526b604fb57ee4883b993e446b81e648 + type_inferenced_ast: 2a1ef0e8fa141193320610df76dc78e6fb3db99f9db8f4ffa8221a90f90f7f40 diff --git a/tests/expectations/compiler/compiler/tuples/destructured.leo.out b/tests/expectations/compiler/compiler/tuples/destructured.leo.out index eabdddda6e..1363798751 100644 --- a/tests/expectations/compiler/compiler/tuples/destructured.leo.out +++ b/tests/expectations/compiler/compiler/tuples/destructured.leo.out @@ -19,6 +19,6 @@ outputs: c: type: bool value: "true" - initial_ast: c39e1fc8bfa14ea666318da537826586eb930b9e9d97ee66742023eb2ff9ad4c - canonicalized_ast: c39e1fc8bfa14ea666318da537826586eb930b9e9d97ee66742023eb2ff9ad4c - type_inferenced_ast: db258d6cb1ddd585f603830905284d2a5c24d716116ce12c861b1a7f8e292ec7 + initial_ast: 98996bc72276bc5cbf211e7559997e8e73a85fce60afd49aa88aee17d1634973 + canonicalized_ast: 98996bc72276bc5cbf211e7559997e8e73a85fce60afd49aa88aee17d1634973 + type_inferenced_ast: 664df8d84cc5ff6bcd4300df23227871ec938459b991d86384fdd1f15b3a89ca diff --git a/tests/expectations/compiler/compiler/tuples/nested_access.leo.out b/tests/expectations/compiler/compiler/tuples/nested_access.leo.out index a611960f44..c4af57aaf4 100644 --- a/tests/expectations/compiler/compiler/tuples/nested_access.leo.out +++ b/tests/expectations/compiler/compiler/tuples/nested_access.leo.out @@ -19,6 +19,6 @@ outputs: c: type: bool value: "false" - initial_ast: f7a51cb79dbcebfecf8ae6fac14031ca7e6b72d7fa15281b9a0cc71500f02507 - canonicalized_ast: f7a51cb79dbcebfecf8ae6fac14031ca7e6b72d7fa15281b9a0cc71500f02507 - type_inferenced_ast: 837c32d828eb32b08e0378113a06d7c7483bfe6f40ee8322a3900749aa80d012 + initial_ast: ef3718fc909a28703e2487661aafb3fc24a858428d79d2ab7bb3743a162ed6a1 + canonicalized_ast: ef3718fc909a28703e2487661aafb3fc24a858428d79d2ab7bb3743a162ed6a1 + type_inferenced_ast: 14e0a6cf8847f1a292a5b22db1173b6c5181e5d49d8f6046d072620a0e94ff07 diff --git a/tests/expectations/parser/parser/circuits/big_self.leo.out b/tests/expectations/parser/parser/circuits/big_self.leo.out index 4d67804a46..7ab99429ca 100644 --- a/tests/expectations/parser/parser/circuits/big_self.leo.out +++ b/tests/expectations/parser/parser/circuits/big_self.leo.out @@ -41,13 +41,13 @@ outputs: col_start: 26 col_stop: 6 path: "" - content: " function x() -> Self {\n...\n }" + content: " function x() -> Self {\n ...\n }" span: line_start: 4 line_stop: 6 col_start: 5 col_stop: 6 path: "" - content: " function x() -> Self {\n...\n }" + content: " function x() -> Self {\n ...\n }" global_consts: {} functions: {} diff --git a/tests/expectations/parser/parser/circuits/field_and_functions.leo.out b/tests/expectations/parser/parser/circuits/field_and_functions.leo.out index 0a8efde0b0..2001535836 100644 --- a/tests/expectations/parser/parser/circuits/field_and_functions.leo.out +++ b/tests/expectations/parser/parser/circuits/field_and_functions.leo.out @@ -46,14 +46,14 @@ outputs: col_start: 18 col_stop: 6 path: "" - content: " function x() {\n...\n }" + content: " function x() {\n ...\n }" span: line_start: 6 line_stop: 8 col_start: 5 col_stop: 6 path: "" - content: " function x() {\n...\n }" + content: " function x() {\n ...\n }" - CircuitFunction: annotations: [] identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function y() {\\\"}\"}" @@ -85,13 +85,13 @@ outputs: col_start: 18 col_stop: 6 path: "" - content: " function y() {\n...\n }" + content: " function y() {\n ...\n }" span: line_start: 9 line_stop: 11 col_start: 5 col_stop: 6 path: "" - content: " function y() {\n...\n }" + content: " function y() {\n ...\n }" global_consts: {} functions: {} diff --git a/tests/expectations/parser/parser/circuits/functions.leo.out b/tests/expectations/parser/parser/circuits/functions.leo.out index de67732577..456134649f 100644 --- a/tests/expectations/parser/parser/circuits/functions.leo.out +++ b/tests/expectations/parser/parser/circuits/functions.leo.out @@ -40,14 +40,14 @@ outputs: col_start: 18 col_stop: 6 path: "" - content: " function x() {\n...\n }" + content: " function x() {\n ...\n }" span: line_start: 4 line_stop: 6 col_start: 5 col_stop: 6 path: "" - content: " function x() {\n...\n }" + content: " function x() {\n ...\n }" - CircuitFunction: annotations: [] identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function y() {\\\"}\"}" @@ -79,13 +79,13 @@ outputs: col_start: 18 col_stop: 6 path: "" - content: " function y() {\n...\n }" + content: " function y() {\n ...\n }" span: line_start: 7 line_stop: 9 col_start: 5 col_stop: 6 path: "" - content: " function y() {\n...\n }" + content: " function y() {\n ...\n }" global_consts: {} functions: {} diff --git a/tests/expectations/parser/parser/circuits/mut_self.leo.out b/tests/expectations/parser/parser/circuits/mut_self.leo.out index bbd0410f66..5aac598fe5 100644 --- a/tests/expectations/parser/parser/circuits/mut_self.leo.out +++ b/tests/expectations/parser/parser/circuits/mut_self.leo.out @@ -41,13 +41,13 @@ outputs: col_start: 26 col_stop: 6 path: "" - content: " function x(mut self) {\n...\n }" + content: " function x(mut self) {\n ...\n }" span: line_start: 4 line_stop: 6 col_start: 5 col_stop: 6 path: "" - content: " function x(mut self) {\n...\n }" + content: " function x(mut self) {\n ...\n }" global_consts: {} functions: {} diff --git a/tests/expectations/parser/parser/circuits/self.leo.out b/tests/expectations/parser/parser/circuits/self.leo.out index bf8a1bfaf7..728f595922 100644 --- a/tests/expectations/parser/parser/circuits/self.leo.out +++ b/tests/expectations/parser/parser/circuits/self.leo.out @@ -41,13 +41,13 @@ outputs: col_start: 22 col_stop: 6 path: "" - content: " function x(self) {\n...\n }" + content: " function x(self) {\n ...\n }" span: line_start: 4 line_stop: 6 col_start: 5 col_stop: 6 path: "" - content: " function x(self) {\n...\n }" + content: " function x(self) {\n ...\n }" global_consts: {} functions: {} diff --git a/tests/expectations/parser/parser/functions/annotated.leo.out b/tests/expectations/parser/parser/functions/annotated.leo.out index 447958aff6..36507df8ff 100644 --- a/tests/expectations/parser/parser/functions/annotated.leo.out +++ b/tests/expectations/parser/parser/functions/annotated.leo.out @@ -48,11 +48,11 @@ outputs: col_start: 14 col_stop: 2 path: "" - content: "function x() {\n...\n}" + content: "function x() {\n ...\n}" span: line_start: 4 line_stop: 6 col_start: 1 col_stop: 2 path: "" - content: "function x() {\n...\n}" + content: "function x() {\n ...\n}" diff --git a/tests/expectations/parser/parser/functions/annotated_param.leo.out b/tests/expectations/parser/parser/functions/annotated_param.leo.out index c3103b64c2..a2654b5268 100644 --- a/tests/expectations/parser/parser/functions/annotated_param.leo.out +++ b/tests/expectations/parser/parser/functions/annotated_param.leo.out @@ -49,11 +49,11 @@ outputs: col_start: 14 col_stop: 2 path: "" - content: "function x() {\n...\n}" + content: "function x() {\n ...\n}" span: line_start: 4 line_stop: 6 col_start: 1 col_stop: 2 path: "" - content: "function x() {\n...\n}" + content: "function x() {\n ...\n}" diff --git a/tests/expectations/parser/parser/functions/annotated_twice.leo.out b/tests/expectations/parser/parser/functions/annotated_twice.leo.out index 9ca087d95b..2d67d2236c 100644 --- a/tests/expectations/parser/parser/functions/annotated_twice.leo.out +++ b/tests/expectations/parser/parser/functions/annotated_twice.leo.out @@ -57,11 +57,11 @@ outputs: col_start: 14 col_stop: 2 path: "" - content: "function x() {\n...\n}" + content: "function x() {\n ...\n}" span: line_start: 4 line_stop: 6 col_start: 1 col_stop: 2 path: "" - content: "function x() {\n...\n}" + content: "function x() {\n ...\n}" diff --git a/tests/expectations/parser/parser/functions/const_param.leo.out b/tests/expectations/parser/parser/functions/const_param.leo.out index eecb5eb51d..1a7d0c68dd 100644 --- a/tests/expectations/parser/parser/functions/const_param.leo.out +++ b/tests/expectations/parser/parser/functions/const_param.leo.out @@ -65,14 +65,14 @@ outputs: col_start: 34 col_stop: 2 path: "" - content: "function x(x: u32, const y: i32) {\n...\n}" + content: "function x(x: u32, const y: i32) {\n ...\n}" span: line_start: 3 line_stop: 5 col_start: 1 col_stop: 2 path: "" - content: "function x(x: u32, const y: i32) {\n...\n}" + content: "function x(x: u32, const y: i32) {\n ...\n}" "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(const x: u32, y: i32) {\\\"}\"}": annotations: [] identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(const x: u32, y: i32) {\\\"}\"}" @@ -130,11 +130,11 @@ outputs: col_start: 34 col_stop: 2 path: "" - content: "function x(const x: u32, y: i32) {\n...\n}" + content: "function x(const x: u32, y: i32) {\n ...\n}" span: line_start: 7 line_stop: 9 col_start: 1 col_stop: 2 path: "" - content: "function x(const x: u32, y: i32) {\n...\n}" + content: "function x(const x: u32, y: i32) {\n ...\n}" diff --git a/tests/expectations/parser/parser/functions/const_self_bad.leo.out b/tests/expectations/parser/parser/functions/const_self_bad.leo.out index 60b7a2fbda..0bce0f5a14 100644 --- a/tests/expectations/parser/parser/functions/const_self_bad.leo.out +++ b/tests/expectations/parser/parser/functions/const_self_bad.leo.out @@ -40,11 +40,11 @@ outputs: col_start: 24 col_stop: 2 path: "" - content: "function x(const self) {\n...\n}" + content: "function x(const self) {\n ...\n}" span: line_start: 3 line_stop: 5 col_start: 1 col_stop: 2 path: "" - content: "function x(const self) {\n...\n}" + content: "function x(const self) {\n ...\n}" diff --git a/tests/expectations/parser/parser/functions/empty.leo.out b/tests/expectations/parser/parser/functions/empty.leo.out index eed8a3d595..74f3b12e79 100644 --- a/tests/expectations/parser/parser/functions/empty.leo.out +++ b/tests/expectations/parser/parser/functions/empty.leo.out @@ -39,11 +39,11 @@ outputs: col_start: 14 col_stop: 2 path: "" - content: "function x() {\n...\n}" + content: "function x() {\n ...\n}" span: line_start: 3 line_stop: 5 col_start: 1 col_stop: 2 path: "" - content: "function x() {\n...\n}" + content: "function x() {\n ...\n}" diff --git a/tests/expectations/parser/parser/functions/param_array.leo.out b/tests/expectations/parser/parser/functions/param_array.leo.out index 115a79fe88..367878395b 100644 --- a/tests/expectations/parser/parser/functions/param_array.leo.out +++ b/tests/expectations/parser/parser/functions/param_array.leo.out @@ -54,11 +54,11 @@ outputs: col_start: 25 col_stop: 2 path: "" - content: "function x(x: [u8; 12]) {\n...\n}" + content: "function x(x: [u8; 12]) {\n ...\n}" span: line_start: 3 line_stop: 5 col_start: 1 col_stop: 2 path: "" - content: "function x(x: [u8; 12]) {\n...\n}" + content: "function x(x: [u8; 12]) {\n ...\n}" diff --git a/tests/expectations/parser/parser/functions/param_circuit.leo.out b/tests/expectations/parser/parser/functions/param_circuit.leo.out index cbfae352d5..45bb7dcde7 100644 --- a/tests/expectations/parser/parser/functions/param_circuit.leo.out +++ b/tests/expectations/parser/parser/functions/param_circuit.leo.out @@ -52,11 +52,11 @@ outputs: col_start: 26 col_stop: 2 path: "" - content: "function x(x: MyCircuit) {\n...\n}" + content: "function x(x: MyCircuit) {\n ...\n}" span: line_start: 3 line_stop: 5 col_start: 1 col_stop: 2 path: "" - content: "function x(x: MyCircuit) {\n...\n}" + content: "function x(x: MyCircuit) {\n ...\n}" diff --git a/tests/expectations/parser/parser/functions/param_tuple.leo.out b/tests/expectations/parser/parser/functions/param_tuple.leo.out index c6c615f19f..ef7a74d3de 100644 --- a/tests/expectations/parser/parser/functions/param_tuple.leo.out +++ b/tests/expectations/parser/parser/functions/param_tuple.leo.out @@ -54,11 +54,11 @@ outputs: col_start: 27 col_stop: 2 path: "" - content: "function x(x: (u32, i32)) {\n...\n}" + content: "function x(x: (u32, i32)) {\n ...\n}" span: line_start: 3 line_stop: 5 col_start: 1 col_stop: 2 path: "" - content: "function x(x: (u32, i32)) {\n...\n}" + content: "function x(x: (u32, i32)) {\n ...\n}" diff --git a/tests/expectations/parser/parser/functions/params.leo.out b/tests/expectations/parser/parser/functions/params.leo.out index c4f953e3ab..d1ea6ac6c4 100644 --- a/tests/expectations/parser/parser/functions/params.leo.out +++ b/tests/expectations/parser/parser/functions/params.leo.out @@ -65,11 +65,11 @@ outputs: col_start: 28 col_stop: 2 path: "" - content: "function x(x: u32, y: i32) {\n...\n}" + content: "function x(x: u32, y: i32) {\n ...\n}" span: line_start: 3 line_stop: 5 col_start: 1 col_stop: 2 path: "" - content: "function x(x: u32, y: i32) {\n...\n}" + content: "function x(x: u32, y: i32) {\n ...\n}" diff --git a/tests/expectations/parser/parser/functions/params_return.leo.out b/tests/expectations/parser/parser/functions/params_return.leo.out index 39a67ccd35..194d6069d2 100644 --- a/tests/expectations/parser/parser/functions/params_return.leo.out +++ b/tests/expectations/parser/parser/functions/params_return.leo.out @@ -66,11 +66,11 @@ outputs: col_start: 35 col_stop: 2 path: "" - content: "function x(x: u32, y: i32) -> u32 {\n...\n}" + content: "function x(x: u32, y: i32) -> u32 {\n ...\n}" span: line_start: 3 line_stop: 5 col_start: 1 col_stop: 2 path: "" - content: "function x(x: u32, y: i32) -> u32 {\n...\n}" + content: "function x(x: u32, y: i32) -> u32 {\n ...\n}" diff --git a/tests/expectations/parser/parser/functions/return.leo.out b/tests/expectations/parser/parser/functions/return.leo.out index a608443be1..9d8f155ffa 100644 --- a/tests/expectations/parser/parser/functions/return.leo.out +++ b/tests/expectations/parser/parser/functions/return.leo.out @@ -40,11 +40,11 @@ outputs: col_start: 21 col_stop: 2 path: "" - content: "function x() -> u32 {\n...\n}" + content: "function x() -> u32 {\n ...\n}" span: line_start: 3 line_stop: 5 col_start: 1 col_stop: 2 path: "" - content: "function x() -> u32 {\n...\n}" + content: "function x() -> u32 {\n ...\n}" diff --git a/tests/expectations/parser/parser/functions/return_tuple.leo.out b/tests/expectations/parser/parser/functions/return_tuple.leo.out index ab2ed0316a..cd07553041 100644 --- a/tests/expectations/parser/parser/functions/return_tuple.leo.out +++ b/tests/expectations/parser/parser/functions/return_tuple.leo.out @@ -42,11 +42,11 @@ outputs: col_start: 28 col_stop: 2 path: "" - content: "function x() -> (u32, u32) {\n...\n}" + content: "function x() -> (u32, u32) {\n ...\n}" span: line_start: 3 line_stop: 5 col_start: 1 col_stop: 2 path: "" - content: "function x() -> (u32, u32) {\n...\n}" + content: "function x() -> (u32, u32) {\n ...\n}" diff --git a/tests/expectations/parser/parser/import/many_import.leo.out b/tests/expectations/parser/parser/import/many_import.leo.out index 2354a64596..fe11e6dc50 100644 --- a/tests/expectations/parser/parser/import/many_import.leo.out +++ b/tests/expectations/parser/parser/import/many_import.leo.out @@ -35,14 +35,14 @@ outputs: col_start: 8 col_stop: 8 path: "" - content: "import test-import.( // local import\n...\n foo," + content: "import test-import.( // local import\n ...\n foo," span: line_start: 3 line_stop: 5 col_start: 8 col_stop: 8 path: "" - content: "import test-import.( // local import\n...\n foo," + content: "import test-import.( // local import\n ...\n foo," - package_or_packages: Packages: name: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":8,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"import bar.( // imports directory import\\\"}\"}" @@ -123,14 +123,14 @@ outputs: col_start: 8 col_stop: 16 path: "" - content: "import bar.( // imports directory import\n...\n bat.bat.Bat," + content: "import bar.( // imports directory import\n ...\n ...\n bat.bat.Bat," span: line_start: 8 line_stop: 11 col_start: 8 col_stop: 16 path: "" - content: "import bar.( // imports directory import\n...\n bat.bat.Bat," + content: "import bar.( // imports directory import\n ...\n ...\n bat.bat.Bat," circuits: {} global_consts: {} functions: {} diff --git a/tests/expectations/parser/parser/statement/block.leo.out b/tests/expectations/parser/parser/statement/block.leo.out index 29ec5fe1f8..4ad226b576 100644 --- a/tests/expectations/parser/parser/statement/block.leo.out +++ b/tests/expectations/parser/parser/statement/block.leo.out @@ -37,7 +37,7 @@ outputs: col_start: 1 col_stop: 2 path: "" - content: "{\n...\n}" + content: "{\n ...\n}" - Block: statements: - Block: @@ -84,14 +84,14 @@ outputs: col_start: 1 col_stop: 2 path: "" - content: "{\n...\n}" + content: "{\n ...\n}" span: line_start: 1 line_stop: 5 col_start: 1 col_stop: 2 path: "" - content: "{\n...\n}" + content: "{\n ...\n ...\n ...\n}" - Block: statements: - Conditional: @@ -123,7 +123,7 @@ outputs: col_start: 6 col_stop: 2 path: "" - content: "if x {\n...\n}" + content: "if x {\n ...\n}" next: ~ span: line_start: 2 @@ -131,11 +131,11 @@ outputs: col_start: 1 col_stop: 2 path: "" - content: "if x {\n...\n}" + content: "if x {\n ...\n}" span: line_start: 1 line_stop: 5 col_start: 1 col_stop: 2 path: "" - content: "{\n...\n}" + content: "{\n ...\n ...\n ...\n}" diff --git a/tests/expectations/parser/parser/statement/conditional.leo.out b/tests/expectations/parser/parser/statement/conditional.leo.out index dcac2a651e..3fd8752374 100644 --- a/tests/expectations/parser/parser/statement/conditional.leo.out +++ b/tests/expectations/parser/parser/statement/conditional.leo.out @@ -31,7 +31,7 @@ outputs: col_start: 6 col_stop: 2 path: "" - content: "if x {\n...\n}" + content: "if x {\n ...\n}" next: ~ span: line_start: 1 @@ -39,7 +39,7 @@ outputs: col_start: 1 col_stop: 2 path: "" - content: "if x {\n...\n}" + content: "if x {\n ...\n}" - Conditional: condition: Identifier: "{\"name\":\"Self\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"if Self {\\\"}\"}" @@ -69,7 +69,7 @@ outputs: col_start: 9 col_stop: 2 path: "" - content: "if Self {\n...\n}" + content: "if Self {\n ...\n}" next: ~ span: line_start: 1 @@ -77,7 +77,7 @@ outputs: col_start: 1 col_stop: 2 path: "" - content: "if Self {\n...\n}" + content: "if Self {\n ...\n}" - Conditional: condition: Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"if (x) {\\\"}\"}" @@ -107,7 +107,7 @@ outputs: col_start: 8 col_stop: 2 path: "" - content: "if (x) {\n...\n}" + content: "if (x) {\n ...\n}" next: ~ span: line_start: 1 @@ -115,7 +115,7 @@ outputs: col_start: 1 col_stop: 2 path: "" - content: "if (x) {\n...\n}" + content: "if (x) {\n ...\n}" - Conditional: condition: Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"if (x) {} else {}\\\"}\"}" @@ -269,7 +269,7 @@ outputs: col_start: 8 col_stop: 2 path: "" - content: "if x+y {\n...\n}" + content: "if x+y {\n ...\n ...\n}" next: ~ span: line_start: 1 @@ -277,4 +277,4 @@ outputs: col_start: 1 col_stop: 2 path: "" - content: "if x+y {\n...\n}\n" + content: "if x+y {\n ...\n ...\n}" diff --git a/tests/expectations/parser/parser/statement/iteration.leo.out b/tests/expectations/parser/parser/statement/iteration.leo.out index 93945a6d4a..77c4649a09 100644 --- a/tests/expectations/parser/parser/statement/iteration.leo.out +++ b/tests/expectations/parser/parser/statement/iteration.leo.out @@ -90,14 +90,14 @@ outputs: col_start: 15 col_stop: 2 path: "" - content: "for x in 0..7 {\n...\n}" + content: "for x in 0..7 {\n ...\n}" span: line_start: 1 line_stop: 3 col_start: 1 col_stop: 2 path: "" - content: "for x in 0..7 {\n...\n}" + content: "for x in 0..7 {\n ...\n}" - Iteration: variable: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"for x in 0..99u8 {\\\"}\"}" start: @@ -148,14 +148,14 @@ outputs: col_start: 18 col_stop: 2 path: "" - content: "for x in 0..99u8 {\n...\n}" + content: "for x in 0..99u8 {\n ...\n}" span: line_start: 1 line_stop: 3 col_start: 1 col_stop: 2 path: "" - content: "for x in 0..99u8 {\n...\n}" + content: "for x in 0..99u8 {\n ...\n}" - Iteration: variable: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"for x in 0..Self {\\\"}\"}" start: @@ -197,11 +197,11 @@ outputs: col_start: 18 col_stop: 2 path: "" - content: "for x in 0..Self {\n...\n}" + content: "for x in 0..Self {\n ...\n}" span: line_start: 1 line_stop: 3 col_start: 1 col_stop: 2 path: "" - content: "for x in 0..Self {\n...\n}" + content: "for x in 0..Self {\n ...\n}" From 80e2b14c8cd316ed23c9658f6a5a013379d7e755 Mon Sep 17 00:00:00 2001 From: Alessandro Coglio Date: Mon, 16 Aug 2021 18:06:27 -0700 Subject: [PATCH 51/58] [ABNF] Fix rule for conditional expressions. The test of the expression should have been a disjunctive expression. This was an oversight when the rules were written. --- grammar/abnf-grammar.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grammar/abnf-grammar.txt b/grammar/abnf-grammar.txt index e25a8aef02..845c4a1530 100644 --- a/grammar/abnf-grammar.txt +++ b/grammar/abnf-grammar.txt @@ -871,7 +871,7 @@ disjunctive-expression = conjunctive-expression ; Finally we have conditional expressions. conditional-expression = disjunctive-expression - / conditional-expression + / disjunctive-expression "?" expression ":" conditional-expression From 30da9d6e1ce93bc0eaf9511425c7ee21730539c7 Mon Sep 17 00:00:00 2001 From: Alessandro Coglio Date: Mon, 16 Aug 2021 18:07:26 -0700 Subject: [PATCH 52/58] [ABNF] Re-generate the markdown file. --- grammar/README.md | 60 +++++++++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/grammar/README.md b/grammar/README.md index 13bbc6de82..0067d1eab3 100644 --- a/grammar/README.md +++ b/grammar/README.md @@ -466,7 +466,7 @@ described above. newline = line-feed / carriage-return / carriage-return line-feed ``` -Go to: _[carriage-return](#user-content-carriage-return), [line-feed](#user-content-line-feed)_; +Go to: _[line-feed](#user-content-line-feed), [carriage-return](#user-content-carriage-return)_; Line terminators form whitespace, along with spaces and horizontal tabs. @@ -476,7 +476,7 @@ Line terminators form whitespace, along with spaces and horizontal tabs. whitespace = space / horizontal-tab / newline ``` -Go to: _[horizontal-tab](#user-content-horizontal-tab), [newline](#user-content-newline), [space](#user-content-space)_; +Go to: _[space](#user-content-space), [horizontal-tab](#user-content-horizontal-tab), [newline](#user-content-newline)_; There are two kinds of comments in Leo, as in other languages. @@ -494,7 +494,7 @@ the ones used in the Java language reference. comment = block-comment / end-of-line-comment ``` -Go to: _[end-of-line-comment](#user-content-end-of-line-comment), [block-comment](#user-content-block-comment)_; +Go to: _[block-comment](#user-content-block-comment), [end-of-line-comment](#user-content-end-of-line-comment)_; @@ -521,7 +521,7 @@ rest-of-block-comment-after-star = "/" / not-star-or-slash rest-of-block-comment ``` -Go to: _[not-star-or-slash](#user-content-not-star-or-slash), [rest-of-block-comment](#user-content-rest-of-block-comment), [rest-of-block-comment-after-star](#user-content-rest-of-block-comment-after-star)_; +Go to: _[rest-of-block-comment](#user-content-rest-of-block-comment), [rest-of-block-comment-after-star](#user-content-rest-of-block-comment-after-star), [not-star-or-slash](#user-content-not-star-or-slash)_; @@ -589,7 +589,7 @@ lowercase-letter = %x61-7A ; a-z letter = uppercase-letter / lowercase-letter ``` -Go to: _[uppercase-letter](#user-content-uppercase-letter), [lowercase-letter](#user-content-lowercase-letter)_; +Go to: _[lowercase-letter](#user-content-lowercase-letter), [uppercase-letter](#user-content-uppercase-letter)_; The following rules defines (ASCII) decimal, octal, and hexadecimal digits. @@ -762,7 +762,7 @@ and Unicode escapes with one to six hexadecimal digits character-literal = single-quote character-literal-element single-quote ``` -Go to: _[single-quote](#user-content-single-quote), [character-literal-element](#user-content-character-literal-element)_; +Go to: _[character-literal-element](#user-content-character-literal-element), [single-quote](#user-content-single-quote)_; @@ -773,7 +773,7 @@ character-literal-element = not-single-quote-or-backslash / unicode-character-escape ``` -Go to: _[not-single-quote-or-backslash](#user-content-not-single-quote-or-backslash), [ascii-character-escape](#user-content-ascii-character-escape), [unicode-character-escape](#user-content-unicode-character-escape), [simple-character-escape](#user-content-simple-character-escape)_; +Go to: _[unicode-character-escape](#user-content-unicode-character-escape), [not-single-quote-or-backslash](#user-content-not-single-quote-or-backslash), [simple-character-escape](#user-content-simple-character-escape), [ascii-character-escape](#user-content-ascii-character-escape)_; @@ -828,7 +828,7 @@ simple-character-escape = single-quote-escape / null-character-escape ``` -Go to: _[carriage-return-escape](#user-content-carriage-return-escape), [horizontal-tab-escape](#user-content-horizontal-tab-escape), [null-character-escape](#user-content-null-character-escape), [double-quote-escape](#user-content-double-quote-escape), [single-quote-escape](#user-content-single-quote-escape), [backslash-escape](#user-content-backslash-escape), [line-feed-escape](#user-content-line-feed-escape)_; +Go to: _[carriage-return-escape](#user-content-carriage-return-escape), [horizontal-tab-escape](#user-content-horizontal-tab-escape), [double-quote-escape](#user-content-double-quote-escape), [backslash-escape](#user-content-backslash-escape), [null-character-escape](#user-content-null-character-escape), [single-quote-escape](#user-content-single-quote-escape), [line-feed-escape](#user-content-line-feed-escape)_; @@ -864,7 +864,7 @@ string-literal-element = not-double-quote-or-backslash / unicode-character-escape ``` -Go to: _[ascii-character-escape](#user-content-ascii-character-escape), [unicode-character-escape](#user-content-unicode-character-escape), [simple-character-escape](#user-content-simple-character-escape), [not-double-quote-or-backslash](#user-content-not-double-quote-or-backslash)_; +Go to: _[not-double-quote-or-backslash](#user-content-not-double-quote-or-backslash), [simple-character-escape](#user-content-simple-character-escape), [unicode-character-escape](#user-content-unicode-character-escape), [ascii-character-escape](#user-content-ascii-character-escape)_; The ones above are all the atomic literals @@ -884,7 +884,7 @@ atomic-literal = untyped-literal / string-literal ``` -Go to: _[signed-literal](#user-content-signed-literal), [untyped-literal](#user-content-untyped-literal), [product-group-literal](#user-content-product-group-literal), [unsigned-literal](#user-content-unsigned-literal), [character-literal](#user-content-character-literal), [string-literal](#user-content-string-literal), [field-literal](#user-content-field-literal), [boolean-literal](#user-content-boolean-literal), [address-literal](#user-content-address-literal)_; +Go to: _[field-literal](#user-content-field-literal), [untyped-literal](#user-content-untyped-literal), [address-literal](#user-content-address-literal), [unsigned-literal](#user-content-unsigned-literal), [character-literal](#user-content-character-literal), [boolean-literal](#user-content-boolean-literal), [signed-literal](#user-content-signed-literal), [string-literal](#user-content-string-literal), [product-group-literal](#user-content-product-group-literal)_; After defining the (mostly) alphanumeric tokens above, @@ -928,7 +928,7 @@ token = keyword / symbol ``` -Go to: _[identifier](#user-content-identifier), [keyword](#user-content-keyword), [symbol](#user-content-symbol), [package-name](#user-content-package-name), [annotation-name](#user-content-annotation-name), [atomic-literal](#user-content-atomic-literal)_; +Go to: _[identifier](#user-content-identifier), [symbol](#user-content-symbol), [keyword](#user-content-keyword), [atomic-literal](#user-content-atomic-literal), [package-name](#user-content-package-name), [annotation-name](#user-content-annotation-name)_; Tokens, comments, and whitespace are lexemes, i.e. lexical units. @@ -995,7 +995,7 @@ group-type = %s"group" arithmetic-type = integer-type / field-type / group-type ``` -Go to: _[integer-type](#user-content-integer-type), [field-type](#user-content-field-type), [group-type](#user-content-group-type)_; +Go to: _[field-type](#user-content-field-type), [integer-type](#user-content-integer-type), [group-type](#user-content-group-type)_; The arithmetic types, along with the boolean, address, and character types, @@ -1021,7 +1021,7 @@ character-type = %s"char" scalar-type = boolean-type / arithmetic-type / address-type / character-type ``` -Go to: _[character-type](#user-content-character-type), [arithmetic-type](#user-content-arithmetic-type), [boolean-type](#user-content-boolean-type), [address-type](#user-content-address-type)_; +Go to: _[boolean-type](#user-content-boolean-type), [arithmetic-type](#user-content-arithmetic-type), [character-type](#user-content-character-type), [address-type](#user-content-address-type)_; Circuit types are denoted by identifiers and the keyword `Self`. @@ -1038,7 +1038,7 @@ self-type = %s"Self" circuit-type = identifier / self-type ``` -Go to: _[identifier](#user-content-identifier), [self-type](#user-content-self-type)_; +Go to: _[self-type](#user-content-self-type), [identifier](#user-content-identifier)_; A tuple type consists of zero, two, or more component types. @@ -1082,7 +1082,7 @@ i.e. types whose values contain (sub-)values aggregate-type = tuple-type / array-type / circuit-type ``` -Go to: _[circuit-type](#user-content-circuit-type), [tuple-type](#user-content-tuple-type), [array-type](#user-content-array-type)_; +Go to: _[array-type](#user-content-array-type), [tuple-type](#user-content-tuple-type), [circuit-type](#user-content-circuit-type)_; Scalar and aggregate types form all the types. @@ -1128,7 +1128,7 @@ A literal is either an atomic one or an affine group literal. literal = atomic-literal / affine-group-literal ``` -Go to: _[affine-group-literal](#user-content-affine-group-literal), [atomic-literal](#user-content-atomic-literal)_; +Go to: _[atomic-literal](#user-content-atomic-literal), [affine-group-literal](#user-content-affine-group-literal)_; The following rule is not directly referenced in the rules for expressions @@ -1170,7 +1170,7 @@ primary-expression = identifier / circuit-expression ``` -Go to: _[array-expression](#user-content-array-expression), [expression](#user-content-expression), [circuit-expression](#user-content-circuit-expression), [identifier](#user-content-identifier), [tuple-expression](#user-content-tuple-expression), [literal](#user-content-literal)_; +Go to: _[tuple-expression](#user-content-tuple-expression), [expression](#user-content-expression), [circuit-expression](#user-content-circuit-expression), [identifier](#user-content-identifier), [array-expression](#user-content-array-expression), [literal](#user-content-literal)_; Tuple expressions construct tuples. @@ -1318,7 +1318,7 @@ postfix-expression = primary-expression / postfix-expression "[" [expression] ".." [expression] "]" ``` -Go to: _[identifier](#user-content-identifier), [circuit-type](#user-content-circuit-type), [function-arguments](#user-content-function-arguments), [natural](#user-content-natural), [primary-expression](#user-content-primary-expression), [expression](#user-content-expression), [postfix-expression](#user-content-postfix-expression)_; +Go to: _[function-arguments](#user-content-function-arguments), [primary-expression](#user-content-primary-expression), [identifier](#user-content-identifier), [postfix-expression](#user-content-postfix-expression), [circuit-type](#user-content-circuit-type), [expression](#user-content-expression), [natural](#user-content-natural)_; Unary operators have the highest operator precedence. @@ -1346,7 +1346,7 @@ exponential-expression = unary-expression / unary-expression "**" exponential-expression ``` -Go to: _[unary-expression](#user-content-unary-expression), [exponential-expression](#user-content-exponential-expression)_; +Go to: _[exponential-expression](#user-content-exponential-expression), [unary-expression](#user-content-unary-expression)_; Next in precedence come multiplication and division, both left-associative. @@ -1428,12 +1428,12 @@ Finally we have conditional expressions. ```abnf conditional-expression = disjunctive-expression - / conditional-expression + / disjunctive-expression "?" expression ":" conditional-expression ``` -Go to: _[disjunctive-expression](#user-content-disjunctive-expression), [expression](#user-content-expression), [conditional-expression](#user-content-conditional-expression)_; +Go to: _[conditional-expression](#user-content-conditional-expression), [disjunctive-expression](#user-content-disjunctive-expression), [expression](#user-content-expression)_; Those above are all the expressions. @@ -1466,7 +1466,7 @@ statement = expression-statement / block ``` -Go to: _[loop-statement](#user-content-loop-statement), [assignment-statement](#user-content-assignment-statement), [variable-declaration](#user-content-variable-declaration), [expression-statement](#user-content-expression-statement), [conditional-statement](#user-content-conditional-statement), [block](#user-content-block), [console-statement](#user-content-console-statement), [return-statement](#user-content-return-statement), [constant-declaration](#user-content-constant-declaration)_; +Go to: _[constant-declaration](#user-content-constant-declaration), [conditional-statement](#user-content-conditional-statement), [expression-statement](#user-content-expression-statement), [return-statement](#user-content-return-statement), [console-statement](#user-content-console-statement), [block](#user-content-block), [loop-statement](#user-content-loop-statement), [assignment-statement](#user-content-assignment-statement), [variable-declaration](#user-content-variable-declaration)_; @@ -1509,7 +1509,7 @@ variable-declaration = %s"let" identifier-or-identifiers [ ":" type ] "=" expression ";" ``` -Go to: _[type](#user-content-type), [identifier-or-identifiers](#user-content-identifier-or-identifiers), [expression](#user-content-expression)_; +Go to: _[identifier-or-identifiers](#user-content-identifier-or-identifiers), [expression](#user-content-expression), [type](#user-content-type)_; @@ -1563,7 +1563,7 @@ The body is a block. loop-statement = %s"for" identifier %s"in" expression ".." [ "=" ] expression block ``` -Go to: _[expression](#user-content-expression), [block](#user-content-block), [identifier](#user-content-identifier)_; +Go to: _[expression](#user-content-expression), [identifier](#user-content-identifier), [block](#user-content-block)_; An assignment statement is straightforward. @@ -1649,7 +1649,7 @@ annotation = annotation-name [ "(" identifier *( "," identifier ) ")" ] ``` -Go to: _[annotation-name](#user-content-annotation-name), [identifier](#user-content-identifier)_; +Go to: _[identifier](#user-content-identifier), [annotation-name](#user-content-annotation-name)_; A function declaration defines a function. @@ -1666,7 +1666,7 @@ function-declaration = *annotation %s"function" identifier block ``` -Go to: _[identifier](#user-content-identifier), [function-parameters](#user-content-function-parameters), [type](#user-content-type), [block](#user-content-block)_; +Go to: _[block](#user-content-block), [identifier](#user-content-identifier), [type](#user-content-type), [function-parameters](#user-content-function-parameters)_; @@ -1676,7 +1676,7 @@ function-parameters = self-parameter / function-inputs ``` -Go to: _[self-parameter](#user-content-self-parameter), [function-inputs](#user-content-function-inputs)_; +Go to: _[function-inputs](#user-content-function-inputs), [self-parameter](#user-content-self-parameter)_; @@ -1697,7 +1697,7 @@ Go to: _[function-input](#user-content-function-input)_; function-input = [ %s"const" ] identifier ":" type ``` -Go to: _[type](#user-content-type), [identifier](#user-content-identifier)_; +Go to: _[identifier](#user-content-identifier), [type](#user-content-type)_; A circuit member variable declaration consists of @@ -1745,7 +1745,7 @@ circuit-declaration = %s"circuit" identifier *member-function-declaration "}" ``` -Go to: _[member-variable-declarations](#user-content-member-variable-declarations), [identifier](#user-content-identifier)_; +Go to: _[identifier](#user-content-identifier), [member-variable-declarations](#user-content-member-variable-declarations)_; An import declaration consists of the `import` keyword @@ -1767,7 +1767,7 @@ by using an explicit package name before the package path. import-declaration = %s"import" package-name "." package-path ";" ``` -Go to: _[package-name](#user-content-package-name), [package-path](#user-content-package-path)_; +Go to: _[package-path](#user-content-package-path), [package-name](#user-content-package-name)_; From 8a73acaa3381ca2c62718e3090e52f9af3f1f9ba Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Mon, 16 Aug 2021 23:51:25 -0700 Subject: [PATCH 53/58] skip leo-lang update test on macos for now --- leo/tests/mod.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/leo/tests/mod.rs b/leo/tests/mod.rs index 9b3eabb83d..8a39330221 100644 --- a/leo/tests/mod.rs +++ b/leo/tests/mod.rs @@ -173,6 +173,7 @@ pub fn login_incorrect_credentials_or_token() -> Result<()> { Ok(()) } +#[cfg(not(target_os = "macos"))] #[test] pub fn leo_update_and_update_automatic() -> Result<()> { let update = Update { From 9382cdbb3407e7f96749739afd3b989a2848a02c Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Tue, 17 Aug 2021 00:10:24 -0700 Subject: [PATCH 54/58] update error_index --- errors/ERROR_INDEX.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/errors/ERROR_INDEX.md b/errors/ERROR_INDEX.md index c8f08dd654..039d20d286 100644 --- a/errors/ERROR_INDEX.md +++ b/errors/ERROR_INDEX.md @@ -1,17 +1,17 @@ # Leo Error Index -## ASG Errors: Error Code Range 370_000 - 370_999 +## Parser Errors: Error Code Range 370_000 - 370_999 -## AST Errors: Error Code Range 371_000 - 371_999 +## State Errors: Error Code Range 371_000 - 371_999 -## Compiler Errors: Error Code Range 372_000 - 372_999 +## AST Errors: Error Code Range 372_000 - 372_999 -## Import Errors: Error Code Range 373_000 - 373_999 +## ASG Errors: Error Code Range 373_000 - 373_999 -## Package Errors: Error Code Range 374_000 - 374_999 +## Import Errors: Error Code Range 374_000 - 374_999 -## Parser Errors: Error Code Range 375_000 - 375_999 +## Package Errors: Error Code Range 375_000 - 375_999 -## State Errors: Error Code Range 376_000 - 376_999 +## Compiler Errors: Error Code Range 376_000 - 376_999 ## CLI Errors: Error Code Range 377_000 - 377_999 From d2a4a14cf48ddf5e01583d065b2bb1ace6e4571b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Aug 2021 10:18:37 +0000 Subject: [PATCH 55/58] Bump snarkvm-dpc from 0.7.8 to 0.7.9 Bumps [snarkvm-dpc](https://github.com/AleoHQ/snarkVM) from 0.7.8 to 0.7.9. - [Release notes](https://github.com/AleoHQ/snarkVM/releases) - [Commits](https://github.com/AleoHQ/snarkVM/compare/v0.7.8...v0.7.9) --- updated-dependencies: - dependency-name: snarkvm-dpc dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 32 ++++++++++++++++---------------- compiler/Cargo.toml | 2 +- state/Cargo.toml | 2 +- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 14483a97e6..468ea90f2d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2428,9 +2428,9 @@ checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" [[package]] name = "snarkvm-algorithms" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40caa98abd0a874a003d844d6a73562020fb5fa976daa14055f030d9803430b7" +checksum = "3534da2cfa71894e4d28c5dcaf9f9c5c94315904c4ace6c86419a8f2ff8b1641" dependencies = [ "anyhow", "bitvec", @@ -2485,9 +2485,9 @@ dependencies = [ [[package]] name = "snarkvm-dpc" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1588a3d2f38307bd64838cf1761d8cef485461e5224831c9b9df11a1fa9864e7" +checksum = "c922bb690fbe9c5919f67f2d887452376339a36bf5ffb50dc6b00d58a5650284" dependencies = [ "anyhow", "base58", @@ -2533,9 +2533,9 @@ dependencies = [ [[package]] name = "snarkvm-gadgets" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3b0cd11387a572f9a1c318c1d446dd46e0522c9be7681b8d6af6882d20880fd" +checksum = "3138cfcaaa27e53cabc7a4fc596b3b0abb47c3cb46fee496e3ac7ce2cd07df9d" dependencies = [ "derivative", "digest 0.9.0", @@ -2553,9 +2553,9 @@ dependencies = [ [[package]] name = "snarkvm-marlin" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "206d633d6299dfb4f52640a3188567462dbf1f207de70cbb829707c07858c7e6" +checksum = "12e6987cde7b734415afc7afe58a038d224393842ad5dfaba728a601c5c5473d" dependencies = [ "blake2", "derivative", @@ -2577,9 +2577,9 @@ dependencies = [ [[package]] name = "snarkvm-parameters" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f5c4d4233a623c46c483296aa24bf4d95a5f3344c669ce4f2956467fe6ea904" +checksum = "506cbbbfe27acb4d4e8dd15e49b430dbfb920fd680cfe1c69ab87542083d0422" dependencies = [ "curl", "hex", @@ -2590,9 +2590,9 @@ dependencies = [ [[package]] name = "snarkvm-polycommit" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b5ca8d560cb6f49d9de9b4a955778cc14563b0a381c56db48ea6171788f30d4" +checksum = "c23a7fa2aab25aa6fc3b7fb27b3d639936725a5c29b29936d1530b64bd011e67" dependencies = [ "derivative", "digest 0.9.0", @@ -2609,15 +2609,15 @@ dependencies = [ [[package]] name = "snarkvm-profiler" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29cb28d79c59db77774484dbc0f4e876dc8604085d8d7f43eee1b813ec0614b4" +checksum = "f7d80cc343b9e19e0f38582fa7e17e6263c4c7449122cf9a606279567ff33d71" [[package]] name = "snarkvm-r1cs" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12e3b7acea34af74dbe5dea056714a9f3c9b1029a9ac888595c96a6e3c676e6" +checksum = "537f2123c7da8a9d3482523156318479790c41e390d33f6936b89a3ed9eee0a8" dependencies = [ "cfg-if 1.0.0", "fxhash", diff --git a/compiler/Cargo.toml b/compiler/Cargo.toml index a61e03c12b..df5e5d65a8 100644 --- a/compiler/Cargo.toml +++ b/compiler/Cargo.toml @@ -65,7 +65,7 @@ version = "0.7.7" default-features = false [dependencies.snarkvm-dpc] -version = "0.7.8" +version = "0.7.9" default-features = false [dependencies.snarkvm-gadgets] diff --git a/state/Cargo.toml b/state/Cargo.toml index f57fbdbc1f..353dfd2199 100644 --- a/state/Cargo.toml +++ b/state/Cargo.toml @@ -33,7 +33,7 @@ version = "0.7.9" default-features = false [dependencies.snarkvm-dpc] -version = "0.7.8" +version = "0.7.9" features = [ "testnet1" ] [dependencies.snarkvm-utilities] From f258c5bde55e7b45bf65760f199f37f3a9d0a59b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Aug 2021 10:17:46 +0000 Subject: [PATCH 56/58] Bump serde_yaml from 0.8.17 to 0.8.18 Bumps [serde_yaml](https://github.com/dtolnay/serde-yaml) from 0.8.17 to 0.8.18. - [Release notes](https://github.com/dtolnay/serde-yaml/releases) - [Commits](https://github.com/dtolnay/serde-yaml/compare/0.8.17...0.8.18) --- updated-dependencies: - dependency-name: serde_yaml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 468ea90f2d..6884fdf78e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2361,9 +2361,9 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.8.17" +version = "0.8.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15654ed4ab61726bf918a39cb8d98a2e2995b002387807fa6ba58fdf7f59bb23" +checksum = "039ba818c784248423789eec090aab9fb566c7b94d6ebbfa1814a9fd52c8afb2" dependencies = [ "dtoa", "linked-hash-map", From 484ebd3467a6be1af2062d25bb9a37d00f1743db Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Wed, 18 Aug 2021 14:40:51 -0700 Subject: [PATCH 57/58] clean up todos --- compiler/src/compiler.rs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/compiler/src/compiler.rs b/compiler/src/compiler.rs index f42135b453..7e8c825fb4 100644 --- a/compiler/src/compiler.rs +++ b/compiler/src/compiler.rs @@ -333,9 +333,7 @@ impl<'a, F: PrimeField, G: GroupType> Compiler<'a, F, G> { /// Verifies the input to the program. /// pub fn verify_local_data_commitment(&self, system_parameters: &SystemParameters) -> Result { - // TODO CONVERT STATE ERROR TO LEO ERROR - let result = verify_local_data_commitment(system_parameters, &self.program_input).unwrap(); - // .map_err(|e| SnarkVMError::new(e))?; + let result = verify_local_data_commitment(system_parameters, &self.program_input)?; Ok(result) } @@ -357,11 +355,14 @@ impl<'a, F: PrimeField, G: GroupType> ConstraintSynthesizer for Compiler<' fn generate_constraints>(&self, cs: &mut CS) -> Result<(), SynthesisError> { let output_directory = self.output_directory.clone(); let package_name = self.program_name.clone(); - // TODO WHAT TO DO HERE - let result = self.compile_constraints(cs).map_err(|e| { - tracing::error!("Error {}", e); - SynthesisError::Unsatisfiable - })?; + + let result = match self.compile_constraints(cs) { + Err(err) => { + eprintln!("{}", err); + std::process::exit(err.exit_code()) + } + Ok(result) => result, + }; // Write results to file let output_file = OutputFile::new(&package_name); From 0feccf63538abf73752d62d626731662326d7f5c Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Wed, 18 Aug 2021 15:37:42 -0700 Subject: [PATCH 58/58] m1 test was infinitely looping --- .github/workflows/ci.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a55d8e3123..47226188b6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -157,17 +157,11 @@ jobs: run: | sccache --start-server - - name: Install cargo-all-features - run: | - SDKROOT=$(xcrun -sdk macosx11.1 --show-sdk-path) \ - MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx11.1 --show-sdk-platform-version) \ - cargo install cargo-all-features - - name: Test run: | SDKROOT=$(xcrun -sdk macosx11.1 --show-sdk-path) \ MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx11.1 --show-sdk-platform-version) \ - cargo test-all-features --all + cargo test --all --features ci_skip - name: Print sccache stats run: sccache --show-stats