diff options
| author | George Marques <george@gmarqu.es> | 2024-04-11 20:28:46 -0300 |
|---|---|---|
| committer | George Marques <george@gmarqu.es> | 2024-04-11 20:28:46 -0300 |
| commit | e761982979fa3953ce7dd28c2337e7ae81ca5630 (patch) | |
| tree | 25809f621c3b13cd06a40ae7b67099367e709295 /modules/gdscript | |
| parent | 83b916bb00eb8cac4584143a80f5cfad7ce1e908 (diff) | |
| download | redot-engine-e761982979fa3953ce7dd28c2337e7ae81ca5630.tar.gz | |
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.
Diffstat (limited to 'modules/gdscript')
| -rw-r--r-- | modules/gdscript/gdscript_analyzer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp index a30a87f3a1..3675a4beeb 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; |
