diff options
author | Liana Husikyan <liana@ethdev.com> | 2015-03-26 19:22:49 +0800 |
---|---|---|
committer | Liana Husikyan <liana@ethdev.com> | 2015-04-08 21:56:35 +0800 |
commit | 7eec25b6eb07f1549725884221402a6e692b46e1 (patch) | |
tree | 6500908fb944f36690a1c3ade5cd2366698bde89 /Types.cpp | |
parent | 45870ed956aa787d05adb191ef10354d197f1688 (diff) | |
download | dexon-solidity-7eec25b6eb07f1549725884221402a6e692b46e1.tar.gz dexon-solidity-7eec25b6eb07f1549725884221402a6e692b46e1.tar.zst dexon-solidity-7eec25b6eb07f1549725884221402a6e692b46e1.zip |
added createing FunctionType from ArrayType VariableDeclaration
added test
Diffstat (limited to 'Types.cpp')
-rw-r--r-- | Types.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
@@ -1002,12 +1002,17 @@ FunctionType::FunctionType(VariableDeclaration const& _varDecl): retParamNames.push_back(member.first); retParams.push_back(member.second); } - } - else - { - retParams.push_back(returnType); - retParamNames.push_back(""); - } + } else + if (auto arrayType = dynamic_cast<ArrayType const*>(returnType.get())) + { + params.push_back(make_shared<IntegerType>(256)); + paramNames.push_back(""); + returnType = arrayType->getBaseType(); + } else + { + retParams.push_back(returnType); + retParamNames.push_back(""); + } swap(params, m_parameterTypes); swap(paramNames, m_parameterNames); |