aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/ast
diff options
context:
space:
mode:
Diffstat (limited to 'libsolidity/ast')
-rw-r--r--libsolidity/ast/AST.h1
-rw-r--r--libsolidity/ast/Types.cpp4
2 files changed, 3 insertions, 2 deletions
diff --git a/libsolidity/ast/AST.h b/libsolidity/ast/AST.h
index 863ad2fe..a25df64b 100644
--- a/libsolidity/ast/AST.h
+++ b/libsolidity/ast/AST.h
@@ -203,6 +203,7 @@ public:
bool isPublic() const { return visibility() >= Visibility::Public; }
virtual bool isVisibleInContract() const { return visibility() != Visibility::External; }
bool isVisibleInDerivedContracts() const { return isVisibleInContract() && visibility() >= Visibility::Internal; }
+ bool isVisibleAsLibraryMember() const { return visibility() >= Visibility::Internal; }
std::string fullyQualifiedName() const { return sourceUnitName() + ":" + name(); }
diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp
index c08e0e67..b2881bea 100644
--- a/libsolidity/ast/Types.cpp
+++ b/libsolidity/ast/Types.cpp
@@ -304,7 +304,7 @@ MemberList::MemberMap Type::boundFunctions(Type const& _type, ContractDefinition
);
for (FunctionDefinition const* function: library.definedFunctions())
{
- if (!function->isVisibleInDerivedContracts() || seenFunctions.count(function))
+ if (!function->isVisibleAsLibraryMember() || seenFunctions.count(function))
continue;
seenFunctions.insert(function);
FunctionType funType(*function, false);
@@ -2875,7 +2875,7 @@ MemberList::MemberMap TypeType::nativeMembers(ContractDefinition const* _current
}
if (contract.isLibrary())
for (FunctionDefinition const* function: contract.definedFunctions())
- if (function->isVisibleInDerivedContracts())
+ if (function->isVisibleAsLibraryMember())
members.push_back(MemberList::Member(
function->name(),
FunctionType(*function).asMemberFunction(true),