Relax assertion about jumps in loose mode

This commit is contained in:
Mathias Baumann 2018-12-05 10:25:59 +01:00
parent 8b38cf3ed4
commit 6e5160efa0
2 changed files with 4 additions and 2 deletions

View File

@ -629,7 +629,9 @@ void AsmAnalyzer::warnOnInstructions(solidity::Instruction _instr, SourceLocatio
if (_instr == solidity::Instruction::JUMP || _instr == solidity::Instruction::JUMPI || _instr == solidity::Instruction::JUMPDEST)
{
solAssert(m_dialect.flavour == AsmFlavour::Loose, "");
if (m_dialect.flavour != AsmFlavour::Loose)
solAssert(m_errorTypeForLoose && *m_errorTypeForLoose != Error::Type::Warning, "");
m_errorReporter.error(
m_errorTypeForLoose ? *m_errorTypeForLoose : Error::Type::Warning,
_location,

View File

@ -94,7 +94,7 @@ public:
*m_analysisInfo,
errorReporter,
EVMVersion::byzantium(),
boost::none,
langutil::Error::Type::SyntaxError,
Dialect::strictAssemblyForEVM()
);
if (!analyzer.analyze(*m_ast) || !errorReporter.errors().empty())