aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--AST.cpp4
-rwxr-xr-xAST.h4
-rw-r--r--ExpressionCompiler.h3
3 files changed, 7 insertions, 4 deletions
diff --git a/AST.cpp b/AST.cpp
index bf3d9894..71bf7c4a 100644
--- a/AST.cpp
+++ b/AST.cpp
@@ -563,7 +563,7 @@ vector<ParamDescription> const FunctionDescription::getParameters() const
if (function)
{
vector<ParamDescription> 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<ParamDescription> const FunctionDescription::getReturnParameters() const
if (function)
{
vector<ParamDescription> 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 d769aa22..a99bc39c 100755
--- a/AST.h
+++ b/AST.h
@@ -182,6 +182,10 @@ struct FunctionDescription
FunctionDescription(std::shared_ptr<FunctionType const> _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 7189bef9..bff2cd7c 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.