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: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Andrej Mitrovic <[email protected]> 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: -------