Bug 18805 – crash in iteration.d

Status
RESOLVED
Resolution
INVALID
Severity
major
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-04-27T21:56:09Z
Last change time
2020-03-21T03:56:42Z
Assigned to
No Owner
Creator
jackb

Comments

Comment #0 by bhjwla — 2018-04-27T21:56:09Z
The following code causes a crash in iteration.d, line 3175: auto a = [1,2,3,4,5]; writeln(a.fold!((x,y,z) => x-y+z)); I have D version 2.079.0.
Comment #1 by b2.temp — 2018-05-18T18:40:55Z
This is not a crash, this is a compiler error due to the fact that your lambda is invalid. fold takes lambdas with 2 parameters.