aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libsolidity/analysis/TypeChecker.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp
index 671e4030..c19ca76d 100644
--- a/libsolidity/analysis/TypeChecker.cpp
+++ b/libsolidity/analysis/TypeChecker.cpp
@@ -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;