diff options
author | chriseth <chris@ethereum.org> | 2018-11-23 01:23:46 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-23 01:23:46 +0800 |
commit | ecd059cb9225c5b9d01a928b1495aff31e3773ee (patch) | |
tree | 7c182755c8fdac9eff202b54f6330dc39073829f /libsolidity | |
parent | b0e4ef7a1325b160e225745264317c0046c39f71 (diff) | |
parent | 06189ae57f2f556f21499938fca8f9c0db82779e (diff) | |
download | dexon-solidity-ecd059cb9225c5b9d01a928b1495aff31e3773ee.tar.gz dexon-solidity-ecd059cb9225c5b9d01a928b1495aff31e3773ee.tar.zst dexon-solidity-ecd059cb9225c5b9d01a928b1495aff31e3773ee.zip |
Merge pull request #5451 from ethereum/bound_function_tests
Add assert and tests for bound functions
Diffstat (limited to 'libsolidity')
-rw-r--r-- | libsolidity/codegen/ExpressionCompiler.cpp | 3 |
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); |