Browse Source

interrogate: fix compile error with default values that call scoped functions

rdb 8 years ago
parent
commit
a175ad6a82
1 changed files with 6 additions and 1 deletions
  1. 6 1
      dtool/src/cppparser/cppExpression.cxx

+ 6 - 1
dtool/src/cppparser/cppExpression.cxx

@@ -1658,7 +1658,12 @@ output(ostream &out, int indent_level, CPPScope *scope, bool) const {
     break;
     break;
 
 
   case T_function:
   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;
     break;
 
 
   case T_unknown_ident:
   case T_unknown_ident: