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

16 lines
254 B
Solidity
Raw Normal View History

contract C {
struct S { bool f; }
S s;
function f() internal view {
S storage c;
(c = s).f && false;
c;
}
function g() internal view {
S storage c;
(c = s).f || true;
c;
}
}
// ----