You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
GDScript DocGen: Fix regression with return metatypes
This commit is contained in:
@@ -304,7 +304,8 @@ void GDScriptDocGen::generate_docs(GDScript *p_script, const GDP::ClassNode *p_c
|
|||||||
method_doc.qualifiers = m_func->is_static ? "static" : "";
|
method_doc.qualifiers = m_func->is_static ? "static" : "";
|
||||||
|
|
||||||
if (m_func->return_type) {
|
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) {
|
} else if (!m_func->body->has_return) {
|
||||||
// If no `return` statement, then return type is `void`, not `Variant`.
|
// If no `return` statement, then return type is `void`, not `Variant`.
|
||||||
method_doc.return_type = "void";
|
method_doc.return_type = "void";
|
||||||
|
|||||||
Reference in New Issue
Block a user