diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2016-10-15 02:30:38 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2016-10-19 17:41:04 +0800 |
commit | fdd1108c1c2e316d143f44d048f1686be2e2eb3a (patch) | |
tree | 2c0bfbf9bc2adce8138f20cf3fc2730a7f689a84 /libsolidity | |
parent | 003359a0b651b78809c37a3b0b96d0a7ff7131d6 (diff) | |
download | dexon-solidity-fdd1108c1c2e316d143f44d048f1686be2e2eb3a.tar dexon-solidity-fdd1108c1c2e316d143f44d048f1686be2e2eb3a.tar.gz dexon-solidity-fdd1108c1c2e316d143f44d048f1686be2e2eb3a.tar.bz2 dexon-solidity-fdd1108c1c2e316d143f44d048f1686be2e2eb3a.tar.lz dexon-solidity-fdd1108c1c2e316d143f44d048f1686be2e2eb3a.tar.xz dexon-solidity-fdd1108c1c2e316d143f44d048f1686be2e2eb3a.tar.zst dexon-solidity-fdd1108c1c2e316d143f44d048f1686be2e2eb3a.zip |
Omit non-convertible bound functions
Diffstat (limited to 'libsolidity')
-rw-r--r-- | libsolidity/ast/Types.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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; |