From ad6e2e82a9e2f7e6f6db99a7be474a1f2f2739bf Mon Sep 17 00:00:00 2001 From: George Marques Date: Thu, 27 Jan 2022 11:34:33 -0300 Subject: 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. --- modules/gdscript/gdscript_parser.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'modules/gdscript/gdscript_parser.cpp') diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index 5e210074ed..f8bcef503e 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -3737,8 +3737,6 @@ String GDScriptParser::DataType::to_string() const { } case ENUM: return enum_type.operator String() + " (enum)"; - case ENUM_VALUE: - return enum_type.operator String() + " (enum value)"; case UNRESOLVED: return ""; } -- cgit v1.2.3