solidity/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_modifier.sol
2021-04-08 21:03:39 +02:00

19 lines
341 B
Solidity

contract C {
uint a;
modifier n { _; a = 7; }
constructor(uint x) n {
a = x;
}
}
contract A is C {
modifier m { a = 5; _; }
constructor() C(2) {
assert(a == 4);
}
}
// ====
// SMTEngine: all
// ----
// Warning 6328: (156-170): CHC: Assertion violation happens here.\nCounterexample:\na = 7\n\nTransaction trace:\nA.constructor()