From 839e0358b332807e36d967d1908a480e7f7c7a3d Mon Sep 17 00:00:00 2001 From: Lukas Tenbrink Date: Mon, 6 Oct 2025 23:00:33 +0200 Subject: [PATCH] Assert that `dictionary.h` does not include `String`, and that neither of the fundamental containers include `Object`. --- core/string/ustring.cpp | 3 ++- core/variant/array.cpp | 1 + core/variant/dictionary.cpp | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/core/string/ustring.cpp b/core/string/ustring.cpp index 2a7de9c0540..646e0e6ba06 100644 --- a/core/string/ustring.cpp +++ b/core/string/ustring.cpp @@ -30,8 +30,9 @@ #include "ustring.h" -STATIC_ASSERT_INCOMPLETE_TYPE(class, Dictionary); STATIC_ASSERT_INCOMPLETE_TYPE(class, Array); +STATIC_ASSERT_INCOMPLETE_TYPE(class, Dictionary); +STATIC_ASSERT_INCOMPLETE_TYPE(class, Object); #include "core/crypto/crypto_core.h" #include "core/math/color.h" diff --git a/core/variant/array.cpp b/core/variant/array.cpp index 4d2fc175fd1..56354107c09 100644 --- a/core/variant/array.cpp +++ b/core/variant/array.cpp @@ -31,6 +31,7 @@ #include "array.h" STATIC_ASSERT_INCOMPLETE_TYPE(class, Dictionary); +STATIC_ASSERT_INCOMPLETE_TYPE(class, Object); STATIC_ASSERT_INCOMPLETE_TYPE(class, String); #include "container_type_validate.h" diff --git a/core/variant/dictionary.cpp b/core/variant/dictionary.cpp index 104b9da6491..727b6c51370 100644 --- a/core/variant/dictionary.cpp +++ b/core/variant/dictionary.cpp @@ -31,6 +31,8 @@ #include "dictionary.h" STATIC_ASSERT_INCOMPLETE_TYPE(class, Array); +STATIC_ASSERT_INCOMPLETE_TYPE(class, Object); +STATIC_ASSERT_INCOMPLETE_TYPE(class, String); #include "core/templates/hash_map.h" #include "core/templates/safe_refcount.h"