aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/codegen/ExpressionCompiler.cpp
diff options
context:
space:
mode:
authorLeonardo Alt <leo@ethereum.org>2018-11-19 22:17:39 +0800
committerLeonardo Alt <leo@ethereum.org>2018-11-22 21:41:39 +0800
commit06189ae57f2f556f21499938fca8f9c0db82779e (patch)
treece106ef690debf21629cbf8339091c220381d6fc /libsolidity/codegen/ExpressionCompiler.cpp
parenta5411965e6d7abf50f896291d69cab820db6ef87 (diff)
downloaddexon-solidity-06189ae57f2f556f21499938fca8f9c0db82779e.tar.gz
dexon-solidity-06189ae57f2f556f21499938fca8f9c0db82779e.tar.zst
dexon-solidity-06189ae57f2f556f21499938fca8f9c0db82779e.zip
Add assert and tests for bound functions
Diffstat (limited to 'libsolidity/codegen/ExpressionCompiler.cpp')
-rw-r--r--libsolidity/codegen/ExpressionCompiler.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/libsolidity/codegen/ExpressionCompiler.cpp b/libsolidity/codegen/ExpressionCompiler.cpp
index 57b513d2..b0d17286 100644
--- a/libsolidity/codegen/ExpressionCompiler.cpp
+++ b/libsolidity/codegen/ExpressionCompiler.cpp
@@ -529,6 +529,8 @@ bool ExpressionCompiler::visit(FunctionCall const& _functionCall)
{
bool shortcutTaken = false;
if (auto identifier = dynamic_cast<Identifier const*>(&_functionCall.expression()))
+ {
+ solAssert(!function.bound(), "");
if (auto functionDef = dynamic_cast<FunctionDefinition const*>(identifier->annotation().referencedDeclaration))
{
// Do not directly visit the identifier, because this way, we can avoid
@@ -537,6 +539,7 @@ bool ExpressionCompiler::visit(FunctionCall const& _functionCall)
utils().pushCombinedFunctionEntryLabel(m_context.resolveVirtualFunction(*functionDef), false);
shortcutTaken = true;
}
+ }
if (!shortcutTaken)
_functionCall.expression().accept(*this);