浏览代码

Autocompletion: mark datatype as constant for constant arrays

HolonProduction 1 年之前
父节点
当前提交
6df1a1e9b0
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      modules/gdscript/gdscript_editor.cpp

+ 1 - 0
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;