Fix dependency tracking for abstract contracts

This commit is contained in:
Mathias Baumann
2020-10-15 11:05:04 +02:00
parent 8d241fece9
commit 2a3a8b54dd
3 changed files with 46 additions and 1 deletions
+5 -1
View File
@@ -1151,11 +1151,15 @@ void CompilerStack::compileContract(
if (m_hasError)
BOOST_THROW_EXCEPTION(CompilerError() << errinfo_comment("Called compile with errors."));
if (_otherCompilers.count(&_contract) || !_contract.canBeDeployed())
if (_otherCompilers.count(&_contract))
return;
for (auto const* dependency: _contract.annotation().contractDependencies)
compileContract(*dependency, _otherCompilers);
if (!_contract.canBeDeployed())
return;
Contract& compiledContract = m_contracts.at(_contract.fullyQualifiedName());
shared_ptr<Compiler> compiler = make_shared<Compiler>(m_evmVersion, m_revertStrings, m_optimiserSettings);