[Issue 8430] [2.060 beta] Default arguments ignored for delegates/function pointers

2012-07-24 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8430


Walter Bright  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||bugzi...@digitalmars.com
 Resolution||DUPLICATE


--- Comment #2 from Walter Bright  2012-07-24 
23:01:48 PDT ---
See the discussion for bug 3866.

*** This issue has been marked as a duplicate of issue 3866 ***

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


[Issue 8430] [2.060 beta] Default arguments ignored for delegates/function pointers

2012-07-24 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8430


Jonathan M Davis  changed:

   What|Removed |Added

 CC||jmdavisp...@gmx.com


--- Comment #1 from Jonathan M Davis  2012-07-24 22:56:27 
PDT ---
They shouldn't be accepted at the declaration site. Default arguments for
function pointers and delegates make no sense. The only time that default
function arguments are used is when you call a function by its name and you
don't give all of the arguments, in which case the default arguments are
effectively copy-pasted at the call site. As function pointers and delegates
aren't named (variables referring to them may be, but they themselves aren't),
and default arguments aren't part of a function's type, there's no way to call
them with default arguments without the compiler special casing situations like
the one that you give here.

Now, even given all of that, I don't think that this is a regression. The fact
that it complains at the call site and didn't before is a bug fix, not a bug.
And it's never complained at the declaration site, so not complaining is
exactly what it's been doing, so it can't be a regression even though it's a
bug.

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