diff options
Merge pull request #4738 from ethereum/dataloc_merged
Enforce data location.
Diffstat (limited to 'test/libsolidity/syntaxTests/dataLocations/libraries/library_function_with_data_location_fine.sol')
-rw-r--r-- | test/libsolidity/syntaxTests/dataLocations/libraries/library_function_with_data_location_fine.sol | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/dataLocations/libraries/library_function_with_data_location_fine.sol b/test/libsolidity/syntaxTests/dataLocations/libraries/library_function_with_data_location_fine.sol new file mode 100644 index 00000000..7a276f95 --- /dev/null +++ b/test/libsolidity/syntaxTests/dataLocations/libraries/library_function_with_data_location_fine.sol @@ -0,0 +1,10 @@ +library L { + struct S { uint x; } + function f(uint[] memory, uint[] storage, S storage) private pure + returns (mapping(uint => uint) storage a, S memory b, uint[] storage c) { return (a, b, c); } + function g(uint[] memory, uint[] storage) internal pure + returns (mapping(uint => uint) storage a, S memory b, uint[] storage c) { return (a, b, c); } + function h(uint[] memory, uint[] storage) public pure returns (S storage x) { return x; } + function i(uint[] calldata, uint[] storage) external pure returns (S storage x) {return x; } +} +// ---- |