ArrayType::interfaceType(): Rename local variable to make more sense

This commit is contained in:
Mathias Baumann 2019-03-20 11:39:34 +01:00
parent 7d809df91a
commit 4c2b1c1f29

View File

@ -1878,21 +1878,21 @@ TypeResult ArrayType::interfaceType(bool _inLibrary) const
return *m_interfaceType; return *m_interfaceType;
TypeResult result{TypePointer{}}; TypeResult result{TypePointer{}};
TypeResult baseExt = m_baseType->interfaceType(_inLibrary); TypeResult baseInterfaceType = m_baseType->interfaceType(_inLibrary);
if (!baseExt.get()) if (!baseInterfaceType.get())
{ {
solAssert(!baseExt.message().empty(), "Expected detailed error message!"); solAssert(!baseInterfaceType.message().empty(), "Expected detailed error message!");
result = baseExt; result = baseInterfaceType;
} }
else if (_inLibrary && location() == DataLocation::Storage) else if (_inLibrary && location() == DataLocation::Storage)
result = shared_from_this(); result = shared_from_this();
else if (m_arrayKind != ArrayKind::Ordinary) else if (m_arrayKind != ArrayKind::Ordinary)
result = this->copyForLocation(DataLocation::Memory, true); result = this->copyForLocation(DataLocation::Memory, true);
else if (isDynamicallySized()) else if (isDynamicallySized())
result = TypePointer{make_shared<ArrayType>(DataLocation::Memory, baseExt)}; result = TypePointer{make_shared<ArrayType>(DataLocation::Memory, baseInterfaceType)};
else else
result = TypePointer{make_shared<ArrayType>(DataLocation::Memory, baseExt, m_length)}; result = TypePointer{make_shared<ArrayType>(DataLocation::Memory, baseInterfaceType, m_length)};
if (_inLibrary) if (_inLibrary)
m_interfaceType_library = result; m_interfaceType_library = result;