diff options
author | Liana Husikyan <liana@ethdev.com> | 2015-03-30 20:34:38 +0800 |
---|---|---|
committer | Liana Husikyan <liana@ethdev.com> | 2015-04-01 21:21:17 +0800 |
commit | 9d734e03fd085a3cbd1a403bd63e51da19e165b5 (patch) | |
tree | 9b2e2c7a4bdf9c15d30b6f19ce3e98460f6bdb7d /SolidityNameAndTypeResolution.cpp | |
parent | 8a94b58e4805598ad285866646711506d1681d1a (diff) | |
download | dexon-solidity-9d734e03fd085a3cbd1a403bd63e51da19e165b5.tar dexon-solidity-9d734e03fd085a3cbd1a403bd63e51da19e165b5.tar.gz dexon-solidity-9d734e03fd085a3cbd1a403bd63e51da19e165b5.tar.bz2 dexon-solidity-9d734e03fd085a3cbd1a403bd63e51da19e165b5.tar.lz dexon-solidity-9d734e03fd085a3cbd1a403bd63e51da19e165b5.tar.xz dexon-solidity-9d734e03fd085a3cbd1a403bd63e51da19e165b5.tar.zst dexon-solidity-9d734e03fd085a3cbd1a403bd63e51da19e165b5.zip |
changed checking for external type in VariableDeclaration::checkTypeRequirements()
changed error msg
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"( |