digitalmars.D.bugs - [Issue 8597] New: UFCS fails when used with a pointer to enum and implicit dereferencing
- d-bugmail puremagic.com (35/35) Aug 28 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8597
- d-bugmail puremagic.com (21/21) Jan 25 2013 http://d.puremagic.com/issues/show_bug.cgi?id=8597
- d-bugmail puremagic.com (11/14) Apr 24 2013 http://d.puremagic.com/issues/show_bug.cgi?id=8597
http://d.puremagic.com/issues/show_bug.cgi?id=8597 Summary: UFCS fails when used with a pointer to enum and implicit dereferencing Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: tommitissari hotmail.com module main; enum MyEnum { first, second, third } MyEnum next(MyEnum myenum) { return cast(MyEnum) (myenum + 1); } void main() { auto myenum = MyEnum.second; auto ptrEnum = &myenum; } types (MyEnum*) MyEnum -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Aug 28 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8597 Andrej Mitrovic <andrej.mitrovich gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrej.mitrovich gmail.com 16:22:11 PST --- I think this is deliberate and it's unrelated to enums: int ufcs(int i) { return 0; } void main() { auto i = 0; auto ptrInt = &i; auto a = ptrInt.ufcs(); // error } Same with structs. There was a similar issue opened where someone made a rationale, it was about not wanting to accidentally pass structs by value, or something like that. I'll wait for someone to give a better response. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 25 2013
http://d.puremagic.com/issues/show_bug.cgi?id=8597 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |enhancementThere was a similar issue opened where someone made a rationale, it was about not wanting to accidentally pass structs by value, or something like that. I'll wait for someone to give a better response.Currently automatic pointer dereference is not supported in UFCS name look up. So this is an enhancement request. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 24 2013