https://d.puremagic.com/issues/show_bug.cgi?id=11857

           Summary: `out` parameter breaks overload resolution
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: ice, rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from Denis Shelomovskij <[email protected]> 2014-01-02 
17:00:51 MSK ---
This code should compile:
---
void f(int) { }
void f(out int) { }
void t(T)(T) { }
void t(T)(out T) if(false) { } // line 4

void main()
{
    const int n = 1;
    f(n); // line 9
    t(n); // also causes ICE
}
---
main.d(9): Error: constant 1 is not an lvalue
main.d(4): Error: cannot have const out parameter of type const(int)
<access violation>
---

Previously dmd just shown error. Now it also ICE-s with access violation in
template case.

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

Reply via email to