aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/functionTypes/external_function_to_function_type_calldata_parameter.sol
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-03-16 18:33:05 +0800
committerchriseth <chris@ethereum.org>2018-04-12 04:00:04 +0800
commit08e807aea01a443419dc82e159776899d96441ec (patch)
tree7cf573ac419423c4297925467d17e7fff584e847 /test/libsolidity/syntaxTests/functionTypes/external_function_to_function_type_calldata_parameter.sol
parentbd27ce0e25d298e075de6c77318e7a8df2e27f6d (diff)
downloaddexon-solidity-08e807aea01a443419dc82e159776899d96441ec.tar
dexon-solidity-08e807aea01a443419dc82e159776899d96441ec.tar.gz
dexon-solidity-08e807aea01a443419dc82e159776899d96441ec.tar.bz2
dexon-solidity-08e807aea01a443419dc82e159776899d96441ec.tar.lz
dexon-solidity-08e807aea01a443419dc82e159776899d96441ec.tar.xz
dexon-solidity-08e807aea01a443419dc82e159776899d96441ec.tar.zst
dexon-solidity-08e807aea01a443419dc82e159776899d96441ec.zip
Add expectations.
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);
}
}