mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Change function type to include and propagate payable and constant modifier.
This commit is contained in:
@@ -242,6 +242,12 @@ void ContractCompiler::appendFunctionSelector(ContractDefinition const& _contrac
|
||||
m_context << notFound;
|
||||
if (fallback)
|
||||
{
|
||||
if (!fallback->isPayable())
|
||||
{
|
||||
// Throw if function is not payable but call contained ether.
|
||||
m_context << Instruction::CALLVALUE;
|
||||
m_context.appendConditionalJumpTo(m_context.errorTag());
|
||||
}
|
||||
eth::AssemblyItem returnTag = m_context.pushNewTag();
|
||||
fallback->accept(*this);
|
||||
m_context << returnTag;
|
||||
|
||||
Reference in New Issue
Block a user