mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix interface type conversion internal to structs.
This commit is contained in:
committed by
Alex Beregszaszi
parent
823e67bf40
commit
36a90289e6
@@ -1783,6 +1783,8 @@ TypePointer StructType::interfaceType(bool _inLibrary) const
|
||||
if (_inLibrary && location() == DataLocation::Storage)
|
||||
return shared_from_this();
|
||||
else if (!recursive())
|
||||
// TODO this might not be enough, we have to convert all members to
|
||||
// their interfaceType
|
||||
return copyForLocation(DataLocation::Memory, true);
|
||||
else
|
||||
return TypePointer();
|
||||
@@ -1805,7 +1807,9 @@ string StructType::signatureInExternalFunction(bool _structsByName) const
|
||||
auto memberTypeStrings = memberTypes | boost::adaptors::transformed([&](TypePointer _t) -> string
|
||||
{
|
||||
solAssert(_t, "Parameter should have external type.");
|
||||
return _t->signatureInExternalFunction(_structsByName);
|
||||
auto t = _t->interfaceType(_structsByName);
|
||||
solAssert(t, "");
|
||||
return t->signatureInExternalFunction(_structsByName);
|
||||
});
|
||||
return "(" + boost::algorithm::join(memberTypeStrings, ",") + ")";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user