diff options
author | Dmitrii Maganov <vonagam@gmail.com> | 2023-03-09 23:53:16 +0200 |
---|---|---|
committer | Yuri Sizov <yuris@humnom.net> | 2023-03-14 13:59:04 +0100 |
commit | 23f2c1234c906dbef35697ffca1324b5b8303560 (patch) | |
tree | 1cab0708e642168a84b6d88df6a2a970503853d6 /modules/gdscript | |
parent | 5824967f2f5d2835f7216dcb5d2d4139f4b8608b (diff) |
GDScript: Fix autocomplete inside a block with a type test condition
(cherry picked from commit e289a4ab2c404991d684b6c77b65d24f41be5b63)
Diffstat (limited to 'modules/gdscript')
-rw-r--r-- | modules/gdscript/gdscript_editor.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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. |