Fixed the jumping to function definition using 'Ctrl+LMB' and the 'Lookup Symbol' button.

This commit is contained in:
S.V.I. Vilcrow 2023-02-13 07:33:10 +03:00
parent 1c1b5da262
commit 56e2fad319
5 changed files with 39 additions and 21 deletions

View file

@ -1401,11 +1401,11 @@ static bool _guess_expression_type(GDScriptParser::CompletionContext &p_context,
} break;
case GDScriptParser::Node::SELF: {
if (p_context.current_class) {
r_type.type.kind = GDScriptParser::DataType::CLASS;
r_type.type.type_source = GDScriptParser::DataType::INFERRED;
r_type.type.is_constant = true;
r_type.type.class_type = p_context.current_class;
r_type.value = p_context.base;
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;
}
found = true;
}
} break;