analysis: determine if a member access on a contract is an l-value

This commit is contained in:
Yoichi Hirai 2016-10-24 19:22:09 +02:00
parent 58477c233d
commit 59f6c18c2b
No known key found for this signature in database
GPG Key ID: E7B75D080FCF7992

View File

@ -1376,6 +1376,11 @@ bool TypeChecker::visit(MemberAccess const& _memberAccess)
}
else if (exprType->category() == Type::Category::FixedBytes)
annotation.isLValue = false;
else if (TypeType const* typeType = dynamic_cast<decltype(typeType)>(exprType.get()))
{
if (ContractType const* contractType = dynamic_cast<decltype(contractType)>(typeType->actualType().get()))
annotation.isLValue = annotation.referencedDeclaration->isLValue();
}
return false;
}