diff options
author | Danil Alexeev <danil@alexeev.xyz> | 2023-10-09 17:38:54 +0300 |
---|---|---|
committer | Danil Alexeev <danil@alexeev.xyz> | 2023-10-09 17:38:54 +0300 |
commit | faa066f9e57768f628ad6a2852ebb93bf88e78ec (patch) | |
tree | 7ff0b8ab8cb56dc16fcac22a1555eb98aa8bc3f9 | |
parent | 42425baa59956dc9d1e22341fe5e5d7f8fad5067 (diff) | |
download | redot-engine-faa066f9e57768f628ad6a2852ebb93bf88e78ec.tar.gz |
GDScript DocGen: Fix regression with return metatypes
-rw-r--r-- | modules/gdscript/editor/gdscript_docgen.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/gdscript/editor/gdscript_docgen.cpp b/modules/gdscript/editor/gdscript_docgen.cpp index cffd661261..c3979dd290 100644 --- a/modules/gdscript/editor/gdscript_docgen.cpp +++ b/modules/gdscript/editor/gdscript_docgen.cpp @@ -304,7 +304,8 @@ void GDScriptDocGen::generate_docs(GDScript *p_script, const GDP::ClassNode *p_c method_doc.qualifiers = m_func->is_static ? "static" : ""; if (m_func->return_type) { - _doctype_from_gdtype(m_func->return_type->get_datatype(), method_doc.return_type, method_doc.return_enum, true); + // `m_func->return_type->get_datatype()` is a metatype. + _doctype_from_gdtype(m_func->get_datatype(), method_doc.return_type, method_doc.return_enum, true); } else if (!m_func->body->has_return) { // If no `return` statement, then return type is `void`, not `Variant`. method_doc.return_type = "void"; |