mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
18 lines
385 B
Solidity
18 lines
385 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] == (byte("d") | byte("e")) ^ byte("f"));
|
|
}
|
|
}
|
|
// ----
|
|
// Warning 6328: (189-208): CHC: Assertion violation happens here.
|