[
https://issues.apache.org/jira/browse/GROOVY-10496?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eric Milles updated GROOVY-10496:
---------------------------------
Fix Version/s: (was: 5.0.0-alpha-1)
> 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
> Assignee: Eric Milles
> Priority: Major
> Fix For: 4.0.1
>
>
> 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}}.
> Also with {{@CompileStatic}} even {{5 in (5<..20)}} gives {{true}}, because
> new parameter lost in {{RangeExpressionTransformer}}.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)