aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libsolidity/codegen/CompilerUtils.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/libsolidity/codegen/CompilerUtils.cpp b/libsolidity/codegen/CompilerUtils.cpp
index d89d023e..22f97dfa 100644
--- a/libsolidity/codegen/CompilerUtils.cpp
+++ b/libsolidity/codegen/CompilerUtils.cpp
@@ -1014,6 +1014,8 @@ void CompilerUtils::convertType(
// stack: <address> <function_id>
m_context << Instruction::POP;
}
+ else if (stackTypeCategory == Type::Category::Function && targetTypeCategory == Type::Category::Function)
+ solAssert(_typeOnStack.isImplicitlyConvertibleTo(_targetType), "Invalid function type conversion requested.");
else
{
// All other types should not be convertible to non-equal types.