mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Ensure that address types are always declared as 160bit
This commit is contained in:
1 parent
eb5a6aacd9
commit
ee65ecfb3b
5 files changed
+14
-14
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user