aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/analysis
diff options
context:
space:
mode:
authorLeonardo Alt <leo@ethereum.org>2018-07-19 01:51:24 +0800
committerLeonardo Alt <leo@ethereum.org>2018-07-19 01:51:24 +0800
commitfaa9c221d41c45e12411c654919f318f6e7fc98f (patch)
tree4393a4143da54f183e0459c59b0f3687bc5fbe37 /libsolidity/analysis
parent25fa1142bc2ba74e75f24f8267d7fcb282423335 (diff)
downloaddexon-solidity-faa9c221d41c45e12411c654919f318f6e7fc98f.tar.gz
dexon-solidity-faa9c221d41c45e12411c654919f318f6e7fc98f.tar.zst
dexon-solidity-faa9c221d41c45e12411c654919f318f6e7fc98f.zip
Changes in ExpressionCompiler
Diffstat (limited to 'libsolidity/analysis')
-rw-r--r--libsolidity/analysis/TypeChecker.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp
index fc5a3608..8536e934 100644
--- a/libsolidity/analysis/TypeChecker.cpp
+++ b/libsolidity/analysis/TypeChecker.cpp
@@ -1957,8 +1957,9 @@ bool TypeChecker::visit(MemberAccess const& _memberAccess)
for (auto const& addressMember: IntegerType(160, IntegerType::Modifier::Address).nativeMembers(nullptr))
if (addressMember.name == memberName)
{
- Identifier const& var = dynamic_cast<Identifier const&>(_memberAccess.expression());
- errorMsg += " Use \"address(" + var.name() + ")." + memberName + "\" to access this address member.";
+ Identifier const* var = dynamic_cast<Identifier const*>(&_memberAccess.expression());
+ string varName = var ? var->name() : "...";
+ errorMsg += " Use \"address(" + varName + ")." + memberName + "\" to access this address member.";
break;
}
m_errorReporter.fatalTypeError(