1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-06 17:25:19 +00:00

GDScript: Warn when enum variable has no default

The default will always be set to `0`, so if it's not a valid value in
the enum, the warning is shown.
This commit is contained in:
George Marques
2024-04-16 11:16:36 -03:00
parent 658e97c93a
commit f9048fcd7d
7 changed files with 38 additions and 0 deletions

View File

@@ -23,6 +23,7 @@ var test_var_hard_int: int
var test_var_hard_variant_type: Variant.Type
@export var test_var_hard_variant_type_exported: Variant.Type
var test_var_hard_node_process_mode: Node.ProcessMode
@warning_ignore("enum_variable_without_default")
var test_var_hard_my_enum: MyEnum
var test_var_hard_array: Array
var test_var_hard_array_int: Array[int]