solidity/test/libsolidity/syntaxTests/controlFlow/localStorageVariables/revert_declaration_fine.sol

12 lines
185 B
Solidity
Raw Normal View History

contract C {
struct S { bool f; }
S s;
function g(bool flag) internal view {
S storage c;
if (flag) c = s;
else revert();
s;
}
}
// ----