solidity/test/libsolidity/syntaxTests/freeFunctions/qualified_struct_access.sol

9 lines
418 B
Solidity
Raw Normal View History

2020-05-04 16:38:00 +00:00
function f() returns (uint) { C.S storage t; t.x; }
contract C {
struct S { uint x; }
}
// ----
// Warning 6321: (22-26): Unnamed return variable can remain unassigned. Add an explicit return with value to all non-reverting code paths or name the variable.
2020-05-04 16:38:00 +00:00
// TypeError 3464: (45-46): This variable is of storage pointer type and can be accessed without prior assignment, which would lead to undefined behaviour.