diff options
author | chriseth <chris@ethereum.org> | 2018-11-30 16:26:08 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-30 16:26:08 +0800 |
commit | d6d41b2bc7040bbae8d4d3b3522d637e37836a1d (patch) | |
tree | 4ce4bc3cf84ba8c67d288a3d45f2edd7f86ca52d /libsolidity | |
parent | a7ca4991df9fce4a27a402e9ab02bfb0c9b25910 (diff) | |
parent | 73a64da041efb2b64b1c89ed6012161cb278e24e (diff) | |
download | dexon-solidity-d6d41b2bc7040bbae8d4d3b3522d637e37836a1d.tar dexon-solidity-d6d41b2bc7040bbae8d4d3b3522d637e37836a1d.tar.gz dexon-solidity-d6d41b2bc7040bbae8d4d3b3522d637e37836a1d.tar.bz2 dexon-solidity-d6d41b2bc7040bbae8d4d3b3522d637e37836a1d.tar.lz dexon-solidity-d6d41b2bc7040bbae8d4d3b3522d637e37836a1d.tar.xz dexon-solidity-d6d41b2bc7040bbae8d4d3b3522d637e37836a1d.tar.zst dexon-solidity-d6d41b2bc7040bbae8d4d3b3522d637e37836a1d.zip |
Merge pull request #5548 from ethereum/fixMemberAccess
Fix bug related to state variables of function type accessed via base contract.
Diffstat (limited to 'libsolidity')
-rw-r--r-- | libsolidity/codegen/ExpressionCompiler.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libsolidity/codegen/ExpressionCompiler.cpp b/libsolidity/codegen/ExpressionCompiler.cpp index 87eecd2e..121585d9 100644 --- a/libsolidity/codegen/ExpressionCompiler.cpp +++ b/libsolidity/codegen/ExpressionCompiler.cpp @@ -1153,7 +1153,9 @@ bool ExpressionCompiler::visit(MemberAccess const& _memberAccess) if (dynamic_cast<ContractType const*>(type->actualType().get())) { solAssert(_memberAccess.annotation().type, "_memberAccess has no type"); - if (auto funType = dynamic_cast<FunctionType const*>(_memberAccess.annotation().type.get())) + if (auto variable = dynamic_cast<VariableDeclaration const*>(_memberAccess.annotation().referencedDeclaration)) + appendVariable(*variable, static_cast<Expression const&>(_memberAccess)); + else if (auto funType = dynamic_cast<FunctionType const*>(_memberAccess.annotation().type.get())) { switch (funType->kind()) { @@ -1199,8 +1201,6 @@ bool ExpressionCompiler::visit(MemberAccess const& _memberAccess) { // no-op } - else if (auto variable = dynamic_cast<VariableDeclaration const*>(_memberAccess.annotation().referencedDeclaration)) - appendVariable(*variable, static_cast<Expression const&>(_memberAccess)); else _memberAccess.expression().accept(*this); } |