www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7344] New: Function-as-array-method doesn't work with local imports

reply d-bugmail puremagic.com writes:
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 puremagic.com
        ReportedBy: bearophile_hugs eml.cc



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: -------
Jan 21 2012
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7344


Andrej Mitrovic <andrej.mitrovich gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrej.mitrovich gmail.com



19:30:25 PST ---
Dup of Issue 6185?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 21 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7344


bearophile_hugs eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE



*** This issue has been marked as a duplicate of issue 6185 ***

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