Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
4.0.0
-
None
-
None
Description
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.
Attachments
Issue Links
- relates to
-
GROOVY-9649 left-open and full-open ranges
- Closed