2019-02-21 12:01:58 +00:00
|
|
|
pragma experimental SMTChecker;
|
|
|
|
|
|
|
|
contract C
|
|
|
|
{
|
|
|
|
uint[] array;
|
|
|
|
uint[][] array2d;
|
2020-02-12 02:21:42 +00:00
|
|
|
uint[][][][] array4d;
|
2019-02-21 12:01:58 +00:00
|
|
|
uint8[] tinyArray;
|
2020-02-12 02:21:42 +00:00
|
|
|
uint8[][][] tinyArray3d;
|
2019-02-21 12:01:58 +00:00
|
|
|
function f(
|
|
|
|
uint[] storage a,
|
|
|
|
uint[] storage b,
|
|
|
|
uint[][] storage cc,
|
|
|
|
uint8[][] storage dd,
|
|
|
|
uint[][][] storage eee
|
|
|
|
) internal {
|
2020-02-12 02:21:42 +00:00
|
|
|
a[0] = 2;
|
|
|
|
array[0] = 42;
|
|
|
|
array2d[0][0] = 42;
|
|
|
|
tinyArray[0] = 42;
|
|
|
|
cc[0][0] = 42;
|
|
|
|
dd[0][0] = 42;
|
|
|
|
eee[0][0][0] = 42;
|
2019-02-21 12:01:58 +00:00
|
|
|
b[0] = 1;
|
|
|
|
// Fails because b == a is possible.
|
|
|
|
assert(a[0] == 2);
|
|
|
|
// Fails because b == array is possible.
|
|
|
|
assert(array[0] == 42);
|
|
|
|
// Fails because b == array2d[0] is possible.
|
|
|
|
assert(array2d[0][0] == 42);
|
|
|
|
// Should not fail since knowledge is erased only for uint[].
|
|
|
|
assert(tinyArray[0] == 42);
|
|
|
|
// Fails because b == cc[0] is possible.
|
|
|
|
assert(cc[0][0] == 42);
|
|
|
|
// Should not fail since knowledge is erased only for uint[].
|
|
|
|
assert(dd[0][0] == 42);
|
|
|
|
// Fails because b == ee[0][0] is possible.
|
|
|
|
assert(eee[0][0][0] == 42);
|
|
|
|
assert(b[0] == 1);
|
|
|
|
}
|
2020-02-12 02:21:42 +00:00
|
|
|
|
|
|
|
function g(uint a, uint b, uint c, uint d, uint e) public {
|
|
|
|
f(array2d[a], array2d[b], array4d[c][c], tinyArray3d[d], array4d[e]);
|
|
|
|
}
|
2019-02-21 12:01:58 +00:00
|
|
|
}
|
|
|
|
// ----
|
2020-07-13 18:48:00 +00:00
|
|
|
// Warning 6328: (468-485): Assertion violation happens here.
|
|
|
|
// Warning 6328: (532-554): Assertion violation happens here.
|
|
|
|
// Warning 6328: (606-633): Assertion violation happens here.
|
|
|
|
// Warning 6328: (774-796): Assertion violation happens here.
|
|
|
|
// Warning 6328: (936-962): Assertion violation happens here.
|