← Back to index
|
Original Bugzilla link
Bug 5561 – Problem with map() that returns array contents
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2011-02-10T14:28:00Z
Last change time
2012-10-27T17:33:56Z
Keywords
rejects-valid
Assigned to
nobody
Creator
bearophile_hugs
Comments
Comment #0
by bearophile_hugs — 2011-02-10T14:28:48Z
import std.algorithm; void main() { int[] a1 = [10, 20]; auto r1 = map!((int k){ return a1[k]; })([0, 1]); // OK double[] a2 = [10.5, 20.5]; auto r2 = map!((int k){ return a2[k]; })([0, 1]); // Access Violation }
Comment #1
by lovelydear — 2012-04-22T16:14:06Z
Runs fine on Win32 2.059
Comment #2
by hsteoh — 2012-10-27T09:37:28Z
Runs fine on Linux 64-bit git HEAD (2.061 candidate). Looks like this has been fixed. Should it be closed?