summaryrefslogtreecommitdiff
path: root/modules/gdscript
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gdscript')
-rw-r--r--modules/gdscript/gdscript.cpp4
-rw-r--r--modules/gdscript/gdscript_compiler.cpp8
2 files changed, 8 insertions, 4 deletions
diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp
index 1fe1561559..40bc2beb23 100644
--- a/modules/gdscript/gdscript.cpp
+++ b/modules/gdscript/gdscript.cpp
@@ -629,6 +629,10 @@ void GDScript::_update_doc() {
}
}
+ for (KeyValue<StringName, Ref<GDScript>> &E : subclasses) {
+ E.value->_update_doc();
+ }
+
_add_doc(doc);
}
#endif
diff --git a/modules/gdscript/gdscript_compiler.cpp b/modules/gdscript/gdscript_compiler.cpp
index 6c7b5d534e..f4b468449b 100644
--- a/modules/gdscript/gdscript_compiler.cpp
+++ b/modules/gdscript/gdscript_compiler.cpp
@@ -2636,10 +2636,6 @@ Error GDScriptCompiler::_compile_class(GDScript *p_script, const GDScriptParser:
}
}
-#ifdef TOOLS_ENABLED
- p_script->_update_doc();
-#endif
-
p_script->_init_rpc_methods_properties();
p_script->valid = true;
@@ -2724,6 +2720,10 @@ Error GDScriptCompiler::compile(const GDScriptParser *p_parser, GDScript *p_scri
return err;
}
+#ifdef TOOLS_ENABLED
+ p_script->_update_doc();
+#endif
+
return GDScriptCache::finish_compiling(main_script->get_path());
}