Treats inline array as an error.

This commit is contained in:
Erik Kundt
2018-04-23 17:11:41 +02:00
parent b2ff9bc88d
commit 896018c8a3
2 changed files with 3 additions and 3 deletions
+2
View File
@@ -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