solidity/test/libsolidity/syntaxTests/viewPureChecker/local_storage_variables.sol
2021-04-20 17:38:29 +02:00

21 lines
330 B
Solidity

contract C {
struct S { uint a; }
S s;
function f() view public {
S storage x = s;
x;
}
function g() view public {
S storage x = s;
x = s;
}
function i() public {
s.a = 2;
}
function h() public {
S storage x = s;
x.a = 2;
}
}
// ----