aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/analysis
diff options
context:
space:
mode:
authorRJ Catalano <catalanor0220@gmail.com>2015-12-17 02:55:52 +0800
committerRJ Catalano <catalanor0220@gmail.com>2015-12-17 02:55:52 +0800
commit0ba24a5289eaaf1941c1e84e774f938353b9b94c (patch)
tree8eab9e138065e69a2b5643db9bec61b771b683d2 /libsolidity/analysis
parentcaa6202f62749567870e38c3e4d284984349ca75 (diff)
downloaddexon-solidity-0ba24a5289eaaf1941c1e84e774f938353b9b94c.tar.gz
dexon-solidity-0ba24a5289eaaf1941c1e84e774f938353b9b94c.tar.zst
dexon-solidity-0ba24a5289eaaf1941c1e84e774f938353b9b94c.zip
changed a couple of small nuances, made an attempt at fixing the parsing in the inline arrays case (fails), and added test for inline arrays per Chriseth request
Diffstat (limited to 'libsolidity/analysis')
-rw-r--r--libsolidity/analysis/TypeChecker.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp
index f2113d2f..9718bf75 100644
--- a/libsolidity/analysis/TypeChecker.cpp
+++ b/libsolidity/analysis/TypeChecker.cpp
@@ -779,7 +779,6 @@ bool TypeChecker::visit(Assignment const& _assignment)
bool TypeChecker::visit(TupleExpression const& _tuple)
{
-
vector<ASTPointer<Expression>> const& components = _tuple.components();
solAssert(!_tuple.isInlineArray(), "Tuple type not properly declared");
TypePointers types;
@@ -793,10 +792,7 @@ bool TypeChecker::visit(TupleExpression const& _tuple)
}
else
types.push_back(TypePointer());
- if (_tuple.isInlineArray())
- _tuple.annotation().type = make_shared<ArrayType>(DataLocation::Storage, _tuple.annotation().type, types.size());
- else
- _tuple.annotation().type = make_shared<TupleType>(types);
+ _tuple.annotation().type = make_shared<TupleType>(types);
// If some of the components are not LValues, the error is reported above.
_tuple.annotation().isLValue = true;
}
@@ -806,10 +802,7 @@ bool TypeChecker::visit(TupleExpression const& _tuple)
{
// Outside of an lvalue-context, the only situation where a component can be empty is (x,).
if (!components[i] && !(i == 1 && components.size() == 2))
- _tuple.isInlineArray() ?
- fatalTypeError(_tuple.location(), "Array component cannot have empty cells.")
- :
- fatalTypeError(_tuple.location(), "Tuple component cannot be empty.");
+ fatalTypeError(_tuple.location(), "Tuple component cannot be empty.");
else if (components[i])
{
components[i]->accept(*this);