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

           Summary: Inconsistent overloading between arrays and scalars
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: verylonglogin....@gmail.com


--- Comment #0 from Denis <verylonglogin....@gmail.com> 2012-01-12 19:34:40 MSK 
---
---
void f(int[]) { assert(0); }
void f(const int[]) { }

void g(int[]) { assert(0); }
void g(const(int)[]) { }

void h(int) { assert(0); }
void h(const int) { }

void main() {
    immutable arr = [5];
    f(arr); // Compiles
    g(arr); // Compiles

    immutable n = 5;
    h(n); // Error: ...matches both...
}
---
If f(arr) and g(arr) compiles, h(n) should compiles too.

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

Reply via email to