Clear all mapping knowledge after array variable assignment

This commit is contained in:
Leonardo Alt
2018-12-14 12:21:53 +01:00
parent 6a2809a582
commit 9199718ec0
3 changed files with 42 additions and 5 deletions
@@ -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