diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-09-12 08:49:57 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-09-12 08:49:57 +0200 |
commit | 0545ed5c7112387b2ee5b4b1998c262df8d061d3 (patch) | |
tree | d2ad72d3ff26406398941cc9a10b1736a1170119 /modules/gdscript/gdscript_warning.h | |
parent | b539bfb2638eef872a8760c953841ef8e6630991 (diff) | |
parent | 14edf044afe54cfe3dced73b83e96e9112581511 (diff) | |
download | redot-engine-0545ed5c7112387b2ee5b4b1998c262df8d061d3.tar.gz |
Merge pull request #81355 from ryanabx/features/enforce-static-typing
Add an optional `untyped_declaration` warning
Diffstat (limited to 'modules/gdscript/gdscript_warning.h')
-rw-r--r-- | modules/gdscript/gdscript_warning.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_warning.h b/modules/gdscript/gdscript_warning.h index 73e12eb20e..a26cfaf72c 100644 --- a/modules/gdscript/gdscript_warning.h +++ b/modules/gdscript/gdscript_warning.h @@ -64,6 +64,7 @@ public: PROPERTY_USED_AS_FUNCTION, // Function not found, but there's a property with the same name. CONSTANT_USED_AS_FUNCTION, // Function not found, but there's a constant with the same name. FUNCTION_USED_AS_PROPERTY, // Property not found, but there's a function with the same name. + UNTYPED_DECLARATION, // Variable/parameter/function has no static type, explicitly specified or inferred (`:=`). UNSAFE_PROPERTY_ACCESS, // Property not found in the detected type (but can be in subtypes). UNSAFE_METHOD_ACCESS, // Function not found in the detected type (but can be in subtypes). UNSAFE_CAST, // Cast used in an unknown type. @@ -112,6 +113,7 @@ public: WARN, // PROPERTY_USED_AS_FUNCTION WARN, // CONSTANT_USED_AS_FUNCTION WARN, // FUNCTION_USED_AS_PROPERTY + IGNORE, // UNTYPED_DECLARATION // Static typing is optional, we don't want to spam warnings. IGNORE, // UNSAFE_PROPERTY_ACCESS // Too common in untyped scenarios. IGNORE, // UNSAFE_METHOD_ACCESS // Too common in untyped scenarios. IGNORE, // UNSAFE_CAST // Too common in untyped scenarios. |