GDScript: Fix bug with identifier shadowed below in current scope

This commit is contained in:
Danil Alexeev 2023-07-25 14:21:49 +03:00
parent 202e4b2c1e
commit d53fc92b4c
No known key found for this signature in database
GPG key ID: 124453E157DA8DC7
19 changed files with 367 additions and 213 deletions

View file

@ -2267,6 +2267,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);