Merge pull request #4127 from sifmelcara/fix/boost-get-check

Fix wrong template parameter passed to boost::get
This commit is contained in:
chriseth 2018-05-14 12:13:45 +02:00 committed by GitHub
commit b5354f1e87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -168,10 +168,10 @@ void InlineModifier::visit(Statement& _statement)
// Replace pop(0) expression statemets (and others) by empty blocks.
if (_statement.type() == typeid(ExpressionStatement))
{
ExpressionStatement& expSt = boost::get<ExpressionStatement&>(_statement);
ExpressionStatement& expSt = boost::get<ExpressionStatement>(_statement);
if (expSt.expression.type() == typeid(FunctionalInstruction))
{
FunctionalInstruction& funInstr = boost::get<FunctionalInstruction&>(expSt.expression);
FunctionalInstruction& funInstr = boost::get<FunctionalInstruction>(expSt.expression);
if (funInstr.instruction == solidity::Instruction::POP)
if (MovableChecker(funInstr.arguments.at(0)).movable())
_statement = Block{expSt.location, {}};