mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Bugfix: Additional swap for compound assignment.
This commit is contained in:
parent
1da53d1681
commit
8dbe13f840
@ -62,6 +62,8 @@ bool ExpressionCompiler::visit(Assignment const& _assignment)
|
||||
m_context << eth::Instruction::SWAP1 << eth::Instruction::DUP2;
|
||||
m_currentLValue.retrieveValue(_assignment, true);
|
||||
appendOrdinaryBinaryOperatorCode(Token::AssignmentToBinaryOp(op), *_assignment.getType());
|
||||
if (m_currentLValue.storesReferenceOnStack())
|
||||
m_context << eth::Instruction::SWAP1;
|
||||
}
|
||||
m_currentLValue.storeValue(_assignment);
|
||||
m_currentLValue.reset();
|
||||
|
Loading…
Reference in New Issue
Block a user