mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
[TypeChecker] Remove function input and return parameter names from mobileType
This commit is contained in:
@@ -1293,9 +1293,9 @@ bool TypeChecker::visit(Conditional const& _conditional)
|
||||
|
||||
if (_conditional.annotation().willBeWrittenTo)
|
||||
m_errorReporter.typeError(
|
||||
2212_error,
|
||||
_conditional.location(),
|
||||
"Conditional expression as left value is not supported yet."
|
||||
2212_error,
|
||||
_conditional.location(),
|
||||
"Conditional expression as left value is not supported yet."
|
||||
);
|
||||
|
||||
return false;
|
||||
|
||||
@@ -3425,6 +3425,28 @@ TypeResult FunctionType::interfaceType(bool /*_inLibrary*/) const
|
||||
return TypeResult::err("Internal type is not allowed for public or external functions.");
|
||||
}
|
||||
|
||||
TypePointer FunctionType::mobileType() const
|
||||
{
|
||||
if (m_valueSet || m_gasSet || m_saltSet || m_bound)
|
||||
return nullptr;
|
||||
|
||||
// return function without parameter names
|
||||
return TypeProvider::function(
|
||||
m_parameterTypes,
|
||||
m_returnParameterTypes,
|
||||
strings(m_parameterTypes.size()),
|
||||
strings(m_returnParameterNames.size()),
|
||||
m_kind,
|
||||
m_arbitraryParameters,
|
||||
m_stateMutability,
|
||||
m_declaration,
|
||||
m_gasSet,
|
||||
m_valueSet,
|
||||
m_bound,
|
||||
m_saltSet
|
||||
);
|
||||
}
|
||||
|
||||
bool FunctionType::canTakeArguments(
|
||||
FuncCallArguments const& _arguments,
|
||||
Type const* _selfType
|
||||
|
||||
@@ -1234,6 +1234,7 @@ public:
|
||||
MemberList::MemberMap nativeMembers(ASTNode const* _currentScope) const override;
|
||||
TypePointer encodingType() const override;
|
||||
TypeResult interfaceType(bool _inLibrary) const override;
|
||||
TypePointer mobileType() const override;
|
||||
|
||||
/// @returns TypePointer of a new FunctionType object. All input/return parameters are an
|
||||
/// appropriate external types (i.e. the interfaceType()s) of input/return parameters of
|
||||
|
||||
Reference in New Issue
Block a user