Merge pull request #338 from guanqun/add_paren

support syntax "(x) = 3"
This commit is contained in:
chriseth
2016-01-05 13:15:29 +01:00
4 changed files with 26 additions and 2 deletions
+4 -1
View File
@@ -792,7 +792,10 @@ bool TypeChecker::visit(TupleExpression const& _tuple)
}
else
types.push_back(TypePointer());
_tuple.annotation().type = make_shared<TupleType>(types);
if (components.size() == 1)
_tuple.annotation().type = type(*components[0]);
else
_tuple.annotation().type = make_shared<TupleType>(types);
// If some of the components are not LValues, the error is reported above.
_tuple.annotation().isLValue = true;
}