diff options
Diffstat (limited to 'libsolidity/codegen')
-rw-r--r-- | libsolidity/codegen/ExpressionCompiler.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libsolidity/codegen/ExpressionCompiler.cpp b/libsolidity/codegen/ExpressionCompiler.cpp index 5e9c6920..9536c727 100644 --- a/libsolidity/codegen/ExpressionCompiler.cpp +++ b/libsolidity/codegen/ExpressionCompiler.cpp @@ -182,10 +182,12 @@ bool ExpressionCompiler::visit(Conditional const& _condition) _condition.condition().accept(*this); eth::AssemblyItem trueTag = m_context.appendConditionalJump(); _condition.falseExpression().accept(*this); + utils().convertType(*_condition.falseExpression().annotation().type, *_condition.annotation().type); eth::AssemblyItem endTag = m_context.appendJumpToNew(); m_context << trueTag; - m_context.adjustStackOffset(-1); + m_context.adjustStackOffset(-_condition.annotation().type->sizeOnStack()); _condition.trueExpression().accept(*this); + utils().convertType(*_condition.trueExpression().annotation().type, *_condition.annotation().type); m_context << endTag; return false; } |