Open hajduakos opened 5 years ago
Depending on the target of verification, the postcondition of setB0 might or might not hold.
setB0
pragma solidity >=0.5.0; contract A { struct S { int x; } function setA0(S storage s_ptr) internal { s_ptr.x = 0; } } contract B is A { S s; /// @notice postcondition s.x == 0 function setB0(S storage s_ptr) internal { setA0(s_ptr); } } contract LocalStorageSpec is B { S s; function setC0(S storage s_ptr) internal { setB0(s_ptr); } function() external payable { setC0(s); assert(s.x == 0); } }
If we only target B without C, it should hold. Otherwise it should not.
B
C
Depending on the target of verification, the postcondition of
setB0
might or might not hold.If we only target
B
withoutC
, it should hold. Otherwise it should not.