mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-11-24 07:48:04 +03:00
add test to check for stack overflow
This commit is contained in:
parent
6631da0c7e
commit
5bd2575fd5
3
compiler/tests/syntax/compare_mismatched_types.leo
Normal file
3
compiler/tests/syntax/compare_mismatched_types.leo
Normal file
@ -0,0 +1,3 @@
|
||||
function main() {
|
||||
let a = -5i8 > 342u32;
|
||||
}
|
@ -54,3 +54,12 @@ fn input_syntax_error() {
|
||||
_ => panic!("input syntax error should be a ParserError"),
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_compare_mismatched_types() {
|
||||
let bytes = include_bytes!("compare_mismatched_types.leo");
|
||||
let program = parse_program(bytes).unwrap();
|
||||
|
||||
// previously this bug caused a stack overflow
|
||||
expect_compiler_error(program);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user