[Issue 5163] New: meaningless error message with front() applied to void[]
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Nov 4 08:09:34 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=5163
Summary: meaningless error message with front() applied to
void[]
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: diagnostic, rejects-valid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: mrmocool at gmx.de
--- Comment #0 from Trass3r <mrmocool at gmx.de> 2010-11-04 08:08:33 PDT ---
import std.array;
void main()
{
void[] a = cast(void[]) [ 1, 2, 3 ];
a.front;
}
yields:
..\src\phobos\std\array.d(419): Error: [i] has no effect in expression (a[0u])
..\src\phobos\std\array.d(5): Error: template instance std.array.front!(void[])
error instantiating
Originally I used std.file.read(), hence the void array.
- 1st message is completely senseless, what "[i]"?
- 2nd message shows line 5 which is the line of "a.front;" but the filename is
wrong.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list