solidity/test/libsolidity/smtCheckerTests/operators/compound_bitwise_string_literal.sol
Alex Beregszaszi edbdff8619 Update tests
2020-12-14 19:32:31 +00:00

18 lines
391 B
Solidity

pragma experimental SMTChecker;
contract C {
function f() public pure {
bytes memory y = "def";
y[0] &= "d";
assert(y[0] == "d");
y[0] |= "e";
assert(y[0] == "d"); // fails
y[0] ^= "f";
assert(y[0] == (bytes1("d") | bytes1("e")) ^ bytes1("f"));
}
}
// ----
// Warning 6328: (189-208): CHC: Assertion violation happens here.