2019-09-26 14:12:27 +00:00
|
|
|
contract A {
|
|
|
|
uint x;
|
2020-06-23 12:14:24 +00:00
|
|
|
constructor (uint y) { assert(x == 0); x = y; }
|
2019-09-26 14:12:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
contract B is A {
|
2020-06-23 12:14:24 +00:00
|
|
|
constructor () A(2) { assert(x == 2); }
|
2019-09-26 14:12:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
contract C is B {
|
|
|
|
function f() public view {
|
|
|
|
assert(x == 2);
|
|
|
|
}
|
|
|
|
}
|
2019-12-04 15:39:34 +00:00
|
|
|
// ====
|
2021-03-31 15:11:54 +00:00
|
|
|
// SMTEngine: all
|
2019-12-04 15:39:34 +00:00
|
|
|
// SMTSolvers: z3
|
2021-03-12 23:02:36 +00:00
|
|
|
// ----
|
2021-10-06 09:53:03 +00:00
|
|
|
// Info 1180: Contract invariant(s) for :C:\n(!(x <= 1) && !(x >= 3))\n
|