aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/functionTypes/external_function_to_function_type_calldata_parameter.sol
diff options
context:
space:
mode:
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.sol9
1 files changed, 6 insertions, 3 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
index cbf90e40..eb4f0693 100644
--- 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
@@ -1,7 +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) external g) public { }
- function callback(bytes) external {}
- function g() public {
+ function f(function(bytes memory) pure external /*g*/) pure public { }
+ function callback(bytes) pure external {}
+ function g() view public {
f(this.callback);
}
}