[Issue 9891] New: Ability to modify immutable using default value of	ref/out parameter
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Sat Apr  6 09:24:15 PDT 2013
    
    
  
http://d.puremagic.com/issues/show_bug.cgi?id=9891
           Summary: Ability to modify immutable using default value of
                    ref/out parameter
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: accepts-invalid
          Severity: critical
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: verylonglogin.reg at gmail.com
--- Comment #0 from Denis Shelomovskij <verylonglogin.reg at gmail.com> 2013-04-06 20:24:13 MSD ---
The following code compiles but should not:
---
immutable int i;
void f(ref int n = i)
{
    ++n;
}
---
P.S.
Inspired by fixed Issue 9773.
-- 
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