digitalmars.D.bugs - [Issue 12039] New: "tupleof" ignores named unions
- d-bugmail puremagic.com (54/54) Jan 29 2014 https://d.puremagic.com/issues/show_bug.cgi?id=12039
- d-bugmail puremagic.com (6/6) Jan 30 2014 https://d.puremagic.com/issues/show_bug.cgi?id=12039
- d-bugmail puremagic.com (13/21) Jan 30 2014 https://d.puremagic.com/issues/show_bug.cgi?id=12039
- d-bugmail puremagic.com (7/9) Jan 30 2014 https://d.puremagic.com/issues/show_bug.cgi?id=12039
https://d.puremagic.com/issues/show_bug.cgi?id=12039 Summary: "tupleof" ignores named unions Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: major Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: monarchdodra gmail.com Using tupleof, named unions are not taken into account. Anonymous unions seem to work "just fine": //---- import std.stdio; import std.traits; void main() { S s; writeln(s.tupleof); writeln(FieldTypeTuple!S.stringof); } //---- //---- struct S { union { int a; int b; } } //Produces: 00 (int, int) //---- //---- struct S { union u { int a; int b; } } //Produces: () //---- This is quite bothersome, as it impacts FieldTypeTuple too. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 29 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12039 Seems to also affect RepresentationTypeTuple -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 30 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12039 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALIDstruct S { union u { int a; int b; } }It declares an union type inside struct S. a and b are in u, not in S. Therefore, struct S has no field, then s.tupleof.length == 0. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 30 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12039It declares an union type inside struct S. a and b are in u, not in S. Therefore, struct S has no field, then s.tupleof.length == 0.Thanks :( -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 30 2014