Relax identity requirement of function type conversions during code generation.

This commit is contained in:
Daniel Kirchner 2018-11-06 13:22:33 +01:00
parent 88aee34c22
commit a3e37a9d5a

View File

@ -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.