mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
27 lines
470 B
Solidity
27 lines
470 B
Solidity
pragma experimental SMTChecker;
|
|
contract C {
|
|
uint a;
|
|
constructor(uint x) public {
|
|
a = x;
|
|
}
|
|
}
|
|
|
|
abstract contract B is C {
|
|
uint b;
|
|
constructor(uint x) public {
|
|
b = x + 10;
|
|
}
|
|
}
|
|
|
|
contract A is B {
|
|
constructor(uint x) B(x) C(x + 2) public {
|
|
assert(a == x + 2);
|
|
assert(b == x + 10);
|
|
assert(b == x + 5);
|
|
}
|
|
}
|
|
|
|
// ----
|
|
// Warning: (171-177): Overflow (resulting value larger than 2**256 - 1) happens here
|
|
// Warning: (294-312): Assertion violation happens here
|