solidity/test/libsolidity/smtCheckerTests/out_of_bounds/array_3.sol
2021-03-30 10:28:48 +02:00

11 lines
316 B
Solidity

pragma experimental SMTChecker;
contract C {
uint[] a;
function r(uint i) public view returns (uint) {
return a[i]; // oob access
}
}
// ----
// Warning 6368: (115-119): CHC: Out of bounds access happens here.\nCounterexample:\na = []\ni = 0\n = 0\n\nTransaction trace:\nC.constructor()\nState: a = []\nC.r(0)