cmListCommand: handle empty lists for list(REMOVE_AT)

Treat an empty list as a list with no valid bounds and return an error
message indicating that any given indices are out-of-bounds.
This commit is contained in:
Ben Boeckel
2018-10-11 17:26:44 -04:00
parent acfe53c588
commit 121a036f73
9 changed files with 33 additions and 9 deletions

View File

@@ -4,3 +4,6 @@ better-empty-list-behavior
* The :command:`list` operations ``REMOVE_ITEM``, ``REMOVE_DUPLICATES``,
``SORT``, ``REVERSE``, and ``FILTER`` all now accept a non-existent variable
as the list since these operations on empty lists is also the empty list.
* The :command:`list` operation ``REMOVE_AT`` now indicates that the given
indices are invalid for a non-existent variable or empty list.