diff --git a/AST.cpp b/AST.cpp index bf3d98947..71bf7c4ab 100644 --- a/AST.cpp +++ b/AST.cpp @@ -563,7 +563,7 @@ vector const FunctionDescription::getParameters() const if (function) { vector paramsDescription; - for (auto const& param: function->getReturnParameters()) + for (auto const& param: function->getParameters()) paramsDescription.push_back(ParamDescription(param->getName(), param->getType()->toString())); return paramsDescription; @@ -580,7 +580,7 @@ vector const FunctionDescription::getReturnParameters() const if (function) { vector paramsDescription; - for (auto const& param: function->getParameters()) + for (auto const& param: function->getReturnParameters()) paramsDescription.push_back(ParamDescription(param->getName(), param->getType()->toString())); return paramsDescription; diff --git a/AST.h b/AST.h index d769aa225..a99bc39cb 100755 --- a/AST.h +++ b/AST.h @@ -182,6 +182,10 @@ struct FunctionDescription FunctionDescription(std::shared_ptr _type, Declaration const* _decl): m_description(_type, _decl){} + /// constructor for a constructor's function definition. Used only inside mix. + FunctionDescription(Declaration const* _def): + m_description(nullptr, _def){} + FunctionDescription(): m_description(nullptr, nullptr){} diff --git a/ExpressionCompiler.h b/ExpressionCompiler.h index 7189bef99..bff2cd7ce 100644 --- a/ExpressionCompiler.h +++ b/ExpressionCompiler.h @@ -130,8 +130,7 @@ private: /// also removes the reference from the stack (note that is does not reset the type to @a NONE). /// @a _expression is the current expression, used for error reporting. void retrieveValue(Expression const& _expression, bool _remove = false) const; - /// Convenience function to retrive Value from Storage. Specific version of - /// @ref retrieveValue + /// Convenience function to retrive Value from Storage. Specific version of @ref retrieveValue void retrieveValueFromStorage(Expression const& _expression, bool _remove = false) const; /// Stores a value (from the stack directly beneath the reference, which is assumed to /// be on the top of the stack, if any) in the lvalue and removes the reference.