aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2015-01-27 23:42:28 +0800
committerChristian <c@ethdev.com>2015-01-29 07:32:21 +0800
commit6ec9586de3ce96fafd3c9c7c6318e13f784e8d8f (patch)
treec2de7a5a7bd18edb7733fec23d33f720d8552631
parentae5a6a235c9d0996a712903e0cfd0560b326bbad (diff)
downloaddexon-solidity-6ec9586de3ce96fafd3c9c7c6318e13f784e8d8f.tar
dexon-solidity-6ec9586de3ce96fafd3c9c7c6318e13f784e8d8f.tar.gz
dexon-solidity-6ec9586de3ce96fafd3c9c7c6318e13f784e8d8f.tar.bz2
dexon-solidity-6ec9586de3ce96fafd3c9c7c6318e13f784e8d8f.tar.lz
dexon-solidity-6ec9586de3ce96fafd3c9c7c6318e13f784e8d8f.tar.xz
dexon-solidity-6ec9586de3ce96fafd3c9c7c6318e13f784e8d8f.tar.zst
dexon-solidity-6ec9586de3ce96fafd3c9c7c6318e13f784e8d8f.zip
Style changes.
-rw-r--r--ExpressionCompiler.cpp12
-rw-r--r--GlobalContext.cpp1
2 files changed, 7 insertions, 6 deletions
diff --git a/ExpressionCompiler.cpp b/ExpressionCompiler.cpp
index d2f709be..bcd90acf 100644
--- a/ExpressionCompiler.cpp
+++ b/ExpressionCompiler.cpp
@@ -365,23 +365,25 @@ void ExpressionCompiler::endVisit(MemberAccess const& _memberAccess)
{
case Type::Category::CONTRACT:
{
+ bool alsoSearchInteger = false;
ContractType const& type = dynamic_cast<ContractType const&>(*_memberAccess.getExpression().getType());
if (type.isSuper())
- {
m_context << m_context.getSuperFunctionEntryLabel(member, type.getContractDefinition()).pushTag();
- break;
- }
else
{
+ // ordinary contract type
u256 identifier = type.getFunctionIdentifier(member);
if (identifier != Invalid256)
{
appendTypeConversion(type, IntegerType(0, IntegerType::Modifier::ADDRESS), true);
m_context << identifier;
- break;
}
- // fall-through to "integer" otherwise (address)
+ else
+ // not found in contract, search in members inherited from address
+ alsoSearchInteger = true;
}
+ if (!alsoSearchInteger)
+ break;
}
case Type::Category::INTEGER:
if (member == "balance")
diff --git a/GlobalContext.cpp b/GlobalContext.cpp
index 40a498c8..687c9c9d 100644
--- a/GlobalContext.cpp
+++ b/GlobalContext.cpp
@@ -89,7 +89,6 @@ MagicVariableDeclaration const* GlobalContext::getCurrentSuper() const
m_superPointer[m_currentContract] = make_shared<MagicVariableDeclaration>(
"super", make_shared<ContractType>(*m_currentContract, true));
return m_superPointer[m_currentContract].get();
-
}
}