mirror of
https://github.com/AleoHQ/leo.git
synced 2024-11-24 10:52:29 +03:00
standardize ast generation in ast and test runner
This commit is contained in:
parent
438af6bf80
commit
649088905d
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -1235,7 +1235,6 @@ name = "leo-compiler"
|
||||
version = "1.5.3"
|
||||
dependencies = [
|
||||
"bincode",
|
||||
"hex",
|
||||
"indexmap",
|
||||
"leo-asg",
|
||||
"leo-asg-passes",
|
||||
|
@ -87,9 +87,6 @@ version = "0.7.6"
|
||||
[dependencies.bincode]
|
||||
version = "1.3"
|
||||
|
||||
[dependencies.hex]
|
||||
version = "0.4.2"
|
||||
|
||||
[dependencies.indexmap]
|
||||
version = "1.7.0"
|
||||
features = [ "serde-1" ]
|
||||
|
@ -333,7 +333,7 @@ impl<'a, F: PrimeField, G: GroupType<F>> Compiler<'a, F, G> {
|
||||
hasher.update(unparsed_file.as_bytes());
|
||||
let hash = hasher.finalize();
|
||||
|
||||
Ok(hex::encode(hash))
|
||||
Ok(format!("{:x}", hash))
|
||||
}
|
||||
|
||||
/// TODO (howardwu): Incorporate this for real program executions and intentionally-real
|
||||
|
@ -20,7 +20,6 @@ use std::{
|
||||
};
|
||||
|
||||
use leo_asg::*;
|
||||
use leo_ast::{Ast, Program};
|
||||
use leo_errors::Result;
|
||||
|
||||
use leo_synthesizer::{CircuitSynthesizer, SerializedCircuit, SummarizedCircuit};
|
||||
@ -58,13 +57,14 @@ fn new_compiler(path: PathBuf, theorem_options: Option<AstSnapshotOptions>) -> E
|
||||
)
|
||||
}
|
||||
|
||||
fn hash(input: String) -> String {
|
||||
fn hash_file(path: &std::path::Path) -> String {
|
||||
use sha2::{Digest, Sha256};
|
||||
|
||||
let mut file = std::fs::File::open(&path).unwrap();
|
||||
let mut hasher = Sha256::new();
|
||||
hasher.update(input.as_bytes());
|
||||
let output = hasher.finalize();
|
||||
hex::encode(&output[..])
|
||||
std::io::copy(&mut file, &mut hasher).unwrap();
|
||||
let hash = hasher.finalize();
|
||||
|
||||
format!("{:x}", hash)
|
||||
}
|
||||
|
||||
pub(crate) fn parse_program(
|
||||
@ -211,28 +211,13 @@ impl Namespace for CompileNamespace {
|
||||
});
|
||||
}
|
||||
|
||||
let initial_ast: String = hash(
|
||||
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()),
|
||||
);
|
||||
let canonicalized_ast: String = hash(
|
||||
Ast::from_json_file("/tmp/output/canonicalization_ast.json".into())
|
||||
.unwrap_or_else(|_| Ast::new(Program::new("Error reading canonicalized theorem.".to_string())))
|
||||
.to_json_string()
|
||||
.unwrap_or_else(|_| "Error converting ast to string.".to_string()),
|
||||
);
|
||||
let type_inferenced_ast = hash(
|
||||
Ast::from_json_file("/tmp/output/type_inferenced_ast.json".into())
|
||||
.unwrap_or_else(|_| Ast::new(Program::new("Error reading type inferenced theorem.".to_string())))
|
||||
.to_json_string()
|
||||
.unwrap_or_else(|_| "Error converting ast to string.".to_string()),
|
||||
);
|
||||
let initial_ast: String = hash_file(Path::new("/tmp/output/initial_ast.json"));
|
||||
let canonicalized_ast: String = hash_file(Path::new("/tmp/output/canonicalization_ast.json"));
|
||||
let type_inferenced_ast = hash_file(Path::new("/tmp/output/type_inferenced_ast.json"));
|
||||
|
||||
if std::fs::read_dir("/tmp/output").is_ok() {
|
||||
/* 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.");
|
||||
}
|
||||
} */
|
||||
|
||||
let final_output = CompileOutput {
|
||||
circuit: last_circuit.unwrap(),
|
||||
|
@ -1,58 +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 <https://www.gnu.org/licenses/>.
|
||||
|
||||
use leo_ast::{FormattedError, LeoError, Span};
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum DeprecatedError {
|
||||
#[error("{}", _0)]
|
||||
Error(#[from] FormattedError),
|
||||
}
|
||||
|
||||
impl DeprecatedError {
|
||||
fn new_from_span(message: String, span: &Span) -> Self {
|
||||
DeprecatedError::Error(FormattedError::new_from_span(message, span))
|
||||
}
|
||||
}
|
||||
|
||||
impl LeoError for DeprecatedError {}
|
||||
|
||||
impl DeprecatedError {
|
||||
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, &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, &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, 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, span)
|
||||
}
|
||||
}
|
@ -1,15 +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 <https://www.gnu.org/licenses/>.
|
@ -1,129 +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 <https://www.gnu.org/licenses/>.
|
||||
|
||||
use leo_ast::{FormattedError, LeoError, Span};
|
||||
|
||||
use crate::{DeprecatedError, SyntaxResult, Token, TokenError};
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum SyntaxError {
|
||||
#[error("{}", _0)]
|
||||
Error(#[from] FormattedError),
|
||||
|
||||
#[error("{}", _0)]
|
||||
TokenError(#[from] TokenError),
|
||||
|
||||
#[error("{}", _0)]
|
||||
DeprecatedError(#[from] DeprecatedError),
|
||||
}
|
||||
|
||||
impl LeoError for SyntaxError {}
|
||||
|
||||
pub 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(SyntaxError::unexpected_whitespace(left, right, &error_span));
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
impl SyntaxError {
|
||||
fn new_from_span(message: String, span: &Span) -> Self {
|
||||
SyntaxError::Error(FormattedError::new_from_span(message, span))
|
||||
}
|
||||
|
||||
pub fn invalid_import_list(span: &Span) -> Self {
|
||||
Self::new_from_span("Cannot import empty list".to_string(), span)
|
||||
}
|
||||
|
||||
pub fn unexpected_eof(span: &Span) -> Self {
|
||||
Self::new_from_span("unexpected EOF".to_string(), 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),
|
||||
span,
|
||||
)
|
||||
}
|
||||
|
||||
pub fn unexpected(got: &Token, expected: &[Token], span: &Span) -> Self {
|
||||
Self::new_from_span(
|
||||
format!(
|
||||
"expected {} -- got '{}'",
|
||||
expected
|
||||
.iter()
|
||||
.map(|x| format!("'{}'", x))
|
||||
.collect::<Vec<_>>()
|
||||
.join(", "),
|
||||
got.to_string()
|
||||
),
|
||||
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(),
|
||||
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::<Vec<_>>()
|
||||
.join(", "),
|
||||
got
|
||||
),
|
||||
span,
|
||||
)
|
||||
}
|
||||
|
||||
pub fn unexpected_statement(got: String, expected: &str, span: &Span) -> Self {
|
||||
Self::new_from_span(format!("expected '{}', got '{}'", expected, got), span)
|
||||
}
|
||||
|
||||
pub fn unexpected_str(got: &Token, expected: &str, span: &Span) -> Self {
|
||||
Self::new_from_span(format!("expected '{}', got '{}'", expected, got.to_string()), span)
|
||||
}
|
||||
|
||||
pub fn spread_in_array_init(span: &Span) -> Self {
|
||||
Self::new_from_span("illegal spread in array initializer".to_string(), span)
|
||||
}
|
||||
|
||||
pub fn invalid_assignment_target(span: &Span) -> Self {
|
||||
Self::new_from_span("invalid assignment target".to_string(), 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(),
|
||||
span,
|
||||
)
|
||||
}
|
||||
|
||||
pub fn illegal_self_const(span: &Span) -> Self {
|
||||
Self::new_from_span("cannot have const self".to_string(), span)
|
||||
}
|
||||
}
|
@ -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
|
||||
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,
|
||||
// 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 <https://www.gnu.org/licenses/>.
|
||||
|
||||
use leo_ast::{FormattedError, LeoError, Span};
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum TokenError {
|
||||
#[error("{}", _0)]
|
||||
Error(#[from] FormattedError),
|
||||
}
|
||||
|
||||
impl LeoError for TokenError {}
|
||||
|
||||
impl TokenError {
|
||||
fn new_from_span(message: String, span: &Span) -> Self {
|
||||
TokenError::Error(FormattedError::new_from_span(message, span))
|
||||
}
|
||||
|
||||
pub fn unexpected_token(token: &str, span: &Span) -> Self {
|
||||
TokenError::new_from_span(format!("unexpected token: '{}'", token), span)
|
||||
}
|
||||
|
||||
pub fn invalid_address_lit(token: &str, span: &Span) -> Self {
|
||||
TokenError::new_from_span(format!("invalid address literal: '{}'", token), span)
|
||||
}
|
||||
}
|
@ -107,7 +107,7 @@ fn run_with_args(opt: Opt) -> Result<(), Box<dyn Error>> {
|
||||
cwd.pop();
|
||||
cwd.join(&val.as_str().unwrap())
|
||||
})
|
||||
.unwrap_or(PathBuf::from(path));
|
||||
.unwrap_or_else(|| PathBuf::from(path));
|
||||
|
||||
// Write all files into the directory.
|
||||
let (initial, canonicalized, type_inferenced) = generate_asts(cwd, text)?;
|
||||
@ -129,7 +129,9 @@ fn run_with_args(opt: Opt) -> Result<(), Box<dyn Error>> {
|
||||
}
|
||||
|
||||
/// Do what Compiler does - prepare 3 stages of AST: initial, canonicalized and type_inferenced
|
||||
fn generate_asts(path: PathBuf, text: &String) -> Result<(String, String, String), Box<dyn Error>> {
|
||||
fn generate_asts(path: PathBuf, text: &str) -> Result<(String, String, String), Box<dyn Error>> {
|
||||
std::env::set_var("LEO_TESTFRAMEWORK", "true");
|
||||
|
||||
let mut ast = leo_parser::parse_ast(path.clone().into_os_string().into_string().unwrap(), text)?;
|
||||
let initial = ast.to_json_string()?;
|
||||
|
||||
@ -147,6 +149,8 @@ fn generate_asts(path: PathBuf, text: &String) -> Result<(String, String, String
|
||||
.expect("Failed to produce type inference ast.")
|
||||
.to_json_string()?;
|
||||
|
||||
std::env::remove_var("LEO_TESTFRAMEWORK");
|
||||
|
||||
Ok((initial, canonicalized, type_inferenced))
|
||||
}
|
||||
|
||||
|
@ -123,15 +123,12 @@ pub fn run_tests<T: Runner>(runner: &T, expectation_category: &str) {
|
||||
None
|
||||
};
|
||||
|
||||
let end_of_header = content.find("*/").expect("failed to find header block in test");
|
||||
let content = &content[end_of_header + 2..];
|
||||
|
||||
let tests = match namespace.parse_type() {
|
||||
ParseType::Line => crate::fetch::split_tests_oneline(content)
|
||||
ParseType::Line => crate::fetch::split_tests_oneline(&content)
|
||||
.into_iter()
|
||||
.map(|x| x.to_string())
|
||||
.collect(),
|
||||
ParseType::ContinuousLines => crate::fetch::split_tests_twoline(content),
|
||||
ParseType::ContinuousLines => crate::fetch::split_tests_twoline(&content),
|
||||
ParseType::Whole => vec![content.to_string()],
|
||||
};
|
||||
|
||||
|
@ -16,6 +16,6 @@ outputs:
|
||||
a:
|
||||
type: bool
|
||||
value: "true"
|
||||
initial_ast: 0788eb39577304b655f147fe3045e1fad995b31811444afadc228bf99f505994
|
||||
canonicalized_ast: 0788eb39577304b655f147fe3045e1fad995b31811444afadc228bf99f505994
|
||||
type_inferenced_ast: 57aa71789a8ba7ac075f734ecc0450ae4b56b2343cff19e345cdab9c7715e1ee
|
||||
initial_ast: b94a0eb19cdcf4606fd76a5d7e66d1329ec1ed3639c00e619af8a9e9b9879878
|
||||
canonicalized_ast: b94a0eb19cdcf4606fd76a5d7e66d1329ec1ed3639c00e619af8a9e9b9879878
|
||||
type_inferenced_ast: e9e24193aa212153fb45b3ea6c6f20743235e9071ff14071bc1278f457f7c465
|
||||
|
@ -22,6 +22,6 @@ outputs:
|
||||
a:
|
||||
type: bool
|
||||
value: "false"
|
||||
initial_ast: e057591dddc93027645e671870d9bb932a32647a600a452657e0a8a3748f0921
|
||||
canonicalized_ast: e057591dddc93027645e671870d9bb932a32647a600a452657e0a8a3748f0921
|
||||
type_inferenced_ast: 1d32fc5c118dc328274a6e2c4048c0efeea2b128fa2d2733ddf7d4fde4daf46f
|
||||
initial_ast: ad17fba2b75a570467bd36de678d39b312aa0e99de288330ce3b69193e21786a
|
||||
canonicalized_ast: ad17fba2b75a570467bd36de678d39b312aa0e99de288330ce3b69193e21786a
|
||||
type_inferenced_ast: 354044b121427055b5fe24ecce425c6e1e3f5b234fd1e4c585018438b09358d7
|
||||
|
@ -16,6 +16,6 @@ outputs:
|
||||
a:
|
||||
type: bool
|
||||
value: "true"
|
||||
initial_ast: 76cba1a1eb179db8b21c2e05403861e133983feec9b987c764a5584da78c16fb
|
||||
canonicalized_ast: 76cba1a1eb179db8b21c2e05403861e133983feec9b987c764a5584da78c16fb
|
||||
type_inferenced_ast: 822de2e0c4fdf74f7b476666b6a8a38782bd828dc2d216a7a68bf70edc444fbf
|
||||
initial_ast: faaab01ea5a01d60ebe5f21468125b71430cb3b5d4732ea258ba762e2256d223
|
||||
canonicalized_ast: faaab01ea5a01d60ebe5f21468125b71430cb3b5d4732ea258ba762e2256d223
|
||||
type_inferenced_ast: adaf76557d43d25d1ee0a3a0270e2d58038372d6d946a52b811394e913150eee
|
||||
|
@ -22,6 +22,6 @@ outputs:
|
||||
a:
|
||||
type: bool
|
||||
value: "false"
|
||||
initial_ast: 8a34bf070edd7585daad47802214b7df49b6df6dd9a6344644a4f121b320e449
|
||||
canonicalized_ast: 8a34bf070edd7585daad47802214b7df49b6df6dd9a6344644a4f121b320e449
|
||||
type_inferenced_ast: 2254abca31e4326444ef2066c8f85b3280505a3ecbaffaf7e472276a3034cc2f
|
||||
initial_ast: 854c8706b316c50672c61fe2f5949e6cb67b330289501cd8eee6782e2c33838a
|
||||
canonicalized_ast: 854c8706b316c50672c61fe2f5949e6cb67b330289501cd8eee6782e2c33838a
|
||||
type_inferenced_ast: 8ff2bfdc3ba353fe5d32c10252dd00ed932b874499e4265f233a3e0c7fd7e357
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [EASG0373020]: 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:11:24\n |\n 11 | const z: [u8; 2] = y[..1u32][..x];\n | ^^^^^^^^^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "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 | ^^^^^^^^^^^"
|
||||
- "Error [EAST0372006]: received dimension size of 0, expected it to be 1 or larger.\n --> compiler-test:8:13\n |\n 8 | let a = [true; (0)];\n | ^^^^^^^^^^^"
|
||||
|
@ -16,6 +16,6 @@ outputs:
|
||||
out:
|
||||
type: bool
|
||||
value: "true"
|
||||
initial_ast: 9a4630fa0959a626a26800f00d05a203e35f4389a9d17a6dc491eb725ef3a529
|
||||
canonicalized_ast: 6c7df16234b6b4d8aaa6ca1d761bcffb5b05893cc515b6f4d72118bc8e495b7e
|
||||
type_inferenced_ast: 4aa60801f15fb817e16eb9f9bd4d6bed555c9130d88edebb3ba78302879703a1
|
||||
initial_ast: 7d259bad0175e047425c0a4fcbec3254b4673c45f3acd7498891531b65c2b237
|
||||
canonicalized_ast: 12fa89aa3775eeb399492df41472507c0488681d5e79a580040d34b24a83c55d
|
||||
type_inferenced_ast: addefe59b9b8e8d82c507389538636be4771c83a8834c249f003b33c3ba938cc
|
||||
|
@ -22,6 +22,6 @@ outputs:
|
||||
x:
|
||||
type: bool
|
||||
value: "false"
|
||||
initial_ast: c4b7aca1f9002da95f8efab340d4dc5d38e64d97274b1815126e7f88f40e155a
|
||||
canonicalized_ast: c8b633546058b56b76a0864ab0fce2aa7169554b716e17250ebc688708dcd206
|
||||
type_inferenced_ast: 9411e52e1ab1ddec7d5d1111aa8c10a5ec916b9d5e86d24ed5348462ec0adb71
|
||||
initial_ast: a00e1308d2a6ae6f8b5c3cde6e2c54c86b1b9daad6961df79d66e8b23fd6a4af
|
||||
canonicalized_ast: e4172132eaaf7c2c3d7e3cc7bf5444b1c8a8cf665d1353862891d33e0514a7f9
|
||||
type_inferenced_ast: 942f6c3baf30fed978b792e80c208e6ca5939b6f331938540f3c54c830f421f0
|
||||
|
@ -22,6 +22,6 @@ outputs:
|
||||
x:
|
||||
type: bool
|
||||
value: "true"
|
||||
initial_ast: 2cbe00dbca8111c92a55dcb9a18766ddb9a407e71535ae62d3bf4d6ec409fca2
|
||||
canonicalized_ast: 75d8d33b9a5376fea14bb9821abe1bc5e1661cfccbf962f58facb42e539b1b04
|
||||
type_inferenced_ast: 45b1b5d994a229da8fb761d97c474778a65b8a5fdd87cfbd6e4aaa4a1ddef7a0
|
||||
initial_ast: f357a93faf7e20acfa71f209da0a9ce4ff445f0b3deb1a8f032f9571502929a3
|
||||
canonicalized_ast: 1d7d52142f512bb09e83a9692e754d0501a59374393a2ea387338cd49bd794d6
|
||||
type_inferenced_ast: 6cafae2971f44ab56e6d676f4849c1bb2f070a5b786b6cd037698d9da932e860
|
||||
|
@ -16,6 +16,6 @@ outputs:
|
||||
x:
|
||||
type: bool
|
||||
value: "true"
|
||||
initial_ast: 002647d1f55a3b5f358cbd27beff81736973fc142dc3d708f8df8d634c1e8fa4
|
||||
canonicalized_ast: b36a5f62c09093fcfce2797b89fe936c4bb94fe1e4aca6608cda4f529677b005
|
||||
type_inferenced_ast: 524e0682eec030dda6f12637fb92af0122a7cf3986a8d7c974a2bc8a1554552d
|
||||
initial_ast: 649081117b5752b42843cc551ffc9343283260e444db76c886dcfe02fa6b9322
|
||||
canonicalized_ast: a1062e68a4f268d7cb83997d0af4bf1cefcb2b8b5f751d549a61d768736fc3ce
|
||||
type_inferenced_ast: 7ad14ee71824314d1519d9f1be0813a27625021ab9c39ec679cec22dfdc0bdeb
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "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 | ^"
|
||||
- "Error [EPAR0370005]: expected ] -- got ')'\n --> compiler-test:8:29\n |\n 8 | return a == [[0u8; 2]; 3)]; // This should be written the right way as this test is for the input file.\n | ^"
|
||||
|
@ -16,6 +16,6 @@ outputs:
|
||||
x:
|
||||
type: bool
|
||||
value: "true"
|
||||
initial_ast: c4b7aca1f9002da95f8efab340d4dc5d38e64d97274b1815126e7f88f40e155a
|
||||
canonicalized_ast: c8b633546058b56b76a0864ab0fce2aa7169554b716e17250ebc688708dcd206
|
||||
type_inferenced_ast: 9411e52e1ab1ddec7d5d1111aa8c10a5ec916b9d5e86d24ed5348462ec0adb71
|
||||
initial_ast: 85129e4920b16da398acbdd1425015a3d9ae95729fd883567015035f9870944b
|
||||
canonicalized_ast: bfcb3cf664334650a2210e2223965a762287ef4bc04c11e828429d6e30dfa7db
|
||||
type_inferenced_ast: a9dfe86a3062d172bd4a0567d9bdbf003d0b0c1acf348df647480bffaf8f354f
|
||||
|
@ -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 [EASG0373026]: unexpected type, expected: 'array of length 2', received: 'array of length 1'\n --> compiler-test:8:31\n |\n 8 | const arr: [u8; (2, 2)] = [[1u8; 2]; 1]; // incorrect dimensions\n | ^^^^^^^^^^^^^"
|
||||
|
@ -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 [EASG0373026]: unexpected type, expected: 'array of length 2', received: 'array of length 1'\n --> compiler-test:9:35\n |\n 9 | [1u8]]; // incorrect dimensions\n | ^^^^^"
|
||||
|
@ -16,6 +16,6 @@ outputs:
|
||||
r0:
|
||||
type: bool
|
||||
value: "true"
|
||||
initial_ast: 411fd383234eaff206ddb89e59c53eb3cf89cc0584065cbcc6a407f7b6c657da
|
||||
canonicalized_ast: 8730ae623fae334d698ea4169b630365f3026e6b39264da353e194feb07c0863
|
||||
type_inferenced_ast: 48ede78fbd4de76d6693bc2a50b813f119024f80d0a6c73f174f1a7ba56a92ce
|
||||
initial_ast: eca1758f42351dfedfe1995abc3551d84d88e65bd10e1e7020673f5ef69e51d9
|
||||
canonicalized_ast: 1849c1993d00a61bb1b4c277a828095bcf219ac28c862682523047de568d51e3
|
||||
type_inferenced_ast: 2c637fb635b741c913de7f529401d959b295d56feba4d3d5da9994bc9c3a3c9a
|
||||
|
@ -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 [EASG0373026]: unexpected type, expected: 'array of length 2', received: 'array of length 1'\n --> compiler-test:8:31\n |\n 8 | const arr: [u8; (2, 2)] = [1u8; (2, 1)]; // incorrect dimensions\n | ^^^^^^^^^^^^^"
|
||||
|
@ -16,6 +16,6 @@ outputs:
|
||||
r0:
|
||||
type: bool
|
||||
value: "true"
|
||||
initial_ast: 436ce80cb3f81cd43e5747a105b14947964f29c0c35070c394728cd2cd9b1fa3
|
||||
canonicalized_ast: 3097d80c877f857bd36f1e3ca56aefd7524a2fc46239959190ae9c5ef166ba9a
|
||||
type_inferenced_ast: 873a71a8f9894e1967f0f750d63011597f17e0a51b5cd42ea0b74191ffa357a1
|
||||
initial_ast: 1291922b32056201b137e1d0152c827c0a92e526a9bf0ca89df25b963ad47403
|
||||
canonicalized_ast: 37c7078195718d1883d4e0aaec7005e53d05620afd7682a7500c45c0f9bd8cf1
|
||||
type_inferenced_ast: 1cc4ba488717dadf27c187b095bc956459057b9ee7566ae26622eca0dff98b1f
|
||||
|
@ -16,6 +16,6 @@ outputs:
|
||||
r0:
|
||||
type: bool
|
||||
value: "true"
|
||||
initial_ast: 33a39a0f27f018eee2f2986d1356bcc9354ce3128447a60859f4392b8a4e4f29
|
||||
canonicalized_ast: c227ab0a4e864f62af90e4b1d843dcd41e65b65354107558cf26383831010a1d
|
||||
type_inferenced_ast: c2515f900d7b2ae04c80ed1f7a3bf5729fec502dffc910cae03ac8cf02530dce
|
||||
initial_ast: 650a327b399596259bd48cbb4a1ca8ea49ddcd1665d76d67d65f24170363a8a5
|
||||
canonicalized_ast: ae92e1195ad8136858b70b17e01df90f5bd62a1b773e0eb52c630bbddcc1b65b
|
||||
type_inferenced_ast: 2c187405389a7326b6bd85556510a674eff80c34d9a67cd01edd13543890635f
|
||||
|
@ -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 [EASG0373026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:10:30\n |\n 10 | const a: [u32; (3, 2)] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^"
|
||||
|
@ -22,6 +22,6 @@ outputs:
|
||||
r:
|
||||
type: "[u8; 3]"
|
||||
value: "\"123\""
|
||||
initial_ast: 1c07965336635dce8cd66c67eddf25a51f61a3b90513f87ef123c642a9b5b18a
|
||||
canonicalized_ast: 1c07965336635dce8cd66c67eddf25a51f61a3b90513f87ef123c642a9b5b18a
|
||||
type_inferenced_ast: cf35fa9ca18f19ac75ca522a77e310b02ff56ac1d748cd5df5c2204bba4a4802
|
||||
initial_ast: eeeba820649099d1985752f7153fede6ecadbc58d52481a1330e0ebb3f0453ca
|
||||
canonicalized_ast: eeeba820649099d1985752f7153fede6ecadbc58d52481a1330e0ebb3f0453ca
|
||||
type_inferenced_ast: 10edff2c28a6a963d49dc1f0c18dcc1f18c1d947937463fcc371e95ca6bb809f
|
||||
|
@ -16,6 +16,6 @@ outputs:
|
||||
x:
|
||||
type: bool
|
||||
value: "true"
|
||||
initial_ast: e75ae154dab0f64ed38fc12e28289351e79787787e882847fbc020a780bc429f
|
||||
canonicalized_ast: e75ae154dab0f64ed38fc12e28289351e79787787e882847fbc020a780bc429f
|
||||
type_inferenced_ast: c5a14533d3c5d0751b98beb612a88eac2c7687ae77858dfcbc3424b160f1cd7d
|
||||
initial_ast: aad43f9950c4406b866b625d01583f681aaf8512281816a44b62f97e78cac7bd
|
||||
canonicalized_ast: aad43f9950c4406b866b625d01583f681aaf8512281816a44b62f97e78cac7bd
|
||||
type_inferenced_ast: 7284c4adb18812b5d1348a5371ba854b0a9306e4b7d45d8a7a53af8e8844bf6f
|
||||
|
@ -16,6 +16,6 @@ outputs:
|
||||
r0:
|
||||
type: bool
|
||||
value: "true"
|
||||
initial_ast: 748ad013543f1352f922fc5b566b38bf6a9de939a566c4484660f17460ef5cee
|
||||
canonicalized_ast: 748ad013543f1352f922fc5b566b38bf6a9de939a566c4484660f17460ef5cee
|
||||
type_inferenced_ast: 80f8d5b301bc982f189c63a4d908c7bf7a9a2d5ea351778d740035bad95f166a
|
||||
initial_ast: a6f591e216938a43e40db4130543a12cb131787f654057d085f58171ae4006e2
|
||||
canonicalized_ast: a6f591e216938a43e40db4130543a12cb131787f654057d085f58171ae4006e2
|
||||
type_inferenced_ast: 61c6ebde5af2f91d3df398ba25a9b6e2b9cedc806c98f82ecef7921b768b330d
|
||||
|
@ -16,6 +16,6 @@ outputs:
|
||||
x:
|
||||
type: bool
|
||||
value: "true"
|
||||
initial_ast: 97004d55104bcf3b6698926656fb23c849cc1c488e387d151c1f3e2be4438fe0
|
||||
canonicalized_ast: 97004d55104bcf3b6698926656fb23c849cc1c488e387d151c1f3e2be4438fe0
|
||||
type_inferenced_ast: 7294dc3dee9189573cbf54b90692869b2a02a78fb3bbb6fe3e2436d2cca377fc
|
||||
initial_ast: 8aff34e4f3d00dd8ecc54aa2a7971175cda5e26a1a913f77414dec7ed93c76fc
|
||||
canonicalized_ast: 8aff34e4f3d00dd8ecc54aa2a7971175cda5e26a1a913f77414dec7ed93c76fc
|
||||
type_inferenced_ast: 425cabf7a2a4669be929ce7325824910a315a118e8627fa5191bbcee05e956b2
|
||||
|
@ -16,6 +16,6 @@ outputs:
|
||||
x:
|
||||
type: bool
|
||||
value: "true"
|
||||
initial_ast: aa978e3283733cfee6cef1e6eff20b4847cf56962ccb3501b6501d31cd42ddb5
|
||||
canonicalized_ast: aa978e3283733cfee6cef1e6eff20b4847cf56962ccb3501b6501d31cd42ddb5
|
||||
type_inferenced_ast: edcba3eea639506ff172054105ac6533c6d184c131240e73f896f307983ba3c2
|
||||
initial_ast: fdd1c43d2dc2f5c97057cd8bd13098d566a2ac4b63661fdb107af830cc8929ad
|
||||
canonicalized_ast: fdd1c43d2dc2f5c97057cd8bd13098d566a2ac4b63661fdb107af830cc8929ad
|
||||
type_inferenced_ast: c95481649332d64c2e08a6e82ae6111a5e74ff925995dd3007fa8b9e238e43c7
|
||||
|
@ -16,6 +16,6 @@ outputs:
|
||||
r0:
|
||||
type: bool
|
||||
value: "true"
|
||||
initial_ast: f92dd478e6c8fdb9a7f0dfd3ad0cf9e6e0239c59e5ee1fda0851fdcdfb2ca589
|
||||
canonicalized_ast: 0ce7eb5522cc65d45b259560b138eca8750b7a4231435f6b5df21c906db4d5ba
|
||||
type_inferenced_ast: 1aeacac3268aed9b99f7d5a7736e9f32cd1a65905d3234d11ec5f6027bd68c66
|
||||
initial_ast: b5ed4361628768e5d29f309a2e363846ab8e9e1237b5522776cd4c1ec68c601b
|
||||
canonicalized_ast: 1e8e83fa6a4e13fbb155df09806a6bc503f9321510a0d935608ef28043585ca0
|
||||
type_inferenced_ast: e83ec826f93f45ca04a1bd2c5dd8b3bff60c6df241afa672568b9eff27d365bc
|
||||
|
@ -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 [EASG0373026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:8:30\n |\n 8 | const a: [u32; (3, 2)] = [0; (2, 3)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [EPAR0370005]: expected ( -- got '-'\n --> compiler-test:4:19\n |\n 4 | const a: [u8; -2] = [0u32; 2];\n | ^"
|
||||
- "Error [EPAR0370005]: expected ( -- got '-'\n --> compiler-test:7:19\n |\n 7 | const a: [u8; -2] = [0u32; 2];\n | ^"
|
||||
|
@ -16,6 +16,6 @@ outputs:
|
||||
x:
|
||||
type: bool
|
||||
value: "true"
|
||||
initial_ast: ab709670db7a5cc6642a175a78541054b53210f6be39a174d90ee57f3c5570f5
|
||||
canonicalized_ast: ab709670db7a5cc6642a175a78541054b53210f6be39a174d90ee57f3c5570f5
|
||||
type_inferenced_ast: f870e0b5181e4187da90ea8f7ea562596f0fea420425a403a972d761131718af
|
||||
initial_ast: 556192af13c817701b5337b58ba4dc7f0f4509c4b35aebb2ef8885f558c9d877
|
||||
canonicalized_ast: 556192af13c817701b5337b58ba4dc7f0f4509c4b35aebb2ef8885f558c9d877
|
||||
type_inferenced_ast: 29369e02493bef27d3b8bda3f299938178dd1ed2df328b4cecd063be92c43565
|
||||
|
@ -16,6 +16,6 @@ outputs:
|
||||
x:
|
||||
type: bool
|
||||
value: "true"
|
||||
initial_ast: 05ee62d30364f4d4ea3a6f680b049c3743d6fcb2cd7e751d798e61b38f1f0c70
|
||||
canonicalized_ast: 05ee62d30364f4d4ea3a6f680b049c3743d6fcb2cd7e751d798e61b38f1f0c70
|
||||
type_inferenced_ast: a1307016717f76519ff0f813ead70ed5460644e0e8414827665a1bd066159a76
|
||||
initial_ast: 68b036cbee1e38611c9328065a91ba3414fa3e4b241c74a76de8d69fc486e6d3
|
||||
canonicalized_ast: 68b036cbee1e38611c9328065a91ba3414fa3e4b241c74a76de8d69fc486e6d3
|
||||
type_inferenced_ast: a6118f60ed2d9e8b58b8abcd440e78c9b47711bea0afe9f50938492fc0946303
|
||||
|
@ -16,6 +16,6 @@ outputs:
|
||||
x:
|
||||
type: bool
|
||||
value: "true"
|
||||
initial_ast: 8caeaa858353e7f461b14364b898d538508c2e45c477c36dddc2960d4d626ed9
|
||||
canonicalized_ast: 8caeaa858353e7f461b14364b898d538508c2e45c477c36dddc2960d4d626ed9
|
||||
type_inferenced_ast: a61912871814695d648b0f176feaa0409b3d6bae3cb7c7a1234bf6543e015a5f
|
||||
initial_ast: 1656fa54c1a5e95548cc4232c70e27649b6dec2eef37b1e05df729736a00994f
|
||||
canonicalized_ast: 1656fa54c1a5e95548cc4232c70e27649b6dec2eef37b1e05df729736a00994f
|
||||
type_inferenced_ast: 275526f498b666f68485a61ccc8a0c97402fb55253d1060efb6e511a766b2810
|
||||
|
@ -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 [EASG0373026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:7:29\n |\n 7 | const b: [[u8; 2]; 3] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^"
|
||||
|
@ -16,6 +16,6 @@ outputs:
|
||||
r0:
|
||||
type: bool
|
||||
value: "true"
|
||||
initial_ast: 77b015384e8f21d34eef7f56465605fa133e739863a6bc33b01315232a86647e
|
||||
canonicalized_ast: 77b015384e8f21d34eef7f56465605fa133e739863a6bc33b01315232a86647e
|
||||
type_inferenced_ast: 4be69d8478185f5b9d4dcee3fc16ad4af858b7a47122bbc8e757d0dbc4bf92d8
|
||||
initial_ast: 662a9450d998537f83bb696515ccf7c6924c318324d1fcc46f3e4b9b1874986f
|
||||
canonicalized_ast: 662a9450d998537f83bb696515ccf7c6924c318324d1fcc46f3e4b9b1874986f
|
||||
type_inferenced_ast: 9005f46215571f707dd5666067f93618e1d5b699bc80465c33d303fe95705ee9
|
||||
|
@ -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 [EASG0373026]: unexpected type, expected: 'array of length 4', received: 'array of length 2'\n --> compiler-test:7:34\n |\n 7 | const b: [[[u8; 2]; 3]; 4] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^^^^^^"
|
||||
|
@ -16,6 +16,6 @@ outputs:
|
||||
r0:
|
||||
type: bool
|
||||
value: "true"
|
||||
initial_ast: ce12666930386785c7a5afe142793c47eae62145ff1d50c590dc82c2b4baded6
|
||||
canonicalized_ast: 8220bc2881fe07bbfa873376696618fc182aff993d2a7d1a23ace5cc00965ff8
|
||||
type_inferenced_ast: c14a7e89debd9289883db476fdbc814d14bfc410d40d1ac100bbece88d35b7c8
|
||||
initial_ast: 42c6550b53e8769f01a77bf1354ddf6578eb79224e63041af9aaa022a778e41f
|
||||
canonicalized_ast: 51cf98ff687fc786eb9973fdab3b243502805e58caede1c0ffdc437e1ba1f148
|
||||
type_inferenced_ast: 0d4f573e6dc4e05a34afa4d64c99dddd505fba2183670b6810275cdaa4cfad77
|
||||
|
@ -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 [EASG0373026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:7:29\n |\n 7 | const b: [[u8; 2]; 3] = [0; (2, 3)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^"
|
||||
|
@ -16,6 +16,6 @@ outputs:
|
||||
r0:
|
||||
type: bool
|
||||
value: "true"
|
||||
initial_ast: 609dfd962592e1dbf90051979163cead865cb69c0722c641517fad4f3091ec57
|
||||
canonicalized_ast: 4d6b8380c844ac6655c7dcc4c4a2ff45f14001577c82f21d87b4546e04c7e776
|
||||
type_inferenced_ast: d86da787361b7cea05474815138f2a1f98642b93232641bf399647788c0d5ecd
|
||||
initial_ast: ac564347c0564834b439dccb87b1329502458c4d75fab158d7cc31253fb5af8f
|
||||
canonicalized_ast: 0a61c2694f461bce3cbf0528df7af8179afd2ef464dcbe10b34a0f7da4abacf6
|
||||
type_inferenced_ast: f5befbd335c89629273e4455ec0b3669d65adc1c248edd476815a28bc2319357
|
||||
|
@ -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 [EASG0373026]: unexpected type, expected: 'array of length 4', received: 'array of length 2'\n --> compiler-test:7:34\n |\n 7 | const b: [[[u8; 2]; 3]; 4] = [0; (2, 3, 4)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^^^^"
|
||||
|
@ -16,6 +16,6 @@ outputs:
|
||||
r0:
|
||||
type: bool
|
||||
value: "true"
|
||||
initial_ast: 67cb2ae1b5b3e19a7c7aa8783d0f566b69bfb995e7848ec7746e1af0448c1aa8
|
||||
canonicalized_ast: 4aba053c866851bfcd22da037e0270ad43a7fabbdc263629af52eea38d577b7a
|
||||
type_inferenced_ast: b44ceb7749802ff53c82221efad075565264531500665a01aa94f745e0c304cd
|
||||
initial_ast: 73337f6874a6e1b33240f0406c74ec8c21971dc58ea2c91ad6dca5e21796a770
|
||||
canonicalized_ast: 6bbaab9e111d45b2509bb8bc50a3f45806a36716892a88be00ceeeaba446c805
|
||||
type_inferenced_ast: 64bdaa95aebca13ef3dc6fbbf331e614403bdae7d7f4f33de63d05a2b3d2e7fa
|
||||
|
@ -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 [EASG0373026]: unexpected type, expected: 'array of length 2', received: 'array of length 3'\n --> compiler-test:8:29\n |\n 8 | const b: [u8; (2, 3)] = [[0; 2]; 3]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^"
|
||||
|
@ -16,6 +16,6 @@ outputs:
|
||||
r0:
|
||||
type: bool
|
||||
value: "true"
|
||||
initial_ast: 9867f722c5ce3ccbc3701238c216acc2b7e37bdc6163a8f7a4a4d88b7f19b73a
|
||||
canonicalized_ast: d5f9deb2b7806ec665a6c6a5a6a0bee2c76310ecec4f34a8a479aa6934902b3a
|
||||
type_inferenced_ast: ed9cee663a3a9dc51ba06a80e5f192fdcc49e62b8e4cb0ae9582f3a7f7b1de25
|
||||
initial_ast: cd71bce2b90ef48459088b8c9a002fe743892716b23f2481477cfc5067efb474
|
||||
canonicalized_ast: 5ce99a61723ea9e44f27e34394f01adc100ebbfaa3ceefb1fcd98c355d35bf20
|
||||
type_inferenced_ast: 8fb4a68c510b546395c8930e50755a51be8ac536220fd753845d04f7255ba855
|
||||
|
@ -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 [EASG0373026]: unexpected type, expected: 'array of length 4', received: 'array of length 2'\n --> compiler-test:7:32\n |\n 7 | const b: [u8; (4, 3, 2)] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^^^^^^"
|
||||
|
@ -16,6 +16,6 @@ outputs:
|
||||
r0:
|
||||
type: bool
|
||||
value: "true"
|
||||
initial_ast: 222950738e89721363dd15b8f5d240befa46d434c45f486857ec4898806d0e84
|
||||
canonicalized_ast: b89098b4159b284f07be789cfb5b196515c9d33821be1411c4bc25ae3c90425f
|
||||
type_inferenced_ast: 4e0acee05ff837a30c1057dec0c5cc18a6ce573e5891218990f88584fef683a7
|
||||
initial_ast: 3b6f3b5c0550568d6af9abe967266e7fdf485bc5725991bcde99f09e9d83aa15
|
||||
canonicalized_ast: 47e20a88ce51e388ae5746d446db2b542593f5d617cca7b82c350942673fb146
|
||||
type_inferenced_ast: dafcf6df6b76d3275356153bf229cb4ca0a50c7ad416e134b8a81102b1b51048
|
||||
|
@ -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 [EASG0373026]: unexpected type, expected: 'array of length 2', received: 'array of length 3'\n --> compiler-test:7:29\n |\n 7 | const b: [u8; (2, 3)] = [0; (3, 2)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^"
|
||||
|
@ -16,6 +16,6 @@ outputs:
|
||||
r0:
|
||||
type: bool
|
||||
value: "true"
|
||||
initial_ast: a312fb26b99d2c4a7891d482079f0220663dba780bc68b9f651def2cd9bad960
|
||||
canonicalized_ast: 01c472ee0495bbb164f67159e86483a29421918178a7115ebd3b905d6909150f
|
||||
type_inferenced_ast: ac2c37891e21027028b4a1e4b8f5972e5ee64f91f6b2ba6a85218c622192ce02
|
||||
initial_ast: d509360798609482b9932f3868d5e5c36be224900c1b1ee15805189cdd245c47
|
||||
canonicalized_ast: 9722920d99b744a31247e8db729d2d4694696416c1b33fee8c71801852019858
|
||||
type_inferenced_ast: 5878c12faf593e2163872d1cfdb9615f41469f45bd8fc1ae17cb31bd9ef8fc2e
|
||||
|
@ -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 [EASG0373026]: unexpected type, expected: 'array of length 4', received: 'array of length 2'\n --> compiler-test:7:32\n |\n 7 | const b: [u8; (4, 3, 2)] = [0; (2, 3, 4)]; // initializer (incorrectly reversed order)\n | ^^^^^^^^^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [EPAR0370007]: 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:10:17\n |\n 10 | console.debug(\"{}\", x);\n | ^^^^^"
|
||||
|
@ -34,6 +34,6 @@ outputs:
|
||||
x:
|
||||
type: bool
|
||||
value: "true"
|
||||
initial_ast: 9f6929c30448a269b4a22f3001085be75f91bc91503978f2804f4d6bf7dd246f
|
||||
canonicalized_ast: 9f6929c30448a269b4a22f3001085be75f91bc91503978f2804f4d6bf7dd246f
|
||||
type_inferenced_ast: b41ada9ca834d73d94641fa3f28c95bea6e6862819bab431ac4b02cc342fb659
|
||||
initial_ast: 60dfd95f6708d08f1772ac051daf7d351c942e789318748d5112199afc5e5538
|
||||
canonicalized_ast: 60dfd95f6708d08f1772ac051daf7d351c942e789318748d5112199afc5e5538
|
||||
type_inferenced_ast: 6da4799d52a8b19274ce772ffea9cd6ae657bf8e28e30c373e7f385fbc7bac1a
|
||||
|
@ -34,6 +34,6 @@ outputs:
|
||||
x:
|
||||
type: bool
|
||||
value: "true"
|
||||
initial_ast: 3de9d88d40969c01145790a5903ab2dfa1a7614ec4f4d62c20b86b917653008e
|
||||
canonicalized_ast: 3de9d88d40969c01145790a5903ab2dfa1a7614ec4f4d62c20b86b917653008e
|
||||
type_inferenced_ast: 53a91ffe37b6a96f1c239669f04ab600f51d2a200a8aed2dee0dc50bb5fa4f7d
|
||||
initial_ast: dd6eab6d13c1d4fd2a85722a7a2bba96e28ea10db6bbf728bbde4fa190ae31f0
|
||||
canonicalized_ast: dd6eab6d13c1d4fd2a85722a7a2bba96e28ea10db6bbf728bbde4fa190ae31f0
|
||||
type_inferenced_ast: 521001453905ff47c0d03f922cd2852e0194d8741ea88c238fdd2d3a57381839
|
||||
|
@ -34,6 +34,6 @@ outputs:
|
||||
x:
|
||||
type: bool
|
||||
value: "true"
|
||||
initial_ast: 7fe0c7281b31c1f126d41c425f852930de3283b0deb54362fba0834b6eb83ae3
|
||||
canonicalized_ast: 7fe0c7281b31c1f126d41c425f852930de3283b0deb54362fba0834b6eb83ae3
|
||||
type_inferenced_ast: 5c851d6f023000766f370ec5bc048af431212368c68fb1ba674500ae7451a36e
|
||||
initial_ast: a5d8769328ff3d4738851ee3887012f5dac72f7c4260808062bd4d051ed38e65
|
||||
canonicalized_ast: a5d8769328ff3d4738851ee3887012f5dac72f7c4260808062bd4d051ed38e65
|
||||
type_inferenced_ast: 917e75ad9ef5a93dc06382d53d49264dc78e80902c19414f5849da3098bf65bb
|
||||
|
@ -34,6 +34,6 @@ outputs:
|
||||
x:
|
||||
type: bool
|
||||
value: "false"
|
||||
initial_ast: aae17ba5bd2ce376b5c440df42be442b0731feb499fa37b133b89f364a8790bf
|
||||
canonicalized_ast: aae17ba5bd2ce376b5c440df42be442b0731feb499fa37b133b89f364a8790bf
|
||||
type_inferenced_ast: 5b110c3aa3e0d65942f7a7fdbdccfc745aa810ea7d71137358f220d2bfecb0b7
|
||||
initial_ast: 3b7f05f3b1b0bbe1c99fe29573d9227a67fc0a9c00bdb8346ca67735c835a138
|
||||
canonicalized_ast: 3b7f05f3b1b0bbe1c99fe29573d9227a67fc0a9c00bdb8346ca67735c835a138
|
||||
type_inferenced_ast: 6d1867ff6b517894b3a7a45d75332ecd82a47f75f7ba79bab1ce10268b9448f6
|
||||
|
@ -34,6 +34,6 @@ outputs:
|
||||
x:
|
||||
type: bool
|
||||
value: "true"
|
||||
initial_ast: 35fd6670d1c00d5c70861e58f988536f86dbe84d26cb1cdf601228a3b784296e
|
||||
canonicalized_ast: 35fd6670d1c00d5c70861e58f988536f86dbe84d26cb1cdf601228a3b784296e
|
||||
type_inferenced_ast: 3dd86ce4e1ecce14619b49e274f1c3275ec7561f82655eadda4752f20e771802
|
||||
initial_ast: 1925069aa0f5296440460a131266179325e8a470b4bb0f83fdf5971b83f711fe
|
||||
canonicalized_ast: 1925069aa0f5296440460a131266179325e8a470b4bb0f83fdf5971b83f711fe
|
||||
type_inferenced_ast: 242c318c7969b4d2950376b852feb50798882d77fd459a40d3180b53be67017b
|
||||
|
@ -100,6 +100,6 @@ outputs:
|
||||
r:
|
||||
type: char
|
||||
value: "'\\u{1f62d}'"
|
||||
initial_ast: 41f5ad78f58a182b6b99dd22151fabb0dc621c4a45c39d087cbc05f89c99eccc
|
||||
canonicalized_ast: 41f5ad78f58a182b6b99dd22151fabb0dc621c4a45c39d087cbc05f89c99eccc
|
||||
type_inferenced_ast: 0463676a90b25002f29b0c056e44945f9c461c535bdf11b47112ace4c3e0eac1
|
||||
initial_ast: b096b1d1540d8cb12f39acb77e580c30209a91aecb3e2b38596de5b88516e40b
|
||||
canonicalized_ast: b096b1d1540d8cb12f39acb77e580c30209a91aecb3e2b38596de5b88516e40b
|
||||
type_inferenced_ast: cabbd5dffc41fe4741fa5bb6b28b7f88265c49dbe6f913221c153a89d9a7adb2
|
||||
|
@ -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:7:23\n |\n 7 | const not_valid = '';\n | ^\n |\n = HELP TODO"
|
||||
|
@ -100,6 +100,6 @@ outputs:
|
||||
r:
|
||||
type: char
|
||||
value: "'a'"
|
||||
initial_ast: d3a773c0b0555cc2c3a6d2fafb9e567488ea8fd91ea965f758ec9f58a4679dd7
|
||||
canonicalized_ast: d3a773c0b0555cc2c3a6d2fafb9e567488ea8fd91ea965f758ec9f58a4679dd7
|
||||
type_inferenced_ast: 460b284982e0fb9819768800b2c84ab682929bba1b6056f03e5e90bfe7f92420
|
||||
initial_ast: 74cb4d0101c42e5649d2644e96aca6b0da6cdf1226f28a8433f473917f80c33f
|
||||
canonicalized_ast: 74cb4d0101c42e5649d2644e96aca6b0da6cdf1226f28a8433f473917f80c33f
|
||||
type_inferenced_ast: e5bdffa94546209c897a4190999c3128360d24c63154302e9eee70db32e6ef88
|
||||
|
@ -19,6 +19,6 @@ outputs:
|
||||
r1:
|
||||
type: bool
|
||||
value: "true"
|
||||
initial_ast: 4e9ef2d8121eabed385e2d358e2d9ed1dc64d88894c3dbfc078d5da34902ce4c
|
||||
canonicalized_ast: 4e9ef2d8121eabed385e2d358e2d9ed1dc64d88894c3dbfc078d5da34902ce4c
|
||||
type_inferenced_ast: 489e02b2ed42362bf493fe2fb58cf03ab06cfb95abd49b7ba0329a8e8d7c3daa
|
||||
initial_ast: b75fd945d38e193c910fcf363c6b49d689d7f102b46bbe2eb0a14c1ed68f775b
|
||||
canonicalized_ast: b75fd945d38e193c910fcf363c6b49d689d7f102b46bbe2eb0a14c1ed68f775b
|
||||
type_inferenced_ast: e65fa8136044413c5f89fec8fb41659d38db8a65be11a7a641421e1e94a26ed8
|
||||
|
@ -100,6 +100,6 @@ outputs:
|
||||
r:
|
||||
type: char
|
||||
value: "'\\u{1f62d}'"
|
||||
initial_ast: 2e1dc058de58dbe98a1f19e7b883fed916d58fc5087de2c2bd06bb98324411d5
|
||||
canonicalized_ast: 2e1dc058de58dbe98a1f19e7b883fed916d58fc5087de2c2bd06bb98324411d5
|
||||
type_inferenced_ast: 40d126753bfa96341a167671ffc7244c6430d8f40934d8197c969baa9b49c785
|
||||
initial_ast: ff50865a1ca02623cf960313ab12a6c497e545130c47b0d1d53d52c3784f8c55
|
||||
canonicalized_ast: ff50865a1ca02623cf960313ab12a6c497e545130c47b0d1d53d52c3784f8c55
|
||||
type_inferenced_ast: f0860ef3f25bed9efe1cbeda98b9f66b6c17598b8b94eb466b460486d5170cfd
|
||||
|
@ -16,6 +16,6 @@ outputs:
|
||||
r0:
|
||||
type: bool
|
||||
value: "true"
|
||||
initial_ast: bc330763338677f23601b03f5665bd8f42f8143f59cc9b4803fb693b3cfa0311
|
||||
canonicalized_ast: fbff610ef772ee7f997b4bc4cd7c2a3f2024d70af35b94a966ca6a0f19f15194
|
||||
type_inferenced_ast: f6b0159f6bffeff8e3cde7f13c97ac5d537b40855271a4a13d07a84d24d78504
|
||||
initial_ast: 3678518f2364040cf8723b72974f03bf7250f504358f54fad71bddf03615bb58
|
||||
canonicalized_ast: 57a5b1b94f04aa2db64914b8ac507be082558a18439102cf402f6a2c5339fab0
|
||||
type_inferenced_ast: efc0e62188f81169fe6afa9a2e035ded5c60f96fbad7961ecbb5679fe47cfa0c
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "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 | ^^^^^^^^^^^^^^^^^^^^^^^^^^"
|
||||
- "Error [EAST0372005]: cannot call keyword `Self` outside of a circuit function\n --> compiler-test:20:3\n |\n 20 | let foo: Self = Foo::new();\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^"
|
||||
|
@ -16,6 +16,6 @@ outputs:
|
||||
r0:
|
||||
type: bool
|
||||
value: "true"
|
||||
initial_ast: 601fb882472ee0ff4aea3330822936a9df64bfc8ceefcd83f000bb3094878d47
|
||||
canonicalized_ast: 601fb882472ee0ff4aea3330822936a9df64bfc8ceefcd83f000bb3094878d47
|
||||
type_inferenced_ast: 110a4e51c4c0ace6c0f3aa385e1735cb4ecf3cfea2a9d2ab7591da3826582c31
|
||||
initial_ast: 57573afa16f60eec53c2c2dbcbddd3f74e1aa9cab5e11d071ab8e2c2ebc264cb
|
||||
canonicalized_ast: 57573afa16f60eec53c2c2dbcbddd3f74e1aa9cab5e11d071ab8e2c2ebc264cb
|
||||
type_inferenced_ast: d326fe25c49e69b7ea315c2dd34d52357e3ab45a0397f8431d7db81a4f8bb644
|
||||
|
@ -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 [EASG0373033]: illegal assignment to immutable variable 'self'\n --> compiler-test:10:9\n |\n 10 | self.a = new;\n | ^^^^^^^^^^^^"
|
||||
|
@ -16,6 +16,6 @@ outputs:
|
||||
r0:
|
||||
type: bool
|
||||
value: "true"
|
||||
initial_ast: 63f34a3b537f3221e8711828f7d0953c0766627c0cdb2e37933b88a93550e261
|
||||
canonicalized_ast: 63f34a3b537f3221e8711828f7d0953c0766627c0cdb2e37933b88a93550e261
|
||||
type_inferenced_ast: 29604fd57ee8658f83e552bc6496541ebcebb91afa313a1706b285fe18385c4c
|
||||
initial_ast: d4b08b986cf725d84faf6e1f7b8d913b724704bd868e4663f7e5e67b973deeb9
|
||||
canonicalized_ast: d4b08b986cf725d84faf6e1f7b8d913b724704bd868e4663f7e5e67b973deeb9
|
||||
type_inferenced_ast: 99eb30261fdb656658b38b967c50bffcd7bdfaa1a25b6f5d2d99024a2feac089
|
||||
|
@ -16,6 +16,6 @@ outputs:
|
||||
r0:
|
||||
type: bool
|
||||
value: "true"
|
||||
initial_ast: 46d600c5f3b64378fbdcff7b4097d54e3855eded01d642f5af25fa3aef44eede
|
||||
canonicalized_ast: 46d600c5f3b64378fbdcff7b4097d54e3855eded01d642f5af25fa3aef44eede
|
||||
type_inferenced_ast: e5cdf935d34157bdbc2eb228c94e2222887c91fc3bc1c9f24bc6e84fddde9730
|
||||
initial_ast: ad72e31b5cd49eec3618538ecd57ccc3ee0cfdc9aff7d6959e884972795cf8f0
|
||||
canonicalized_ast: ad72e31b5cd49eec3618538ecd57ccc3ee0cfdc9aff7d6959e884972795cf8f0
|
||||
type_inferenced_ast: 897982d1fae87cba7e25f3b2da2a3ce77f80713b334e96c60b664247a77e1040
|
||||
|
@ -16,6 +16,6 @@ outputs:
|
||||
r0:
|
||||
type: u32
|
||||
value: "100"
|
||||
initial_ast: c76bd461573b9bb3622a74b5c5a10a98402b8c86c13086c01c161b77aac0c642
|
||||
canonicalized_ast: c76bd461573b9bb3622a74b5c5a10a98402b8c86c13086c01c161b77aac0c642
|
||||
type_inferenced_ast: 213f747571838133c62a73574f769d25fd42afce151e580be42d1d9d7b62033b
|
||||
initial_ast: 849a0cbbc46368c5aed51041416ccbed73e8a7581606a893f797a855088ab89b
|
||||
canonicalized_ast: 849a0cbbc46368c5aed51041416ccbed73e8a7581606a893f797a855088ab89b
|
||||
type_inferenced_ast: 55480af9be6c93cc699f0c42546e7ac671deefa6d8a3525c90bfd819fa564a75
|
||||
|
@ -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 [EASG0373003]: missing circuit member 'x' for initialization of circuit 'Foo'\n --> compiler-test:12:15\n |\n 12 | const a = Foo { y: 0u32 };\n | ^^^^^^^^^^^^^^^"
|
||||
|
@ -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 [EASG0373003]: missing circuit member 'x' for initialization of circuit 'Foo'\n --> compiler-test:12:15\n |\n 12 | const a = Foo { y };\n | ^^^^^^^^^"
|
||||
|
@ -16,6 +16,6 @@ outputs:
|
||||
r0:
|
||||
type: bool
|
||||
value: "true"
|
||||
initial_ast: 3b07cdd6e203ad5775a6c75a4598330e4bf7b04616bdbd532df20bd7bba1981d
|
||||
canonicalized_ast: f87f269c06e5eb1d6802b4a92c9a4af2a3966583dbaa2454b5468b3f56114a15
|
||||
type_inferenced_ast: 73ed7092d40d9b7e5be744e14da191eaa7f0758b6027c7e984365bd33e07ae2d
|
||||
initial_ast: 3cb0dc7f78b63faff3a15f46441db2ff2c2621055e5c4c4b7b4d3d1c25485c2f
|
||||
canonicalized_ast: 580e75874deb3a33d82bd22d1a47d42112ea1a1470191d747b964be46b7d4b9f
|
||||
type_inferenced_ast: 3ecd1a3869556473464f57dff59632a85d377f0e05c1f293f4bc5d9fdb4449b2
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [EASG0373000]: 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:7:15\n |\n 7 | const a = Foo { };\n | ^^^"
|
||||
|
@ -16,6 +16,6 @@ outputs:
|
||||
r0:
|
||||
type: bool
|
||||
value: "true"
|
||||
initial_ast: b53c2c321c3f6ee2202eaca1e709607f5e82f9e456be132b08493de57b1c4089
|
||||
canonicalized_ast: b53c2c321c3f6ee2202eaca1e709607f5e82f9e456be132b08493de57b1c4089
|
||||
type_inferenced_ast: a94dfe431aa43189323427aadb33120d4ac03e19b9a898353858c26b624869ed
|
||||
initial_ast: a8d57a614a02e614f6348371df26c8d5e14b9010f7030b996f095f9269e321a6
|
||||
canonicalized_ast: a8d57a614a02e614f6348371df26c8d5e14b9010f7030b996f095f9269e321a6
|
||||
type_inferenced_ast: 8e7cc4f886a8879b3e6ff6a480f0bde2a35b899828b13f7d0c717305c31528cb
|
||||
|
@ -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 [EASG0373002]: illegal reference to non-existant member 'echoed' of circuit 'Foo'\n --> compiler-test:14:17\n |\n 14 | const err = a.echoed(1u32);\n | ^^^^^^^^"
|
||||
|
@ -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 [EASG0373009]: cannot call static function 'echo' of circuit 'Foo' from target\n --> compiler-test:14:17\n |\n 14 | const err = a.echo(1u32); // echo is a static function and must be accessed using `::`\n | ^^^^^^"
|
||||
|
@ -16,6 +16,6 @@ outputs:
|
||||
r0:
|
||||
type: bool
|
||||
value: "true"
|
||||
initial_ast: 8b7192c1472be002b294589105832ae0e979e964fc62e63ba22b1f0cf3b762e5
|
||||
canonicalized_ast: 8b7192c1472be002b294589105832ae0e979e964fc62e63ba22b1f0cf3b762e5
|
||||
type_inferenced_ast: 14d9f0f0a222b6ec4236b0eb75e0740d624279181bb7ab9281752529b0a0f417
|
||||
initial_ast: fce7f3121253c1816f714f477363129ad6d1d0ced57bf95d077018b662d37e2e
|
||||
canonicalized_ast: fce7f3121253c1816f714f477363129ad6d1d0ced57bf95d077018b662d37e2e
|
||||
type_inferenced_ast: f51786fa63d23648c8f5dbe7e68044ce5932cfaeb4959c4b6aace752d4e1d9be
|
||||
|
@ -16,6 +16,6 @@ outputs:
|
||||
r0:
|
||||
type: bool
|
||||
value: "true"
|
||||
initial_ast: da39dd8a0b9ddb1304cfe1fd1dd555c01c43750524db4021d27e1425ec175322
|
||||
canonicalized_ast: da39dd8a0b9ddb1304cfe1fd1dd555c01c43750524db4021d27e1425ec175322
|
||||
type_inferenced_ast: 6cdc6a128cc2fb9220293b7c34ba4066cc63911f5ffbe00959142992f358e488
|
||||
initial_ast: aa990d905a80b0c553cb00121b6489a093737b25430626b0ab213768c6578dd4
|
||||
canonicalized_ast: aa990d905a80b0c553cb00121b6489a093737b25430626b0ab213768c6578dd4
|
||||
type_inferenced_ast: c28318f0aa35886141aafdbcbd073bb5aeb7574a4415f36ac5a2ba3512c9249b
|
||||
|
@ -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 [EASG0373028]: failed to resolve variable reference 'Foo'\n --> compiler-test:13:17\n |\n 13 | const err = Foo.echo(1u32); // Invalid, echo is a static function and must be accessed using `::`\n | ^^^"
|
||||
|
@ -16,6 +16,6 @@ outputs:
|
||||
r0:
|
||||
type: bool
|
||||
value: "true"
|
||||
initial_ast: 380f44a5f5d7c1ef76c593da32936d480e79240bb7cd17fce0122b18c9e7f722
|
||||
canonicalized_ast: 82f1edfa14a6e28b57828bf5f4be2aaaf21fb5468c0388088a56a4e44adb31fe
|
||||
type_inferenced_ast: ab690a29d11e08699223ec4009174acdec23c3667d523af63556187d7396e66b
|
||||
initial_ast: 6b7330aea358edabfdc424c8f1bc5e09bbd4d8ee7837c541a936c7ba969e408f
|
||||
canonicalized_ast: 1908b80b37e8e3e8f8d842c460e67107f7c4b116da7c4bd411d48a88f2eb4680
|
||||
type_inferenced_ast: ad5377f0e9b59f882d08b2e4013dcbb7a92ed8f68cf32f5012c73de5d4af0a5f
|
||||
|
@ -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 [EASG0373002]: illegal reference to non-existant member 'echoed' of circuit 'Foo'\n --> compiler-test:13:17\n |\n 13 | const err = Foo::echoed(1u32);\n | ^^^^^^^^^^^"
|
||||
|
@ -16,6 +16,6 @@ outputs:
|
||||
r0:
|
||||
type: bool
|
||||
value: "true"
|
||||
initial_ast: 7abdf292d56f99ef05e39c1a55a6071d9d69ca8c8e537e08201472f057e7a127
|
||||
canonicalized_ast: 7abdf292d56f99ef05e39c1a55a6071d9d69ca8c8e537e08201472f057e7a127
|
||||
type_inferenced_ast: db8685abd4ffc32fa55786b847eff1d0694b871c1757eec70757879d82856872
|
||||
initial_ast: f974cbe4ee74fe5b7fb214f7b8eab4c8a82c8c0f9c723b39869766d412d6f51d
|
||||
canonicalized_ast: f974cbe4ee74fe5b7fb214f7b8eab4c8a82c8c0f9c723b39869766d412d6f51d
|
||||
type_inferenced_ast: 5def83ccc0943b9f4623b4029782fbf4e5a43b806eb6048a8374509a29b19cea
|
||||
|
@ -16,6 +16,6 @@ outputs:
|
||||
r0:
|
||||
type: bool
|
||||
value: "true"
|
||||
initial_ast: ca98bec50adc76ce348e28e7020d6e99cb6aa8fb733e0e0bce023ca8d1e3e4b6
|
||||
canonicalized_ast: ca98bec50adc76ce348e28e7020d6e99cb6aa8fb733e0e0bce023ca8d1e3e4b6
|
||||
type_inferenced_ast: ec5aad932c3d0d016142a7d288328547949da8add55025076c5d404d2451917d
|
||||
initial_ast: 9f51ce1f8641def4b58ffefde0327cd71e3d7f372317a190acdb743676204d07
|
||||
canonicalized_ast: 9f51ce1f8641def4b58ffefde0327cd71e3d7f372317a190acdb743676204d07
|
||||
type_inferenced_ast: 95d30601df73b59f26b38c79e99e13cc28fc6f7eee094da6445dbd2522706036
|
||||
|
@ -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 [EASG0373002]: illegal reference to non-existant member 'y' of circuit 'Foo'\n --> compiler-test:12:17\n |\n 12 | const err = a.y;\n | ^^^"
|
||||
|
@ -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 [EASG0373007]: attempt to assign to function 'bar'\n --> compiler-test:15:5\n |\n 15 | f.bar = 1u8;\n | ^^^^^^^^^^^"
|
||||
|
@ -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 [EASG0373007]: attempt to assign to function 'bar'\n --> compiler-test:12:9\n |\n 12 | self.bar = new;\n | ^^^^^^^^^^^^^^"
|
||||
|
@ -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 [EASG0373007]: attempt to assign to function 'bar'\n --> compiler-test:12:9\n |\n 12 | self.bar = new;\n | ^^^^^^^^^^^^^^"
|
||||
|
@ -16,6 +16,6 @@ outputs:
|
||||
r0:
|
||||
type: bool
|
||||
value: "true"
|
||||
initial_ast: a9313db75382b5afb38e9453bdb0dd6c0aa7368cf11e208eb0ca8124ea615d8b
|
||||
canonicalized_ast: 3d4bb330e687601978d3f68544582d93c3bace6c0d3e8808c409b8534c563403
|
||||
type_inferenced_ast: 14b0aa9c6d83ca85c625cdc78e4cf96dcbe1672b98c379e8783744d59d699bb1
|
||||
initial_ast: 487137b6056b6581848325c184f203e6b8e1126a07c3edeef5fd09f782a14140
|
||||
canonicalized_ast: 0137d626b6716a21c5bc65039d3a91e59c78c47b5ed1faed7ab1714c687331ae
|
||||
type_inferenced_ast: dde0d4242540437765771b4f1b0ab71bcf84846231787a26407fde686c4b87bc
|
||||
|
@ -16,6 +16,6 @@ outputs:
|
||||
r0:
|
||||
type: bool
|
||||
value: "true"
|
||||
initial_ast: ff029cd4035cb046857e7e8c0ff56c843969d2f04db76ced2698a20cf0491485
|
||||
canonicalized_ast: 88447a6c1f7b92f4af7d9cecd7fd8d6fa5e96ed5dd6c6fde5897cf3df3f5cbc5
|
||||
type_inferenced_ast: 51a081de631b9b95b2055ea5ba6a52d17972caf8bf7c70dadd49801af9d011f9
|
||||
initial_ast: cadaffe377627256cf3c7e255647642b376168c5b81a9c1c1cb6684775abb110
|
||||
canonicalized_ast: 1ee85d9839667f2949d24a0be13d272dd079ea09d2e4fb08e62a7e3b8e5ecf17
|
||||
type_inferenced_ast: 1f34c95fc0a1ec28b980b199e54b6f239789d91447d41e89c2e099c437282ad2
|
||||
|
@ -16,6 +16,6 @@ outputs:
|
||||
r0:
|
||||
type: bool
|
||||
value: "true"
|
||||
initial_ast: 5d815c98c76a76dd93051902eae718df3db66e0268ba9af8ae62ef7af19b1d48
|
||||
canonicalized_ast: 798961ad9da5a767a98882ff36944483f1f1412dcf10f67acf1f390a19bfc138
|
||||
type_inferenced_ast: 6dbfd429fa50f0017a01dae57ae2a98e7452ab7c54bfcd251e1ed40e5f28176c
|
||||
initial_ast: 983751a1008df24a1250b76c647f3a093060668ef3fe496bb32c2e2207c5663a
|
||||
canonicalized_ast: f451f85f99ffe4c2fdd7699f1acf4f1bc7d15cc85ea9584fa8f5cff500ff33d9
|
||||
type_inferenced_ast: 91209927df3bbfa0a98523a8014b96683642bfcd9170cd0f34e68cd0556aa4f7
|
||||
|
@ -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 [EASG0373033]: illegal assignment to immutable variable 'self'\n --> compiler-test:10:9\n |\n 10 | self.a = new;\n | ^^^^^^^^^^^^"
|
||||
|
@ -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 [EASG0373006]: extra circuit member 'a' for initialization of circuit 'Foo' is not allowed\n --> compiler-test:11:19\n |\n 11 | let f = Foo { a: 0u8 };\n | ^"
|
||||
|
@ -16,6 +16,6 @@ outputs:
|
||||
r0:
|
||||
type: bool
|
||||
value: "true"
|
||||
initial_ast: 357f19fd5e1fbbbeec8a18bcf14c30a7504feacbc88ffbd26e78eedf1d593275
|
||||
canonicalized_ast: 357f19fd5e1fbbbeec8a18bcf14c30a7504feacbc88ffbd26e78eedf1d593275
|
||||
type_inferenced_ast: aa3bf1734030119bb595a42d268b30509506ee06cf413b14bcde4e9056679dac
|
||||
initial_ast: 4efab89c2c0c158574a22cdbd67147a1671396e64683d11a0429be322da8eaef
|
||||
canonicalized_ast: 4efab89c2c0c158574a22cdbd67147a1671396e64683d11a0429be322da8eaef
|
||||
type_inferenced_ast: 5a0c615cbf1a7a9e0678f9c19fc67d1cff86dab2daa744e97ed75aedd52553d5
|
||||
|
@ -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 [EASG0373033]: illegal assignment to immutable variable 'f'\n --> compiler-test:13:5\n |\n 13 | f.a = 1u8;\n | ^^^^^^^^^"
|
||||
|
@ -16,6 +16,6 @@ outputs:
|
||||
r0:
|
||||
type: bool
|
||||
value: "true"
|
||||
initial_ast: bb1ea12ac46ffd912b45b6febd71de41691c9aa064d07d5492e31845e72d00f2
|
||||
canonicalized_ast: ad957837a54fca62c6da8665a04dbf57cb87b5c5a000038a1b900c2be359a178
|
||||
type_inferenced_ast: 0fe1f5ac625424734a5140253228e3a6cde9f548b6deb18907f3ac49871180cc
|
||||
initial_ast: f3c1f752d79bf6e33e9ce04cdfe79bcc4748e75b540c8e7738bdd6acd53286c2
|
||||
canonicalized_ast: c2f39a6371a632676b8ac4a01aa51d70b848a50f5ed846f8f3a5f45f1680156f
|
||||
type_inferenced_ast: f9f74212c1f9fbfbe5e6ed6f6c7a19be3c7128c1fdad29aac34447d2d7ec880c
|
||||
|
@ -16,6 +16,6 @@ outputs:
|
||||
r0:
|
||||
type: bool
|
||||
value: "true"
|
||||
initial_ast: 41a569090cff5eba31d9640b3f9e8d8585dfcd817d25a42a48edcd2d522fbb72
|
||||
canonicalized_ast: 5150d7b2463ec10096f925fde523a4b956093ca44579487a82f15554fd7c32ed
|
||||
type_inferenced_ast: 71d1f128ff9c4fa1df5189139360f4ccb3a460e83034c635952e6875c7fe41bb
|
||||
initial_ast: f49f2da00f26e2285667ddf27968026e98196e5b8fdb26bc7146eb3da8679607
|
||||
canonicalized_ast: b12bf33d368ecb7ca2e50cac999ba06c28354bf635df82625a5f84f717ab3516
|
||||
type_inferenced_ast: c5d54c79f04a89b623ba2338400ef3192f95d258be829437e1979de43b177a3a
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user