mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Remove duplicate if-check
This commit is contained in:
parent
57c1c8b46c
commit
66b24225fb
@ -1234,10 +1234,10 @@ bool TypeChecker::visit(TupleExpression const& _tuple)
|
||||
if (!dynamic_cast<RationalNumberType const&>(*types[i]).mobileType())
|
||||
m_errorReporter.fatalTypeError(components[i]->location(), "Invalid rational number.");
|
||||
|
||||
if (_tuple.isInlineArray())
|
||||
solAssert(!!types[i], "Inline array cannot have empty components");
|
||||
if (_tuple.isInlineArray())
|
||||
{
|
||||
solAssert(!!types[i], "Inline array cannot have empty components");
|
||||
|
||||
if ((i == 0 || inlineArrayType) && !types[i]->mobileType())
|
||||
m_errorReporter.fatalTypeError(components[i]->location(), "Invalid mobile type.");
|
||||
|
||||
|
@ -197,7 +197,7 @@ BOOST_AUTO_TEST_CASE(type_identifiers)
|
||||
TypePointer keccak256fun = make_shared<FunctionType>(strings{}, strings{}, FunctionType::Kind::KECCAK256);
|
||||
BOOST_CHECK_EQUAL(keccak256fun->identifier(), "t_function_keccak256_nonpayable$__$returns$__$");
|
||||
|
||||
FunctionType metaFun(TypePointers{keccak256fun}, TypePointers{s.type()});
|
||||
FunctionType metaFun(TypePointers{keccak256fun}, TypePointers{s.type()}, strings{""}, strings{""});
|
||||
BOOST_CHECK_EQUAL(metaFun.identifier(), "t_function_internal_nonpayable$_t_function_keccak256_nonpayable$__$returns$__$_$returns$_t_type$_t_struct$_Struct_$3_storage_ptr_$_$");
|
||||
|
||||
TypePointer m = make_shared<MappingType>(Type::fromElementaryTypeName("bytes32"), s.type());
|
||||
|
Loading…
Reference in New Issue
Block a user