solidity/test/libsolidity/smtCheckerTests/types/array_static_aliasing_memory_5.sol

19 lines
468 B
Solidity
Raw Normal View History

pragma experimental SMTChecker;
contract C
{
2020-02-12 02:21:42 +00:00
function f(uint[2] memory a, uint[2] memory b, uint[2] memory c) public pure {
require(c[0] == 42);
require(a[0] == 2);
b[0] = 1;
// Should fail since b == c is possible.
assert(c[0] == 42);
// Should fail since b == a is possible.
assert(a[0] == 2);
assert(b[0] == 1);
}
}
// ----
2020-07-13 18:48:00 +00:00
// Warning 6328: (228-246): Assertion violation happens here
// Warning 6328: (293-310): Assertion violation happens here