aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/ast
diff options
context:
space:
mode:
authorLianaHus <liana@ethdev.com>2016-01-16 00:36:06 +0800
committerLianaHus <liana@ethdev.com>2016-01-16 00:36:06 +0800
commitb2daa5a9d818f80df0c12e0afedb9ff549bd63d8 (patch)
tree0bbb6dd41eb7bb0716d24c728b4de617b159e36e /libsolidity/ast
parentca45cfee8c3a1013a174b3fe499e7361c5f6d3d8 (diff)
downloaddexon-solidity-b2daa5a9d818f80df0c12e0afedb9ff549bd63d8.tar
dexon-solidity-b2daa5a9d818f80df0c12e0afedb9ff549bd63d8.tar.gz
dexon-solidity-b2daa5a9d818f80df0c12e0afedb9ff549bd63d8.tar.bz2
dexon-solidity-b2daa5a9d818f80df0c12e0afedb9ff549bd63d8.tar.lz
dexon-solidity-b2daa5a9d818f80df0c12e0afedb9ff549bd63d8.tar.xz
dexon-solidity-b2daa5a9d818f80df0c12e0afedb9ff549bd63d8.tar.zst
dexon-solidity-b2daa5a9d818f80df0c12e0afedb9ff549bd63d8.zip
fixed assert on EI creation for structs containing only mapping or arrays
Diffstat (limited to 'libsolidity/ast')
-rw-r--r--libsolidity/ast/Types.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp
index 2e9b56a1..79e5bb02 100644
--- a/libsolidity/ast/Types.cpp
+++ b/libsolidity/ast/Types.cpp
@@ -1593,6 +1593,10 @@ FunctionTypePointer FunctionType::interfaceFunctionType() const
else
return FunctionTypePointer();
}
+ auto variable = dynamic_cast<VariableDeclaration const*>(m_declaration);
+ if (variable && retParamTypes.empty())
+ return FunctionTypePointer();
+
return make_shared<FunctionType>(paramTypes, retParamTypes, m_parameterNames, m_returnParameterNames, m_location, m_arbitraryParameters);
}