solidity/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_mixed_chain_with_params.sol

31 lines
628 B
Solidity
Raw Normal View History

pragma experimental SMTChecker;
contract F {
uint a;
constructor(uint x) public {
a = x;
}
}
2019-12-03 20:44:06 +00:00
abstract contract E is F {}
abstract contract D is E {
constructor() public {
a = 3;
}
}
2019-12-03 20:44:06 +00:00
abstract contract C is D {}
contract B is C {
constructor(uint x) F(x + 1) public {
}
}
contract A is B {
constructor(uint x) B(x) public {
assert(a == 3);
assert(a == 4);
}
}
// ----
// Warning 2661: (261-266): Overflow (resulting value larger than 2**256 - 1) happens here
// Warning 2661: (261-266): Overflow (resulting value larger than 2**256 - 1) happens here
// Warning 4661: (356-370): Assertion violation happens here