mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Split fallback function and introduce "fallback()" and "receive()" syntax.
This commit is contained in:
@@ -1462,8 +1462,9 @@ BoolResult ContractType::isExplicitlyConvertibleTo(Type const& _convertTo) const
|
||||
|
||||
bool ContractType::isPayable() const
|
||||
{
|
||||
auto receiveFunction = m_contract.receiveFunction();
|
||||
auto fallbackFunction = m_contract.fallbackFunction();
|
||||
return fallbackFunction && fallbackFunction->isPayable();
|
||||
return receiveFunction || (fallbackFunction && fallbackFunction->isPayable());
|
||||
}
|
||||
|
||||
TypeResult ContractType::unaryOperatorResult(Token _operator) const
|
||||
|
||||
Reference in New Issue
Block a user