Page MenuHomePhabricator

set and set_var should have the same treatment as assignment expression
Closed, ResolvedPublic

Description

Following should be disallowed:

set('true', 1)

Note that this is always checkable, because the first argument to set and set_var is required to be a literal string, not arbitrary expression.

Event Timeline

I think that, right now, code like true := 1 only fails for a coincidence, not because it's validated. So IMHO the patch for this one should go on top of https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/AbuseFilter/+/547871/.

Change 547871 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/extensions/AbuseFilter@master] Forbid assignments where the LHS is a built-in identifier

https://gerrit.wikimedia.org/r/547871

Change 547871 merged by jenkins-bot:
[mediawiki/extensions/AbuseFilter@master] Forbid assignments where the LHS is a built-in identifier

https://gerrit.wikimedia.org/r/547871

Daimona removed a project: Patch-For-Review.