http://d.puremagic.com/issues/show_bug.cgi?id=5850
Andrej Mitrovic <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |[email protected] Resolution| |DUPLICATE --- Comment #1 from Andrej Mitrovic <[email protected]> 2012-12-11 01:38:32 PST --- This is related to Issue 7603. Not that your sample won't compile anymore. What will compile is this: int outerX = 1; int outerY; void foo(out int x = outerX, ref int y = outerY) { y = 2; } void main() { int innerX, innerY; foo(innerX, innerY); assert(innerX == 0 && innerY == 2); assert(outerX == 1 && outerY == 0); foo(); assert(outerX == 0 && outerY == 2); } So 'out' and 'ref' default arguments refer to what variables are referenced, not what values are written. Maybe you should open a documentation enhancement request so the above is added to the docs to clear out any confusion for newbies. *** This issue has been marked as a duplicate of issue 7603 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
