diff options
author | Paweł Bylica <chfast@gmail.com> | 2015-04-03 18:23:58 +0800 |
---|---|---|
committer | Paweł Bylica <chfast@gmail.com> | 2015-04-03 18:23:58 +0800 |
commit | fc3ea6aa6cc4e7eb740ec0fb1c329b1fca1d372c (patch) | |
tree | 4462ff4bc82edef5a71db16c518c026dae7de4fa /SolidityNameAndTypeResolution.cpp | |
parent | 7fb437d0da0819c034b659f7a8ce4f35dd2a8b69 (diff) | |
parent | 2ad1be6eee882a20ad78e9ff1e6d9b113b7ffcc8 (diff) | |
download | dexon-solidity-fc3ea6aa6cc4e7eb740ec0fb1c329b1fca1d372c.tar dexon-solidity-fc3ea6aa6cc4e7eb740ec0fb1c329b1fca1d372c.tar.gz dexon-solidity-fc3ea6aa6cc4e7eb740ec0fb1c329b1fca1d372c.tar.bz2 dexon-solidity-fc3ea6aa6cc4e7eb740ec0fb1c329b1fca1d372c.tar.lz dexon-solidity-fc3ea6aa6cc4e7eb740ec0fb1c329b1fca1d372c.tar.xz dexon-solidity-fc3ea6aa6cc4e7eb740ec0fb1c329b1fca1d372c.tar.zst dexon-solidity-fc3ea6aa6cc4e7eb740ec0fb1c329b1fca1d372c.zip |
Merge remote-tracking branch 'upstream/develop' into evmjit
Diffstat (limited to 'SolidityNameAndTypeResolution.cpp')
-rw-r--r-- | SolidityNameAndTypeResolution.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/SolidityNameAndTypeResolution.cpp b/SolidityNameAndTypeResolution.cpp index ddcf3614..531f3bc1 100644 --- a/SolidityNameAndTypeResolution.cpp +++ b/SolidityNameAndTypeResolution.cpp @@ -460,7 +460,7 @@ BOOST_AUTO_TEST_CASE(function_external_types) uint a; } contract Test { - function boo(uint arg2, bool arg3, bytes8 arg4, bool[2] pairs, uint[] dynamic, C carg) external returns (uint ret) { + function boo(uint arg2, bool arg3, bytes8 arg4, bool[2] pairs, uint[] dynamic, C carg, address[] addresses) external returns (uint ret) { ret = 5; } })"; @@ -471,7 +471,7 @@ BOOST_AUTO_TEST_CASE(function_external_types) auto functions = contract->getDefinedFunctions(); if (functions.empty()) continue; - BOOST_CHECK_EQUAL("boo(uint256,bool,bytes8,bool[2],uint256[],address)", functions[0]->externalSignature()); + BOOST_CHECK_EQUAL("boo(uint256,bool,bytes8,bool[2],uint256[],address,address[])", functions[0]->externalSignature()); } } @@ -503,6 +503,16 @@ BOOST_AUTO_TEST_CASE(function_external_call_not_allowed_conversion) BOOST_CHECK_THROW(parseTextAndResolveNames(text), TypeError); } +// todo delete when implemented +BOOST_AUTO_TEST_CASE(arrays_in_internal_functions) +{ + char const* text = R"( + contract Test { + function foo(address[] addresses) {} + })"; + BOOST_CHECK_THROW(parseTextAndResolveNames(text), TypeError); +} + BOOST_AUTO_TEST_CASE(function_internal_allowed_conversion) { char const* text = R"( |