mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Clear all mapping knowledge after array variable assignment
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user