solidity/test/libsolidity/syntaxTests/dataLocations/data_location_in_function_type_fail.sol

9 lines
365 B
Solidity

library L {
struct Nested { uint y; }
function b(function(Nested calldata) external returns (uint)[] storage) external pure {}
function d(function(Nested storage) external returns (uint)[] storage) external pure {}
}
// ----
// TypeError 6651: (159-173): Data location must be "memory" or "calldata" for parameter in function, but "storage" was given.