mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Allowing implicit conversion from calldata slice to memory and storage array types.
This commit is contained in:
parent
e3b009d6a7
commit
0efd52a38e
@ -2074,7 +2074,11 @@ std::unique_ptr<ReferenceType> ArrayType::copyForLocation(DataLocation _location
|
|||||||
|
|
||||||
BoolResult ArraySliceType::isImplicitlyConvertibleTo(Type const& _other) const
|
BoolResult ArraySliceType::isImplicitlyConvertibleTo(Type const& _other) const
|
||||||
{
|
{
|
||||||
if (m_arrayType.location() == DataLocation::CallData && m_arrayType.isDynamicallySized() && m_arrayType == _other)
|
if (
|
||||||
|
m_arrayType.dataStoredIn(DataLocation::CallData) &&
|
||||||
|
m_arrayType.isDynamicallySized() &&
|
||||||
|
m_arrayType.isImplicitlyConvertibleTo(_other)
|
||||||
|
)
|
||||||
return true;
|
return true;
|
||||||
return (*this) == _other;
|
return (*this) == _other;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user