Timofey Ananyev created GROOVY-10496:
----------------------------------------
Summary: Wrong IntRange.by(...) behaviour for left-open ranges
Key: GROOVY-10496
URL: https://issues.apache.org/jira/browse/GROOVY-10496
Project: Groovy
Issue Type: Bug
Affects Versions: 4.0.0
Reporter: Timofey Ananyev
Call {{by}} on {{IntRange}} results in loss of information about inclusion of
the left border, because {{inclusiveLeft}} flag is not passed into
{{NumberRange}} constructor.
For example, {{5 in (5<..20)}} gives {{false}} when {{5 in (5<..20).by(2)}}
gives {{true}}.
While with {{NumberRange}} {{5 in (5L<..20)}} and {{5 in (5L<..20).by(2)}} both
gives {{false}}.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)