mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Rename 'asMemberFunction' to widen its purpose.
This commit is contained in:
@@ -443,7 +443,7 @@ MemberList::MemberMap Type::boundFunctions(Type const& _type, ContractDefinition
|
||||
continue;
|
||||
seenFunctions.insert(function);
|
||||
FunctionType funType(*function, false);
|
||||
if (auto fun = funType.asMemberFunction(true, true))
|
||||
if (auto fun = funType.asCallableFunction(true, true))
|
||||
if (_type.isImplicitlyConvertibleTo(*fun->selfType()))
|
||||
members.push_back(MemberList::Member(function->name(), fun, function));
|
||||
}
|
||||
@@ -1970,7 +1970,7 @@ MemberList::MemberMap ContractType::nativeMembers(ContractDefinition const* _con
|
||||
for (auto const& it: m_contract.interfaceFunctions())
|
||||
members.push_back(MemberList::Member(
|
||||
it.second->declaration().name(),
|
||||
it.second->asMemberFunction(m_contract.isLibrary()),
|
||||
it.second->asCallableFunction(m_contract.isLibrary()),
|
||||
&it.second->declaration()
|
||||
));
|
||||
}
|
||||
@@ -3059,7 +3059,7 @@ TypePointer FunctionType::copyAndSetGasOrValue(bool _setGas, bool _setValue) con
|
||||
);
|
||||
}
|
||||
|
||||
FunctionTypePointer FunctionType::asMemberFunction(bool _inLibrary, bool _bound) const
|
||||
FunctionTypePointer FunctionType::asCallableFunction(bool _inLibrary, bool _bound) const
|
||||
{
|
||||
if (_bound && m_parameterTypes.empty())
|
||||
return FunctionTypePointer();
|
||||
@@ -3201,7 +3201,7 @@ MemberList::MemberMap TypeType::nativeMembers(ContractDefinition const* _current
|
||||
if (function->isVisibleAsLibraryMember())
|
||||
members.push_back(MemberList::Member(
|
||||
function->name(),
|
||||
FunctionType(*function).asMemberFunction(true),
|
||||
FunctionType(*function).asCallableFunction(true),
|
||||
function
|
||||
));
|
||||
if (isBase)
|
||||
|
||||
Reference in New Issue
Block a user