Merge remote-tracking branch 'origin/develop' into breaking

This commit is contained in:
chriseth
2020-11-26 11:48:53 +01:00
81 changed files with 278 additions and 108 deletions
@@ -0,0 +1,17 @@
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.
@@ -0,0 +1,17 @@
pragma experimental SMTChecker;
contract C {
function f() public pure {
bytes3 y = "def";
y &= "def";
assert(y == "def");
y |= "dee";
assert(y == "def"); // fails
y ^= "fed";
assert(y == (bytes3("def") | bytes3("dee")) ^ bytes3("fed"));
}
}
// ----
// Warning 6328: (180-198): CHC: Assertion violation happens here.
@@ -0,0 +1,21 @@
pragma experimental SMTChecker;
contract C {
function f() public pure {
bytes32 y = "abcdefghabcdefghabcdefghabcdefgh";
bytes32 z = y;
y &= "bcdefghabcdefghabcdefghabcdefgha";
z &= "bcdefghabcdefghabcdefghabcdefgha";
assert(y == "abcdefghabcdefghabcdefghabcdefgh"); // fails
y |= "cdefghabcdefghabcdefghabcdefghab";
z |= "cdefghabcdefghabcdefghabcdefghab";
assert(y == "abcdefghabcdefghabcdefghabcd"); // fails
y ^= "abcdefghabcdefghabcdefghabcdefgh";
assert(y == z ^ "abcdefghabcdefghabcdefghabcdefgh");
}
}
// ----
// Warning 6328: (262-309): CHC: Assertion violation happens here.
// Warning 6328: (427-470): CHC: Assertion violation happens here.