2020-09-24 17:24:33 +00:00
|
|
|
pragma experimental SMTChecker;
|
|
|
|
|
|
|
|
contract C {
|
|
|
|
function f(bytes calldata b) external pure {
|
|
|
|
require(b.length == 30);
|
|
|
|
require(b[10] == 0xff);
|
|
|
|
require(b[b.length - 1] == 0xaa);
|
|
|
|
assert(bytes(b[10:]).length == 20);
|
|
|
|
assert(bytes(b[10:])[0] == 0xff);
|
|
|
|
assert(bytes(b[10:])[5] == 0xff);
|
|
|
|
assert(bytes(b[10:])[19] == 0xaa);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// ----
|
2020-10-19 17:11:59 +00:00
|
|
|
// Warning 6328: (221-253): CHC: Assertion violation might happen here.
|
|
|
|
// Warning 6328: (257-289): CHC: Assertion violation might happen here.
|
|
|
|
// Warning 6328: (293-326): CHC: Assertion violation might happen here.
|
2020-09-24 17:24:33 +00:00
|
|
|
// Warning 4661: (221-253): BMC: Assertion violation happens here.
|
|
|
|
// Warning 4661: (257-289): BMC: Assertion violation happens here.
|
|
|
|
// Warning 4661: (293-326): BMC: Assertion violation happens here.
|