[Issue 9773] New: ref parameter with default value should not compile

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Mar 21 01:00:46 PDT 2013


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

           Summary: ref parameter with default value should not compile
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: alanb at ucora.com


--- Comment #0 from Rob T <alanb at ucora.com> 2013-03-21 01:00:44 PDT ---
This should not compile.

void f( ref string a = "" )
{
   a = "crash and burn";
}

int main()
{

  f(); // seg fault
  return 0;
}

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