Change function type to include and propagate payable and constant modifier.

This commit is contained in:
chriseth
2016-09-05 21:28:28 +02:00
parent 962531af96
commit 9c64edf110
8 changed files with 123 additions and 62 deletions
+6
View File
@@ -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;