Swap declaration/statemutability in FunctionType constructor

This commit is contained in:
Alex Beregszaszi 2017-08-28 14:40:28 +01:00
parent aa94000a91
commit 79e84a8fa4
4 changed files with 8 additions and 11 deletions

View File

@ -1628,7 +1628,6 @@ void TypeChecker::endVisit(NewExpression const& _newExpression)
strings(), strings(),
FunctionType::Kind::ObjectCreation, FunctionType::Kind::ObjectCreation,
false, false,
nullptr,
StateMutability::Pure StateMutability::Pure
); );
_newExpression.annotation().isPure = true; _newExpression.annotation().isPure = true;

View File

@ -2164,7 +2164,6 @@ FunctionTypePointer FunctionType::newExpressionType(ContractDefinition const& _c
strings{""}, strings{""},
Kind::Creation, Kind::Creation,
false, false,
nullptr,
stateMutability stateMutability
); );
} }
@ -2416,8 +2415,8 @@ FunctionTypePointer FunctionType::interfaceFunctionType() const
m_returnParameterNames, m_returnParameterNames,
m_kind, m_kind,
m_arbitraryParameters, m_arbitraryParameters,
m_declaration, m_stateMutability,
m_stateMutability m_declaration
); );
} }
@ -2444,8 +2443,8 @@ MemberList::MemberMap FunctionType::nativeMembers(ContractDefinition const*) con
strings(), strings(),
Kind::SetValue, Kind::SetValue,
false, false,
nullptr,
StateMutability::NonPayable, StateMutability::NonPayable,
nullptr,
m_gasSet, m_gasSet,
m_valueSet m_valueSet
) )
@ -2461,8 +2460,8 @@ MemberList::MemberMap FunctionType::nativeMembers(ContractDefinition const*) con
strings(), strings(),
Kind::SetGas, Kind::SetGas,
false, false,
nullptr,
StateMutability::NonPayable, StateMutability::NonPayable,
nullptr,
m_gasSet, m_gasSet,
m_valueSet m_valueSet
) )
@ -2599,8 +2598,8 @@ TypePointer FunctionType::copyAndSetGasOrValue(bool _setGas, bool _setValue) con
m_returnParameterNames, m_returnParameterNames,
m_kind, m_kind,
m_arbitraryParameters, m_arbitraryParameters,
m_declaration,
m_stateMutability, m_stateMutability,
m_declaration,
m_gasSet || _setGas, m_gasSet || _setGas,
m_valueSet || _setValue, m_valueSet || _setValue,
m_bound m_bound
@ -2648,8 +2647,8 @@ FunctionTypePointer FunctionType::asMemberFunction(bool _inLibrary, bool _bound)
m_returnParameterNames, m_returnParameterNames,
kind, kind,
m_arbitraryParameters, m_arbitraryParameters,
m_declaration,
m_stateMutability, m_stateMutability,
m_declaration,
m_gasSet, m_gasSet,
m_valueSet, m_valueSet,
_bound _bound

View File

@ -899,7 +899,6 @@ public:
strings(), strings(),
_kind, _kind,
_arbitraryParameters, _arbitraryParameters,
nullptr,
_stateMutability _stateMutability
) )
{ {
@ -916,8 +915,8 @@ public:
strings _returnParameterNames = strings(), strings _returnParameterNames = strings(),
Kind _kind = Kind::Internal, Kind _kind = Kind::Internal,
bool _arbitraryParameters = false, bool _arbitraryParameters = false,
Declaration const* _declaration = nullptr,
StateMutability _stateMutability = StateMutability::NonPayable, StateMutability _stateMutability = StateMutability::NonPayable,
Declaration const* _declaration = nullptr,
bool _gasSet = false, bool _gasSet = false,
bool _valueSet = false, bool _valueSet = false,
bool _bound = false bool _bound = false

View File

@ -644,8 +644,8 @@ bool ExpressionCompiler::visit(FunctionCall const& _functionCall)
strings(), strings(),
FunctionType::Kind::BareCall, FunctionType::Kind::BareCall,
false, false,
nullptr,
StateMutability::NonPayable, StateMutability::NonPayable,
nullptr,
true, true,
true true
), ),