From 568da1136992f8f188ba419bef814659f7a7794a Mon Sep 17 00:00:00 2001 From: Lu Guanqun Date: Mon, 4 Jan 2016 16:11:04 +0800 Subject: support decayed tuple expression as left value --- libsolidity/analysis/TypeChecker.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libsolidity/analysis') diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp index 9718bf75..de30dcf7 100644 --- a/libsolidity/analysis/TypeChecker.cpp +++ b/libsolidity/analysis/TypeChecker.cpp @@ -792,7 +792,10 @@ bool TypeChecker::visit(TupleExpression const& _tuple) } else types.push_back(TypePointer()); - _tuple.annotation().type = make_shared(types); + if (components.size() == 1) + _tuple.annotation().type = type(*components[0]); + else + _tuple.annotation().type = make_shared(types); // If some of the components are not LValues, the error is reported above. _tuple.annotation().isLValue = true; } -- cgit v1.2.3