[Issue 3866] anonymous delegate with default parameters cross-talks to another anonymous delegate

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Feb 11 18:55:10 PST 2012


http://d.puremagic.com/issues/show_bug.cgi?id=3866


yebblies <yebblies at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|nobody at puremagic.com        |yebblies at gmail.com


--- Comment #2 from yebblies <yebblies at gmail.com> 2012-02-12 13:55:08 EST ---
The problem occurs because default parameters are stored in the type, but types
are considered equivalent if their mangled names match, and mangled names don't
include parameter names or default arguments.

The solution is probably either to include parameter names and default
arguments in the comparison for equality, or to move them out of function types
and into function declarations.  I'm leaning towards the latter.

This case _can_ be fixed by refusing to merge function pointers, but the
problem will still exists for pointers to function pointers, structs containing
function pointers, etc.

-- 
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