[Issue 10096] New: Regression (git-head): __traits(allMembers) triggers out of bounds error
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu May 16 07:15:21 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10096
Summary: Regression (git-head): __traits(allMembers) triggers
out of bounds error
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: regression
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: andrej.mitrovich at gmail.com
--- Comment #0 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2013-05-16 07:15:21 PDT ---
import std.conv;
string foo(alias var, T = typeof(var))()
{
foreach (idx, member; __traits(allMembers, T))
{
// Error: array index [2] is outside array bounds [0 .. 2]
to!string(var.tupleof[idx]);
}
return "";
}
struct S
{
int i;
string s;
}
void main()
{
S s = S(1, "");
auto x = foo!s;
}
Worked in 2.062, in 2.063:
> Error: array index [2] is outside array bounds [0 .. 2]
Might be related to Issue 10095
--
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