From 1087d34a665ad2d3595d8a5259d69e8f3d52eebe Mon Sep 17 00:00:00 2001 From: Liana Husikyan Date: Mon, 27 Apr 2015 13:07:25 +0200 Subject: saved returnParameterNames in FunctionType constructor --- AST.cpp | 1 + ExpressionCompiler.cpp | 1 + Types.cpp | 7 +++++-- Types.h | 3 +++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/AST.cpp b/AST.cpp index 83b0adf3..09f98dca 100644 --- a/AST.cpp +++ b/AST.cpp @@ -821,6 +821,7 @@ void NewExpression::checkTypeRequirements(TypePointers const*) parameterTypes, TypePointers{contractType}, strings(), + strings(), FunctionType::Location::Creation); } diff --git a/ExpressionCompiler.cpp b/ExpressionCompiler.cpp index ae825be1..76d05bd0 100644 --- a/ExpressionCompiler.cpp +++ b/ExpressionCompiler.cpp @@ -526,6 +526,7 @@ bool ExpressionCompiler::visit(FunctionCall const& _functionCall) TypePointers{}, TypePointers{}, strings(), + strings(), Location::External, false, true, diff --git a/Types.cpp b/Types.cpp index 40b0dba6..7a5b309d 100644 --- a/Types.cpp +++ b/Types.cpp @@ -1143,7 +1143,7 @@ FunctionTypePointer FunctionType::externalFunctionType() const return FunctionTypePointer(); retParamTypes.push_back(type->externalType()); } - return make_shared(paramTypes, retParamTypes, m_parameterNames, m_location, m_arbitraryParameters); + return make_shared(paramTypes, retParamTypes, m_parameterNames, m_returnParameterNames, m_location, m_arbitraryParameters); } MemberList const& FunctionType::getMembers() const @@ -1165,6 +1165,7 @@ MemberList const& FunctionType::getMembers() const parseElementaryTypeVector({"uint"}), TypePointers{copyAndSetGasOrValue(false, true)}, strings(), + strings(), Location::SetValue, false, m_gasSet, @@ -1180,6 +1181,7 @@ MemberList const& FunctionType::getMembers() const parseElementaryTypeVector({"uint"}), TypePointers{copyAndSetGasOrValue(true, false)}, strings(), + strings(), Location::SetGas, false, m_gasSet, @@ -1267,7 +1269,8 @@ TypePointer FunctionType::copyAndSetGasOrValue(bool _setGas, bool _setValue) con return make_shared( m_parameterTypes, m_returnParameterTypes, - strings(), + m_parameterNames, + m_returnParameterNames, m_location, m_arbitraryParameters, m_gasSet || _setGas, diff --git a/Types.h b/Types.h index 49dd436d..65a6867d 100644 --- a/Types.h +++ b/Types.h @@ -573,6 +573,7 @@ public: parseElementaryTypeVector(_parameterTypes), parseElementaryTypeVector(_returnParameterTypes), strings(), + strings(), _location, _arbitraryParameters ) @@ -582,6 +583,7 @@ public: TypePointers const& _parameterTypes, TypePointers const& _returnParameterTypes, strings _parameterNames = strings(), + strings _returnParameterNames = strings(), Location _location = Location::Internal, bool _arbitraryParameters = false, bool _gasSet = false, @@ -590,6 +592,7 @@ public: m_parameterTypes (_parameterTypes), m_returnParameterTypes (_returnParameterTypes), m_parameterNames (_parameterNames), + m_returnParameterNames (_returnParameterNames), m_location (_location), m_arbitraryParameters (_arbitraryParameters), m_gasSet (_gasSet), -- cgit v1.2.3