mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
12 lines
283 B
Solidity
12 lines
283 B
Solidity
contract C {
|
|
struct s {
|
|
uint a;
|
|
}
|
|
function f() public {
|
|
s storage x;
|
|
x.a = 2;
|
|
}
|
|
}
|
|
// ----
|
|
// TypeError: (105-106): This variable is of storage pointer type and can be accessed without prior assignment, which would lead to undefined behaviour.
|