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;
|
||||
|
||||
@@ -583,6 +583,8 @@ bool ExpressionCompiler::visit(FunctionCall const& _functionCall)
|
||||
Location::Bare,
|
||||
false,
|
||||
nullptr,
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
true
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user