diff options
author | Christian <c@ethdev.com> | 2015-02-14 07:43:02 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2015-02-17 02:24:07 +0800 |
commit | 3e29ec2cb2075fc6734a0f350503c393fbeeb3d6 (patch) | |
tree | 21012d2ea633c1473d057daea4f3b4ff7e60a574 /Types.cpp | |
parent | 500cb69f12a1e048258b1ebb9fa5ea858433ffff (diff) | |
download | dexon-solidity-3e29ec2cb2075fc6734a0f350503c393fbeeb3d6.tar.gz dexon-solidity-3e29ec2cb2075fc6734a0f350503c393fbeeb3d6.tar.zst dexon-solidity-3e29ec2cb2075fc6734a0f350503c393fbeeb3d6.zip |
"external" visibility specifier.
Diffstat (limited to 'Types.cpp')
-rw-r--r-- | Types.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -572,7 +572,8 @@ MemberList const& ContractType::getMembers() const { for (ContractDefinition const* base: m_contract.getLinearizedBaseContracts()) for (ASTPointer<FunctionDefinition> const& function: base->getDefinedFunctions()) - if (!function->isConstructor() && !function->getName().empty()) + if (!function->isConstructor() && !function->getName().empty() && + function->isVisibleInDerivedContracts()) members.insert(make_pair(function->getName(), make_shared<FunctionType>(*function, true))); } else @@ -957,10 +958,10 @@ MemberList const& TypeType::getMembers() const ContractDefinition const& contract = dynamic_cast<ContractType const&>(*m_actualType).getContractDefinition(); vector<ContractDefinition const*> currentBases = m_currentContract->getLinearizedBaseContracts(); if (find(currentBases.begin(), currentBases.end(), &contract) != currentBases.end()) - // We are accessing the type of a base contract, so add all public and private + // We are accessing the type of a base contract, so add all public and protected // functions. Note that this does not add inherited functions on purpose. for (ASTPointer<FunctionDefinition> const& f: contract.getDefinedFunctions()) - if (!f->isConstructor() && !f->getName().empty()) + if (!f->isConstructor() && !f->getName().empty() && f->isVisibleInDerivedContracts()) members[f->getName()] = make_shared<FunctionType>(*f); } else if (m_actualType->getCategory() == Category::Enum) |