You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
GDScript: Consolidate behavior for assigning enum types
This makes sure that assigning values to enum-typed variables are consistent. Same enum is always valid, different enum is always invalid (without casting) and assigning `int` creates a warning if there is no casting. There are new test cases to ensure this behavior doesn't break in the future.
This commit is contained in:
@@ -70,6 +70,7 @@ public:
|
||||
REDUNDANT_AWAIT, // await is used but expression is synchronous (not a signal nor a coroutine).
|
||||
EMPTY_FILE, // A script file is empty.
|
||||
SHADOWED_GLOBAL_IDENTIFIER, // A global class or function has the same name as variable.
|
||||
INT_ASSIGNED_TO_ENUM, // An integer value was assigned to an enum-typed variable without casting.
|
||||
WARNING_MAX,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user