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

10 lines
453 B
Solidity
Raw Normal View History

2018-08-07 17:12:49 +00:00
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: (66-72): Data location must be "memory" for parameter in function, but "calldata" was given.
// TypeError: (159-165): Data location must be "memory" for parameter in function, but "storage" was given.