GDScript: Reset local variables on exit from block

This commit is contained in:
Danil Alexeev 2023-06-01 21:46:37 +03:00
parent 621d68e412
commit f3bf75fbb4
No known key found for this signature in database
GPG key ID: 124453E157DA8DC7
8 changed files with 96 additions and 14 deletions

View file

@ -1117,7 +1117,7 @@ public:
bool has_return = false;
bool has_continue = false;
bool has_unreachable_code = false; // Just so warnings aren't given more than once per block.
bool is_loop = false;
bool is_in_loop = false; // The block is nested in a loop (directly or indirectly).
bool has_local(const StringName &p_name) const;
const Local &get_local(const StringName &p_name) const;