소스 검색

Fix infinite recursion when guessing type of variable which is being assigned to

cdemirer 3 년 전
부모
커밋
bd518f6b11
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      modules/gdscript/gdscript_editor.cpp

+ 1 - 1
modules/gdscript/gdscript_editor.cpp

@@ -1891,7 +1891,7 @@ static bool _guess_identifier_type(GDScriptParser::CompletionContext &p_context,
 		suite = suite->parent_block;
 	}
 
-	if (last_assigned_expression && last_assign_line != p_context.current_line) {
+	if (last_assigned_expression && last_assign_line < p_context.current_line) {
 		GDScriptParser::CompletionContext c = p_context;
 		c.current_line = last_assign_line;
 		r_type.assigned_expression = last_assigned_expression;