diff options
author | Josh Bleecher Snyder <josharian@gmail.com> | 2019-01-16 12:51:06 -0800 |
---|---|---|
committer | alandonovan <adonovan@google.com> | 2019-01-16 15:51:06 -0500 |
commit | d5c553afa28580f549692858a9b5c3592fa505c0 (patch) | |
tree | 201276b36353dc6f6ce788fa1f97b699dae3c27e /internal | |
parent | d37220ea0f192e8167c26989f8ae23a66aba2d71 (diff) | |
download | starlark-go-d5c553afa28580f549692858a9b5c3592fa505c0.tar.gz |
starlark: correctly calculate len when slicing an empty range (#117)
* starlark: correctly calculate len when slicing an empty range
The range_ constructor correctly calculated a len of 0 when constructing
an empty range, but slicing a range did not; it calculated a len of 1.
This change unifies the length calculation.
This allow us to simplify range construction along the way.
Fixes #116
* starlark: document that Slice must be called with non-zero step
Diffstat (limited to 'internal')
0 files changed, 0 insertions, 0 deletions