aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/ast
diff options
context:
space:
mode:
authorLeonardo Alt <leo@ethereum.org>2018-07-05 20:46:27 +0800
committerLeonardo Alt <leo@ethereum.org>2018-07-17 20:33:23 +0800
commit0075f4239aca8c82cf110dc46ed333fdcd6dd572 (patch)
tree4e94ceaea848a9b2bb413f43691baf9113ad14e9 /libsolidity/ast
parent1d33f41c1ab96746b97b97f79732ec23759fb8f0 (diff)
downloaddexon-solidity-0075f4239aca8c82cf110dc46ed333fdcd6dd572.tar.gz
dexon-solidity-0075f4239aca8c82cf110dc46ed333fdcd6dd572.tar.zst
dexon-solidity-0075f4239aca8c82cf110dc46ed333fdcd6dd572.zip
Address members not accessible by contract instance
Diffstat (limited to 'libsolidity/ast')
-rw-r--r--libsolidity/ast/Types.cpp38
-rw-r--r--libsolidity/ast/Types.h2
2 files changed, 0 insertions, 40 deletions
diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp
index dd0736e9..2c2d3b68 100644
--- a/libsolidity/ast/Types.cpp
+++ b/libsolidity/ast/Types.cpp
@@ -1873,47 +1873,9 @@ MemberList::MemberMap ContractType::nativeMembers(ContractDefinition const* _con
&it.second->declaration()
));
}
- // In 0.5.0 address members are not populated into the contract.
- if (!_contract->sourceUnit().annotation().experimentalFeatures.count(ExperimentalFeature::V050))
- addNonConflictingAddressMembers(members);
return members;
}
-void ContractType::addNonConflictingAddressMembers(MemberList::MemberMap& _members)
-{
- MemberList::MemberMap addressMembers = IntegerType(160, IntegerType::Modifier::Address).nativeMembers(nullptr);
- for (auto const& addressMember: addressMembers)
- {
- bool clash = false;
- for (auto const& member: _members)
- {
- if (
- member.name == addressMember.name &&
- (
- // Members with different types are not allowed
- member.type->category() != addressMember.type->category() ||
- // Members must overload functions without clash
- (
- member.type->category() == Type::Category::Function &&
- dynamic_cast<FunctionType const&>(*member.type).hasEqualArgumentTypes(dynamic_cast<FunctionType const&>(*addressMember.type))
- )
- )
- )
- {
- clash = true;
- break;
- }
- }
-
- if (!clash)
- _members.push_back(MemberList::Member(
- addressMember.name,
- addressMember.type,
- addressMember.declaration
- ));
- }
-}
-
shared_ptr<FunctionType const> const& ContractType::newExpressionType() const
{
if (!m_constructorType)
diff --git a/libsolidity/ast/Types.h b/libsolidity/ast/Types.h
index 135f4a0e..1a676b42 100644
--- a/libsolidity/ast/Types.h
+++ b/libsolidity/ast/Types.h
@@ -740,8 +740,6 @@ public:
std::vector<std::tuple<VariableDeclaration const*, u256, unsigned>> stateVariables() const;
private:
- static void addNonConflictingAddressMembers(MemberList::MemberMap& _members);
-
ContractDefinition const& m_contract;
/// If true, it is the "super" type of the current contract, i.e. it contains only inherited
/// members.