http://d.puremagic.com/issues/show_bug.cgi?id=5850
Summary: Default arguments of out and ref arguments Product: D Version: D2 Platform: Other OS/Version: Windows Status: NEW Keywords: wrong-code Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2011-04-16 18:11:29 PDT --- This D2 program compiles with no errors and runs raising no assert errors: void foo(out int x=1, ref int y=2) {} void main() { int x, y; foo(x, y); assert(x == 0 && y == 0); } If default arguments for out and ref arguments can't be made to work, then I suggest to disallow them statically. In Ada (2012) "A default_expression is only allowed in a parameter_specification for a formal parameter of mode in." See point 19 here: http://www.ada-auth.org/standards/12rm/html/RM-6-1.html -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------