leo/tests/compiler/integers/i8/negate_zero.leo

18 lines
219 B
Plaintext
Raw Normal View History

2021-05-03 17:28:53 +03:00
/*
namespace: Compile
expectation: Pass
2021-05-10 20:19:19 +03:00
inputs:
- dummy.in: |
[main]
y: bool = true;
[registers]
r0: bool = false;
2021-05-03 17:28:53 +03:00
*/
2021-05-10 20:19:19 +03:00
function main(y: bool) -> bool {
const a = 0i8;
2020-08-05 07:37:09 +03:00
2021-05-10 20:19:19 +03:00
return -a == 0i8 == y;
}