Report an error if immutables not assigned

This commit is contained in:
a3d4
2020-07-23 16:38:54 +02:00
parent 336fe94422
commit 5b54cfbed3
7 changed files with 48 additions and 8 deletions
+11 -1
View File
@@ -516,7 +516,17 @@ bool CompilerStack::compile()
if (auto contract = dynamic_cast<ContractDefinition const*>(node.get()))
if (isRequestedContract(*contract))
{
compileContract(*contract, otherCompilers);
try
{
compileContract(*contract, otherCompilers);
}
catch (Error const& _error)
{
if (_error.type() != Error::Type::CodeGenerationError)
throw;
m_errorReporter.error(_error.errorId(), _error.type(), SourceLocation(), _error.what());
return false;
}
if (m_generateIR || m_generateEwasm)
generateIR(*contract);
if (m_generateEwasm)