summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_warning.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-04-27 16:56:08 +0200
committerRémi Verschelde <rverschelde@gmail.com>2023-04-27 16:56:08 +0200
commitc4a9d3212689a54679eebbce0a8525bd027ba101 (patch)
tree3bd7bca690fb4eaad98df7c9b085797d3e668c97 /modules/gdscript/gdscript_warning.cpp
parent190f1588ccd813739b248e11c74c7b375e88a47a (diff)
parent0ba6048ad3c945e2bd1d0114b5095535c22103ce (diff)
downloadredot-engine-c4a9d3212689a54679eebbce0a8525bd027ba101.tar.gz
Merge pull request #76264 from vnen/gdscript-static-variales
Add support for static variables in GDScript
Diffstat (limited to 'modules/gdscript/gdscript_warning.cpp')
-rw-r--r--modules/gdscript/gdscript_warning.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_warning.cpp b/modules/gdscript/gdscript_warning.cpp
index 0cb8e3a2af..c7f72f4eed 100644
--- a/modules/gdscript/gdscript_warning.cpp
+++ b/modules/gdscript/gdscript_warning.cpp
@@ -185,6 +185,9 @@ String GDScriptWarning::get_message() const {
case ONREADY_WITH_EXPORT: {
return R"("@onready" will set the default value after "@export" takes effect and will override it.)";
}
+ case REDUNDANT_STATIC_UNLOAD: {
+ return R"(The "@static_unload" annotation is redundant because the file does not have a class with static variables.)";
+ }
case WARNING_MAX:
break; // Can't happen, but silences warning
}
@@ -254,6 +257,7 @@ String GDScriptWarning::get_name_from_code(Code p_code) {
"NATIVE_METHOD_OVERRIDE",
"GET_NODE_DEFAULT_WITHOUT_ONREADY",
"ONREADY_WITH_EXPORT",
+ "REDUNDANT_STATIC_UNLOAD",
};
static_assert((sizeof(names) / sizeof(*names)) == WARNING_MAX, "Amount of warning types don't match the amount of warning names.");