[Issue 8597] UFCS fails when used with a pointer to enum and implicit dereferencing
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Jan 25 16:22:12 PST 2013
http://d.puremagic.com/issues/show_bug.cgi?id=8597
Andrej Mitrovic <andrej.mitrovich at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |andrej.mitrovich at gmail.com
--- Comment #1 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2013-01-25 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: -------
More information about the Digitalmars-d-bugs
mailing list