aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorErik Kundt <bitshift@posteo.org>2018-04-23 23:11:41 +0800
committerErik Kundt <bitshift@posteo.org>2018-04-23 23:11:41 +0800
commit896018c8a33f92e9dd507b462c858dbcf13d6385 (patch)
tree213d6b6aa043ea3f00c18f7a5b55cfd4728407d0 /libsolidity
parentb2ff9bc88d50e89419317d54b00e80b4c18a92c7 (diff)
downloaddexon-solidity-896018c8a33f92e9dd507b462c858dbcf13d6385.tar.gz
dexon-solidity-896018c8a33f92e9dd507b462c858dbcf13d6385.tar.zst
dexon-solidity-896018c8a33f92e9dd507b462c858dbcf13d6385.zip
Treats inline array as an error.
Diffstat (limited to 'libsolidity')
-rw-r--r--libsolidity/analysis/TypeChecker.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp
index 53409e6c..02f2f833 100644
--- a/libsolidity/analysis/TypeChecker.cpp
+++ b/libsolidity/analysis/TypeChecker.cpp
@@ -1423,6 +1423,8 @@ bool TypeChecker::visit(TupleExpression const& _tuple)
if (types[i]->category() == Type::Category::Tuple)
if (dynamic_cast<TupleType const&>(*types[i]).components().empty())
{
+ if (_tuple.isInlineArray())
+ m_errorReporter.fatalTypeError(components[i]->location(), "Array component cannot be empty.");
if (v050)
m_errorReporter.fatalTypeError(components[i]->location(), "Tuple component cannot be empty.");
else