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-04-12 04:25:36 +0800
committerGitHub <noreply@github.com>2018-04-12 04:25:36 +0800
commitee5d0ef79bee71a47249ed36081738dd34707900 (patch)
treefcc1d4e910eef36fef15fca3e036f3039146450c /test/libsolidity/syntaxTests/functionTypes/external_function_to_function_type_calldata_parameter.sol
parent7626c8ab7276266c3721310d41455c393d1ee888 (diff)
parentb5a696ad48780bf0614eef2a737a2e89963d4640 (diff)
downloaddexon-solidity-ee5d0ef79bee71a47249ed36081738dd34707900.tar
dexon-solidity-ee5d0ef79bee71a47249ed36081738dd34707900.tar.gz
dexon-solidity-ee5d0ef79bee71a47249ed36081738dd34707900.tar.bz2
dexon-solidity-ee5d0ef79bee71a47249ed36081738dd34707900.tar.lz
dexon-solidity-ee5d0ef79bee71a47249ed36081738dd34707900.tar.xz
dexon-solidity-ee5d0ef79bee71a47249ed36081738dd34707900.tar.zst
dexon-solidity-ee5d0ef79bee71a47249ed36081738dd34707900.zip
Merge pull request #3752 from ethereum/fixStateVariableParsing
Fix state variable parsing
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.sol10
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);
+ }
+}