From 23f2c1234c906dbef35697ffca1324b5b8303560 Mon Sep 17 00:00:00 2001 From: Dmitrii Maganov Date: Thu, 9 Mar 2023 23:53:16 +0200 Subject: GDScript: Fix autocomplete inside a block with a type test condition (cherry picked from commit e289a4ab2c404991d684b6c77b65d24f41be5b63) --- modules/gdscript/gdscript_editor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp index 63dfd4d27c..536cb344f4 100644 --- a/modules/gdscript/gdscript_editor.cpp +++ b/modules/gdscript/gdscript_editor.cpp @@ -1956,7 +1956,7 @@ static bool _guess_identifier_type(GDScriptParser::CompletionContext &p_context, GDScriptParser::CompletionContext c = p_context; c.current_line = type_test->operand->start_line; c.current_suite = suite; - if ((!id_type.is_set() || id_type.is_variant()) && type_test->test_datatype.is_hard_type()) { + if (type_test->test_datatype.is_hard_type()) { id_type = type_test->test_datatype; if (last_assign_line < c.current_line) { // Override last assignment. -- cgit v1.2.3