mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Replace casting of external functions to address by a member named "address".
This commit is contained in:
committed by
chriseth
parent
d3ea86b052
commit
9f6fff2120
@@ -1338,6 +1338,13 @@ bool ExpressionCompiler::visit(MemberAccess const& _memberAccess)
|
||||
/// need to store it as bytes4
|
||||
utils().leftShiftNumberOnStack(224);
|
||||
}
|
||||
else if (member == "address")
|
||||
{
|
||||
auto const& functionType = dynamic_cast<FunctionType const&>(*_memberAccess.expression().annotation().type);
|
||||
solAssert(functionType.kind() == FunctionType::Kind::External, "");
|
||||
// stack: <address> <function_id>
|
||||
m_context << Instruction::POP;
|
||||
}
|
||||
else
|
||||
solAssert(
|
||||
!!_memberAccess.expression().annotation().type->memberType(member),
|
||||
|
||||
Reference in New Issue
Block a user