diff options
author | Leonardo Alt <leo@ethereum.org> | 2018-12-14 19:21:43 +0800 |
---|---|---|
committer | Leonardo Alt <leo@ethereum.org> | 2018-12-14 19:21:53 +0800 |
commit | 9199718ec0aa1210094ceb9ca587fe49fba70518 (patch) | |
tree | 483ff6fed2eb914f19710928464a35790a400c60 /test/libsolidity | |
parent | 6a2809a582d95a5b4cb52abeb3f92ed01857809b (diff) | |
download | dexon-solidity-9199718ec0aa1210094ceb9ca587fe49fba70518.tar dexon-solidity-9199718ec0aa1210094ceb9ca587fe49fba70518.tar.gz dexon-solidity-9199718ec0aa1210094ceb9ca587fe49fba70518.tar.bz2 dexon-solidity-9199718ec0aa1210094ceb9ca587fe49fba70518.tar.lz dexon-solidity-9199718ec0aa1210094ceb9ca587fe49fba70518.tar.xz dexon-solidity-9199718ec0aa1210094ceb9ca587fe49fba70518.tar.zst dexon-solidity-9199718ec0aa1210094ceb9ca587fe49fba70518.zip |
Clear all mapping knowledge after array variable assignment
Diffstat (limited to 'test/libsolidity')
-rw-r--r-- | test/libsolidity/smtCheckerTests/types/mapping_aliasing_1.sol | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/libsolidity/smtCheckerTests/types/mapping_aliasing_1.sol b/test/libsolidity/smtCheckerTests/types/mapping_aliasing_1.sol index 1c7e8b8a..39d096f5 100644 --- a/test/libsolidity/smtCheckerTests/types/mapping_aliasing_1.sol +++ b/test/libsolidity/smtCheckerTests/types/mapping_aliasing_1.sol @@ -7,9 +7,12 @@ contract C function f() public { require(a[1] == b[1]); + a[1] = 2; mapping (uint => uint) storage c = a; - c[1] = 2; + assert(c[1] == 2); // False negative! Needs aliasing. assert(a[1] == b[1]); } } +// ---- +// Warning: (261-281): Assertion violation happens here |