aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/codegen
diff options
context:
space:
mode:
Diffstat (limited to 'libsolidity/codegen')
-rw-r--r--libsolidity/codegen/ExpressionCompiler.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/libsolidity/codegen/ExpressionCompiler.cpp b/libsolidity/codegen/ExpressionCompiler.cpp
index 2fd0b2c4..b0e92b59 100644
--- a/libsolidity/codegen/ExpressionCompiler.cpp
+++ b/libsolidity/codegen/ExpressionCompiler.cpp
@@ -233,7 +233,12 @@ bool ExpressionCompiler::visit(TupleExpression const& _tuple)
else if (_tuple.annotation().lValueRequested)
lvalues.push_back(unique_ptr<LValue>());
if (_tuple.annotation().lValueRequested)
- m_currentLValue.reset(new TupleObject(m_context, move(lvalues)));
+ {
+ if (_tuple.components().size() == 1)
+ m_currentLValue = move(lvalues[0]);
+ else
+ m_currentLValue.reset(new TupleObject(m_context, move(lvalues)));
+ }
return false;
}