[Issue 7603] Default initializer is allowed on ref/out params

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Feb 27 19:56:58 PST 2012


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


bearophile_hugs at eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bearophile_hugs at eml.cc


--- Comment #1 from bearophile_hugs at eml.cc 2012-02-27 19:56:57 PST ---
Ow.

Even this fails:

void test1(ref int val = 10) {}
void test2(out int val = 20) {}
void main() {
    int x;
    test1(x);
    assert(x == 10);
    test2(x);
    assert(x == 20);
}

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