Callvalue checks for implicit constructors.

This commit is contained in:
Daniel Kirchner
2020-05-11 16:14:34 +02:00
parent 4058ce8fe5
commit 79b217dfb3
8 changed files with 169 additions and 4 deletions
+5 -2
View File
@@ -157,10 +157,13 @@ void ContractCompiler::appendInitAndConstructorCode(ContractDefinition const& _c
if (FunctionDefinition const* constructor = _contract.constructor())
appendConstructor(*constructor);
else if (auto c = _contract.nextConstructor(m_context.mostDerivedContract()))
appendBaseConstructor(*c);
else
{
// Implicit constructors are always non-payable.
appendCallValueCheck();
if (auto c = _contract.nextConstructor(m_context.mostDerivedContract()))
appendBaseConstructor(*c);
}
}
size_t ContractCompiler::packIntoContractCreator(ContractDefinition const& _contract)