leo/tests/compiler/integers/i16/negate_min_fail.leo
Pranav Gaddamadugu 566d239153 Fix some tests
2022-08-10 11:40:24 -07:00

15 lines
327 B
Plaintext

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