Skip to content

Commit c41e470

Browse files
committed
Merge pull request #111342 from Ivorforce/dict-assert-no-string
Assert that `dictionary.h` does not include `String`, and that neither of the fundamental containers include `Object`
2 parents 4ab2202 + 839e035 commit c41e470

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

core/string/ustring.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@
3030

3131
#include "ustring.h"
3232

33-
STATIC_ASSERT_INCOMPLETE_TYPE(class, Dictionary);
3433
STATIC_ASSERT_INCOMPLETE_TYPE(class, Array);
34+
STATIC_ASSERT_INCOMPLETE_TYPE(class, Dictionary);
35+
STATIC_ASSERT_INCOMPLETE_TYPE(class, Object);
3536

3637
#include "core/crypto/crypto_core.h"
3738
#include "core/math/color.h"

core/variant/array.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#include "array.h"
3232

3333
STATIC_ASSERT_INCOMPLETE_TYPE(class, Dictionary);
34+
STATIC_ASSERT_INCOMPLETE_TYPE(class, Object);
3435
STATIC_ASSERT_INCOMPLETE_TYPE(class, String);
3536

3637
#include "container_type_validate.h"

core/variant/dictionary.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
#include "dictionary.h"
3232

3333
STATIC_ASSERT_INCOMPLETE_TYPE(class, Array);
34+
STATIC_ASSERT_INCOMPLETE_TYPE(class, Object);
35+
STATIC_ASSERT_INCOMPLETE_TYPE(class, String);
3436

3537
#include "core/templates/hash_map.h"
3638
#include "core/templates/safe_refcount.h"

0 commit comments

Comments
 (0)