summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_warning.h
diff options
context:
space:
mode:
authorYuri Sizov <yuris@humnom.net>2023-07-31 21:01:36 +0200
committerYuri Sizov <yuris@humnom.net>2023-07-31 21:01:36 +0200
commit3de7dd902c3b491b92cad822eb1ce7018001c24b (patch)
tree29ac72747d9bb8ac089ad7a05842676861e97901 /modules/gdscript/gdscript_warning.h
parent8b12849fef2059421583e4e5bf2a27f654d8ab42 (diff)
parentd53fc92b4c6b5e4484e8f0bfff6ac55163dde3fb (diff)
downloadredot-engine-3de7dd902c3b491b92cad822eb1ce7018001c24b.tar.gz
Merge pull request #79880 from dalexeev/gds-fix-id-shadowing-below
GDScript: Fix bug with identifier shadowed below in current scope
Diffstat (limited to 'modules/gdscript/gdscript_warning.h')
-rw-r--r--modules/gdscript/gdscript_warning.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_warning.h b/modules/gdscript/gdscript_warning.h
index ae6207fcdc..8444d46a88 100644
--- a/modules/gdscript/gdscript_warning.h
+++ b/modules/gdscript/gdscript_warning.h
@@ -83,6 +83,8 @@ public:
DEPRECATED_KEYWORD, // The keyword is deprecated and should be replaced.
RENAMED_IN_GODOT_4_HINT, // A variable or function that could not be found has been renamed in Godot 4.
CONFUSABLE_IDENTIFIER, // The identifier contains misleading characters that can be confused. E.g. "usеr" (has Cyrillic "е" instead of Latin "e").
+ CONFUSABLE_LOCAL_DECLARATION, // The parent block declares an identifier with the same name below.
+ CONFUSABLE_LOCAL_USAGE, // The identifier will be shadowed below in the block.
INFERENCE_ON_VARIANT, // The declaration uses type inference but the value is typed as Variant.
NATIVE_METHOD_OVERRIDE, // The script method overrides a native one, this may not work as intended.
GET_NODE_DEFAULT_WITHOUT_ONREADY, // A class variable uses `get_node()` (or the `$` notation) as its default value, but does not use the @onready annotation.
@@ -128,6 +130,8 @@ public:
WARN, // DEPRECATED_KEYWORD
WARN, // RENAMED_IN_GODOT_4_HINT
WARN, // CONFUSABLE_IDENTIFIER
+ WARN, // CONFUSABLE_LOCAL_DECLARATION
+ WARN, // CONFUSABLE_LOCAL_USAGE
ERROR, // INFERENCE_ON_VARIANT // Most likely done by accident, usually inference is trying for a particular type.
ERROR, // NATIVE_METHOD_OVERRIDE // May not work as expected.
ERROR, // GET_NODE_DEFAULT_WITHOUT_ONREADY // May not work as expected.