mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add proper unipmlemented errors for array copying
This commit is contained in:
@@ -185,6 +185,13 @@ void ArrayUtils::copyArrayToStorage(ArrayType const& _targetType, ArrayType cons
|
||||
{
|
||||
solAssert(byteOffsetSize == 0, "Byte offset for array as base type.");
|
||||
auto const& sourceBaseArrayType = dynamic_cast<ArrayType const&>(*sourceBaseType);
|
||||
|
||||
solUnimplementedAssert(
|
||||
_sourceType.location() != DataLocation::CallData ||
|
||||
!_sourceType.isDynamicallyEncoded() ||
|
||||
!sourceBaseArrayType.isDynamicallySized(),
|
||||
"Copying nested calldata dynamic arrays to storage is not implemented in the old code generator."
|
||||
);
|
||||
_context << Instruction::DUP3;
|
||||
if (sourceBaseArrayType.location() == DataLocation::Memory)
|
||||
_context << Instruction::MLOAD;
|
||||
|
||||
Reference in New Issue
Block a user