diff options
author | Daniel Kirchner <daniel@ekpyron.org> | 2018-08-13 22:25:28 +0800 |
---|---|---|
committer | Daniel Kirchner <daniel@ekpyron.org> | 2018-08-13 22:33:37 +0800 |
commit | 341128962f001eb78e5e3e3a83beadbef8d697b0 (patch) | |
tree | 92626689a3e594c679b9aecba3ca7db2c6f3363b /test/libsolidity/syntaxTests/types/mapping/mapping_array_return_internal.sol | |
parent | 4ae59acc098c2ede9a2dc44e741a28df49cc59d2 (diff) | |
download | dexon-solidity-341128962f001eb78e5e3e3a83beadbef8d697b0.tar dexon-solidity-341128962f001eb78e5e3e3a83beadbef8d697b0.tar.gz dexon-solidity-341128962f001eb78e5e3e3a83beadbef8d697b0.tar.bz2 dexon-solidity-341128962f001eb78e5e3e3a83beadbef8d697b0.tar.lz dexon-solidity-341128962f001eb78e5e3e3a83beadbef8d697b0.tar.xz dexon-solidity-341128962f001eb78e5e3e3a83beadbef8d697b0.tar.zst dexon-solidity-341128962f001eb78e5e3e3a83beadbef8d697b0.zip |
Allow mappings of arrays as arguments and return values of internal functions.
Diffstat (limited to 'test/libsolidity/syntaxTests/types/mapping/mapping_array_return_internal.sol')
-rw-r--r-- | test/libsolidity/syntaxTests/types/mapping/mapping_array_return_internal.sol | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/types/mapping/mapping_array_return_internal.sol b/test/libsolidity/syntaxTests/types/mapping/mapping_array_return_internal.sol new file mode 100644 index 00000000..8837c745 --- /dev/null +++ b/test/libsolidity/syntaxTests/types/mapping/mapping_array_return_internal.sol @@ -0,0 +1,16 @@ +contract C { + mapping(uint=>uint)[] m; + function f() internal view returns (mapping(uint=>uint)[] storage) { + return m; + } + function g() private view returns (mapping(uint=>uint)[] storage) { + return m; + } + function h() internal view returns (mapping(uint=>uint)[] storage r) { + r = m; + } + function i() private view returns (mapping(uint=>uint)[] storage r) { + (r,r) = (m,m); + } +} +// ---- |