aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/ast
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2017-02-16 19:36:43 +0800
committerchriseth <c@ethdev.com>2017-02-16 21:57:00 +0800
commitc3c3cccbec058f7f220994da7d272ce41d49d3e8 (patch)
tree70dae0e10851730c9cb1c447d69c6df82d99be4a /libsolidity/ast
parente629cf5bc3dc093a302b461273d89c8dd5999cb6 (diff)
downloaddexon-solidity-c3c3cccbec058f7f220994da7d272ce41d49d3e8.tar.gz
dexon-solidity-c3c3cccbec058f7f220994da7d272ce41d49d3e8.tar.zst
dexon-solidity-c3c3cccbec058f7f220994da7d272ce41d49d3e8.zip
Fix early exist for fatal errors.
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 5b7b4a2c..96b3ed17 100644
--- a/libsolidity/ast/Types.cpp
+++ b/libsolidity/ast/Types.cpp
@@ -1652,6 +1652,7 @@ MemberList::MemberMap StructType::nativeMembers(ContractDefinition const*) const
for (ASTPointer<VariableDeclaration> const& variable: m_struct.members())
{
TypePointer type = variable->annotation().type;
+ solAssert(type, "");
// Skip all mapping members if we are not in storage.
if (location() != DataLocation::Storage && !type->canLiveOutsideStorage())
continue;
@@ -1964,6 +1965,8 @@ FunctionType::FunctionType(VariableDeclaration const& _varDecl):
if (auto structType = dynamic_cast<StructType const*>(returnType.get()))
{
for (auto const& member: structType->members(nullptr))
+ {
+ solAssert(member.type, "");
if (member.type->category() != Category::Mapping)
{
if (auto arrayType = dynamic_cast<ArrayType const*>(member.type.get()))
@@ -1972,6 +1975,7 @@ FunctionType::FunctionType(VariableDeclaration const& _varDecl):
retParams.push_back(member.type);
retParamNames.push_back(member.name);
}
+ }
}
else
{