solidity/test/libsolidity/syntaxTests/controlFlow/storageReturn/assembly/returning_function.sol
2020-03-09 16:23:10 +01:00

14 lines
325 B
Solidity

contract C {
struct S { bool f; }
S s;
function f() internal pure returns (S storage c) {
// this should warn about unreachable code, but currently function flow is ignored
assembly {
function f() { return(0, 0) }
f()
c_slot := s_slot
}
}
}
// ----