aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/analysis/ConstantEvaluator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libsolidity/analysis/ConstantEvaluator.cpp')
-rw-r--r--libsolidity/analysis/ConstantEvaluator.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/libsolidity/analysis/ConstantEvaluator.cpp b/libsolidity/analysis/ConstantEvaluator.cpp
index 83f37f47..8659bbfd 100644
--- a/libsolidity/analysis/ConstantEvaluator.cpp
+++ b/libsolidity/analysis/ConstantEvaluator.cpp
@@ -87,6 +87,12 @@ void ConstantEvaluator::endVisit(Identifier const& _identifier)
setType(_identifier, type(*value));
}
+void ConstantEvaluator::endVisit(TupleExpression const& _tuple)
+{
+ if (!_tuple.isInlineArray() && _tuple.components().size() == 1)
+ setType(_tuple, type(*_tuple.components().front()));
+}
+
void ConstantEvaluator::setType(ASTNode const& _node, TypePointer const& _type)
{
if (_type && _type->category() == Type::Category::RationalNumber)