From 0430e26e6d3688aa4c7505ad8aedcc8123d41978 Mon Sep 17 00:00:00 2001 From: Xwdit Date: Thu, 16 Dec 2021 16:14:14 +0100 Subject: [PATCH] Fix enum int comparison Fix enum int comparison --- modules/gdscript/gdscript_analyzer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp index 7b64c0564ef..e48a813f4ab 100644 --- a/modules/gdscript/gdscript_analyzer.cpp +++ b/modules/gdscript/gdscript_analyzer.cpp @@ -2606,7 +2606,8 @@ void GDScriptAnalyzer::reduce_identifier_from_base(GDScriptParser::IdentifierNod GDScriptParser::DataType result; result.type_source = GDScriptParser::DataType::ANNOTATED_EXPLICIT; result.kind = GDScriptParser::DataType::ENUM_VALUE; - result.builtin_type = base.builtin_type; + result.is_constant = true; + result.builtin_type = Variant::INT; result.native_type = base.native_type; result.enum_type = name; p_identifier->set_datatype(result);