mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #5592 from ethereum/fix-issue-5446
Relax assertion about jumps in loose mode
This commit is contained in:
commit
dd6327594f
@ -629,7 +629,9 @@ void AsmAnalyzer::warnOnInstructions(solidity::Instruction _instr, SourceLocatio
|
|||||||
|
|
||||||
if (_instr == solidity::Instruction::JUMP || _instr == solidity::Instruction::JUMPI || _instr == solidity::Instruction::JUMPDEST)
|
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_errorReporter.error(
|
||||||
m_errorTypeForLoose ? *m_errorTypeForLoose : Error::Type::Warning,
|
m_errorTypeForLoose ? *m_errorTypeForLoose : Error::Type::Warning,
|
||||||
_location,
|
_location,
|
||||||
|
@ -94,7 +94,7 @@ public:
|
|||||||
*m_analysisInfo,
|
*m_analysisInfo,
|
||||||
errorReporter,
|
errorReporter,
|
||||||
EVMVersion::byzantium(),
|
EVMVersion::byzantium(),
|
||||||
boost::none,
|
langutil::Error::Type::SyntaxError,
|
||||||
Dialect::strictAssemblyForEVM()
|
Dialect::strictAssemblyForEVM()
|
||||||
);
|
);
|
||||||
if (!analyzer.analyze(*m_ast) || !errorReporter.errors().empty())
|
if (!analyzer.analyze(*m_ast) || !errorReporter.errors().empty())
|
||||||
|
Loading…
Reference in New Issue
Block a user