mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix bug preventing overloads of different array types.
This commit is contained in:
parent
938ed70935
commit
79c5d032fe
@ -831,6 +831,8 @@ bool ArrayType::operator==(Type const& _other) const
|
||||
other.isDynamicallySized() != isDynamicallySized()
|
||||
)
|
||||
return false;
|
||||
if (*other.baseType() != *baseType())
|
||||
return false;
|
||||
return isDynamicallySized() || length() == other.length();
|
||||
}
|
||||
|
||||
|
@ -2743,6 +2743,17 @@ BOOST_AUTO_TEST_CASE(invalid_args_creating_memory_array)
|
||||
BOOST_CHECK(expectError(text) == Error::Type::TypeError);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(function_overload_array_type)
|
||||
{
|
||||
char const* text = R"(
|
||||
contract M {
|
||||
function f(uint[] values);
|
||||
function f(int[] values);
|
||||
}
|
||||
)";
|
||||
BOOST_CHECK(success(text));
|
||||
}
|
||||
|
||||
/*BOOST_AUTO_TEST_CASE(inline_array_declaration_and_passing)
|
||||
{
|
||||
char const* text = R"(
|
||||
|
Loading…
Reference in New Issue
Block a user