aboutsummaryrefslogtreecommitdiffstats
path: root/ExpressionCompiler.cpp
diff options
context:
space:
mode:
authorLu Guanqun <guanqun.lu@gmail.com>2015-03-01 11:34:39 +0800
committerLu Guanqun <guanqun.lu@gmail.com>2015-03-08 22:50:06 +0800
commit3b9b71e0ae86cc20c6a0201b027bd45bee4257e5 (patch)
treec3b1ffc4e5d6d2e8013733401289928cfc51d086 /ExpressionCompiler.cpp
parente008f3f808b1483e7b7a5861ea4fe46fbe74bcff (diff)
downloaddexon-solidity-3b9b71e0ae86cc20c6a0201b027bd45bee4257e5.tar.gz
dexon-solidity-3b9b71e0ae86cc20c6a0201b027bd45bee4257e5.tar.zst
dexon-solidity-3b9b71e0ae86cc20c6a0201b027bd45bee4257e5.zip
implement overload resolution
Diffstat (limited to 'ExpressionCompiler.cpp')
-rw-r--r--ExpressionCompiler.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/ExpressionCompiler.cpp b/ExpressionCompiler.cpp
index 3d7a2531..5e5442ba 100644
--- a/ExpressionCompiler.cpp
+++ b/ExpressionCompiler.cpp
@@ -822,7 +822,11 @@ bool ExpressionCompiler::visit(IndexAccess const& _indexAccess)
void ExpressionCompiler::endVisit(Identifier const& _identifier)
{
Declaration const* declaration = _identifier.getReferencedDeclaration();
- if (MagicVariableDeclaration const* magicVar = dynamic_cast<MagicVariableDeclaration const*>(declaration))
+ if (declaration == nullptr)
+ {
+ // no-op
+ }
+ else if (MagicVariableDeclaration const* magicVar = dynamic_cast<MagicVariableDeclaration const*>(declaration))
{
if (magicVar->getType()->getCategory() == Type::Category::Contract)
// "this" or "super"