mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
22 lines
345 B
Solidity
22 lines
345 B
Solidity
pragma experimental SMTChecker;
|
|
|
|
contract C {
|
|
uint[] b;
|
|
|
|
function f() public {
|
|
require(b.length == 0);
|
|
b.push() = 1;
|
|
assert(b[0] == 1);
|
|
}
|
|
|
|
function g() public {
|
|
b.push() = 1;
|
|
assert(b[b.length - 1] == 1);
|
|
// Fails
|
|
assert(b[b.length - 1] == 100);
|
|
}
|
|
|
|
}
|
|
// ----
|
|
// Warning 6328: (232-262): CHC: Assertion violation happens here.
|