diff options
author | Daniel Kirchner <daniel@ekpyron.org> | 2018-11-06 20:22:33 +0800 |
---|---|---|
committer | Daniel Kirchner <daniel@ekpyron.org> | 2018-11-06 20:22:33 +0800 |
commit | a3e37a9d5aa2039255783ffba4629574c4acf4c6 (patch) | |
tree | 21e879d3c935607f44af327ce8039c97e6195fd0 | |
parent | 88aee34c22d86a004848ae8bdc818b5168dd94cb (diff) | |
download | dexon-solidity-a3e37a9d5aa2039255783ffba4629574c4acf4c6.tar.gz dexon-solidity-a3e37a9d5aa2039255783ffba4629574c4acf4c6.tar.zst dexon-solidity-a3e37a9d5aa2039255783ffba4629574c4acf4c6.zip |
Relax identity requirement of function type conversions during code generation.
-rw-r--r-- | libsolidity/codegen/CompilerUtils.cpp | 2 |
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. |