diff options
author | chriseth <chris@ethereum.org> | 2018-07-20 19:45:43 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-20 19:45:43 +0800 |
commit | beb66db66feda8ef59176069eea393aa5884c5da (patch) | |
tree | 7dbc2b0a46f2a6da6d8d373d16efb2155ca61f0e | |
parent | 9697b5886eac6b4473edd2b883002a2c1242486b (diff) | |
parent | 3fa0ac5822f9920e9e75a3786189eb10edc4c39c (diff) | |
download | dexon-solidity-beb66db66feda8ef59176069eea393aa5884c5da.tar dexon-solidity-beb66db66feda8ef59176069eea393aa5884c5da.tar.gz dexon-solidity-beb66db66feda8ef59176069eea393aa5884c5da.tar.bz2 dexon-solidity-beb66db66feda8ef59176069eea393aa5884c5da.tar.lz dexon-solidity-beb66db66feda8ef59176069eea393aa5884c5da.tar.xz dexon-solidity-beb66db66feda8ef59176069eea393aa5884c5da.tar.zst dexon-solidity-beb66db66feda8ef59176069eea393aa5884c5da.zip |
Merge pull request #4534 from ethereum/chriseth-patch-1
Do not handle `balance` member of contract types specially.
-rw-r--r-- | libsolidity/analysis/ViewPureChecker.cpp | 3 |
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: |