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

Merge pull request #79880 from dalexeev/gds-fix-id-shadowing-below

GDScript: Fix bug with identifier shadowed below in current scope
This commit is contained in:
Yuri Sizov
2023-07-31 21:01:36 +02:00
19 changed files with 367 additions and 213 deletions

View File

@@ -2280,6 +2280,9 @@ GDScriptParser::ExpressionNode *GDScriptParser::parse_identifier(ExpressionNode
IdentifierNode *identifier = alloc_node<IdentifierNode>();
complete_extents(identifier);
identifier->name = previous.get_identifier();
#ifdef DEBUG_ENABLED
identifier->suite = current_suite;
#endif
if (current_suite != nullptr && current_suite->has_local(identifier->name)) {
const SuiteNode::Local &declaration = current_suite->get_local(identifier->name);