Merge pull request #9776 from ethereum/reportUnimplemented

Sol->Yul: Report source locations related to unimplemented features.
This commit is contained in:
chriseth
2020-09-15 18:46:45 +02:00
committed by GitHub
12 changed files with 212 additions and 49 deletions
@@ -54,6 +54,12 @@ bytes SolidityExecutionFramework::multiSourceCompileContract(
m_compiler.setRevertStringBehaviour(m_revertStrings);
if (!m_compiler.compile())
{
// The testing framework expects an exception for
// "unimplemented" yul IR generation.
if (m_compileViaYul)
for (auto const& error: m_compiler.errors())
if (error->type() == langutil::Error::Type::CodeGenerationError)
BOOST_THROW_EXCEPTION(*error);
langutil::SourceReferenceFormatter formatter(std::cerr);
for (auto const& error: m_compiler.errors())