[Issue 7344] New: Function-as-array-method doesn't work with local	imports
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Sat Jan 21 19:05:01 PST 2012
    
    
  
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: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at 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: -------
    
    
More information about the Digitalmars-d-bugs
mailing list