Do not handle balance member of contract types specially.

This commit is contained in:
chriseth 2018-07-20 10:50:05 +02:00 committed by GitHub
parent e3c2f20f6e
commit 3fa0ac5822
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -287,9 +287,8 @@ void ViewPureChecker::endVisit(MemberAccess const& _memberAccess)
ASTString const& member = _memberAccess.memberName(); ASTString const& member = _memberAccess.memberName();
switch (_memberAccess.expression().annotation().type->category()) switch (_memberAccess.expression().annotation().type->category())
{ {
case Type::Category::Contract:
case Type::Category::Integer: case Type::Category::Integer:
if (member == "balance" && !_memberAccess.annotation().referencedDeclaration) if (member == "balance")
mutability = StateMutability::View; mutability = StateMutability::View;
break; break;
case Type::Category::Magic: case Type::Category::Magic: