summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_analyzer.cpp
diff options
context:
space:
mode:
authorDanil Alexeev <danil@alexeev.xyz>2023-08-11 11:22:01 +0300
committerDanil Alexeev <danil@alexeev.xyz>2023-08-11 11:22:01 +0300
commitfb45cab133103de4f641cc72a553a28463bed7fd (patch)
treefd4d8a6418a1141515af747413d74edd3559b6ca /modules/gdscript/gdscript_analyzer.cpp
parent7df393312fa8eab98231f2c335366a1ef6205367 (diff)
downloadredot-engine-fb45cab133103de4f641cc72a553a28463bed7fd.tar.gz
GDScript: Fix "Identifier not found" error when accessing inner class from inside
Diffstat (limited to 'modules/gdscript/gdscript_analyzer.cpp')
-rw-r--r--modules/gdscript/gdscript_analyzer.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp
index cb04913620..ad4528747b 100644
--- a/modules/gdscript/gdscript_analyzer.cpp
+++ b/modules/gdscript/gdscript_analyzer.cpp
@@ -3469,6 +3469,9 @@ void GDScriptAnalyzer::reduce_identifier_from_base(GDScriptParser::IdentifierNod
for (GDScriptParser::ClassNode *script_class : script_classes) {
if (p_base == nullptr && script_class->identifier && script_class->identifier->name == name) {
reduce_identifier_from_base_set_class(p_identifier, script_class->get_datatype());
+ if (script_class->outer != nullptr) {
+ p_identifier->source = GDScriptParser::IdentifierNode::MEMBER_CLASS;
+ }
return;
}