Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

Fix `gdscript_analyzer.cpp` compilation error with `deprecated=no`

LanzaSchneider29b7df67d60c
diff --git a/modules/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp
index 829b861b5e6..bab4aeee3de 100644
--- a/modules/gdscript/gdscript_analyzer.cpp
+++ b/modules/gdscript/gdscript_analyzer.cpp
@@ -1880,7 +1880,7 @@ void GDScriptAnalyzer::resolve_function_signature(GDScriptParser::FunctionNode *
if (p_function->return_type == nullptr) {
// GH-118877. We decided to make an exception to maintain compatibility, since the problem can only be detected at runtime.
#ifdef DISABLE_DEPRECATED
- p_function->set_datatype(parent_return_type);
+ p_function->return_type_constraint = parent_return_type;
#else // !DISABLE_DEPRECATED
if (function_name == GDScriptLanguage::get_singleton()->strings._get_property_list && method_flags.has_flag(METHOD_FLAG_VIRTUAL)) {
GDScriptParser::DataType array_type;