From 2d9c407456a0eb0590a320e9ee22ab6c44fc9799 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Tue, 6 Sep 2016 22:10:06 +0100 Subject: Include assert for selfType on bound functions to avoid crash --- libsolidity/ast/Types.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libsolidity') diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp index a0c1626d..4b5f12ce 100644 --- a/libsolidity/ast/Types.cpp +++ b/libsolidity/ast/Types.cpp @@ -2130,7 +2130,8 @@ vector const FunctionType::returnParameterTypeNames(bool _addDataLocatio TypePointer FunctionType::selfType() const { - solAssert(bound(), ""); + solAssert(bound(), "Function is not bound."); + solAssert(m_parameterTypes.size() > 0, "Function has no self type."); return m_parameterTypes.at(0); } -- cgit