mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
26 lines
660 B
Solidity
26 lines
660 B
Solidity
pragma experimental SMTChecker;
|
|
|
|
contract C
|
|
{
|
|
uint[] array;
|
|
uint[][] array2d;
|
|
function f(uint[] storage a, uint[] storage b) internal {
|
|
a[0] = 2;
|
|
b[0] = 42;
|
|
array[0] = 1;
|
|
// Fails because array == a is possible.
|
|
assert(a[0] == 2);
|
|
// Fails because array == b is possible.
|
|
assert(b[0] == 42);
|
|
assert(array[0] == 1);
|
|
}
|
|
function g(uint x, uint y) public {
|
|
f(array2d[x], array2d[y]);
|
|
}
|
|
}
|
|
// ----
|
|
// Warning 4661: (225-242): Assertion violation happens here
|
|
// Warning 4661: (289-307): Assertion violation happens here
|
|
// Warning 4661: (225-242): Assertion violation happens here
|
|
// Warning 4661: (289-307): Assertion violation happens here
|