pragma solidity ^0.5.0;
contract C {
function f() public {
uint8 a = 2;
uint8 b = 5;
uint8 c = a - b;
}
}
Translated:
type state is unit;
function f (const res__unit : unit) : (unit) is
block {
const a : nat = 2n;
const b : nat = 5n;
const c : nat = abs(a - b);
} with (unit);
This preserves the type (nat) but produces wrong value 3, whereas in Solidity it would be 253
Sample:
Translated:
This preserves the type (nat) but produces wrong value
3
, whereas in Solidity it would be253