Merge pull request #9008 from ethereum/smt_add_test

[SMTChecker] Add test that has an unused mapping
This commit is contained in:
chriseth 2020-05-25 17:04:54 +02:00 committed by GitHub
commit 370350da07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,17 @@
pragma experimental SMTChecker;
contract C {
uint x;
uint y;
mapping (address => bool) public never_used;
function inc() public {
require(x < 10);
require(y < 10);
if(x == 0) x = 0; // noop state var read
x++;
y++;
assert(y == x);
}
}