aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/ast
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-06-13 16:51:49 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-09-16 19:12:43 +0800
commit36a90289e65b06c54326a1c254baa5fa6029f766 (patch)
treeb84191a9460b107396618fe42ad1fada1ba05f67 /libsolidity/ast
parent823e67bf4014d20c6c83d509264e1464d9578f99 (diff)
downloaddexon-solidity-36a90289e65b06c54326a1c254baa5fa6029f766.tar.gz
dexon-solidity-36a90289e65b06c54326a1c254baa5fa6029f766.tar.zst
dexon-solidity-36a90289e65b06c54326a1c254baa5fa6029f766.zip
Fix interface type conversion internal to structs.
Diffstat (limited to 'libsolidity/ast')
-rw-r--r--libsolidity/ast/Types.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp
index 9fdfe632..14b30df8 100644
--- a/libsolidity/ast/Types.cpp
+++ b/libsolidity/ast/Types.cpp
@@ -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, ",") + ")";
}