mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merged in changes from chriseth/payable
This commit is contained in:
committed by
chriseth
parent
680b83b2a4
commit
962531af96
+17
-14
@@ -1890,20 +1890,23 @@ MemberList::MemberMap FunctionType::nativeMembers(ContractDefinition const*) con
|
||||
{
|
||||
MemberList::MemberMap members;
|
||||
if (m_location != Location::BareDelegateCall && m_location != Location::DelegateCall)
|
||||
members.push_back(MemberList::Member(
|
||||
"value",
|
||||
make_shared<FunctionType>(
|
||||
parseElementaryTypeVector({"uint"}),
|
||||
TypePointers{copyAndSetGasOrValue(false, true)},
|
||||
strings(),
|
||||
strings(),
|
||||
Location::SetValue,
|
||||
false,
|
||||
nullptr,
|
||||
m_gasSet,
|
||||
m_valueSet
|
||||
)
|
||||
));
|
||||
{
|
||||
if (!m_declaration || m_isPayable) // If this is an actual function, it has to be payable
|
||||
members.push_back(MemberList::Member(
|
||||
"value",
|
||||
make_shared<FunctionType>(
|
||||
parseElementaryTypeVector({"uint"}),
|
||||
TypePointers{copyAndSetGasOrValue(false, true)},
|
||||
strings(),
|
||||
strings(),
|
||||
Location::SetValue,
|
||||
false,
|
||||
nullptr,
|
||||
m_gasSet,
|
||||
m_valueSet
|
||||
)
|
||||
));
|
||||
}
|
||||
if (m_location != Location::Creation)
|
||||
members.push_back(MemberList::Member(
|
||||
"gas",
|
||||
|
||||
Reference in New Issue
Block a user