aboutsummaryrefslogtreecommitdiffstats
path: root/Types.cpp
diff options
context:
space:
mode:
authorLiana Husikyan <liana@ethdev.com>2015-03-26 19:22:49 +0800
committerLiana Husikyan <liana@ethdev.com>2015-04-08 21:56:35 +0800
commit7eec25b6eb07f1549725884221402a6e692b46e1 (patch)
tree6500908fb944f36690a1c3ade5cd2366698bde89 /Types.cpp
parent45870ed956aa787d05adb191ef10354d197f1688 (diff)
downloaddexon-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.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/Types.cpp b/Types.cpp
index 78649cc9..0c80a0f7 100644
--- a/Types.cpp
+++ b/Types.cpp
@@ -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);