mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
test: add a test about external function type taking/returning internal functions
This commit is contained in:
parent
e51f852504
commit
f3d0433ec3
@ -4215,6 +4215,26 @@ BOOST_AUTO_TEST_CASE(call_value_on_non_payable_function_type)
|
|||||||
BOOST_CHECK(expectError(text) == Error::Type::TypeError);
|
BOOST_CHECK(expectError(text) == Error::Type::TypeError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BOOST_AUTO_TEST_CASE(external_function_type_returning_internal)
|
||||||
|
{
|
||||||
|
char const* text = R"(
|
||||||
|
contract C {
|
||||||
|
function() external returns (function () internal) x;
|
||||||
|
}
|
||||||
|
)";
|
||||||
|
BOOST_CHECK(expectError(text) == Error::Type::TypeError);
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOST_AUTO_TEST_CASE(external_function_type_taking_internal)
|
||||||
|
{
|
||||||
|
char const* text = R"(
|
||||||
|
contract C {
|
||||||
|
function(function () internal) external x;
|
||||||
|
}
|
||||||
|
)";
|
||||||
|
BOOST_CHECK(expectError(text) == Error::Type::TypeError);
|
||||||
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(call_value_on_payable_function_type)
|
BOOST_AUTO_TEST_CASE(call_value_on_payable_function_type)
|
||||||
{
|
{
|
||||||
char const* text = R"(
|
char const* text = R"(
|
||||||
|
Loading…
Reference in New Issue
Block a user