summaryrefslogtreecommitdiff
path: root/modules/gdscript
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-01-13 18:02:58 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-01-13 18:02:58 +0100
commitef01b492275e2ebdc3769f3e4ffa925884c1e4b1 (patch)
tree589791466c5c4b7a65cdc51d86b5da876d993f08 /modules/gdscript
parent7d2945f4635cabcc3de782bf3c4ea84f0bcce40f (diff)
parent3a5e41293c5cba87da1dad3a9760dc45fab6687b (diff)
Merge pull request #71329 from vnen/gdscript-fix-enum-value-resolution
GDScript: Fix infinite recursion in resolution of enum values
Diffstat (limited to 'modules/gdscript')
-rw-r--r--modules/gdscript/gdscript_analyzer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp
index 0c858a36e7..1b488d560c 100644
--- a/modules/gdscript/gdscript_analyzer.cpp
+++ b/modules/gdscript/gdscript_analyzer.cpp
@@ -889,11 +889,11 @@ void GDScriptAnalyzer::resolve_class_member(GDScriptParser::ClassNode *p_class,
resolve_function_signature(member.function, p_source);
break;
case GDScriptParser::ClassNode::Member::ENUM_VALUE: {
+ member.enum_value.identifier->set_datatype(resolving_datatype);
+
if (member.enum_value.custom_value) {
check_class_member_name_conflict(p_class, member.enum_value.identifier->name, member.enum_value.custom_value);
- member.enum_value.identifier->set_datatype(resolving_datatype);
-
const GDScriptParser::EnumNode *prev_enum = current_enum;
current_enum = member.enum_value.parent_enum;
reduce_expression(member.enum_value.custom_value);