summaryrefslogtreecommitdiff
path: root/modules/gdscript/gdscript_analyzer.cpp
diff options
context:
space:
mode:
authorXwdit <xwditfr@gmail.com>2021-12-16 16:14:14 +0100
committerXwdit <xwditfr@gmail.com>2021-12-16 16:14:14 +0100
commit0430e26e6d3688aa4c7505ad8aedcc8123d41978 (patch)
tree939d8e0c62a0c02aa3116b90c56af3d21da16531 /modules/gdscript/gdscript_analyzer.cpp
parentbe83968b6ba8bd91c18f4446ded4706a0094d773 (diff)
Fix enum int comparison
Fix enum int comparison
Diffstat (limited to 'modules/gdscript/gdscript_analyzer.cpp')
-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 7b64c0564e..e48a813f4a 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);