mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Abort if parseAndAnalyze failed but no errors are reported in compileYul
This commit is contained in:
parent
b17daee20e
commit
642d4b9217
@ -867,7 +867,12 @@ Json::Value StandardCompiler::compileYul(InputsAndSettings _inputsAndSettings)
|
||||
AssemblyStack stack(_inputsAndSettings.evmVersion, AssemblyStack::Language::StrictAssembly);
|
||||
string const& sourceName = _inputsAndSettings.sources.begin()->first;
|
||||
string const& sourceContents = _inputsAndSettings.sources.begin()->second;
|
||||
if (!stack.parseAndAnalyze(sourceName, sourceContents))
|
||||
|
||||
// Inconsistent state - stop here to receive error reports from users
|
||||
if (!stack.parseAndAnalyze(sourceName, sourceContents) && stack.errors().empty())
|
||||
return formatFatalError("InternalCompilerError", "No error reported, but compilation failed.");
|
||||
|
||||
if (!stack.errors().empty())
|
||||
{
|
||||
Json::Value errors = Json::arrayValue;
|
||||
for (auto const& error: stack.errors())
|
||||
|
Loading…
Reference in New Issue
Block a user