aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/analysis
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-07-20 16:50:05 +0800
committerGitHub <noreply@github.com>2018-07-20 16:50:05 +0800
commit3fa0ac5822f9920e9e75a3786189eb10edc4c39c (patch)
treecc5f53c54929069543760bcaab1cbb60f1c17d74 /libsolidity/analysis
parente3c2f20f6e8c7919a6733fa736a3a222028f213c (diff)
downloaddexon-solidity-3fa0ac5822f9920e9e75a3786189eb10edc4c39c.tar.gz
dexon-solidity-3fa0ac5822f9920e9e75a3786189eb10edc4c39c.tar.zst
dexon-solidity-3fa0ac5822f9920e9e75a3786189eb10edc4c39c.zip
Do not handle `balance` member of contract types specially.
Diffstat (limited to 'libsolidity/analysis')
-rw-r--r--libsolidity/analysis/ViewPureChecker.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/libsolidity/analysis/ViewPureChecker.cpp b/libsolidity/analysis/ViewPureChecker.cpp
index 18c642c3..d936ada0 100644
--- a/libsolidity/analysis/ViewPureChecker.cpp
+++ b/libsolidity/analysis/ViewPureChecker.cpp
@@ -287,9 +287,8 @@ void ViewPureChecker::endVisit(MemberAccess const& _memberAccess)
ASTString const& member = _memberAccess.memberName();
switch (_memberAccess.expression().annotation().type->category())
{
- case Type::Category::Contract:
case Type::Category::Integer:
- if (member == "balance" && !_memberAccess.annotation().referencedDeclaration)
+ if (member == "balance")
mutability = StateMutability::View;
break;
case Type::Category::Magic: