mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
[SMTChecker] Add test that has an unused mapping
This commit is contained in:
parent
7a6ad61583
commit
0fda5fe077
17
test/libsolidity/smtCheckerTests/types/unused_mapping.sol
Normal file
17
test/libsolidity/smtCheckerTests/types/unused_mapping.sol
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user