Fix InlineArrayType::componentsCommonMobileType function

This commit is contained in:
wechman
2022-08-29 07:18:35 +02:00
parent e4be484047
commit efcf92948c
2 changed files with 34 additions and 5 deletions
+2 -5
View File
@@ -2819,12 +2819,9 @@ Type const* InlineArrayType::componentsCommonMobileType() const
Type const* commonType = nullptr;
for (Type const* type: m_components)
commonType =
commonType ?
Type::commonType(commonType, type->mobileType()) :
type->mobileType();
commonType = commonType ? Type::commonType(commonType, type) : type;
return TypeProvider::withLocationIfReference(DataLocation::Memory, commonType);
return TypeProvider::withLocationIfReference(DataLocation::Memory, commonType->mobileType());
}
vector<tuple<string, Type const*>> InlineArrayType::makeStackItems() const