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

Reset unassigned local variables to null in the loops

This commit is contained in:
Yuri Rubinsky
2022-11-28 19:29:02 +03:00
parent ef090ee6ea
commit 8d2506e811
3 changed files with 12 additions and 2 deletions

View File

@@ -1055,12 +1055,12 @@ public:
HashMap<StringName, int> locals_indices;
FunctionNode *parent_function = nullptr;
ForNode *parent_for = nullptr;
IfNode *parent_if = nullptr;
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 has_local(const StringName &p_name) const;
const Local &get_local(const StringName &p_name) const;