solidity/test/libsolidity/smtCheckerTests/modifiers/modifier_assignment_outside_branch.sol

20 lines
265 B
Solidity
Raw Normal View History

2019-04-01 09:10:28 +00:00
pragma experimental SMTChecker;
contract C
{
uint x;
address owner;
modifier onlyOwner {
if (msg.sender == owner) _;
}
function f() public onlyOwner {
}
function g(uint y) public {
y = 1;
if (y > x) f();
}
}