mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Memory arrays cannot be resized.
This commit is contained in:
parent
35540fcf2d
commit
ee7ef675c3
7
AST.cpp
7
AST.cpp
@ -936,8 +936,11 @@ void MemberAccess::checkTypeRequirements(TypePointers const* _argumentTypes)
|
||||
else if (type.getCategory() == Type::Category::Array)
|
||||
{
|
||||
auto const& arrayType(dynamic_cast<ArrayType const&>(type));
|
||||
m_isLValue = (*m_memberName == "length" &&
|
||||
arrayType.location() != DataLocation::CallData && arrayType.isDynamicallySized());
|
||||
m_isLValue = (
|
||||
*m_memberName == "length" &&
|
||||
arrayType.location() == DataLocation::Storage &&
|
||||
arrayType.isDynamicallySized()
|
||||
);
|
||||
}
|
||||
else
|
||||
m_isLValue = false;
|
||||
|
Loading…
Reference in New Issue
Block a user