Merge pull request #63613 from AntonioDell/bugfix/63592

This commit is contained in:
Rémi Verschelde 2022-07-29 12:06:35 +02:00 committed by GitHub
commit a230e367af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 5 deletions

View File

@ -1473,11 +1473,16 @@ static bool _guess_expression_type(GDScriptParser::CompletionContext &p_context,
if (callee_type == GDScriptParser::Node::IDENTIFIER || call->is_super) {
// Simple call, so base is 'self'.
if (p_context.current_class) {
base.type.kind = GDScriptParser::DataType::CLASS;
base.type.type_source = GDScriptParser::DataType::INFERRED;
base.type.is_constant = true;
base.type.class_type = p_context.current_class;
base.value = p_context.base;
if (call->is_super) {
base.type = p_context.current_class->base_type;
base.value = p_context.base;
} else {
base.type.kind = GDScriptParser::DataType::CLASS;
base.type.type_source = GDScriptParser::DataType::INFERRED;
base.type.is_constant = true;
base.type.class_type = p_context.current_class;
base.value = p_context.base;
}
} else {
break;
}