From c3c3cccbec058f7f220994da7d272ce41d49d3e8 Mon Sep 17 00:00:00 2001 From: chriseth Date: Thu, 16 Feb 2017 12:36:43 +0100 Subject: Fix early exist for fatal errors. --- libsolidity/ast/Types.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libsolidity/ast') 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 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(returnType.get())) { for (auto const& member: structType->members(nullptr)) + { + solAssert(member.type, ""); if (member.type->category() != Category::Mapping) { if (auto arrayType = dynamic_cast(member.type.get())) @@ -1972,6 +1975,7 @@ FunctionType::FunctionType(VariableDeclaration const& _varDecl): retParams.push_back(member.type); retParamNames.push_back(member.name); } + } } else { -- cgit