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

24 lines
231 B
Solidity
Raw Normal View History

2019-04-01 09:10:28 +00:00
pragma experimental SMTChecker;
contract C
{
uint y;
function f() public {
2020-02-12 02:21:42 +00:00
if (y != 1)
g();
2019-04-01 09:10:28 +00:00
assert(y == 1);
}
2020-02-12 02:21:42 +00:00
function g() internal {
2019-04-01 09:10:28 +00:00
y = 1;
h();
}
2020-02-12 02:21:42 +00:00
function h() internal {
2019-04-01 09:10:28 +00:00
f();
2020-02-12 02:21:42 +00:00
assert(y == 1);
2019-04-01 09:10:28 +00:00
}
}
// ----