Bob Nystrom
08618abc5d
fix: allow empty range subscripts [0..-1] and [0...0] on empty lists
...
Add special case in list_subscript native to return a new empty list when
the source list is empty and the requested range is [0..-1] (inclusive) or
[0...0] (exclusive). This enables using list[0..-1] as a universal copy
idiom that works even for empty lists. Update the List.+ operator to use
this idiom instead of manual iteration. Add test cases for both range
forms on empty lists.
2014-02-15 04:10:41 +00:00
..
2014-01-05 20:27:12 +00:00
2014-01-05 20:27:12 +00:00
2014-01-06 16:01:04 +00:00
2014-01-28 23:31:11 +00:00
2014-01-05 20:27:12 +00:00
2014-01-05 20:27:12 +00:00
2014-02-13 16:38:44 +00:00
2014-02-14 15:16:56 +00:00
2014-01-19 21:01:51 +00:00
2014-02-13 16:38:44 +00:00
2014-02-04 17:34:05 +00:00
2014-01-21 02:12:55 +00:00
2014-02-13 01:33:35 +00:00
2014-01-18 01:29:10 +00:00
2014-01-05 20:27:12 +00:00
2014-01-21 15:52:03 +00:00
2014-01-15 15:59:10 +00:00
2014-02-15 04:10:41 +00:00
2014-01-21 02:12:55 +00:00
2014-01-05 20:27:12 +00:00
2014-01-21 15:44:11 +00:00
2014-01-28 23:31:11 +00:00
2014-02-13 16:38:44 +00:00
2014-01-13 03:37:11 +00:00
2014-01-05 20:27:12 +00:00
2014-01-19 21:01:51 +00:00
2014-02-13 16:38:44 +00:00
2014-01-18 01:29:10 +00:00
2014-02-14 14:37:37 +00:00
2014-01-05 20:27:12 +00:00
2014-02-13 16:38:44 +00:00
2014-01-05 20:27:12 +00:00
2014-01-05 20:27:12 +00:00
2014-01-05 20:27:12 +00:00
2014-01-05 20:27:12 +00:00
2014-01-05 20:27:12 +00:00
2014-01-05 20:27:12 +00:00
2014-01-05 20:27:12 +00:00
2014-01-05 20:27:12 +00:00