solidity/test/libsolidity/smtCheckerTests/operators/constant_propagation_2.sol

15 lines
234 B
Solidity
Raw Normal View History

2020-12-16 16:58:49 +00:00
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);
}
}