1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-09 12:50:35 +00:00

Merge pull request #84492 from HolonProduction/reduce-const-arrays

Autocompletion: Mark datatype as constant for constant arrays
This commit is contained in:
Rémi Verschelde
2024-05-07 21:52:40 +02:00

View File

@@ -1695,6 +1695,7 @@ static bool _guess_expression_type(GDScriptParser::CompletionContext &p_context,
if (full) { if (full) {
// If not fully constant, setting this value is detrimental to the inference. // If not fully constant, setting this value is detrimental to the inference.
r_type.value = a; r_type.value = a;
r_type.type.is_constant = true;
} }
r_type.type.type_source = GDScriptParser::DataType::ANNOTATED_EXPLICIT; r_type.type.type_source = GDScriptParser::DataType::ANNOTATED_EXPLICIT;
r_type.type.kind = GDScriptParser::DataType::BUILTIN; r_type.type.kind = GDScriptParser::DataType::BUILTIN;