summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-01-17 20:20:16 +0100
committerGitHub <noreply@github.com>2022-01-17 20:20:16 +0100
commit4cfade6212be18f0b1a215dc088a9f1d6ac9b395 (patch)
tree1d0ac8817125520660fb648c63d3ea58da6c1af5
parent91909ef801efe97f87faa1a46bee4eac352b6649 (diff)
parent0430e26e6d3688aa4c7505ad8aedcc8123d41978 (diff)
Merge pull request #55995 from Xwdit/enum_fix
Fix enum int comparison
-rw-r--r--modules/gdscript/gdscript_analyzer.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp
index 3a79190149..0d295c3a51 100644
--- a/modules/gdscript/gdscript_analyzer.cpp
+++ b/modules/gdscript/gdscript_analyzer.cpp
@@ -2641,7 +2641,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);