summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_analyzer.cpp
diff options
context:
space:
mode:
authorDmitrii Maganov <vonagam@gmail.com>2022-12-27 22:49:26 +0200
committerDmitrii Maganov <vonagam@gmail.com>2022-12-27 23:02:12 +0200
commitf67aa3e46d1f100cc6788353bf6c50f2175250e9 (patch)
treea0b4db635d94571e10a3abf60d00dc1fd7e09c4c /modules/gdscript/gdscript_analyzer.cpp
parentb6e06038f8a373f7fb8d26e92d5f06887e459598 (diff)
downloadredot-engine-f67aa3e46d1f100cc6788353bf6c50f2175250e9.tar.gz
GDScript: Fix return type of constructor call for extending class
Diffstat (limited to 'modules/gdscript/gdscript_analyzer.cpp')
-rw-r--r--modules/gdscript/gdscript_analyzer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp
index fc2e6e94f3..9f8d4e4f7e 100644
--- a/modules/gdscript/gdscript_analyzer.cpp
+++ b/modules/gdscript/gdscript_analyzer.cpp
@@ -4174,7 +4174,7 @@ bool GDScriptAnalyzer::get_function_signature(GDScriptParser::Node *p_source, bo
r_default_arg_count++;
}
}
- r_return_type = found_function->get_datatype();
+ r_return_type = p_is_constructor ? p_base_type : found_function->get_datatype();
r_return_type.is_meta_type = false;
r_return_type.is_coroutine = found_function->is_coroutine;