Ensure that address types are always declared as 160bit

This commit is contained in:
Alex Beregszaszi committed 2017-09-26 22:46:33 +01:00
1 parent eb5a6aacd9
commit ee65ecfb3b
5 files changed
+14 -14

No files matched your search

+3 -3
View File
@@ -1040,7 +1040,7 @@ bool ExpressionCompiler::visit(MemberAccess const& _memberAccess)
identifier = FunctionType(*function).externalIdentifier();
else
solAssert(false, "Contract member is neither variable nor function.");
utils().convertType(type, IntegerType(0, IntegerType::Modifier::Address), true);
utils().convertType(type, IntegerType(160, IntegerType::Modifier::Address), true);
m_context << identifier;
}
else
@@ -1057,7 +1057,7 @@ bool ExpressionCompiler::visit(MemberAccess const& _memberAccess)
{
utils().convertType(
*_memberAccess.expression().annotation().type,
IntegerType(0, IntegerType::Modifier::Address),
IntegerType(160, IntegerType::Modifier::Address),
true
);
m_context << Instruction::BALANCE;
@@ -1065,7 +1065,7 @@ bool ExpressionCompiler::visit(MemberAccess const& _memberAccess)
else if ((set<string>{"send", "transfer", "call", "callcode", "delegatecall"}).count(member))
utils().convertType(
*_memberAccess.expression().annotation().type,
IntegerType(0, IntegerType::Modifier::Address),
IntegerType(160, IntegerType::Modifier::Address),
true
);
else