mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Sending ether.
This commit is contained in:
@@ -192,7 +192,7 @@ u256 IntegerType::literalValue(Literal const& _literal) const
|
||||
const MemberList IntegerType::AddressMemberList =
|
||||
MemberList({{"balance", make_shared<IntegerType const>(256)},
|
||||
{"send", make_shared<FunctionType const>(TypePointers({make_shared<IntegerType const>(256)}),
|
||||
TypePointers())}});
|
||||
TypePointers(), FunctionType::Location::SEND)}});
|
||||
|
||||
bool BoolType::isExplicitlyConvertibleTo(Type const& _convertTo) const
|
||||
{
|
||||
@@ -314,6 +314,7 @@ FunctionType::FunctionType(FunctionDefinition const& _function)
|
||||
retParams.push_back(var->getType());
|
||||
swap(params, m_parameterTypes);
|
||||
swap(retParams, m_returnParameterTypes);
|
||||
m_location = Location::INTERNAL;
|
||||
}
|
||||
|
||||
bool FunctionType::operator==(Type const& _other) const
|
||||
@@ -347,6 +348,19 @@ string FunctionType::toString() const
|
||||
return name + ")";
|
||||
}
|
||||
|
||||
unsigned FunctionType::getSizeOnStack() const
|
||||
{
|
||||
switch (m_location)
|
||||
{
|
||||
case Location::INTERNAL:
|
||||
return 1;
|
||||
case Location::EXTERNAL:
|
||||
return 2;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
bool MappingType::operator==(Type const& _other) const
|
||||
{
|
||||
if (_other.getCategory() != getCategory())
|
||||
|
||||
Reference in New Issue
Block a user