From 6df1a1e9b003a241fcecddf57f24694f25d55998 Mon Sep 17 00:00:00 2001 From: HolonProduction Date: Sun, 5 Nov 2023 21:52:04 +0100 Subject: [PATCH] Autocompletion: mark datatype as constant for constant arrays --- modules/gdscript/gdscript_editor.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp index 44e104da05f..c20b3dc2fa8 100644 --- a/modules/gdscript/gdscript_editor.cpp +++ b/modules/gdscript/gdscript_editor.cpp @@ -1646,6 +1646,7 @@ static bool _guess_expression_type(GDScriptParser::CompletionContext &p_context, if (full) { // If not fully constant, setting this value is detrimental to the inference. r_type.value = a; + r_type.type.is_constant = true; } r_type.type.type_source = GDScriptParser::DataType::ANNOTATED_EXPLICIT; r_type.type.kind = GDScriptParser::DataType::BUILTIN;