summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorMariano Suligoy <marianognu.easyrpg@gmail.com>2021-08-14 10:37:59 -0300
committerMariano Suligoy <marianognu.easyrpg@gmail.com>2021-08-17 19:44:27 -0300
commit7f37e2987a18cb29a206694104194c7adcd5e439 (patch)
treeb4bd47c616b028e65d1be276e31ec1037b070d96 /modules
parent819aa47feeefe76bf1cb2e179765bf35ee5d3dda (diff)
When analyzing GdScript sources, consider Enums as Dictionaries. Fixes #45558
Diffstat (limited to 'modules')
-rw-r--r--modules/gdscript/gdscript_analyzer.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp
index ab37e54cf1..5e5316f69a 100644
--- a/modules/gdscript/gdscript_analyzer.cpp
+++ b/modules/gdscript/gdscript_analyzer.cpp
@@ -2351,7 +2351,10 @@ void GDScriptAnalyzer::reduce_identifier_from_base(GDScriptParser::IdentifierNod
result.enum_type = name;
p_identifier->set_datatype(result);
} else {
- push_error(vformat(R"(Cannot find value "%s" in "%s".)", name, base.to_string()), p_identifier);
+ // Consider as a Dictionary
+ GDScriptParser::DataType dummy;
+ dummy.kind = GDScriptParser::DataType::VARIANT;
+ p_identifier->set_datatype(dummy);
}
} else {
push_error(R"(Cannot get property from enum value.)", p_identifier);