1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

GDScript: Fix "Identifier not found" error when accessing inner class from inside

This commit is contained in:
Danil Alexeev
2023-08-11 11:22:01 +03:00
parent 7df393312f
commit fb45cab133
3 changed files with 29 additions and 0 deletions

View File

@@ -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;
}