Merge pull request #5592 from ethereum/fix-issue-5446

Relax assertion about jumps in loose mode
This commit is contained in:
chriseth 2018-12-05 11:43:31 +01:00 committed by GitHub
commit dd6327594f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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())