Memory arrays cannot be resized.

This commit is contained in:
chriseth 2015-06-29 20:05:41 +02:00
parent 35540fcf2d
commit ee7ef675c3

View File

@ -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;