From 8125f93b12243836a3c2edea09715a58d1cc1764 Mon Sep 17 00:00:00 2001 From: chriseth Date: Tue, 21 Apr 2015 13:35:38 +0200 Subject: Fix for Contract and Enum types as external function arguments. --- Types.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Types.cpp') 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(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(*externalType()).getParameterTypes(); + TypePointers externalParameterTypes = externalFunctionType()->getParameterTypes(); for (auto it = externalParameterTypes.cbegin(); it != externalParameterTypes.cend(); ++it) { solAssert(!!(*it), "Parameter should have external type"); -- cgit