Bug 13884 – No error line number with std.array.array of range of type tuples
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-12-21T16:46:00Z
Last change time
2015-01-19T14:06:23Z
Keywords
diagnostic, pull
Assigned to
nobody
Creator
bearophile_hugs
Comments
Comment #0 by bearophile_hugs — 2014-12-21T16:46:27Z
This is wrong code:
import std.array: array;
import std.algorithm: map;
struct Foo { int x; }
void main() {
[Foo(1)].map!(t => t.tupleof).array;
}
Dmd 2.067alpha shows an error without line number:
Error: no size for type (int)
temp.d(5,19): Error: functions cannot return a tuple
...\dmd2\src\phobos\std\algorithm.d(450,16): instantiated from here: MapResult!(__lambda1, Foo[])
temp.d(5,13): instantiated from here: map!(Foo[])