diff --git a/vhdlpp/expression.cc b/vhdlpp/expression.cc index f0e7ee25b..063063772 100644 --- a/vhdlpp/expression.cc +++ b/vhdlpp/expression.cc @@ -20,6 +20,7 @@ */ # include "expression.h" +# include "subprogram.h" # include "parse_types.h" # include "scope.h" # include @@ -283,6 +284,11 @@ ExpFunc::~ExpFunc() delete argv_[idx]; } +const VType* ExpFunc::func_ret_type() const +{ + return def_->peek_return_type(); +} + ExpInteger::ExpInteger(int64_t val) : value_(val) { diff --git a/vhdlpp/expression.h b/vhdlpp/expression.h index 28ab2b16f..b5b5f5c0a 100644 --- a/vhdlpp/expression.h +++ b/vhdlpp/expression.h @@ -477,6 +477,7 @@ class ExpFunc : public Expression { inline perm_string func_name() const { return name_; } inline size_t func_args() const { return argv_.size(); } inline const Expression*func_arg(size_t idx) const { return argv_[idx]; } + const VType*func_ret_type() const; public: // Base methods int elaborate_expr(Entity*ent, Architecture*arc, const VType*ltype);