diff --git a/libyul/AsmAnalysis.cpp b/libyul/AsmAnalysis.cpp index 3cbed9c77..1be1cf1a0 100644 --- a/libyul/AsmAnalysis.cpp +++ b/libyul/AsmAnalysis.cpp @@ -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, diff --git a/test/tools/yulopti.cpp b/test/tools/yulopti.cpp index e867f0496..d0643d737 100644 --- a/test/tools/yulopti.cpp +++ b/test/tools/yulopti.cpp @@ -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())