[Issue 3051] Passing alias to member function does not work (1/2)
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Jun 5 06:17:45 PDT 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3051
Steven Schveighoffer <schveiguy at yahoo.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |schveiguy at yahoo.com
--- Comment #2 from Steven Schveighoffer <schveiguy at yahoo.com> 2009-06-05 06:17:44 PDT ---
I thought the same as you at first, but I tried this code, and it works:
void fun(alias fx)()
{
fx();
}
void main()
{
int x = 0;
void hun()
{
x++;
}
fun!(hun)();
writefln("%s", x); // outputs 1
}
So I think Andrei is right, it is probably a conflict of 2 this pointers
required. The second bug is legit, as it is equivalent to what I wrote here,
but I think this one is invalid (need 2 this pointers).
--
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