mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
12 lines
261 B
Solidity
12 lines
261 B
Solidity
contract C {
|
|
struct S { uint a; }
|
|
S s;
|
|
function f() internal returns (S storage r)
|
|
{
|
|
r.a = 0;
|
|
r = s;
|
|
}
|
|
}
|
|
// ----
|
|
// TypeError: (109-110): This variable is of storage pointer type and can be accessed without prior assignment.
|