www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 9216] New: Local import of std.array does not make popFront() visible

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9216

           Summary: Local import of std.array does not make popFront()
                    visible
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: puneet coverify.org



---
test.d(6): Error: undefined identifier 'popFront'When I import std.array at
module level (line 1), popFront is available. But if I import std.array inside
the main function, it gives me an error saying:

test.d(6): Error: undefined identifier 'popFront'


// import std.array; // compiles fine when placed here               // 1
void main()                                                          // 2
{                                                                    // 3
  import std.array;        // does not make popFront visible    // 4
  int foo[] = new int[5];                                            // 5
  foo.popFront();                                                    // 6
}                                                                    // 7

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 27 2012
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9216


bearophile_hugs eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bearophile_hugs eml.cc



This is known limitation of UCFS. If you import array inside a function, then
you have to use its function with the normal function syntax:

popFront(foo);

I'd like this limitation to be solved, but I don't know of plans to solve it.

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


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |andrej.mitrovich gmail.com
         Resolution|                            |DUPLICATE



09:03:02 PST ---
*** 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: -------
Dec 27 2012