Merge pull request #86341 from Vilcrow/fix-self-completion

Fix the autocomplete function for the 'self' keyword.
This commit is contained in:
Rémi Verschelde 2024-01-03 10:00:19 +01:00
commit 8be3c4b73f
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -1494,11 +1494,8 @@ static bool _guess_expression_type(GDScriptParser::CompletionContext &p_context,
} break;
case GDScriptParser::Node::SELF: {
if (p_context.current_class) {
if (p_context.type != GDScriptParser::COMPLETION_SUPER_METHOD) {
r_type.type = p_context.current_class->get_datatype();
} else {
r_type.type = p_context.current_class->base_type;
}
r_type.type = p_context.current_class->get_datatype();
r_type.type.is_meta_type = false;
found = true;
}
} break;