mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
changed checking for external type in VariableDeclaration::checkTypeRequirements()
changed error msg
This commit is contained in:
parent
8a94b58e48
commit
9d734e03fd
@ -460,7 +460,7 @@ BOOST_AUTO_TEST_CASE(function_external_types)
|
|||||||
uint a;
|
uint a;
|
||||||
}
|
}
|
||||||
contract Test {
|
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;
|
ret = 5;
|
||||||
}
|
}
|
||||||
})";
|
})";
|
||||||
@ -471,7 +471,7 @@ BOOST_AUTO_TEST_CASE(function_external_types)
|
|||||||
auto functions = contract->getDefinedFunctions();
|
auto functions = contract->getDefinedFunctions();
|
||||||
if (functions.empty())
|
if (functions.empty())
|
||||||
continue;
|
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);
|
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)
|
BOOST_AUTO_TEST_CASE(function_internal_allowed_conversion)
|
||||||
{
|
{
|
||||||
char const* text = R"(
|
char const* text = R"(
|
||||||
|
Loading…
Reference in New Issue
Block a user