2019-02-21 12:01:58 +00:00
|
|
|
pragma experimental SMTChecker;
|
|
|
|
|
|
|
|
contract C
|
|
|
|
{
|
|
|
|
mapping (uint => uint) singleMap;
|
|
|
|
mapping (uint => uint)[] severalMaps;
|
|
|
|
mapping (uint => uint8)[] severalMaps8;
|
|
|
|
mapping (uint => uint)[][] severalMaps3d;
|
|
|
|
function f(mapping (uint => uint) storage map) internal {
|
|
|
|
require(severalMaps[0][0] == 42);
|
|
|
|
require(severalMaps8[0][0] == 42);
|
|
|
|
require(severalMaps3d[0][0][0] == 42);
|
|
|
|
map[0] = 2;
|
|
|
|
// Should fail since map == severalMaps[0] is possible.
|
|
|
|
assert(severalMaps[0][0] == 42);
|
2019-07-30 18:32:49 +00:00
|
|
|
// Should not fail since knowledge is erased only for mapping (uint => uint).
|
2019-02-21 12:01:58 +00:00
|
|
|
assert(severalMaps8[0][0] == 42);
|
|
|
|
// Should fail since map == severalMaps3d[0][0] is possible.
|
|
|
|
assert(severalMaps3d[0][0][0] == 42);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// ----
|
|
|
|
// Warning: (451-482): Assertion violation happens here
|
2019-07-30 18:32:49 +00:00
|
|
|
// Warning: (665-701): Assertion violation happens here
|