2020-11-26 16:14:58 +00:00
|
|
|
|
|
|
|
contract C {
|
|
|
|
|
|
|
|
uint[2] public x = [42,1];
|
|
|
|
|
|
|
|
function f() public view {
|
|
|
|
assert(this.x(0) == x[0]); // should hold
|
|
|
|
assert(this.x(1) == x[1]); // should hold
|
|
|
|
assert(this.x(0) == 0); // should fail
|
|
|
|
}
|
|
|
|
}
|
2021-03-31 15:11:54 +00:00
|
|
|
// ====
|
|
|
|
// SMTEngine: all
|
2020-11-26 16:14:58 +00:00
|
|
|
// ----
|
2021-03-31 15:11:54 +00:00
|
|
|
// Warning 6328: (162-184): CHC: Assertion violation happens here.\nCounterexample:\nx = [42, 1]\n\nTransaction trace:\nC.constructor()\nState: x = [42, 1]\nC.f()
|
2021-10-06 09:53:03 +00:00
|
|
|
// Info 1180: Contract invariant(s) for :C:\n!(x.length <= 1)\n
|