summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcdemirer <41021322+cdemirer@users.noreply.github.com>2022-07-04 02:49:36 +0300
committercdemirer <41021322+cdemirer@users.noreply.github.com>2022-07-04 02:49:36 +0300
commitbd518f6b11932598d578131aba5624176811bf96 (patch)
treef71eaabb0889785922a1fb10ff62341204b72af3
parent41fdddb1f8132dcba8256a145de44da5df3155b2 (diff)
Fix infinite recursion when guessing type of variable which is being assigned to
-rw-r--r--modules/gdscript/gdscript_editor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp
index 474c8094f2..0dd990d135 100644
--- a/modules/gdscript/gdscript_editor.cpp
+++ b/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;