mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #4301 from rnaby/TypeChecker
Simplification of typeSupportedByOldABIEncoder
This commit is contained in:
commit
32f2db780c
@ -41,15 +41,13 @@ bool typeSupportedByOldABIEncoder(Type const& _type)
|
||||
{
|
||||
if (_type.dataStoredIn(DataLocation::Storage))
|
||||
return true;
|
||||
else if (_type.category() == Type::Category::Struct)
|
||||
if (_type.category() == Type::Category::Struct)
|
||||
return false;
|
||||
else if (_type.category() == Type::Category::Array)
|
||||
if (_type.category() == Type::Category::Array)
|
||||
{
|
||||
auto const& arrayType = dynamic_cast<ArrayType const&>(_type);
|
||||
auto base = arrayType.baseType();
|
||||
if (!typeSupportedByOldABIEncoder(*base))
|
||||
return false;
|
||||
else if (base->category() == Type::Category::Array && base->isDynamicallySized())
|
||||
if (!typeSupportedByOldABIEncoder(*base) || (base->category() == Type::Category::Array && base->isDynamicallySized()))
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user