[Issue 8914] New: Wrong `escaping reference` error on returning static array

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Oct 30 07:09:57 PDT 2012


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

           Summary: Wrong `escaping reference` error on returning static
                    array
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          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> 2012-10-30 17:09:52 MSK ---
As static array is a value type, there should be no error:
---
int[2] f(int[2] arr...)
{ return arr; } // Error: escaping reference to variadic parameter arr
---

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