mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge remote-tracking branch 'origin/develop' into develop_060
This commit is contained in:
@@ -3411,6 +3411,15 @@ MemberList::MemberMap TypeType::nativeMembers(ContractDefinition const* _current
|
||||
return members;
|
||||
}
|
||||
|
||||
BoolResult TypeType::isExplicitlyConvertibleTo(Type const& _convertTo) const
|
||||
{
|
||||
if (auto const* address = dynamic_cast<AddressType const*>(&_convertTo))
|
||||
if (address->stateMutability() == StateMutability::NonPayable)
|
||||
if (auto const* contractType = dynamic_cast<ContractType const*>(m_actualType))
|
||||
return contractType->contractDefinition().isLibrary();
|
||||
return isImplicitlyConvertibleTo(_convertTo);
|
||||
}
|
||||
|
||||
ModifierType::ModifierType(ModifierDefinition const& _modifier)
|
||||
{
|
||||
TypePointers params;
|
||||
|
||||
@@ -1317,6 +1317,7 @@ public:
|
||||
std::string toString(bool _short) const override { return "type(" + m_actualType->toString(_short) + ")"; }
|
||||
MemberList::MemberMap nativeMembers(ContractDefinition const* _currentScope) const override;
|
||||
|
||||
BoolResult isExplicitlyConvertibleTo(Type const& _convertTo) const override;
|
||||
private:
|
||||
TypePointer m_actualType;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user