diff options
author | Liana Husikyan <liana@ethdev.com> | 2015-04-23 00:53:58 +0800 |
---|---|---|
committer | Liana Husikyan <liana@ethdev.com> | 2015-04-27 19:08:32 +0800 |
commit | 88536f90e8403239380c280176250390bab2cd8d (patch) | |
tree | 7ca4aa77cf9e039c02265ebdaa3d6650680931c8 /Types.cpp | |
parent | 648ce852561a1a28bebf3be1a64480aee560bf7a (diff) | |
download | dexon-solidity-88536f90e8403239380c280176250390bab2cd8d.tar.gz dexon-solidity-88536f90e8403239380c280176250390bab2cd8d.tar.zst dexon-solidity-88536f90e8403239380c280176250390bab2cd8d.zip |
changed the test so constructor will have input parameters
Diffstat (limited to 'Types.cpp')
-rw-r--r-- | Types.cpp | 48 |
1 files changed, 37 insertions, 11 deletions
@@ -1143,7 +1143,7 @@ FunctionTypePointer FunctionType::externalFunctionType() const return FunctionTypePointer(); retParamTypes.push_back(type->externalType()); } - return make_shared<FunctionType>(paramTypes, retParamTypes, m_location, m_arbitraryParameters); + return make_shared<FunctionType>(paramTypes, retParamTypes, m_parameterNames, m_location, m_arbitraryParameters); } MemberList const& FunctionType::getMembers() const @@ -1159,14 +1159,34 @@ MemberList const& FunctionType::getMembers() const if (!m_members) { MemberList::MemberMap members{ - {"value", make_shared<FunctionType>(parseElementaryTypeVector({"uint"}), - TypePointers{copyAndSetGasOrValue(false, true)}, - Location::SetValue, false, m_gasSet, m_valueSet)}}; + { + "value", + make_shared<FunctionType>( + parseElementaryTypeVector({"uint"}), + TypePointers{copyAndSetGasOrValue(false, true)}, + strings(), + Location::SetValue, + false, + m_gasSet, + m_valueSet + ) + } + }; if (m_location != Location::Creation) - members.push_back(MemberList::Member("gas", make_shared<FunctionType>( - parseElementaryTypeVector({"uint"}), - TypePointers{copyAndSetGasOrValue(true, false)}, - Location::SetGas, false, m_gasSet, m_valueSet))); + members.push_back( + MemberList::Member( + "gas", + make_shared<FunctionType>( + parseElementaryTypeVector({"uint"}), + TypePointers{copyAndSetGasOrValue(true, false)}, + strings(), + Location::SetGas, + false, + m_gasSet, + m_valueSet + ) + ) + ); m_members.reset(new MemberList(members)); } return *m_members; @@ -1244,9 +1264,15 @@ TypePointers FunctionType::parseElementaryTypeVector(strings const& _types) TypePointer FunctionType::copyAndSetGasOrValue(bool _setGas, bool _setValue) const { - return make_shared<FunctionType>(m_parameterTypes, m_returnParameterTypes, m_location, - m_arbitraryParameters, - m_gasSet || _setGas, m_valueSet || _setValue); + return make_shared<FunctionType>( + m_parameterTypes, + m_returnParameterTypes, + strings(), + m_location, + m_arbitraryParameters, + m_gasSet || _setGas, + m_valueSet || _setValue + ); } vector<string> const FunctionType::getParameterTypeNames() const |