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

16 lines
482 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) -> i128 {
let a: i128 = -170141183460469231731687303715884105728i128;
return -a; // This line attempts to return 170141183460469231731687303715884105728i128 however, the largest i128 value is 170141183460469231731687303715884105727i128.
}
}