summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_editor.cpp
diff options
context:
space:
mode:
authorS.V.I. Vilcrow <svi@vilcrow.net>2023-02-13 07:33:10 +0300
committerS.V.I. Vilcrow <svi@vilcrow.net>2023-07-12 21:30:35 +0300
commit56e2fad31927e40406bc888aab99fa8f3f417d1f (patch)
treef4ae50ec1aabe88083b4c076d9c8d6f71c0a3a24 /modules/gdscript/gdscript_editor.cpp
parent1c1b5da2629f65bb14113919b3ca48ad4d08b516 (diff)
downloadredot-engine-56e2fad31927e40406bc888aab99fa8f3f417d1f.tar.gz
Fixed the jumping to function definition using 'Ctrl+LMB' and the 'Lookup Symbol' button.
Diffstat (limited to 'modules/gdscript/gdscript_editor.cpp')
-rw-r--r--modules/gdscript/gdscript_editor.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp
index 8cfd48b52b..1b33e131c7 100644
--- a/modules/gdscript/gdscript_editor.cpp
+++ b/modules/gdscript/gdscript_editor.cpp
@@ -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;