mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Replace casting of external functions to address by a member named "address".
This commit is contained in:
committed by
chriseth
parent
d3ea86b052
commit
9f6fff2120
@@ -2726,8 +2726,6 @@ bool FunctionType::operator==(Type const& _other) const
|
||||
|
||||
BoolResult FunctionType::isExplicitlyConvertibleTo(Type const& _convertTo) const
|
||||
{
|
||||
if (m_kind == Kind::External && _convertTo == *TypeProvider::address())
|
||||
return true;
|
||||
return _convertTo.category() == category();
|
||||
}
|
||||
|
||||
@@ -2922,7 +2920,10 @@ MemberList::MemberMap FunctionType::nativeMembers(ContractDefinition const*) con
|
||||
{
|
||||
MemberList::MemberMap members;
|
||||
if (m_kind == Kind::External)
|
||||
{
|
||||
members.emplace_back("selector", TypeProvider::fixedBytes(4));
|
||||
members.emplace_back("address", TypeProvider::address());
|
||||
}
|
||||
if (m_kind != Kind::BareDelegateCall)
|
||||
{
|
||||
if (isPayable())
|
||||
|
||||
Reference in New Issue
Block a user