diff options
author | mingchuan <mingc@skymizer.com> | 2018-05-23 12:31:20 +0800 |
---|---|---|
committer | mingchuan <mingc@skymizer.com> | 2018-05-30 18:05:55 +0800 |
commit | b7cafcbdf95c807f46fc07f4788d82981b7112b4 (patch) | |
tree | 5714a463da64eaf75a3ec56732165ec89e77d677 /test/libsolidity/syntaxTests/dataLocations/externalFunction | |
parent | 9d5064d04d178474b95d67e87aaa32d0e5e03b0f (diff) | |
download | dexon-solidity-b7cafcbdf95c807f46fc07f4788d82981b7112b4.tar dexon-solidity-b7cafcbdf95c807f46fc07f4788d82981b7112b4.tar.gz dexon-solidity-b7cafcbdf95c807f46fc07f4788d82981b7112b4.tar.bz2 dexon-solidity-b7cafcbdf95c807f46fc07f4788d82981b7112b4.tar.lz dexon-solidity-b7cafcbdf95c807f46fc07f4788d82981b7112b4.tar.xz dexon-solidity-b7cafcbdf95c807f46fc07f4788d82981b7112b4.tar.zst dexon-solidity-b7cafcbdf95c807f46fc07f4788d82981b7112b4.zip |
Allow using `calldata` keyword to specify data location
Diffstat (limited to 'test/libsolidity/syntaxTests/dataLocations/externalFunction')
3 files changed, 14 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/dataLocations/externalFunction/function_argument_location_specifier_test_external_calldata.sol b/test/libsolidity/syntaxTests/dataLocations/externalFunction/function_argument_location_specifier_test_external_calldata.sol new file mode 100644 index 00000000..781c645a --- /dev/null +++ b/test/libsolidity/syntaxTests/dataLocations/externalFunction/function_argument_location_specifier_test_external_calldata.sol @@ -0,0 +1,4 @@ +contract test { + function f(bytes calldata) external; +} +// ---- diff --git a/test/libsolidity/syntaxTests/dataLocations/externalFunction/function_argument_location_specifier_test_external_memory.sol b/test/libsolidity/syntaxTests/dataLocations/externalFunction/function_argument_location_specifier_test_external_memory.sol new file mode 100644 index 00000000..807cc064 --- /dev/null +++ b/test/libsolidity/syntaxTests/dataLocations/externalFunction/function_argument_location_specifier_test_external_memory.sol @@ -0,0 +1,5 @@ +contract test { + function f(bytes memory) external; +} +// ---- +// TypeError: (31-36): Location has to be calldata for external functions (remove the "memory" or "storage" keyword). diff --git a/test/libsolidity/syntaxTests/dataLocations/externalFunction/function_argument_location_specifier_test_external_storage.sol b/test/libsolidity/syntaxTests/dataLocations/externalFunction/function_argument_location_specifier_test_external_storage.sol new file mode 100644 index 00000000..2664dbab --- /dev/null +++ b/test/libsolidity/syntaxTests/dataLocations/externalFunction/function_argument_location_specifier_test_external_storage.sol @@ -0,0 +1,5 @@ +contract test { + function f(bytes storage) external; +} +// ---- +// TypeError: (31-36): Location has to be calldata for external functions (remove the "memory" or "storage" keyword). |