diff options
author | Stoofin <44447892+stoofin@users.noreply.github.com> | 2020-04-09 02:43:47 -0700 |
---|---|---|
committer | Stoofin <44447892+stoofin@users.noreply.github.com> | 2020-04-09 05:01:40 -0700 |
commit | 44281f233dd0f3cff13a0c14320de943ee4719ea (patch) | |
tree | f0db6b713b04bf27a5d260b4a91ed209dc22684c /modules/gdscript | |
parent | ff14d071ccfdf25b899ab49312ef639da7c71fd6 (diff) |
Pattern bind counts as assignment
Fixes #34697
Diffstat (limited to 'modules/gdscript')
-rw-r--r-- | modules/gdscript/gdscript_parser.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index 9c39294e3e..84bc692717 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -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; |