summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_editor.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-03-10 22:47:55 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-03-10 22:47:55 +0100
commit567dc78e62d33f4c6e9ef07d3ca4221b096ea48e (patch)
tree933431e7e2dfd1fea16e25e1d601ef10b7113ea5 /modules/gdscript/gdscript_editor.cpp
parent2dc8ad294898df0d5cfb6ea88679297b11e3f798 (diff)
parente289a4ab2c404991d684b6c77b65d24f41be5b63 (diff)
downloadredot-engine-567dc78e62d33f4c6e9ef07d3ca4221b096ea48e.tar.gz
Merge pull request #74689 from vonagam/fix-autocomplete-after-type-test
GDScript: Fix autocomplete inside a block with a type test condition
Diffstat (limited to 'modules/gdscript/gdscript_editor.cpp')
-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 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.