solidity/test/libsolidity/smtCheckerTests/inheritance/implicit_constructor_hierarchy.sol
2019-11-28 14:43:23 +01:00

17 lines
252 B
Solidity

pragma experimental SMTChecker;
contract A {
uint x;
constructor (uint y) public { assert(x == 0); x = y; }
}
contract B is A {
constructor () A(2) public { assert(x == 2); }
}
contract C is B {
function f() public view {
assert(x == 2);
}
}