From 09276cb9d3589493176bc45b2075517c2087d75b Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Wed, 27 Sep 2017 14:11:44 +0100 Subject: Do not add members of address to contracts in experimental 0.5.0 --- libsolidity/ast/Types.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'libsolidity/ast') diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp index a3cbe50a..ff5195ff 100644 --- a/libsolidity/ast/Types.cpp +++ b/libsolidity/ast/Types.cpp @@ -1616,9 +1616,10 @@ string ContractType::canonicalName() const return m_contract.annotation().canonicalName; } -MemberList::MemberMap ContractType::nativeMembers(ContractDefinition const*) const +MemberList::MemberMap ContractType::nativeMembers(ContractDefinition const* _contract) const { MemberList::MemberMap members; + solAssert(_contract, ""); if (m_super) { // add the most derived of all functions which are visible in derived contracts @@ -1660,7 +1661,9 @@ MemberList::MemberMap ContractType::nativeMembers(ContractDefinition const*) con &it.second->declaration() )); } - addNonConflictingAddressMembers(members); + // In 0.5.0 address members are not populated into the contract. + if (!_contract->sourceUnit().annotation().experimentalFeatures.count(ExperimentalFeature::V050)) + addNonConflictingAddressMembers(members); return members; } -- cgit