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

           Summary: Function-as-array-method doesn't work with local
                    imports
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: bearophile_h...@eml.cc


--- Comment #0 from bearophile_h...@eml.cc 2012-01-21 19:04:59 PST ---
This is a spinoff of bug 6272, that was not fully fixed.


void main() {
    import std.algorithm;
    auto data = new int[10];
    sort(data); // OK
    data.sort(); // line 5, Error
}



The latest DMD 2.058head gives:

test.d(5): Error: undefined identifier module test.sort


This version gives the same error:

void main() {
    import std.algorithm: sort;
    auto data = new int[10];
    sort(data); // OK
    data.sort(); // line 5, Error
}

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

Reply via email to