[Issue 4028] delegates with differing default arguments lead to same template instantiation

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Apr 5 22:19:16 PDT 2011


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


Walter Bright <bugzilla at digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla at digitalmars.com


--- Comment #6 from Walter Bright <bugzilla at digitalmars.com> 2011-04-05 22:15:35 PDT ---
(In reply to comment #4)
> The two delegates *are* the same type, so they are supposed to lead to the same 
> template instantiation. Introducing a default parameter does not create a new 
> type.
> I'm not sure why function pointers with default parameters are accepted at all. 
> I think it should be an error.

I suspect the only way to deal with this is, as you suggest, disallowing
default arguments for function pointers. I don't know what the downside of that
is, though.

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