浏览代码

Fix the autocomplete function for the 'self' keyword.

(cherry picked from commit c8fc824608efde15ae05a36ab6bab314ebcad01d)
S.V.I. Vilcrow 1 年之前
父节点
当前提交
89fd2c30e1
共有 1 个文件被更改,包括 2 次插入5 次删除
  1. 2 5
      modules/gdscript/gdscript_editor.cpp

+ 2 - 5
modules/gdscript/gdscript_editor.cpp

@@ -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;