Bug 18700 – iota with floating type + padRigh asserts

Status
RESOLVED
Resolution
INVALID
Severity
minor
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2018-03-31T16:03:43Z
Last change time
2020-03-21T03:56:36Z
Assigned to
No Owner
Creator
santerkrupp

Comments

Comment #0 by santerkrupp — 2018-03-31T16:03:43Z
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 by b2.temp — 2018-08-20T11:41:18Z
The provided code doesn't compile. The errors message don't show any assertion failure (https://run.dlang.io/is/0dlHL0)