solidity/test/libsolidity/syntaxTests/nameAndTypeResolution/275_inline_struct_declaration_arrays.sol

13 lines
310 B
Solidity
Raw Normal View History

contract C {
struct S {
uint a;
string b;
}
function f() public {
S[2] memory x = [S({a: 1, b: "fish"}), S({a: 2, b: "fish"})];
}
}
// ----
// Warning 2072: (102-115): Unused local variable.
// Warning 2018: (72-169): Function state mutability can be restricted to pure