diff --git a/AST.cpp b/AST.cpp index 2b73aab5e..cb935183f 100644 --- a/AST.cpp +++ b/AST.cpp @@ -936,8 +936,11 @@ void MemberAccess::checkTypeRequirements(TypePointers const* _argumentTypes) else if (type.getCategory() == Type::Category::Array) { auto const& arrayType(dynamic_cast(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;