Merge pull request #37712 from stoofin/pattern-bind-warning
Fix unassigned variable warnings for match bindings
This commit is contained in:
commit
9716204555
1 changed files with 1 additions and 0 deletions
|
@ -2683,6 +2683,7 @@ void GDScriptParser::_transform_match_statment(MatchNode *p_match_statement) {
|
|||
LocalVarNode *local_var = branch->body->variables[e->key()];
|
||||
local_var->assign = e->value();
|
||||
local_var->set_datatype(local_var->assign->get_datatype());
|
||||
local_var->assignments++;
|
||||
|
||||
IdentifierNode *id2 = alloc_node<IdentifierNode>();
|
||||
id2->name = local_var->name;
|
||||
|
|
Loading…
Reference in a new issue