[Issue 5986] Function pointers wrongly typed

2011-06-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5986


yebblies  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE


--- Comment #3 from yebblies  2011-06-12 22:09:28 PDT ---
*** This issue has been marked as a duplicate of issue 3720 ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 5986] Function pointers wrongly typed

2011-06-06 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5986


yebblies  changed:

   What|Removed |Added

 CC||yebbl...@gmail.com


--- Comment #2 from yebblies  2011-06-06 21:04:57 PDT ---
The reason the second method works is because of issue 3797.

The fact that &ClassType.nonstaticmethod returns an invalid function pointer is
definitely a bug.

But what should it do?
I see the following options:
 1. Disallow it completely - you can still get the address from a delegate's
function pointer
 2. Make it return void*
 3. Make it return a callable function pointer that matches the abi for member
function calls.

I'm not sure what sensible use cases there are for getting the address of a
member function, but 1 seems the most reasonable.

The original bug report asks for 3, but that does not seem particularly useful.
eg.
 auto funcptr = &Class.func;
 auto instance = new Class();
 funcptr(instance);

vs
 auto instance = new Class();
 instance.func();

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 5986] Function pointers wrongly typed

2011-05-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5986



--- Comment #1 from Raphael Londeix  2011-05-12 
02:52:27 PDT ---
dmd version is v2.052

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---