mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
added createing FunctionType from ArrayType VariableDeclaration
added test
This commit is contained in:
parent
45870ed956
commit
7eec25b6eb
@ -71,6 +71,10 @@ void ExpressionCompiler::appendStateVariableAccessor(VariableDeclaration const&
|
|||||||
m_context << location.first;
|
m_context << location.first;
|
||||||
|
|
||||||
TypePointer returnType = _varDecl.getType();
|
TypePointer returnType = _varDecl.getType();
|
||||||
|
if (ArrayType const* arrayType = dynamic_cast<ArrayType const*>(returnType.get()))
|
||||||
|
{
|
||||||
|
(void)arrayType;
|
||||||
|
} else
|
||||||
for (TypePointer const& paramType: paramTypes)
|
for (TypePointer const& paramType: paramTypes)
|
||||||
{
|
{
|
||||||
// move offset to memory
|
// move offset to memory
|
||||||
|
@ -1002,8 +1002,13 @@ FunctionType::FunctionType(VariableDeclaration const& _varDecl):
|
|||||||
retParamNames.push_back(member.first);
|
retParamNames.push_back(member.first);
|
||||||
retParams.push_back(member.second);
|
retParams.push_back(member.second);
|
||||||
}
|
}
|
||||||
}
|
} else
|
||||||
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);
|
retParams.push_back(returnType);
|
||||||
retParamNames.push_back("");
|
retParamNames.push_back("");
|
||||||
|
Loading…
Reference in New Issue
Block a user