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.
This commit is contained in:
parent
83b916bb00
commit
e761982979
1 changed files with 1 additions and 1 deletions
|
@ -3755,7 +3755,7 @@ void GDScriptAnalyzer::reduce_identifier_from_base(GDScriptParser::IdentifierNod
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
case GDScriptParser::ClassNode::Member::FUNCTION: {
|
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->set_datatype(make_callable_type(member.function->info));
|
||||||
p_identifier->source = GDScriptParser::IdentifierNode::MEMBER_FUNCTION;
|
p_identifier->source = GDScriptParser::IdentifierNode::MEMBER_FUNCTION;
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue