diff options
Diffstat (limited to 'test/libsolidity/syntaxTests/functionTypes/external_function_to_function_type_calldata_parameter.sol')
-rw-r--r-- | test/libsolidity/syntaxTests/functionTypes/external_function_to_function_type_calldata_parameter.sol | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/functionTypes/external_function_to_function_type_calldata_parameter.sol b/test/libsolidity/syntaxTests/functionTypes/external_function_to_function_type_calldata_parameter.sol new file mode 100644 index 00000000..eb4f0693 --- /dev/null +++ b/test/libsolidity/syntaxTests/functionTypes/external_function_to_function_type_calldata_parameter.sol @@ -0,0 +1,10 @@ +// This is a test that checks that the type of the `bytes` parameter is +// correctly changed from its own type `bytes calldata` to `bytes memory` +// when converting to a function type. +contract C { + function f(function(bytes memory) pure external /*g*/) pure public { } + function callback(bytes) pure external {} + function g() view public { + f(this.callback); + } +} |