Fixed parser treating compound assignment the same as assignment which gave wrong argument usage count
This commit is contained in:
parent
2c96942df9
commit
a859643f7e
@ -776,8 +776,7 @@ GDScriptParser::Node *GDScriptParser::_parse_expression(Node *p_parent, bool p_s
|
|||||||
}
|
}
|
||||||
_add_warning(GDScriptWarning::UNASSIGNED_VARIABLE_OP_ASSIGN, -1, identifier.operator String());
|
_add_warning(GDScriptWarning::UNASSIGNED_VARIABLE_OP_ASSIGN, -1, identifier.operator String());
|
||||||
}
|
}
|
||||||
FALLTHROUGH;
|
} break;
|
||||||
}
|
|
||||||
case GDScriptTokenizer::TK_OP_ASSIGN: {
|
case GDScriptTokenizer::TK_OP_ASSIGN: {
|
||||||
lv->assignments += 1;
|
lv->assignments += 1;
|
||||||
lv->usages--; // Assignment is not really usage
|
lv->usages--; // Assignment is not really usage
|
||||||
|
Loading…
Reference in New Issue
Block a user