From e761982979fa3953ce7dd28c2337e7ae81ca5630 Mon Sep 17 00:00:00 2001 From: George Marques Date: Thu, 11 Apr 2024 20:28:46 -0300 Subject: [PATCH] GDScript: Assume constructor to be accessible from class Since the constructor is accessed directly from the class, even if not marked `static`, it can be retrieved as a Callable without an instance. --- modules/gdscript/gdscript_analyzer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp index a30a87f3a1c1..3675a4beebc7 100644 --- a/modules/gdscript/gdscript_analyzer.cpp +++ b/modules/gdscript/gdscript_analyzer.cpp @@ -3755,7 +3755,7 @@ void GDScriptAnalyzer::reduce_identifier_from_base(GDScriptParser::IdentifierNod } break; case GDScriptParser::ClassNode::Member::FUNCTION: { - if (is_base && (!base.is_meta_type || member.function->is_static)) { + if (is_base && (!base.is_meta_type || member.function->is_static || is_constructor)) { p_identifier->set_datatype(make_callable_type(member.function->info)); p_identifier->source = GDScriptParser::IdentifierNode::MEMBER_FUNCTION; return;