solidity/test/libsolidity/smtCheckerTests/operators/constant_propagation_2.sol
2020-12-16 17:59:00 +01:00

15 lines
234 B
Solidity

pragma experimental SMTChecker;
contract C {
uint constant x = 7;
uint constant y = 3;
uint constant z = x / y;
function f() public pure {
assert(z == 2);
assert(z == x / 3);
assert(z == 7 / y);
assert(z * 3 != 7);
}
}