Explorar o código

Array/Dictionary marked as not safe to const fold

Fix: #44459
Thakee Nathees %!s(int64=4) %!d(string=hai) anos
pai
achega
16bb01adfb
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      modules/gdscript/gdscript_analyzer.cpp

+ 2 - 0
modules/gdscript/gdscript_analyzer.cpp

@@ -1719,6 +1719,8 @@ void GDScriptAnalyzer::reduce_call(GDScriptParser::CallNode *p_call, bool is_awa
 				// Those are stored by reference so not suited for compile-time construction.
 				// Those are stored by reference so not suited for compile-time construction.
 				// Because in this case they would be the same reference in all constructed values.
 				// Because in this case they would be the same reference in all constructed values.
 				case Variant::OBJECT:
 				case Variant::OBJECT:
+				case Variant::DICTIONARY:
+				case Variant::ARRAY:
 				case Variant::PACKED_BYTE_ARRAY:
 				case Variant::PACKED_BYTE_ARRAY:
 				case Variant::PACKED_INT32_ARRAY:
 				case Variant::PACKED_INT32_ARRAY:
 				case Variant::PACKED_INT64_ARRAY:
 				case Variant::PACKED_INT64_ARRAY: