diff options
author | mingchuan <mingc@skymizer.com> | 2018-07-26 12:06:56 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-08-15 00:53:06 +0800 |
commit | 16de7a04935ecee9c33392965f23dcfc775b799d (patch) | |
tree | 350b9722b2352f3f17bfea9489ca5a7dc0cb358a /test/libsolidity/syntaxTests/dataLocations/privateFunction | |
parent | b000a022f2d7c1057ade755ed1ea8c70380688a5 (diff) | |
download | dexon-solidity-16de7a04935ecee9c33392965f23dcfc775b799d.tar dexon-solidity-16de7a04935ecee9c33392965f23dcfc775b799d.tar.gz dexon-solidity-16de7a04935ecee9c33392965f23dcfc775b799d.tar.bz2 dexon-solidity-16de7a04935ecee9c33392965f23dcfc775b799d.tar.lz dexon-solidity-16de7a04935ecee9c33392965f23dcfc775b799d.tar.xz dexon-solidity-16de7a04935ecee9c33392965f23dcfc775b799d.tar.zst dexon-solidity-16de7a04935ecee9c33392965f23dcfc775b799d.zip |
New test cases.
Diffstat (limited to 'test/libsolidity/syntaxTests/dataLocations/privateFunction')
2 files changed, 10 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/dataLocations/privateFunction/private_function_parameters_no_data_location.sol b/test/libsolidity/syntaxTests/dataLocations/privateFunction/private_function_parameters_no_data_location.sol new file mode 100644 index 00000000..2f4e2a34 --- /dev/null +++ b/test/libsolidity/syntaxTests/dataLocations/privateFunction/private_function_parameters_no_data_location.sol @@ -0,0 +1,5 @@ +contract C { + function f(uint[]) private pure {} +} +// ---- +// TypeError: (28-34): Storage location must be "storage" or "memory" for parameter in private function, but none was given. diff --git a/test/libsolidity/syntaxTests/dataLocations/privateFunction/private_function_return_parameters_no_data_location.sol b/test/libsolidity/syntaxTests/dataLocations/privateFunction/private_function_return_parameters_no_data_location.sol new file mode 100644 index 00000000..5356f944 --- /dev/null +++ b/test/libsolidity/syntaxTests/dataLocations/privateFunction/private_function_return_parameters_no_data_location.sol @@ -0,0 +1,5 @@ +contract C { + function f() private pure returns(uint[]) {} +} +// ---- +// TypeError: (51-57): Storage location must be "storage" or "memory" for parameter in private function, but none was given. |