From fdd1108c1c2e316d143f44d048f1686be2e2eb3a Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Fri, 14 Oct 2016 19:30:38 +0100 Subject: Omit non-convertible bound functions --- libsolidity/ast/Types.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp index 5d3d4f1a..068cc138 100644 --- a/libsolidity/ast/Types.cpp +++ b/libsolidity/ast/Types.cpp @@ -241,7 +241,8 @@ MemberList::MemberMap Type::boundFunctions(Type const& _type, ContractDefinition seenFunctions.insert(function); FunctionType funType(*function, false); if (auto fun = funType.asMemberFunction(true, true)) - members.push_back(MemberList::Member(function->name(), fun, function)); + if (_type.isImplicitlyConvertibleTo(*fun->selfType())) + members.push_back(MemberList::Member(function->name(), fun, function)); } } return members; -- cgit