leo/tests/compiler/integers/i8/negate_min_fail.leo
2022-10-05 16:53:49 -07:00

16 lines
362 B
Plaintext

/*
namespace: Compile
expectation: Pass
input_file: ../inputs/dummy.in
*/
program test.aleo {
// TODO: This test passes, but constant propogation should detect an overflow.
transition main(y: bool) -> i8 {
let a: i8 = -128i8;
return -a; // This line attempts to return 128i8 however, the largest i8 value is 127i8.
}
}