diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-07-29 12:06:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-29 12:06:35 +0200 |
commit | a230e367af698f12e19c6da1352e69780f41232f (patch) | |
tree | 5de3c326b3c8e1527e24c7099eafe29483ab5ef2 /modules/gdscript/gdscript_editor.cpp | |
parent | def0122b79a9f135d81b4cc79a1b5768693381f8 (diff) | |
parent | 7b975b50dc0b7b54d9672ea00447d4a3a591a72f (diff) |
Merge pull request #63613 from AntonioDell/bugfix/63592
Diffstat (limited to 'modules/gdscript/gdscript_editor.cpp')
-rw-r--r-- | modules/gdscript/gdscript_editor.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp index 90dcfa307e..d943974ce4 100644 --- a/modules/gdscript/gdscript_editor.cpp +++ b/modules/gdscript/gdscript_editor.cpp @@ -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; } |