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

           Summary: ICE on passing by ref statically initialized
                    const/immutable variable
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: ice, rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: verylonglogin....@gmail.com


--- Comment #0 from Denis Shelomovskij <verylonglogin....@gmail.com> 2012-11-02 
17:56:39 MSK ---
---
void f(T)(ref T) { } // same for `auto ref`

const n = 1; // or `immutable`

void main()
{
    f(n); // main.d(8): Error: constant 1 is not an lvalue
    // And ICE: Assertion failure: '0' on line 1224 in file 'glue.c'
}
---

The bad thing is that it breaks `auto ref` too with same (incorrect now) "not
an lvalue" error before ICE.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to