From 93509bf5c17521536c7ce8cc28834f39c0f5e957 Mon Sep 17 00:00:00 2001 From: gluaxspeed Date: Thu, 19 Aug 2021 09:16:50 -0700 Subject: [PATCH] alias node type --- .../src/canonicalization/canonicalizer.rs | 8 +-- ast-passes/src/import_resolution/importer.rs | 16 ++--- ast/src/{types => aliases}/alias.rs | 11 +-- ast/src/aliases/mod.rs | 18 +++++ ast/src/lib.rs | 3 + ast/src/program.rs | 10 ++- ast/src/reducer/reconstructing_director.rs | 12 +++- ast/src/reducer/reconstructing_reducer.rs | 2 +- ast/src/types/mod.rs | 3 - errors/src/asg/asg_errors.rs | 8 --- errors/src/ast/ast_errors.rs | 22 +++++- errors/src/parser/parser_errors.rs | 4 +- parser/src/parser/file.rs | 18 +++-- parser/src/tokenizer/mod.rs | 1 - .../array/array_range_access_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 +- .../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 +- .../compiler/char/invalid_char.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/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 +- .../circuits/self_member_invalid.leo.out | 2 +- .../circuits/self_member_undefined.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 +- .../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 +- .../non_const_input_const.leo.out | 2 +- .../compiler/integers/i128/max_fail.leo.out | 2 +- .../compiler/integers/i128/min_fail.leo.out | 2 +- .../compiler/integers/i16/max_fail.leo.out | 2 +- .../compiler/integers/i16/min_fail.leo.out | 2 +- .../compiler/integers/i32/max_fail.leo.out | 2 +- .../compiler/integers/i32/min_fail.leo.out | 2 +- .../compiler/integers/i64/max_fail.leo.out | 2 +- .../compiler/integers/i64/min_fail.leo.out | 2 +- .../compiler/integers/i8/max_fail.leo.out | 2 +- .../compiler/integers/i8/min_fail.leo.out | 2 +- .../compiler/integers/u128/max_fail.leo.out | 2 +- .../compiler/integers/u128/min_fail.leo.out | 2 +- .../compiler/integers/u16/max_fail.leo.out | 2 +- .../compiler/integers/u16/min_fail.leo.out | 2 +- .../compiler/integers/u32/max_fail.leo.out | 2 +- .../compiler/integers/u32/min_fail.leo.out | 2 +- .../compiler/integers/u64/max_fail.leo.out | 2 +- .../compiler/integers/u64/min_fail.leo.out | 2 +- .../compiler/integers/u8/max_fail.leo.out | 2 +- .../compiler/integers/u8/min_fail.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 +- .../expression/literal/char_fail.leo.out | 70 +++++++++---------- .../expression/literal/string_fail.leo.out | 14 ++-- 90 files changed, 203 insertions(+), 165 deletions(-) rename ast/src/{types => aliases}/alias.rs (79%) create mode 100644 ast/src/aliases/mod.rs diff --git a/ast-passes/src/canonicalization/canonicalizer.rs b/ast-passes/src/canonicalization/canonicalizer.rs index 2d67e818e1..5cf086df3f 100644 --- a/ast-passes/src/canonicalization/canonicalizer.rs +++ b/ast-passes/src/canonicalization/canonicalizer.rs @@ -29,7 +29,7 @@ pub struct Canonicalizer { // If we are in a circuit keep track of the circuit name. circuit_name: Option, in_circuit: bool, - alias_lookup: Box Option<(Type, Span)>>, + alias_lookup: Box Option>, } impl AstPass for Canonicalizer { @@ -41,11 +41,11 @@ impl AstPass for Canonicalizer { } impl Canonicalizer { - pub fn new(aliases: IndexMap) -> Self { + pub fn new(aliases: IndexMap) -> Self { Self { circuit_name: None, in_circuit: false, - alias_lookup: Box::new(move |alias: String| -> Option<(Type, Span)> { aliases.get(&alias).cloned() }), + alias_lookup: Box::new(move |alias: String| -> Option { aliases.get(&alias).cloned() }), } } @@ -502,7 +502,7 @@ impl ReconstructingReducer for Canonicalizer { } Type::CircuitOrAlias(identifier) => { if let Some(alias_type) = (self.alias_lookup)(identifier.name.to_string()) { - return self.reduce_type(type_, alias_type.0, &alias_type.1); + return self.reduce_type(type_, alias_type.represents, &alias_type.name.span); } Ok(Type::CircuitOrAlias(identifier)) diff --git a/ast-passes/src/import_resolution/importer.rs b/ast-passes/src/import_resolution/importer.rs index 6af497bf3f..5f36586827 100644 --- a/ast-passes/src/import_resolution/importer.rs +++ b/ast-passes/src/import_resolution/importer.rs @@ -125,13 +125,13 @@ where expected_input: Vec, import_statements: Vec, empty_imports: IndexMap, - mut aliases: IndexMap, + mut aliases: IndexMap, mut circuits: IndexMap, mut functions: IndexMap, mut global_consts: IndexMap, ) -> Result { if !empty_imports.is_empty() { - // TODO THROW ERROR + return Err(AstError::injected_programs(empty_imports.len()).into()); } let mut imported_symbols: Vec<(Vec, ImportSymbol, Span)> = vec![]; @@ -148,22 +148,20 @@ where let mut resolved_packages: IndexMap, Program> = IndexMap::new(); for (package, span) in deduplicated_imports { - let _pretty_package = package.join("."); + let pretty_package = package.join("."); - // TODO FIX ERROR let resolved_package = match wrapped_resolver.resolve_package(&package.iter().map(|x| &**x).collect::>()[..], &span)? { Some(x) => x, - None => return Err(AstError::empty_string(&span).into()), + None => return Err(AstError::unresolved_import(pretty_package, &span).into()), }; resolved_packages.insert(package.clone(), resolved_package); } - // TODO ERROR // TODO copyable AST. for (package, symbol, span) in imported_symbols.into_iter() { - let _pretty_package = package.join("."); + let pretty_package = package.join("."); let resolved_package = resolved_packages .get_mut(&package) @@ -186,7 +184,7 @@ where } else if let Some(global_const) = resolved_package.global_consts.get(&name) { global_consts.insert(name.clone(), global_const.clone()); } else { - return Err(AstError::empty_string(&span).into()); + return Err(AstError::unresolved_import(pretty_package, &span).into()); } } ImportSymbol::Alias(name, alias) => { @@ -199,7 +197,7 @@ where } else if let Some(global_const) = resolved_package.global_consts.get(&name) { global_consts.insert(alias.clone(), global_const.clone()); } else { - return Err(AstError::empty_string(&span).into()); + return Err(AstError::unresolved_import(pretty_package, &span).into()); } } } diff --git a/ast/src/types/alias.rs b/ast/src/aliases/alias.rs similarity index 79% rename from ast/src/types/alias.rs rename to ast/src/aliases/alias.rs index 99110bfbff..68d28e9ba5 100644 --- a/ast/src/types/alias.rs +++ b/ast/src/aliases/alias.rs @@ -16,17 +16,18 @@ use crate::{Identifier, Type}; -use serde::{Deserialize, Serialize}; use std::fmt; -#[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] +use serde::{Deserialize, Serialize}; + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct Alias { pub name: Identifier, - pub represents: Box, + pub represents: Type, } impl fmt::Display for Alias { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "alias {} == {}", self.name.name, self.represents) + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "{} : {}", self.name.name, self.represents) } } diff --git a/ast/src/aliases/mod.rs b/ast/src/aliases/mod.rs new file mode 100644 index 0000000000..0f788acc32 --- /dev/null +++ b/ast/src/aliases/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 alias; +pub use self::alias::*; diff --git a/ast/src/lib.rs b/ast/src/lib.rs index b901001174..ea4edb0320 100644 --- a/ast/src/lib.rs +++ b/ast/src/lib.rs @@ -22,6 +22,9 @@ #![doc = include_str!("../README.md")] +pub mod aliases; +pub use self::aliases::*; + pub mod annotation; pub use self::annotation::*; diff --git a/ast/src/program.rs b/ast/src/program.rs index 4907f5f554..5506ec9076 100644 --- a/ast/src/program.rs +++ b/ast/src/program.rs @@ -17,9 +17,7 @@ //! A Leo program consists of import, circuit, and function definitions. //! Each defined type consists of ast statements and expressions. -use crate::{Circuit, DefinitionStatement, Function, FunctionInput, ImportStatement, Type}; - -use leo_errors::Span; +use crate::{Alias, Circuit, DefinitionStatement, Function, FunctionInput, ImportStatement}; use indexmap::IndexMap; use serde::{Deserialize, Serialize}; @@ -32,7 +30,7 @@ pub struct Program { pub expected_input: Vec, pub import_statements: Vec, pub imports: IndexMap, - pub aliases: IndexMap, + pub aliases: IndexMap, pub circuits: IndexMap, pub global_consts: IndexMap, pub functions: IndexMap, @@ -51,8 +49,8 @@ impl fmt::Display for Program { writeln!(f,)?; } writeln!(f,)?; - for alias in self.aliases.iter() { - write!(f, "({}, {})", alias.0, alias.1 .0)?; + for (_, alias) in self.aliases.iter() { + alias.fmt(f)?; writeln!(f,)?; } writeln!(f,)?; diff --git a/ast/src/reducer/reconstructing_director.rs b/ast/src/reducer/reconstructing_director.rs index 999f9e2566..9a3b666ecb 100644 --- a/ast/src/reducer/reconstructing_director.rs +++ b/ast/src/reducer/reconstructing_director.rs @@ -427,9 +427,15 @@ impl ReconstructingDirector { } let mut aliases = IndexMap::new(); - for (name, (type_, span)) in program.aliases.iter() { - let type_ = self.reduce_type(type_, span)?; - aliases.insert(name.clone(), (type_, span.clone())); + for (name, alias) in program.aliases.iter() { + let represents = self.reduce_type(&alias.represents, &alias.name.span)?; + aliases.insert( + name.clone(), + Alias { + name: alias.name.clone(), + represents, + }, + ); } let mut circuits = IndexMap::new(); diff --git a/ast/src/reducer/reconstructing_reducer.rs b/ast/src/reducer/reconstructing_reducer.rs index dd8f11d6a8..4c4b847d43 100644 --- a/ast/src/reducer/reconstructing_reducer.rs +++ b/ast/src/reducer/reconstructing_reducer.rs @@ -382,7 +382,7 @@ pub trait ReconstructingReducer { expected_input: Vec, import_statements: Vec, imports: IndexMap, - aliases: IndexMap, + aliases: IndexMap, circuits: IndexMap, functions: IndexMap, global_consts: IndexMap, diff --git a/ast/src/types/mod.rs b/ast/src/types/mod.rs index 0c13967ff7..ebba862921 100644 --- a/ast/src/types/mod.rs +++ b/ast/src/types/mod.rs @@ -14,9 +14,6 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -pub mod alias; -pub use alias::*; - pub mod integer_type; pub use integer_type::*; diff --git a/errors/src/asg/asg_errors.rs b/errors/src/asg/asg_errors.rs index 89a4f9bf12..d169d4bd4e 100644 --- a/errors/src/asg/asg_errors.rs +++ b/errors/src/asg/asg_errors.rs @@ -33,14 +33,6 @@ create_errors!( help: None, } - /// For when a import of the specified name is unresolved. - @formatted - unresolved_import { - args: (name: impl Display), - msg: format!("failed to resolve import: '{}'", name), - help: None, - } - /// For when a circuit member of the specified name is unresolved. @formatted unresolved_circuit_member { diff --git a/errors/src/ast/ast_errors.rs b/errors/src/ast/ast_errors.rs index 0d13ab94da..d48b044462 100644 --- a/errors/src/ast/ast_errors.rs +++ b/errors/src/ast/ast_errors.rs @@ -15,7 +15,10 @@ // along with the Leo library. If not, see . use crate::create_errors; -use std::{error::Error as ErrorArg, fmt::Debug}; +use std::{ + error::Error as ErrorArg, + fmt::{Debug, Display}, +}; create_errors!( /// AstError enum that represents all the errors for the `leo-ast` crate. @@ -102,4 +105,21 @@ create_errors!( msg: "Console::Assert cannot be matched here, its handled in another case.", help: None, } + + /// This error is for when a user tries to use the library and programatically inject an import + /// on the rust side. + @backtraced + injected_programs { + args: (injected_import_count: impl Display), + msg: format!("It seems the AST has {} injected imports. This is unexpected please import the library naturally", injected_import_count), + help: None, + } + + /// For when a import of the specified name is unresolved. + @formatted + unresolved_import { + args: (name: impl Display), + msg: format!("failed to resolve import: '{}'", name), + help: None, + } ); diff --git a/errors/src/parser/parser_errors.rs b/errors/src/parser/parser_errors.rs index 35f9b90cb5..7728a65750 100644 --- a/errors/src/parser/parser_errors.rs +++ b/errors/src/parser/parser_errors.rs @@ -27,9 +27,9 @@ create_errors!( /// For when the parser encountered an unexpected token. @formatted unexpected_token { - args: (message: impl Display, help: String), + args: (message: impl Display), msg: message, - help: Some(help), + help: None, } /// For when the parser encoutnered an invalid address literal. diff --git a/parser/src/parser/file.rs b/parser/src/parser/file.rs index 93e3b25235..271c76f61b 100644 --- a/parser/src/parser/file.rs +++ b/parser/src/parser/file.rs @@ -62,8 +62,8 @@ impl ParserContext { global_consts.insert(name, global_const); } Token::Type => { - let (name, type_) = self.parse_type_alias()?; - aliases.insert(name, type_); + let (name, alias) = self.parse_type_alias()?; + aliases.insert(name, alias); } _ => { return Err(ParserError::unexpected( @@ -526,16 +526,22 @@ impl ParserContext { } /// - /// Returns an [`(String, (Type, Span))`] AST node if the next tokens represent a global + /// Returns an [`(String, Alias)`] AST node if the next tokens represent a global /// const definition statement and assignment. /// - pub fn parse_type_alias(&mut self) -> Result<(String, (Type, Span))> { + pub fn parse_type_alias(&mut self) -> Result<(String, Alias)> { self.expect(Token::Type)?; let name = self.expect_ident()?; self.expect(Token::Assign)?; - let type_ = self.parse_type()?; + let (type_, _) = self.parse_type()?; self.expect(Token::Semicolon)?; - Ok((name.name.to_string(), type_)) + Ok(( + name.name.to_string(), + Alias { + represents: type_, + name, + }, + )) } } diff --git a/parser/src/tokenizer/mod.rs b/parser/src/tokenizer/mod.rs index fccc611747..576254be1b 100644 --- a/parser/src/tokenizer/mod.rs +++ b/parser/src/tokenizer/mod.rs @@ -84,7 +84,6 @@ pub(crate) fn tokenize(path: &str, input: StrTendril) -> Result compiler-test:7:24\n |\n 7 | const z: [u8; 2] = y[..1u32][..x];\n | ^^^^^^^^^^^^^^" + - "Error [EASG0373019]: 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/multi_fail_initializer.leo.out b/tests/expectations/compiler/compiler/array/multi_fail_initializer.leo.out index c6849d72e8..b920c88311 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 [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 | ^^^^^^^^^^^^^" + - "Error [EASG0373025]: 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 08e07e5508..1c81b18dcc 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 [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 | ^^^^^" + - "Error [EASG0373025]: 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 75c810dc3b..3a9fe9224b 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 [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 | ^^^^^^^^^^^^^" + - "Error [EASG0373025]: 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 ac7a7d9c6f..e9692944ca 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 [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 | ^^^^^^^^^^^" + - "Error [EASG0373025]: 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 1812da5de7..6183b26503 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 [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 | ^^^^^^^^^^^" + - "Error [EASG0373025]: 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_nested_value_nested_3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2_fail.leo.out index 217955800f..24df29595e 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 [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 | ^^^^^^^^^^^" + - "Error [EASG0373025]: 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 54c025b34a..45474940cb 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 [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 | ^^^^^^^^^^^^^^^^" + - "Error [EASG0373025]: 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 d1af91c904..e6be12de69 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 [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 | ^^^^^^^^^^^" + - "Error [EASG0373025]: 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 bf875ee25e..640c3e964a 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 [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 | ^^^^^^^^^^^^^^" + - "Error [EASG0373025]: 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 d9ade042ec..f05e92f051 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 [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 | ^^^^^^^^^^^" + - "Error [EASG0373025]: 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 f236a3578a..02afe9a48e 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 [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 | ^^^^^^^^^^^^^^^^" + - "Error [EASG0373025]: 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 243e146be8..1b75a63f99 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 [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 | ^^^^^^^^^^^" + - "Error [EASG0373025]: 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 370d7730e6..67e96d07cf 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 [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 | ^^^^^^^^^^^^^^" + - "Error [EASG0373025]: 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/char/invalid_char.leo.out b/tests/expectations/compiler/compiler/char/invalid_char.leo.out index 1044b2dbf1..c788506554 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 [EPAR0370000]: '\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 | ^" 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 d3d1a707f1..e995bb86db 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 [EASG0373033]: illegal assignment to immutable variable 'self'\n --> compiler-test:7:9\n |\n 7 | self.a = new;\n | ^^^^^^^^^^^^" + - "Error [EASG0373032]: 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 6854a2bc6f..8af6948767 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 [EASG0373003]: missing circuit member 'x' for initialization of circuit 'Foo'\n --> compiler-test:9:15\n |\n 9 | const a = Foo { y: 0u32 };\n | ^^^^^^^^^^^^^^^" + - "Error [EASG0373002]: 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 a6b6460e54..53e7c8bd36 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 [EASG0373003]: missing circuit member 'x' for initialization of circuit 'Foo'\n --> compiler-test:9:15\n |\n 9 | const a = Foo { y };\n | ^^^^^^^^^" + - "Error [EASG0373002]: 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/member_function_fail.leo.out b/tests/expectations/compiler/compiler/circuits/member_function_fail.leo.out index 5c34a23b9d..fdaddd7eed 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 [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 | ^^^^^^^^" + - "Error [EASG0373001]: 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 50f8f5a0b5..fd47d80984 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 [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 | ^^^^^^" + - "Error [EASG0373008]: 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 0fedea2143..9311064dc2 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 [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 | ^^^" + - "Error [EASG0373027]: 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 66b5cccfc3..918bf95807 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 [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 | ^^^^^^^^^^^" + - "Error [EASG0373001]: 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 f80585c1ea..eef6c84a76 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 [EASG0373002]: illegal reference to non-existant member 'y' of circuit 'Foo'\n --> compiler-test:9:17\n |\n 9 | const err = a.y;\n | ^^^" + - "Error [EASG0373001]: 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 550752bee7..f81a2e6a10 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 [EASG0373007]: attempt to assign to function 'bar'\n --> compiler-test:12:5\n |\n 12 | f.bar = 1u8;\n | ^^^^^^^^^^^" + - "Error [EASG0373006]: 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 e1958638b2..a560ec1f26 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 [EASG0373007]: attempt to assign to function 'bar'\n --> compiler-test:9:9\n |\n 9 | self.bar = new;\n | ^^^^^^^^^^^^^^" + - "Error [EASG0373006]: 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 e1958638b2..a560ec1f26 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 [EASG0373007]: attempt to assign to function 'bar'\n --> compiler-test:9:9\n |\n 9 | self.bar = new;\n | ^^^^^^^^^^^^^^" + - "Error [EASG0373006]: 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 d3d1a707f1..e995bb86db 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 [EASG0373033]: illegal assignment to immutable variable 'self'\n --> compiler-test:7:9\n |\n 7 | self.a = new;\n | ^^^^^^^^^^^^" + - "Error [EASG0373032]: 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 db91c8aeef..3bd203bc2a 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 [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 | ^" + - "Error [EASG0373005]: 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 d56bfa412b..4e0dd84533 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 [EASG0373033]: illegal assignment to immutable variable 'f'\n --> compiler-test:10:5\n |\n 10 | f.a = 1u8;\n | ^^^^^^^^^" + - "Error [EASG0373032]: 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_member_invalid.leo.out b/tests/expectations/compiler/compiler/circuits/self_member_invalid.leo.out index 8056d661ae..85e1e719ef 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 [EASG0373009]: cannot call static function 'bar' of circuit 'Foo' from target\n --> compiler-test:13:17\n |\n 13 | const err = foo.bar();\n | ^^^^^^^" + - "Error [EASG0373008]: 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 357c5dcc1e..604086e9eb 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 [EASG0373009]: cannot call static function 'bar' of circuit 'Foo' from target\n --> compiler-test:11:17\n |\n 11 | const err = foo.bar();\n | ^^^^^^^" + - "Error [EASG0373008]: 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_parameter_fail_unknown.leo.out b/tests/expectations/compiler/compiler/console/log_parameter_fail_unknown.leo.out index 0693d53502..13d96cc9b2 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 [EASG0373028]: failed to resolve variable reference 'a'\n --> compiler-test:4:23\n |\n 4 | console.log(\"{}\", a);\n | ^" + - "Error [EASG0373027]: 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 40465e1bdf..4ac07c61b9 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 [EAST0372008]: Cannot constrcut an empty string: it has the type of [char; 0] which is not possible.\n --> compiler-test:3:30\n |\n 3 | import core.unstable.blake2s.BadCircuit; // `BadCircuit` is not included in the blake2s package\n | ^^^^^^^^^^" + - "Error [EAST0372011]: failed to resolve import: 'core.unstable.blake2s'\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 8a79441dff..c5cfe9c2bc 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 [EAST0372008]: Cannot constrcut an empty string: it has the type of [char; 0] which is not possible.\n --> compiler-test:3:13\n |\n 3 | import core.*; // You cannot import all dependencies from core at once\n | ^" + - "Error [EAST0372011]: failed to resolve import: 'core'\n --> compiler-test:3:13\n |\n 3 | import core.*; // You cannot import all dependencies from core at once\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 5c6d28f519..1d348aeb97 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 [EAST0372008]: Cannot constrcut an empty string: it has the type of [char; 0] which is not possible.\n --> compiler-test:3:13\n |\n 3 | import core.bad_circuit; // `bad_circuit` is not a core package\n | ^^^^^^^^^^^" + - "Error [EAST0372011]: failed to resolve import: 'core'\n --> compiler-test:3:13\n |\n 3 | import core.bad_circuit; // `bad_circuit` is not a core package\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 23786ee167..ff3bf66480 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 [EAST0372008]: Cannot constrcut an empty string: it has the type of [char; 0] which is not possible.\n --> compiler-test:3:22\n |\n 3 | import core.unstable.bad_circuit; // `bad_circuit` is not a core unstable package\n | ^^^^^^^^^^^" + - "Error [EAST0372011]: failed to resolve import: 'core.unstable'\n --> compiler-test:3:22\n |\n 3 | import core.unstable.bad_circuit; // `bad_circuit` is not a core unstable package\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 68c53fc358..6b1a084492 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 5 | ...\n 6 | }\n | ^" + - "Error [EASG0373034]: 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 a8b0dfd0c9..a7586b72b2 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 4 | ...\n 5 | ...\n 6 | ...\n 7 | ...\n 8 | ...\n 9 | ...\n 10 | ...\n 11 | }\n | ^" + - "Error [EASG0373033]: 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/return_array_nested_fail.leo.out b/tests/expectations/compiler/compiler/function/return_array_nested_fail.leo.out index ec70067b21..0aca9e37e9 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 [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 | ^^^^^^^^^^^^^" + - "Error [EASG0373025]: 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 e2256628cb..231dbf0254 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 [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 | ^^^^^^^^^^^^^" + - "Error [EASG0373025]: 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 1d2cfacf9e..194746f3ae 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 [EASG0373028]: failed to resolve variable reference 'myGlobal'\n --> compiler-test:5:12\n |\n 5 | return myGlobal;\n | ^^^^^^^^" + - "Error [EASG0373027]: 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 d21aace1cd..8af5ccb5a9 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 [EASG0373024]: failed to resolve function: 'my_function'\n --> compiler-test:5:5\n |\n 5 | my_function();\n | ^^^^^^^^^^^" + - "Error [EASG0373023]: 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 1f854bf2fd..5c6cabd3d7 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 [EASG0373033]: illegal assignment to immutable variable 'basic'\n --> compiler-test:7:5\n |\n 7 | basic = 2u32;\n | ^^^^^^^^^^^^" + - "Error [EASG0373032]: 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/non_const_input_const.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/non_const_input_const.leo.out index 7c208e40ac..29c1c52cbb 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 [EASG0373025]: failed to resolve type for variable definition 'unknown'\n --> compiler-test:4:17\n |\n 4 | let b = a * 2;\n | ^" + - "Error [EASG0373024]: 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/integers/i128/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/i128/max_fail.leo.out index d3bcb58a4e..dcf61b19c0 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 [EASG0373031]: failed to parse int value '170141183460469231731687303715884105728'\n --> compiler-test:4:21\n |\n 4 | const a: i128 = 170141183460469231731687303715884105728;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" + - "Error [EASG0373030]: 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 55f057ca89..1521d75463 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 [EASG0373031]: failed to parse int value '-170141183460469231731687303715884105729'\n --> compiler-test:4:21\n |\n 4 | const a: i128 = -170141183460469231731687303715884105729;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" + - "Error [EASG0373030]: 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/i16/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/i16/max_fail.leo.out index 243ee127a8..f794128e4b 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 [EASG0373031]: failed to parse int value '32768'\n --> compiler-test:4:20\n |\n 4 | const a: i16 = 32768;\n | ^^^^^" + - "Error [EASG0373030]: 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 00fcc69d5c..956353eb27 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 [EASG0373031]: failed to parse int value '-32769'\n --> compiler-test:4:20\n |\n 4 | const a: i16 = -32769;\n | ^^^^^^" + - "Error [EASG0373030]: 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/i32/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/i32/max_fail.leo.out index 3781b7b1a9..0d54553e56 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 [EASG0373031]: failed to parse int value '2147483648'\n --> compiler-test:4:20\n |\n 4 | const a: i32 = 2147483648;\n | ^^^^^^^^^^" + - "Error [EASG0373030]: 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 45d45fc6e5..73ba63d793 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 [EASG0373031]: failed to parse int value '-2147483649'\n --> compiler-test:4:20\n |\n 4 | const a: i32 = -2147483649;\n | ^^^^^^^^^^^" + - "Error [EASG0373030]: 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/i64/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/i64/max_fail.leo.out index 70acb90ad2..e650a7040c 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 [EASG0373031]: failed to parse int value '9223372036854775808'\n --> compiler-test:4:20\n |\n 4 | const a: i64 = 9223372036854775808;\n | ^^^^^^^^^^^^^^^^^^^" + - "Error [EASG0373030]: 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 d40e357854..96c0168ffc 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 [EASG0373031]: failed to parse int value '-9223372036854775809'\n --> compiler-test:4:20\n |\n 4 | const a: i64 = -9223372036854775809;\n | ^^^^^^^^^^^^^^^^^^^^" + - "Error [EASG0373030]: 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/i8/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/i8/max_fail.leo.out index 59e58793b3..dbd082ebcf 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 [EASG0373031]: failed to parse int value '128'\n --> compiler-test:4:19\n |\n 4 | const a: i8 = 128;\n | ^^^" + - "Error [EASG0373030]: 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 849c2b97bc..8b62f07ded 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 [EASG0373031]: failed to parse int value '-129'\n --> compiler-test:4:19\n |\n 4 | const a: i8 = -129;\n | ^^^^" + - "Error [EASG0373030]: 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/u128/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/u128/max_fail.leo.out index 0e63762f44..379df98977 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 [EASG0373031]: failed to parse int value '340282366920938463463374607431768211456'\n --> compiler-test:4:21\n |\n 4 | const a: u128 = 340282366920938463463374607431768211456;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" + - "Error [EASG0373030]: 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 db0cdb2474..2decda5aa3 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 [EASG0373031]: failed to parse int value '-1'\n --> compiler-test:4:21\n |\n 4 | const a: u128 = -1;\n | ^^" + - "Error [EASG0373030]: 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/u16/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/u16/max_fail.leo.out index b249cb3754..5589174d2d 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 [EASG0373031]: failed to parse int value '65536'\n --> compiler-test:4:20\n |\n 4 | const a: u16 = 65536;\n | ^^^^^" + - "Error [EASG0373030]: 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 7f1c33ece7..6d7454bc9e 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 [EASG0373031]: failed to parse int value '-1'\n --> compiler-test:4:20\n |\n 4 | const a: u16 = -1;\n | ^^" + - "Error [EASG0373030]: 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/u32/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/u32/max_fail.leo.out index 9846c671e1..b7d67e21c2 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 [EASG0373031]: failed to parse int value '4294967296'\n --> compiler-test:4:20\n |\n 4 | const a: u32 = 4294967296;\n | ^^^^^^^^^^" + - "Error [EASG0373030]: 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 28202851e3..b7e23834bd 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 [EASG0373031]: failed to parse int value '-1'\n --> compiler-test:4:20\n |\n 4 | const a: u32 = -1;\n | ^^" + - "Error [EASG0373030]: 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/u64/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/u64/max_fail.leo.out index 4636c42cf2..55b5108fa8 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 [EASG0373031]: failed to parse int value '18446744073709551616'\n --> compiler-test:4:20\n |\n 4 | const a: u64 = 18446744073709551616;\n | ^^^^^^^^^^^^^^^^^^^^" + - "Error [EASG0373030]: 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 a33bae4611..f0d007ea6c 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 [EASG0373031]: failed to parse int value '-1'\n --> compiler-test:4:20\n |\n 4 | const a: u64 = -1;\n | ^^" + - "Error [EASG0373030]: 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/u8/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/u8/max_fail.leo.out index 1764ec3502..2c635d7168 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 [EASG0373031]: failed to parse int value '256'\n --> compiler-test:4:19\n |\n 4 | const a: u8 = 256;\n | ^^^" + - "Error [EASG0373030]: 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 c2e3b45913..4f759d7ea2 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 [EASG0373031]: failed to parse int value '-1'\n --> compiler-test:4:19\n |\n 4 | const a: u8 = -1;\n | ^^" + - "Error [EASG0373030]: 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/mutability/array_fail.leo.out b/tests/expectations/compiler/compiler/mutability/array_fail.leo.out index ca06a5b485..fb91d0943d 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 [EASG0373033]: illegal assignment to immutable variable 'a'\n --> compiler-test:5:5\n |\n 5 | a[0] = 0;\n | ^^^^^^^^" + - "Error [EASG0373032]: 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 0d6020a433..7da40fbd62 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 [EASG0373033]: illegal assignment to immutable variable 'a'\n --> compiler-test:10:5\n |\n 10 | a.x = 0;\n | ^^^^^^^" + - "Error [EASG0373032]: 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 91f1479abc..60c212a3e6 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 [EASG0373010]: cannot call mutable member function 'foo' of circuit 'Foo' from immutable context\n --> compiler-test:15:5\n |\n 15 | a.foo();\n | ^^^^^" + - "Error [EASG0373009]: 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 c173994d24..1c73aff5da 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 [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 | ^" + - "Error [EASG0373005]: 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 c6ba953ccb..4a957ebc26 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 [EASG0373033]: illegal assignment to immutable variable 'a'\n --> compiler-test:6:5\n |\n 6 | a = 0;\n | ^^^^^" + - "Error [EASG0373032]: 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 3c28b515fc..3c818f62f7 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 [EASG0373028]: failed to resolve variable reference 'a'\n --> compiler-test:5:5\n |\n 5 | a = false;\n | ^" + - "Error [EASG0373027]: 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 c6ba953ccb..4a957ebc26 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 [EASG0373033]: illegal assignment to immutable variable 'a'\n --> compiler-test:6:5\n |\n 6 | a = 0;\n | ^^^^^" + - "Error [EASG0373032]: 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 659cb7e8b4..f5bc04e338 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 [EASG0373021]: ternary sides had different types: left u32, right bool\n --> compiler-test:4:13\n |\n 4 | let x = true ? x: true;\n | ^^^^^^^^^^^^^^" + - "Error [EASG0373020]: 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 349d819abb..e975210ed2 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 [EASG0373017]: a variable named \"x\" already exists in this scope\n --> compiler-test:5:3\n |\n 5 | let x = true;\n | ^^^^^^^^^^^^" + - "Error [EASG0373016]: 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 0deb81474b..384fa46cc2 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 [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 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^" + - "Error [EASG0373014]: 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/expression/literal/char_fail.leo.out b/tests/expectations/parser/parser/expression/literal/char_fail.leo.out index a5656a5488..46390f4fb9 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 [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" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\'\n | ^" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | 'a\n | ^" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | ''\n | ^" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\x9A'\n | ^" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\x7'\n | ^" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\x7g'\n | ^" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\xz'\n | ^" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\x80'\n | ^" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\xc1'\n | ^" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\xc2'\n | ^" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\xDF'\n | ^" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\xC0'\n | ^" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\xe0'\n | ^" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\x9f'\n | ^" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | 'abcdefg'\n | ^" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\t\\t'\n | ^" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\a'\n | ^" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\z'\n | ^" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\A'\n | ^" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\Z'\n | ^" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\1'\n | ^" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\9'\n | ^" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\*'\n | ^" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\x'\n | ^" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\u'\n | ^" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\u{bbbbb}\\u{aaaa}'\n | ^" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\uz'\n | ^" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\u1'\n | ^" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\u123'\n | ^" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\u{2764z'\n | ^" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\u{276g}'\n | ^" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\u00000000'\n | ^" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\u01000000'\n | ^" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '\\u9999999'\n | ^" + - "Error [EPAR0370000]: '\n --> test:1:1\n |\n 1 | '😭😂😘'\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 07ac3097ed..4d8c97fc71 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 [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" + - "Error [EPAR0370000]: \"\n --> test:1:1\n |\n 1 | \"Hello world!\n | ^" + - "Error [EPAR0370000]: \"\n --> test:1:1\n |\n 1 | \"\\\"\n | ^" + - "Error [EPAR0370000]: \"\n --> test:1:1\n |\n 1 | \"\\l\"\n | ^" + - "Error [EPAR0370000]: \"\n --> test:1:1\n |\n 1 | \"\\uaaa\"\n | ^" + - "Error [EPAR0370000]: \"\n --> test:1:1\n |\n 1 | \"\\u\"\n | ^" + - "Error [EPAR0370000]: \"\n --> test:1:1\n |\n 1 | \"\\xFF\"\n | ^" + - "Error [EPAR0370000]: \"\n --> test:1:1\n |\n 1 | \"\\x\"\n | ^"