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

15 lines
446 B
Solidity
Raw Normal View History

2020-09-24 17:24:33 +00:00
pragma experimental SMTChecker;
contract C {
function f(bytes calldata b) external pure {
require(b[0] == 0xff);
assert(bytes(b[:20]).length == 20);
assert(bytes(b[:20])[0] == 0xff);
assert(bytes(b[:20])[5] == 0xff);
}
}
// ----
// Warning 6328: (157-189): CHC: Assertion violation might happen here.
2020-09-24 17:24:33 +00:00
// Warning 6328: (193-225): CHC: Assertion violation happens here.
// Warning 4661: (157-189): BMC: Assertion violation happens here.