Merge pull request #6367 from ethereum/yul-standard

Allow warnings in AssemblyStack
This commit is contained in:
chriseth 2019-03-25 14:59:29 +01:00 committed by GitHub
commit ffe3a60301
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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())