From a175ad6a82b416cca997a0e1ec7a6d5953884bb5 Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 7 Apr 2017 13:56:47 +0200 Subject: [PATCH] interrogate: fix compile error with default values that call scoped functions --- dtool/src/cppparser/cppExpression.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dtool/src/cppparser/cppExpression.cxx b/dtool/src/cppparser/cppExpression.cxx index 0dff4f64b8..adbbaea14e 100644 --- a/dtool/src/cppparser/cppExpression.cxx +++ b/dtool/src/cppparser/cppExpression.cxx @@ -1658,7 +1658,12 @@ output(ostream &out, int indent_level, CPPScope *scope, bool) const { break; case T_function: - out << _u._fgroup->_name; + // Pick any instance; they all have the same name anyway. + if (!_u._fgroup->_instances.empty() && _u._fgroup->_instances[0]->_ident != NULL) { + _u._fgroup->_instances[0]->_ident->output(out, scope); + } else { + out << _u._fgroup->_name; + } break; case T_unknown_ident: