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

13 lines
365 B
Solidity
Raw Normal View History

contract C {
function f() public pure {
// ffff0000 in bytes4
bytes4 x = ~bytes4(hex"ffff");
assert(x == 0xffff0000); // should fail
assert(x == 0x0000ffff); // should hold
}
}
2021-03-31 15:11:54 +00:00
// ====
// SMTEngine: all
// ----
// Warning 6328: (100-123): CHC: Assertion violation happens here.\nCounterexample:\n\nx = 0xffff\n\nTransaction trace:\nC.constructor()\nC.f()