Merge pull request #30095 from Anutrix/arg-fix

Fixed parser treating compound assignment the same as assignment whic…
This commit is contained in:
Rémi Verschelde 2019-06-27 01:03:21 +02:00 committed by GitHub
commit 65a7eba91c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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());
}
FALLTHROUGH;
}
} break;
case GDScriptTokenizer::TK_OP_ASSIGN: {
lv->assignments += 1;
lv->usages--; // Assignment is not really usage