mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Treats inline array as an error.
This commit is contained in:
parent
b2ff9bc88d
commit
896018c8a3
@ -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
|
||||
|
@ -8,6 +8,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (146-149): Tuple component cannot be empty.
|
||||
// Warning: (151-154): Tuple component cannot be empty.
|
||||
// TypeError: (145-155): Type tuple()[2] memory is not implicitly convertible to expected type tuple(uint256,uint256).
|
||||
// TypeError: (146-149): Array component cannot be empty.
|
||||
|
Loading…
Reference in New Issue
Block a user