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

This commit is contained in:
cdemirer 2022-07-04 02:49:36 +03:00
parent 41fdddb1f8
commit bd518f6b11

View file

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