[Issue 9946] New: A UFCS disallowed in dynamic array allocation

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Apr 16 15:55:58 PDT 2013


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

           Summary: A UFCS disallowed in dynamic array allocation
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2013-04-16 15:55:57 PDT ---
size_t count(alias x)(int[] haystack) {
    return 0;
}
void main() {
    int[] data;
    auto n1 = count!5(data);          // OK
    auto n2 = data.count!5;           // OK
    auto a1 = new int[count!5(data)]; // OK
    auto a2 = new int[data.count!5];  // Error
}


DMD 2.063alpha gives:

test.d(9): Error: no property 'count!(5)' for type 'int[]'

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