mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add type error when attempting value transfer to a non-payable contract
This commit is contained in:
@@ -1230,6 +1230,12 @@ bool ContractType::isExplicitlyConvertibleTo(Type const& _convertTo) const
|
||||
_convertTo.category() == Category::Contract;
|
||||
}
|
||||
|
||||
bool ContractType::isPayable() const
|
||||
{
|
||||
auto fallbackFunction = m_contract.fallbackFunction();
|
||||
return fallbackFunction && fallbackFunction->isPayable();
|
||||
}
|
||||
|
||||
TypePointer ContractType::unaryOperatorResult(Token::Value _operator) const
|
||||
{
|
||||
return _operator == Token::Delete ? make_shared<TupleType>() : TypePointer();
|
||||
|
||||
Reference in New Issue
Block a user