As the test added in this commit shows, prior to this commit, the uninitialized check would incorrectly fail when using list unpack assignment, if the same variable is reused later.
This modifies CollectLValues, so that it supports list unpack assignments (in addition to tuple, and normal assignments).
Please let me know if there's anything that needs to be added/modified in this change, thanks! 🙏
Fixes https://github.com/bazelbuild/buildtools/issues/1201
As the test added in this commit shows, prior to this commit, the uninitialized check would incorrectly fail when using list unpack assignment, if the same variable is reused later.
This modifies
CollectLValues
, so that it supports list unpack assignments (in addition to tuple, and normal assignments).Please let me know if there's anything that needs to be added/modified in this change, thanks! 🙏