Skip to content

Commit

Permalink
fixup! remove unused error code
Browse files Browse the repository at this point in the history
  • Loading branch information
matheusaaguiar committed Jul 11, 2023
1 parent eee852b commit 5b3a88d
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions libsolidity/analysis/TypeChecker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1693,19 +1693,16 @@ bool TypeChecker::visit(TupleExpression const& _tuple)
{
if (!inlineArrayType)
m_errorReporter.fatalTypeError(6378_error, _tuple.location(), "Unable to deduce common type for array elements.");
else if (!inlineArrayType->nameable())
m_errorReporter.fatalTypeError(
9656_error,
_tuple.location(),
"Unable to deduce nameable type for array elements. Try adding explicit type conversion for the first element."
);
else if (inlineArrayType->containsNestedMapping())
{
// Types which are not nameable should not have mobileType and thus should have been detected before
solAssert(inlineArrayType->nameable());
m_errorReporter.fatalTypeError(
1545_error,
_tuple.location(),
"Type " + inlineArrayType->humanReadableName() + " is only valid in storage."
);

}
_tuple.annotation().type = TypeProvider::array(DataLocation::Memory, inlineArrayType, types.size());
}
else
Expand Down

0 comments on commit 5b3a88d

Please sign in to comment.