mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Check for payable when comparing function types
This commit is contained in:
parent
abe6eb9830
commit
1b32cdcf21
@ -2220,6 +2220,8 @@ string FunctionType::identifier() const
|
||||
}
|
||||
if (isConstant())
|
||||
id += "_constant";
|
||||
if (isPayable())
|
||||
id += "_payable";
|
||||
id += identifierList(m_parameterTypes) + "returns" + identifierList(m_returnParameterTypes);
|
||||
if (m_gasSet)
|
||||
id += "gas";
|
||||
@ -2238,9 +2240,13 @@ bool FunctionType::operator==(Type const& _other) const
|
||||
|
||||
if (m_kind != other.m_kind)
|
||||
return false;
|
||||
|
||||
if (m_isConstant != other.isConstant())
|
||||
return false;
|
||||
|
||||
if (m_isPayable != other.isPayable())
|
||||
return false;
|
||||
|
||||
if (m_parameterTypes.size() != other.m_parameterTypes.size() ||
|
||||
m_returnParameterTypes.size() != other.m_returnParameterTypes.size())
|
||||
return false;
|
||||
@ -2399,10 +2405,15 @@ FunctionTypePointer FunctionType::interfaceFunctionType() const
|
||||
return FunctionTypePointer();
|
||||
|
||||
return make_shared<FunctionType>(
|
||||
paramTypes, retParamTypes,
|
||||
m_parameterNames, m_returnParameterNames,
|
||||
m_kind, m_arbitraryParameters,
|
||||
m_declaration, m_isConstant, m_isPayable
|
||||
paramTypes,
|
||||
retParamTypes,
|
||||
m_parameterNames,
|
||||
m_returnParameterNames,
|
||||
m_kind,
|
||||
m_arbitraryParameters,
|
||||
m_declaration,
|
||||
m_isConstant,
|
||||
m_isPayable
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user