mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
GDScript: set assign operation on local var made by match
This is needed in a all local variables with assigment to properly set the typed operation. Fix #34928
This commit is contained in:
parent
b9a553f99d
commit
e7b7dc57fc
1 changed files with 1 additions and 1 deletions
|
@ -2689,6 +2689,7 @@ void GDScriptParser::_transform_match_statment(MatchNode *p_match_statement) {
|
|||
op->op = OperatorNode::OP_ASSIGN;
|
||||
op->arguments.push_back(id2);
|
||||
op->arguments.push_back(local_var->assign);
|
||||
local_var->assign_op = op;
|
||||
|
||||
branch->body->statements.push_front(op);
|
||||
branch->body->statements.push_front(local_var);
|
||||
|
@ -2866,7 +2867,6 @@ void GDScriptParser::_parse_block(BlockNode *p_block, bool p_static) {
|
|||
|
||||
assigned = _get_default_value_for_type(lv->datatype, var_line);
|
||||
}
|
||||
lv->assign = assigned;
|
||||
//must be added later, to avoid self-referencing.
|
||||
p_block->variables.insert(n, lv);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue