Skip to content

Commit e761982

Browse files
committed
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.
1 parent 83b916b commit e761982

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/gdscript/gdscript_analyzer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3755,7 +3755,7 @@ void GDScriptAnalyzer::reduce_identifier_from_base(GDScriptParser::IdentifierNod
37553755
} break;
37563756

37573757
case GDScriptParser::ClassNode::Member::FUNCTION: {
3758-
if (is_base && (!base.is_meta_type || member.function->is_static)) {
3758+
if (is_base && (!base.is_meta_type || member.function->is_static || is_constructor)) {
37593759
p_identifier->set_datatype(make_callable_type(member.function->info));
37603760
p_identifier->source = GDScriptParser::IdentifierNode::MEMBER_FUNCTION;
37613761
return;

0 commit comments

Comments
 (0)