D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 18700 - iota with floating type + padRigh asserts
Summary: iota with floating type + padRigh asserts
Status: RESOLVED INVALID
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: x86_64 Linux
: P1 minor
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-31 16:03 UTC by santerkrupp
Modified: 2020-03-21 03:56 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description santerkrupp 2018-03-31 16:03:43 UTC
The following triggers an assertion std.range.package.d (source line 5632 for tag 2.079.0):

iota(6.).padRight(0, 10).slide(4)

The problem occurs when:
 - iota is floating type
 - padRight causes padding to the original size of the iota plus the size of the slide (e.g. 6 + 4 == 10 in the above)
Comment 1 basile-z 2018-08-20 11:41:18 UTC
The provided code doesn't compile. The errors message don't show any assertion failure (https://run.dlang.io/is/0dlHL0)