http://d.puremagic.com/issues/show_bug.cgi?id=8430
Summary: [2.060 beta] Default arguments ignored for
delegates/function pointers
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: regression
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from S�nke Ludwig <[email protected]> 2012-07-24 22:48:25
PDT ---
The following used to work in 2.059. Not sure if default args are supposed to
work at all, but in case they are not, they should not be accepted at
declaration site in the first place.
---
void main()
{
void delegate(int arg = 0) del;
del(); // error
void function(int arg = 0) fun;
fun(); // error
}
---
delegate_defarg.d(4): Error: expected 1 function arguments, not 0
delegate_defarg.d(7): Error: expected 1 function arguments, not 0
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------