Merge pull request #62690 from cdemirer/fix-infinite-guess-recursion

This commit is contained in:
Rémi Verschelde 2022-07-06 15:54:16 +02:00 committed by GitHub
commit 4c56885bc0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1903,7 +1903,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;