mirror of
https://github.com/AleoHQ/leo.git
synced 2024-11-24 10:52:29 +03:00
regen tests after removing dead errors, docs
This commit is contained in:
parent
51e8ea49de
commit
478bb83f70
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -1274,6 +1274,7 @@ version = "1.5.3"
|
||||
dependencies = [
|
||||
"backtrace",
|
||||
"color-backtrace",
|
||||
"colored",
|
||||
"derivative",
|
||||
"eyre",
|
||||
"leo-input",
|
||||
|
@ -17,6 +17,9 @@ include = [ "Cargo.toml", "src", "README.md", "LICENSE.md" ]
|
||||
license = "GPL-3.0"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
colored = "2.0.0"
|
||||
|
||||
[dependencies.leo-input]
|
||||
path = "../input"
|
||||
version = "1.5.3"
|
||||
|
@ -0,0 +1,17 @@
|
||||
# Leo Error Index
|
||||
|
||||
## ASG Errors: Error Code Range 370_000 - 370_999
|
||||
|
||||
## AST Errors: Error Code Range 371_000 - 371_999
|
||||
|
||||
## Compiler Errors: Error Code Range 372_000 - 372_999
|
||||
|
||||
## Import Errors: Error Code Range 373_000 - 373_999
|
||||
|
||||
## Package Errors: Error Code Range 374_000 - 374_999
|
||||
|
||||
## Parser Errors: Error Code Range 375_000 - 375_999
|
||||
|
||||
## State Errors: Error Code Range 376_000 - 376_999
|
||||
|
||||
## CLI Errors: Error Code Range 377_000 - 377_999
|
@ -18,6 +18,7 @@ use std::fmt;
|
||||
|
||||
use backtrace::Backtrace;
|
||||
use color_backtrace::{BacktracePrinter, Verbosity};
|
||||
use colored::Colorize;
|
||||
use derivative::Derivative;
|
||||
|
||||
/// The indent for an error message.
|
||||
@ -88,19 +89,33 @@ impl BacktracedError {
|
||||
impl fmt::Display for BacktracedError {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
let error_message = format!(
|
||||
"[E{error_type}{code_identifier:0>3}{exit_code:0>4}]: {message}\
|
||||
{indent } ",
|
||||
indent = INDENT,
|
||||
"Error: [E{error_type}{code_identifier:0>3}{exit_code:0>4}]: {message}",
|
||||
error_type = self.error_type,
|
||||
code_identifier = self.code_identifier,
|
||||
exit_code = self.exit_code,
|
||||
message = self.message,
|
||||
);
|
||||
|
||||
write!(f, "{}", error_message)?;
|
||||
// To avoid the color enabling characters for comparison with test expectations.
|
||||
if std::env::var("LEO_TESTFRAMEWORK")
|
||||
.unwrap_or_default()
|
||||
.trim()
|
||||
.to_owned()
|
||||
.is_empty()
|
||||
{
|
||||
write!(f, "{}", error_message.bold().red())?;
|
||||
} else {
|
||||
write!(f, "{}", error_message)?;
|
||||
};
|
||||
|
||||
if let Some(help) = &self.help {
|
||||
write!(f, "{indent } = {help}", indent = INDENT, help = help)?;
|
||||
write!(
|
||||
f,
|
||||
"\n{indent } |\n\
|
||||
{indent } = {help}",
|
||||
indent = INDENT,
|
||||
help = help
|
||||
)?;
|
||||
}
|
||||
|
||||
let leo_backtrace = std::env::var("LEO_BACKTRACE").unwrap_or_default().trim().to_owned();
|
||||
|
@ -20,6 +20,7 @@ use std::fmt;
|
||||
|
||||
use backtrace::Backtrace;
|
||||
use color_backtrace::{BacktracePrinter, Verbosity};
|
||||
use colored::Colorize;
|
||||
|
||||
/// Formatted compiler error type
|
||||
/// undefined value `x`
|
||||
@ -95,20 +96,34 @@ impl fmt::Display for FormattedError {
|
||||
let underlined = underline(self.span.col_start, self.span.col_stop);
|
||||
|
||||
let error_message = format!(
|
||||
"[E{error_type}{code_identifier:0>3}{exit_code:0>4}]: {message}\n \
|
||||
--> {path}:{line_start}:{start}\n\
|
||||
{indent } ",
|
||||
indent = INDENT,
|
||||
"[E{error_type}{code_identifier:0>3}{exit_code:0>4}]: {message}",
|
||||
error_type = self.backtrace.error_type,
|
||||
code_identifier = self.backtrace.code_identifier,
|
||||
exit_code = self.backtrace.exit_code,
|
||||
message = self.backtrace.message,
|
||||
);
|
||||
|
||||
// To avoid the color enabling characters for comparison with test expectations.
|
||||
if std::env::var("LEO_TESTFRAMEWORK")
|
||||
.unwrap_or_default()
|
||||
.trim()
|
||||
.to_owned()
|
||||
.is_empty()
|
||||
{
|
||||
write!(f, "{}", error_message.bold().red())?;
|
||||
} else {
|
||||
write!(f, "{}", error_message)?;
|
||||
};
|
||||
|
||||
write!(
|
||||
f,
|
||||
"\n{indent }--> {path}:{line_start}:{start}\n\
|
||||
{indent } ",
|
||||
indent = INDENT,
|
||||
path = &*self.span.path,
|
||||
line_start = self.span.line_start,
|
||||
start = self.span.col_start,
|
||||
);
|
||||
|
||||
write!(f, "{}", error_message)?;
|
||||
)?;
|
||||
|
||||
for (line_no, line) in self.span.content.lines().enumerate() {
|
||||
writeln!(
|
||||
@ -122,14 +137,19 @@ impl fmt::Display for FormattedError {
|
||||
|
||||
write!(
|
||||
f,
|
||||
"{indent } |{underlined}\n\
|
||||
{indent } |\n",
|
||||
"{indent } |{underlined}",
|
||||
indent = INDENT,
|
||||
underlined = underlined,
|
||||
)?;
|
||||
|
||||
if let Some(help) = &self.backtrace.help {
|
||||
write!(f, "{indent } = {help}", indent = INDENT, help = help)?;
|
||||
write!(
|
||||
f,
|
||||
"\n{indent } |\n\
|
||||
{indent } = {help}",
|
||||
indent = INDENT,
|
||||
help = help
|
||||
)?;
|
||||
}
|
||||
|
||||
let leo_backtrace = std::env::var("LEO_BACKTRACE").unwrap_or_default().trim().to_owned();
|
||||
|
16
leo/main.rs
16
leo/main.rs
@ -27,7 +27,6 @@ use commands::{
|
||||
};
|
||||
use leo_errors::Result;
|
||||
|
||||
use colored::Colorize;
|
||||
use std::{path::PathBuf, process::exit};
|
||||
use structopt::{clap::AppSettings, StructOpt};
|
||||
|
||||
@ -221,20 +220,7 @@ fn handle_error<T>(res: Result<T>) -> T {
|
||||
match res {
|
||||
Ok(t) => t,
|
||||
Err(err) => {
|
||||
eprintln!(
|
||||
"{} {}",
|
||||
"Error:".bold().red(),
|
||||
err.to_string()
|
||||
.lines()
|
||||
.enumerate()
|
||||
.map(|(i, l)| if i == 0 {
|
||||
l.bold().red().to_string()
|
||||
} else {
|
||||
l.to_string()
|
||||
})
|
||||
.collect::<Vec<_>>()
|
||||
.join("\n")
|
||||
);
|
||||
eprintln!("{}", err);
|
||||
exit(err.exit_code());
|
||||
}
|
||||
}
|
||||
|
@ -47,6 +47,7 @@ pub trait Runner {
|
||||
}
|
||||
|
||||
pub fn run_tests<T: Runner>(runner: &T, expectation_category: &str) {
|
||||
std::env::set_var("LEO_TESTFRAMEWORK", "true");
|
||||
let mut pass_categories = 0;
|
||||
let mut pass_tests = 0;
|
||||
let mut fail_tests = 0;
|
||||
@ -226,4 +227,6 @@ pub fn run_tests<T: Runner>(runner: &T, expectation_category: &str) {
|
||||
pass_categories
|
||||
);
|
||||
}
|
||||
|
||||
std::env::remove_var("LEO_TESTFRAMEWORK");
|
||||
}
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370020]: array index out of bounds: '0'\n --> compiler-test:7:24\n |\n 7 | const z: [u8; 2] = y[..1u32][..x];\n | ^^^^^^^^^^^^^^\n |\n"
|
||||
- "[EASG0370020]: array index out of bounds: '0'\n --> compiler-test:7:24\n |\n 7 | const z: [u8; 2] = y[..1u32][..x];\n | ^^^^^^^^^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EAST0371006]: received dimension size of 0, expected it to be 1 or larger.\n --> compiler-test:4:13\n |\n 4 | let a = [true; (0)];\n | ^^^^^^^^^^^\n |\n"
|
||||
- "[EAST0371006]: received dimension size of 0, expected it to be 1 or larger.\n --> compiler-test:4:13\n |\n 4 | let a = [true; (0)];\n | ^^^^^^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EPAR0375005]: expected ] -- got ')'\n --> compiler-test:4:29\n |\n 4 | return a == [[0u8; 2]; 3)]; // This should be written the right way as this test is for the input file.\n | ^\n |\n"
|
||||
- "[EPAR0375005]: expected ] -- got ')'\n --> compiler-test:4:29\n |\n 4 | return a == [[0u8; 2]; 3)]; // This should be written the right way as this test is for the input file.\n | ^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370026]: unexpected type, expected: 'array of length 2', received: 'array of length 1'\n --> compiler-test:4:31\n |\n 4 | const arr: [u8; (2, 2)] = [[1u8; 2]; 1]; // incorrect dimensions\n | ^^^^^^^^^^^^^\n |\n"
|
||||
- "[EASG0370026]: unexpected type, expected: 'array of length 2', received: 'array of length 1'\n --> compiler-test:4:31\n |\n 4 | const arr: [u8; (2, 2)] = [[1u8; 2]; 1]; // incorrect dimensions\n | ^^^^^^^^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370026]: unexpected type, expected: 'array of length 2', received: 'array of length 1'\n --> compiler-test:5:35\n |\n 5 | [1u8]]; // incorrect dimensions\n | ^^^^^\n |\n"
|
||||
- "[EASG0370026]: unexpected type, expected: 'array of length 2', received: 'array of length 1'\n --> compiler-test:5:35\n |\n 5 | [1u8]]; // incorrect dimensions\n | ^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370026]: unexpected type, expected: 'array of length 2', received: 'array of length 1'\n --> compiler-test:4:31\n |\n 4 | const arr: [u8; (2, 2)] = [1u8; (2, 1)]; // incorrect dimensions\n | ^^^^^^^^^^^^^\n |\n"
|
||||
- "[EASG0370026]: unexpected type, expected: 'array of length 2', received: 'array of length 1'\n --> compiler-test:4:31\n |\n 4 | const arr: [u8; (2, 2)] = [1u8; (2, 1)]; // incorrect dimensions\n | ^^^^^^^^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:6:30\n |\n 6 | const a: [u32; (3, 2)] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n"
|
||||
- "[EASG0370026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:6:30\n |\n 6 | const a: [u32; (3, 2)] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:5:30\n |\n 5 | const a: [u32; (3, 2)] = [0; (2, 3)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n"
|
||||
- "[EASG0370026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:5:30\n |\n 5 | const a: [u32; (3, 2)] = [0; (2, 3)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EPAR0375005]: expected ( -- got '-'\n --> compiler-test:4:19\n |\n 4 | const a: [u8; -2] = [0u32; 2];\n | ^\n |\n"
|
||||
- "[EPAR0375005]: expected ( -- got '-'\n --> compiler-test:4:19\n |\n 4 | const a: [u8; -2] = [0u32; 2];\n | ^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:4:29\n |\n 4 | const b: [[u8; 2]; 3] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n"
|
||||
- "[EASG0370026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:4:29\n |\n 4 | const b: [[u8; 2]; 3] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370026]: unexpected type, expected: 'array of length 4', received: 'array of length 2'\n --> compiler-test:4:34\n |\n 4 | const b: [[[u8; 2]; 3]; 4] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^^^^^^\n |\n"
|
||||
- "[EASG0370026]: unexpected type, expected: 'array of length 4', received: 'array of length 2'\n --> compiler-test:4:34\n |\n 4 | const b: [[[u8; 2]; 3]; 4] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:4:29\n |\n 4 | const b: [[u8; 2]; 3] = [0; (2, 3)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n"
|
||||
- "[EASG0370026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:4:29\n |\n 4 | const b: [[u8; 2]; 3] = [0; (2, 3)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370026]: unexpected type, expected: 'array of length 4', received: 'array of length 2'\n --> compiler-test:4:34\n |\n 4 | const b: [[[u8; 2]; 3]; 4] = [0; (2, 3, 4)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^^^^\n |\n"
|
||||
- "[EASG0370026]: unexpected type, expected: 'array of length 4', received: 'array of length 2'\n --> compiler-test:4:34\n |\n 4 | const b: [[[u8; 2]; 3]; 4] = [0; (2, 3, 4)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370026]: unexpected type, expected: 'array of length 2', received: 'array of length 3'\n --> compiler-test:4:29\n |\n 4 | const b: [u8; (2, 3)] = [[0; 2]; 3]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n"
|
||||
- "[EASG0370026]: unexpected type, expected: 'array of length 2', received: 'array of length 3'\n --> compiler-test:4:29\n |\n 4 | const b: [u8; (2, 3)] = [[0; 2]; 3]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370026]: unexpected type, expected: 'array of length 4', received: 'array of length 2'\n --> compiler-test:4:32\n |\n 4 | const b: [u8; (4, 3, 2)] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^^^^^^\n |\n"
|
||||
- "[EASG0370026]: unexpected type, expected: 'array of length 4', received: 'array of length 2'\n --> compiler-test:4:32\n |\n 4 | const b: [u8; (4, 3, 2)] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370026]: unexpected type, expected: 'array of length 2', received: 'array of length 3'\n --> compiler-test:4:29\n |\n 4 | const b: [u8; (2, 3)] = [0; (3, 2)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n"
|
||||
- "[EASG0370026]: unexpected type, expected: 'array of length 2', received: 'array of length 3'\n --> compiler-test:4:29\n |\n 4 | const b: [u8; (2, 3)] = [0; (3, 2)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370026]: unexpected type, expected: 'array of length 4', received: 'array of length 2'\n --> compiler-test:4:32\n |\n 4 | const b: [u8; (4, 3, 2)] = [0; (2, 3, 4)]; // initializer (incorrectly reversed order)\n | ^^^^^^^^^^^^^^\n |\n"
|
||||
- "[EASG0370026]: unexpected type, expected: 'array of length 4', received: 'array of length 2'\n --> compiler-test:4:32\n |\n 4 | const b: [u8; (4, 3, 2)] = [0; (2, 3, 4)]; // initializer (incorrectly reversed order)\n | ^^^^^^^^^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EPAR0375007]: unexpected identifier: expected 'assert', 'error', 'log' -- got 'debug'\n --> compiler-test:7:17\n |\n 7 | console.debug(\"{}\", x);\n | ^^^^^\n |\n"
|
||||
- "[EPAR0375007]: unexpected identifier: expected 'assert', 'error', 'log' -- got 'debug'\n --> compiler-test:7:17\n |\n 7 | console.debug(\"{}\", x);\n | ^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EPAR0375000]: '\n --> compiler-test:4:23\n |\n 4 | const not_valid = '';\n | ^\n |\n = HELP TODO"
|
||||
- "[EPAR0375000]: '\n --> compiler-test:4:23\n |\n 4 | const not_valid = '';\n | ^\n |\n = HELP TODO"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EAST0371005]: cannot call keyword `Self` outside of a circuit function\n --> compiler-test:16:3\n |\n 16 | let foo: Self = Foo::new();\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n"
|
||||
- "[EAST0371005]: cannot call keyword `Self` outside of a circuit function\n --> compiler-test:16:3\n |\n 16 | let foo: Self = Foo::new();\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370033]: illegal assignment to immutable variable 'self'\n --> compiler-test:7:9\n |\n 7 | self.a = new;\n | ^^^^^^^^^^^^\n |\n"
|
||||
- "[EASG0370033]: illegal assignment to immutable variable 'self'\n --> compiler-test:7:9\n |\n 7 | self.a = new;\n | ^^^^^^^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370003]: missing circuit member 'x' for initialization of circuit 'Foo'\n --> compiler-test:9:15\n |\n 9 | const a = Foo { y: 0u32 };\n | ^^^^^^^^^^^^^^^\n |\n"
|
||||
- "[EASG0370003]: missing circuit member 'x' for initialization of circuit 'Foo'\n --> compiler-test:9:15\n |\n 9 | const a = Foo { y: 0u32 };\n | ^^^^^^^^^^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370003]: missing circuit member 'x' for initialization of circuit 'Foo'\n --> compiler-test:9:15\n |\n 9 | const a = Foo { y };\n | ^^^^^^^^^\n |\n"
|
||||
- "[EASG0370003]: missing circuit member 'x' for initialization of circuit 'Foo'\n --> compiler-test:9:15\n |\n 9 | const a = Foo { y };\n | ^^^^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370000]: failed to resolve circuit: 'Foo'\n --> compiler-test:4:15\n |\n 4 | const a = Foo { };\n | ^^^\n |\n"
|
||||
- "[EASG0370000]: failed to resolve circuit: 'Foo'\n --> compiler-test:4:15\n |\n 4 | const a = Foo { };\n | ^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370002]: illegal reference to non-existant member 'echoed' of circuit 'Foo'\n --> compiler-test:11:17\n |\n 11 | const err = a.echoed(1u32);\n | ^^^^^^^^\n |\n"
|
||||
- "[EASG0370002]: illegal reference to non-existant member 'echoed' of circuit 'Foo'\n --> compiler-test:11:17\n |\n 11 | const err = a.echoed(1u32);\n | ^^^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370009]: cannot call static function 'echo' of circuit 'Foo' from target\n --> compiler-test:11:17\n |\n 11 | const err = a.echo(1u32); // echo is a static function and must be accessed using `::`\n | ^^^^^^\n |\n"
|
||||
- "[EASG0370009]: cannot call static function 'echo' of circuit 'Foo' from target\n --> compiler-test:11:17\n |\n 11 | const err = a.echo(1u32); // echo is a static function and must be accessed using `::`\n | ^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370028]: failed to resolve variable reference 'Foo'\n --> compiler-test:10:17\n |\n 10 | const err = Foo.echo(1u32); // Invalid, echo is a static function and must be accessed using `::`\n | ^^^\n |\n"
|
||||
- "[EASG0370028]: failed to resolve variable reference 'Foo'\n --> compiler-test:10:17\n |\n 10 | const err = Foo.echo(1u32); // Invalid, echo is a static function and must be accessed using `::`\n | ^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370002]: illegal reference to non-existant member 'echoed' of circuit 'Foo'\n --> compiler-test:10:17\n |\n 10 | const err = Foo::echoed(1u32);\n | ^^^^^^^^^^^\n |\n"
|
||||
- "[EASG0370002]: illegal reference to non-existant member 'echoed' of circuit 'Foo'\n --> compiler-test:10:17\n |\n 10 | const err = Foo::echoed(1u32);\n | ^^^^^^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370002]: illegal reference to non-existant member 'y' of circuit 'Foo'\n --> compiler-test:9:17\n |\n 9 | const err = a.y;\n | ^^^\n |\n"
|
||||
- "[EASG0370002]: illegal reference to non-existant member 'y' of circuit 'Foo'\n --> compiler-test:9:17\n |\n 9 | const err = a.y;\n | ^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370007]: attempt to assign to function 'bar'\n --> compiler-test:12:5\n |\n 12 | f.bar = 1u8;\n | ^^^^^^^^^^^\n |\n"
|
||||
- "[EASG0370007]: attempt to assign to function 'bar'\n --> compiler-test:12:5\n |\n 12 | f.bar = 1u8;\n | ^^^^^^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370007]: attempt to assign to function 'bar'\n --> compiler-test:9:9\n |\n 9 | self.bar = new;\n | ^^^^^^^^^^^^^^\n |\n"
|
||||
- "[EASG0370007]: attempt to assign to function 'bar'\n --> compiler-test:9:9\n |\n 9 | self.bar = new;\n | ^^^^^^^^^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370007]: attempt to assign to function 'bar'\n --> compiler-test:9:9\n |\n 9 | self.bar = new;\n | ^^^^^^^^^^^^^^\n |\n"
|
||||
- "[EASG0370007]: attempt to assign to function 'bar'\n --> compiler-test:9:9\n |\n 9 | self.bar = new;\n | ^^^^^^^^^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370033]: illegal assignment to immutable variable 'self'\n --> compiler-test:7:9\n |\n 7 | self.a = new;\n | ^^^^^^^^^^^^\n |\n"
|
||||
- "[EASG0370033]: illegal assignment to immutable variable 'self'\n --> compiler-test:7:9\n |\n 7 | self.a = new;\n | ^^^^^^^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370006]: extra circuit member 'a' for initialization of circuit 'Foo' is not allowed\n --> compiler-test:8:19\n |\n 8 | let f = Foo { a: 0u8 };\n | ^\n |\n"
|
||||
- "[EASG0370006]: extra circuit member 'a' for initialization of circuit 'Foo' is not allowed\n --> compiler-test:8:19\n |\n 8 | let f = Foo { a: 0u8 };\n | ^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370033]: illegal assignment to immutable variable 'f'\n --> compiler-test:10:5\n |\n 10 | f.a = 1u8;\n | ^^^^^^^^^\n |\n"
|
||||
- "[EASG0370033]: illegal assignment to immutable variable 'f'\n --> compiler-test:10:5\n |\n 10 | f.a = 1u8;\n | ^^^^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EPAR0375009]: unexpected string: expected 'ident', got 'static'\n --> compiler-test:5:5\n |\n 5 | static function new() -> Self {\n | ^^^^^^\n |\n"
|
||||
- "[EPAR0375009]: unexpected string: expected 'ident', got 'static'\n --> compiler-test:5:5\n |\n 5 | static function new() -> Self {\n | ^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370000]: failed to resolve circuit: 'Self'\n --> compiler-test:4:5\n |\n 4 | Self::main();\n | ^^^^\n |\n"
|
||||
- "[EASG0370000]: failed to resolve circuit: 'Self'\n --> compiler-test:4:5\n |\n 4 | Self::main();\n | ^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370009]: cannot call static function 'bar' of circuit 'Foo' from target\n --> compiler-test:13:17\n |\n 13 | const err = foo.bar();\n | ^^^^^^^\n |\n"
|
||||
- "[EASG0370009]: cannot call static function 'bar' of circuit 'Foo' from target\n --> compiler-test:13:17\n |\n 13 | const err = foo.bar();\n | ^^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370009]: cannot call static function 'bar' of circuit 'Foo' from target\n --> compiler-test:11:17\n |\n 11 | const err = foo.bar();\n | ^^^^^^^\n |\n"
|
||||
- "[EASG0370009]: cannot call static function 'bar' of circuit 'Foo' from target\n --> compiler-test:11:17\n |\n 11 | const err = foo.bar();\n | ^^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EPAR0375009]: unexpected string: expected 'formatted string', got 'hello'\n --> compiler-test:4:18\n |\n 4 | console.log( hello );\n | ^^^^^\n |\n"
|
||||
- "[EPAR0375009]: unexpected string: expected 'formatted string', got 'hello'\n --> compiler-test:4:18\n |\n 4 | console.log( hello );\n | ^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[ECMP0372006]: Formatter given 1 containers and found 0 parameters\n --> compiler-test:4:17\n |\n 4 | console.log(\"{}\");\n | ^^^^\n |\n"
|
||||
- "[ECMP0372006]: Formatter given 1 containers and found 0 parameters\n --> compiler-test:4:17\n |\n 4 | console.log(\"{}\");\n | ^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[ECMP0372006]: Formatter given 0 containers and found 1 parameters\n --> compiler-test:4:17\n |\n 4 | console.log(\"\", 1u32);\n | ^^^^^^^^\n |\n"
|
||||
- "[ECMP0372006]: Formatter given 0 containers and found 1 parameters\n --> compiler-test:4:17\n |\n 4 | console.log(\"\", 1u32);\n | ^^^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370028]: failed to resolve variable reference 'a'\n --> compiler-test:4:23\n |\n 4 | console.log(\"{}\", a);\n | ^\n |\n"
|
||||
- "[EASG0370028]: failed to resolve variable reference 'a'\n --> compiler-test:4:23\n |\n 4 | console.log(\"{}\", a);\n | ^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370001]: failed to resolve import: 'core.unstable.blake2s.BadCircuit'\n --> compiler-test:3:30\n |\n 3 | import core.unstable.blake2s.BadCircuit; // `BadCircuit` is not included in the blake2s package\n | ^^^^^^^^^^\n |\n"
|
||||
- "[EASG0370001]: failed to resolve import: 'core.unstable.blake2s.BadCircuit'\n --> compiler-test:3:30\n |\n 3 | import core.unstable.blake2s.BadCircuit; // `BadCircuit` is not included in the blake2s package\n | ^^^^^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370001]: failed to resolve import: 'core'\n --> :0:0\n |\n |\n"
|
||||
- "[EASG0370001]: failed to resolve import: 'core'\n --> :0:0\n |"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370001]: failed to resolve import: 'core'\n --> :0:0\n |\n |\n"
|
||||
- "[EASG0370001]: failed to resolve import: 'core'\n --> :0:0\n |"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370001]: failed to resolve import: 'core.unstable'\n --> :0:0\n |\n |\n"
|
||||
- "[EASG0370001]: failed to resolve import: 'core.unstable'\n --> :0:0\n |"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EPAR0375004]: Unexpected white space between terms 1 and field\n --> compiler-test:4:13\n |\n 4 | const f = 1 field;\n | ^\n |\n"
|
||||
- "[EPAR0375004]: Unexpected white space between terms 1 and field\n --> compiler-test:4:13\n |\n 4 | const f = 1 field;\n | ^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "- Circuit has no constraints, use inputs and registers in program to produce them"
|
||||
- "[EASG0370016]: a function named \"main\" already exists in this scope\n --> compiler-test:8:1\n |\n 8 | function main() {\n|\n 9 | ...\n|\n 10 | }\n | ^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370035]: function 'main' failed to validate return path: 'cannot have asymmetrical return in if statement'\n --> compiler-test:4:5\n |\n 4 | if true {\n|\n 5 | ...\n|\n 6 | }\n | ^\n |\n"
|
||||
- "[EASG0370035]: function 'main' failed to validate return path: 'cannot have asymmetrical return in if statement'\n --> compiler-test:4:5\n |\n 4 | if true {\n|\n 5 | ...\n|\n 6 | }\n | ^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370034]: function 'main' missing return for all paths\n --> compiler-test:3:1\n |\n 3 | function main() -> bool {\n|\n 4 | ...\n|\n 5 | }\n|\n 6 | \n|\n 7 | \n|\n 8 | \n|\n 9 | \n|\n 10 | \n | ^\n |\n"
|
||||
- "[EASG0370034]: function 'main' missing return for all paths\n --> compiler-test:3:1\n |\n 3 | function main() -> bool {\n|\n 4 | ...\n|\n 5 | }\n|\n 6 | \n|\n 7 | \n|\n 8 | \n|\n 9 | \n|\n 10 | \n | ^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:4:12\n |\n 4 | return [0u8; (2, 3)]; // The correct 3x2 array tuple is `[0u8; (3, 2)]`\n | ^^^^^^^^^^^^^\n |\n"
|
||||
- "[EASG0370026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:4:12\n |\n 4 | return [0u8; (2, 3)]; // The correct 3x2 array tuple is `[0u8; (3, 2)]`\n | ^^^^^^^^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:4:12\n |\n 4 | return [[0u8; 3]; 2]; // The correct 3x2 nested array is `[0u8; 2]; 3]`\n | ^^^^^^^^^^^^^\n |\n"
|
||||
- "[EASG0370026]: unexpected type, expected: 'array of length 3', received: 'array of length 2'\n --> compiler-test:4:12\n |\n 4 | return [[0u8; 3]; 2]; // The correct 3x2 nested array is `[0u8; 2]; 3]`\n | ^^^^^^^^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370028]: failed to resolve variable reference 'myGlobal'\n --> compiler-test:5:12\n |\n 5 | return myGlobal;\n | ^^^^^^^^\n |\n"
|
||||
- "[EASG0370028]: failed to resolve variable reference 'myGlobal'\n --> compiler-test:5:12\n |\n 5 | return myGlobal;\n | ^^^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370024]: failed to resolve function: 'my_function'\n --> compiler-test:5:5\n |\n 5 | my_function();\n | ^^^^^^^^^^^\n |\n"
|
||||
- "[EASG0370024]: failed to resolve function: 'my_function'\n --> compiler-test:5:5\n |\n 5 | my_function();\n | ^^^^^^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370033]: illegal assignment to immutable variable 'basic'\n --> compiler-test:7:5\n |\n 7 | basic = 2u32;\n | ^^^^^^^^^^^^\n |\n"
|
||||
- "[EASG0370033]: illegal assignment to immutable variable 'basic'\n --> compiler-test:7:5\n |\n 7 | basic = 2u32;\n | ^^^^^^^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[ECMP0372029]: Expected input variable `a` to be non-constant. Move input variable `a` to [main] section of input file\n --> compiler-test:3:15\n |\n 3 | function main(a: u32) {\n | ^\n |\n"
|
||||
- "[ECMP0372029]: Expected input variable `a` to be non-constant. Move input variable `a` to [main] section of input file\n --> compiler-test:3:15\n |\n 3 | function main(a: u32) {\n | ^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[ECMP0372035]: Input variable a declared twice\n --> compiler-test:3:21\n |\n 3 | function main(const a: u32) {\n | ^\n |\n"
|
||||
- "[ECMP0372035]: Input variable a declared twice\n --> compiler-test:3:21\n |\n 3 | function main(const a: u32) {\n | ^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[ECMP0372031]: Input array dimensions mismatch expected 1, found array dimensions 2\n --> compiler-test:3:15\n |\n 3 | function main(x: [i16; 2]) {\n | ^\n |\n"
|
||||
- "[ECMP0372031]: Input array dimensions mismatch expected 1, found array dimensions 2\n --> compiler-test:3:15\n |\n 3 | function main(x: [i16; 2]) {\n | ^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[ECMP0372032]: Input tuple size mismatch expected 3, found tuple with length 2\n --> compiler-test:3:15\n |\n 3 | function main(x: (u8, bool, u8)) {\n | ^\n |\n"
|
||||
- "[ECMP0372032]: Input tuple size mismatch expected 3, found tuple with length 2\n --> compiler-test:3:15\n |\n 3 | function main(x: (u8, bool, u8)) {\n | ^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370025]: failed to resolve type for variable definition 'unknown'\n --> compiler-test:4:17\n |\n 4 | let b = a * 2;\n | ^\n |\n"
|
||||
- "[EASG0370025]: failed to resolve type for variable definition 'unknown'\n --> compiler-test:4:17\n |\n 4 | let b = a * 2;\n | ^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[ECMP0372035]: Input variable a declared twice\n --> compiler-test:3:15\n |\n 3 | function main(a: u32) {\n | ^\n |\n"
|
||||
- "[ECMP0372035]: Input variable a declared twice\n --> compiler-test:3:15\n |\n 3 | function main(a: u32) {\n | ^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[ECMP0372031]: Input array dimensions mismatch expected 2, found array dimensions 1\n --> compiler-test:3:21\n |\n 3 | function main(const x: [i16; 2]) {\n | ^\n |\n"
|
||||
- "[ECMP0372031]: Input array dimensions mismatch expected 2, found array dimensions 1\n --> compiler-test:3:21\n |\n 3 | function main(const x: [i16; 2]) {\n | ^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[ECMP0372032]: Input tuple size mismatch expected 3, found tuple with length 2\n --> compiler-test:3:21\n |\n 3 | function main(const x: (u8, bool, u8)) {\n | ^\n |\n"
|
||||
- "[ECMP0372032]: Input tuple size mismatch expected 3, found tuple with length 2\n --> compiler-test:3:21\n |\n 3 | function main(const x: (u8, bool, u8)) {\n | ^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[ECMP0372037]: Mismatched types. Expected register output type `u8`, found type `bool`.\n --> compiler-test:3:1\n |\n 3 | function main() -> bool {\n|\n 4 | ...\n|\n 5 | }\n | ^\n |\n"
|
||||
- "[ECMP0372037]: Mismatched types. Expected register output type `u8`, found type `bool`.\n --> compiler-test:3:1\n |\n 3 | function main() -> bool {\n|\n 4 | ...\n|\n 5 | }\n | ^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370031]: failed to parse int value '170141183460469231731687303715884105728'\n --> compiler-test:4:21\n |\n 4 | const a: i128 = 170141183460469231731687303715884105728;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n"
|
||||
- "[EASG0370031]: failed to parse int value '170141183460469231731687303715884105728'\n --> compiler-test:4:21\n |\n 4 | const a: i128 = 170141183460469231731687303715884105728;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370031]: failed to parse int value '-170141183460469231731687303715884105729'\n --> compiler-test:4:21\n |\n 4 | const a: i128 = -170141183460469231731687303715884105729;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n"
|
||||
- "[EASG0370031]: failed to parse int value '-170141183460469231731687303715884105729'\n --> compiler-test:4:21\n |\n 4 | const a: i128 = -170141183460469231731687303715884105729;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EPAR0375004]: Unexpected white space between terms 1 and i128\n --> compiler-test:4:15\n |\n 4 | const i = 1 i128;\n | ^\n |\n"
|
||||
- "[EPAR0375004]: Unexpected white space between terms 1 and i128\n --> compiler-test:4:15\n |\n 4 | const i = 1 i128;\n | ^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370031]: failed to parse int value '32768'\n --> compiler-test:4:20\n |\n 4 | const a: i16 = 32768;\n | ^^^^^\n |\n"
|
||||
- "[EASG0370031]: failed to parse int value '32768'\n --> compiler-test:4:20\n |\n 4 | const a: i16 = 32768;\n | ^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370031]: failed to parse int value '-32769'\n --> compiler-test:4:20\n |\n 4 | const a: i16 = -32769;\n | ^^^^^^\n |\n"
|
||||
- "[EASG0370031]: failed to parse int value '-32769'\n --> compiler-test:4:20\n |\n 4 | const a: i16 = -32769;\n | ^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EPAR0375004]: Unexpected white space between terms 1 and i16\n --> compiler-test:4:15\n |\n 4 | const i = 1 i16;\n | ^\n |\n"
|
||||
- "[EPAR0375004]: Unexpected white space between terms 1 and i16\n --> compiler-test:4:15\n |\n 4 | const i = 1 i16;\n | ^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370031]: failed to parse int value '2147483648'\n --> compiler-test:4:20\n |\n 4 | const a: i32 = 2147483648;\n | ^^^^^^^^^^\n |\n"
|
||||
- "[EASG0370031]: failed to parse int value '2147483648'\n --> compiler-test:4:20\n |\n 4 | const a: i32 = 2147483648;\n | ^^^^^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370031]: failed to parse int value '-2147483649'\n --> compiler-test:4:20\n |\n 4 | const a: i32 = -2147483649;\n | ^^^^^^^^^^^\n |\n"
|
||||
- "[EASG0370031]: failed to parse int value '-2147483649'\n --> compiler-test:4:20\n |\n 4 | const a: i32 = -2147483649;\n | ^^^^^^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EPAR0375004]: Unexpected white space between terms 1 and i32\n --> compiler-test:4:15\n |\n 4 | const i = 1 i32;\n | ^\n |\n"
|
||||
- "[EPAR0375004]: Unexpected white space between terms 1 and i32\n --> compiler-test:4:15\n |\n 4 | const i = 1 i32;\n | ^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370031]: failed to parse int value '9223372036854775808'\n --> compiler-test:4:20\n |\n 4 | const a: i64 = 9223372036854775808;\n | ^^^^^^^^^^^^^^^^^^^\n |\n"
|
||||
- "[EASG0370031]: failed to parse int value '9223372036854775808'\n --> compiler-test:4:20\n |\n 4 | const a: i64 = 9223372036854775808;\n | ^^^^^^^^^^^^^^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370031]: failed to parse int value '-9223372036854775809'\n --> compiler-test:4:20\n |\n 4 | const a: i64 = -9223372036854775809;\n | ^^^^^^^^^^^^^^^^^^^^\n |\n"
|
||||
- "[EASG0370031]: failed to parse int value '-9223372036854775809'\n --> compiler-test:4:20\n |\n 4 | const a: i64 = -9223372036854775809;\n | ^^^^^^^^^^^^^^^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EPAR0375004]: Unexpected white space between terms 1 and i64\n --> compiler-test:4:15\n |\n 4 | const i = 1 i64;\n | ^\n |\n"
|
||||
- "[EPAR0375004]: Unexpected white space between terms 1 and i64\n --> compiler-test:4:15\n |\n 4 | const i = 1 i64;\n | ^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370031]: failed to parse int value '128'\n --> compiler-test:4:19\n |\n 4 | const a: i8 = 128;\n | ^^^\n |\n"
|
||||
- "[EASG0370031]: failed to parse int value '128'\n --> compiler-test:4:19\n |\n 4 | const a: i8 = 128;\n | ^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370031]: failed to parse int value '-129'\n --> compiler-test:4:19\n |\n 4 | const a: i8 = -129;\n | ^^^^\n |\n"
|
||||
- "[EASG0370031]: failed to parse int value '-129'\n --> compiler-test:4:19\n |\n 4 | const a: i8 = -129;\n | ^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[ECMP0372085]: integer operation failed due to the signed integer error `Integer overflow`\n --> compiler-test:5:15\n |\n 5 | const b = -a;\n | ^^\n |\n"
|
||||
- "[ECMP0372083]: integer operation failed due to the signed integer error `Integer overflow`\n --> compiler-test:5:15\n |\n 5 | const b = -a;\n | ^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EPAR0375004]: Unexpected white space between terms 1 and i8\n --> compiler-test:4:15\n |\n 4 | const i = 1 i8;\n | ^\n |\n"
|
||||
- "[EPAR0375004]: Unexpected white space between terms 1 and i8\n --> compiler-test:4:15\n |\n 4 | const i = 1 i8;\n | ^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370031]: failed to parse int value '340282366920938463463374607431768211456'\n --> compiler-test:4:21\n |\n 4 | const a: u128 = 340282366920938463463374607431768211456;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n"
|
||||
- "[EASG0370031]: failed to parse int value '340282366920938463463374607431768211456'\n --> compiler-test:4:21\n |\n 4 | const a: u128 = 340282366920938463463374607431768211456;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370031]: failed to parse int value '-1'\n --> compiler-test:4:21\n |\n 4 | const a: u128 = -1;\n | ^^\n |\n"
|
||||
- "[EASG0370031]: failed to parse int value '-1'\n --> compiler-test:4:21\n |\n 4 | const a: u128 = -1;\n | ^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[ECMP0372091]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u128) {}\n | ^\n |\n"
|
||||
- "[ECMP0372089]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u128) {}\n | ^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EPAR0375004]: Unexpected white space between terms 1 and u128\n --> compiler-test:4:15\n |\n 4 | const i = 1 u128;\n | ^\n |\n"
|
||||
- "[EPAR0375004]: Unexpected white space between terms 1 and u128\n --> compiler-test:4:15\n |\n 4 | const i = 1 u128;\n | ^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370031]: failed to parse int value '65536'\n --> compiler-test:4:20\n |\n 4 | const a: u16 = 65536;\n | ^^^^^\n |\n"
|
||||
- "[EASG0370031]: failed to parse int value '65536'\n --> compiler-test:4:20\n |\n 4 | const a: u16 = 65536;\n | ^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370031]: failed to parse int value '-1'\n --> compiler-test:4:20\n |\n 4 | const a: u16 = -1;\n | ^^\n |\n"
|
||||
- "[EASG0370031]: failed to parse int value '-1'\n --> compiler-test:4:20\n |\n 4 | const a: u16 = -1;\n | ^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[ECMP0372091]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u16) {}\n | ^\n |\n"
|
||||
- "[ECMP0372089]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u16) {}\n | ^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EPAR0375004]: Unexpected white space between terms 1 and u16\n --> compiler-test:4:15\n |\n 4 | const i = 1 u16;\n | ^\n |\n"
|
||||
- "[EPAR0375004]: Unexpected white space between terms 1 and u16\n --> compiler-test:4:15\n |\n 4 | const i = 1 u16;\n | ^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370031]: failed to parse int value '4294967296'\n --> compiler-test:4:20\n |\n 4 | const a: u32 = 4294967296;\n | ^^^^^^^^^^\n |\n"
|
||||
- "[EASG0370031]: failed to parse int value '4294967296'\n --> compiler-test:4:20\n |\n 4 | const a: u32 = 4294967296;\n | ^^^^^^^^^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EASG0370031]: failed to parse int value '-1'\n --> compiler-test:4:20\n |\n 4 | const a: u32 = -1;\n | ^^\n |\n"
|
||||
- "[EASG0370031]: failed to parse int value '-1'\n --> compiler-test:4:20\n |\n 4 | const a: u32 = -1;\n | ^^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[ECMP0372091]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u32) {}\n | ^\n |\n"
|
||||
- "[ECMP0372089]: failed to parse `-2` as expected integer type\n --> compiler-test:3:15\n |\n 3 | function main(a: u32) {}\n | ^"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "[EPAR0375004]: Unexpected white space between terms 1 and u32\n --> compiler-test:4:15\n |\n 4 | const i = 1 u32;\n | ^\n |\n"
|
||||
- "[EPAR0375004]: Unexpected white space between terms 1 and u32\n --> compiler-test:4:15\n |\n 4 | const i = 1 u32;\n | ^"
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user