mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
15 lines
242 B
Solidity
15 lines
242 B
Solidity
|
contract C {
|
||
|
struct S { uint x; }
|
||
|
S s;
|
||
|
function f() view internal returns (S storage) {
|
||
|
return s;
|
||
|
}
|
||
|
function g() public {
|
||
|
f().x = 2;
|
||
|
}
|
||
|
function h() view public {
|
||
|
f();
|
||
|
f().x;
|
||
|
}
|
||
|
}
|