aboutsummaryrefslogtreecommitdiffstats
path: root/Types.cpp
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-04-21 19:35:38 +0800
committerchriseth <c@ethdev.com>2015-04-21 21:50:37 +0800
commit8125f93b12243836a3c2edea09715a58d1cc1764 (patch)
treeaa3146a94740d74b1e16711c7829f95374457b13 /Types.cpp
parente4808305a17f43392e03e29546494d464c5f0895 (diff)
downloaddexon-solidity-8125f93b12243836a3c2edea09715a58d1cc1764.tar.gz
dexon-solidity-8125f93b12243836a3c2edea09715a58d1cc1764.tar.zst
dexon-solidity-8125f93b12243836a3c2edea09715a58d1cc1764.zip
Fix for Contract and Enum types as external function arguments.
Diffstat (limited to 'Types.cpp')
-rw-r--r--Types.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Types.cpp b/Types.cpp
index bfde7187..eb24a462 100644
--- a/Types.cpp
+++ b/Types.cpp
@@ -1109,7 +1109,7 @@ unsigned FunctionType::getSizeOnStack() const
return size;
}
-TypePointer FunctionType::externalType() const
+FunctionTypePointer FunctionType::externalFunctionType() const
{
TypePointers paramTypes;
TypePointers retParamTypes;
@@ -1117,13 +1117,13 @@ TypePointer FunctionType::externalType() const
for (auto type: m_parameterTypes)
{
if (!type->externalType())
- return TypePointer();
+ return FunctionTypePointer();
paramTypes.push_back(type->externalType());
}
for (auto type: m_returnParameterTypes)
{
if (!type->externalType())
- return TypePointer();
+ return FunctionTypePointer();
retParamTypes.push_back(type->externalType());
}
return make_shared<FunctionType>(paramTypes, retParamTypes, m_location, m_arbitraryParameters);
@@ -1168,7 +1168,7 @@ string FunctionType::externalSignature(std::string const& _name) const
}
string ret = funcName + "(";
- TypePointers externalParameterTypes = dynamic_cast<FunctionType const&>(*externalType()).getParameterTypes();
+ TypePointers externalParameterTypes = externalFunctionType()->getParameterTypes();
for (auto it = externalParameterTypes.cbegin(); it != externalParameterTypes.cend(); ++it)
{
solAssert(!!(*it), "Parameter should have external type");