www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 6357] New: Almost all AA methods are not pure/nothrow/ safe

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

           Summary: Almost all AA methods are not pure/nothrow/ safe
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Mac OS X
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: druntime
        AssignedTo: nobody puremagic.com
        ReportedBy: kennytm gmail.com
        Depends on: 5555


--- Comment #0 from kennytm gmail.com 2011-07-20 09:35:32 PDT ---
Test case:
-------------------------------------
 safe auto bug6357(int[int] x) {
    auto k = x.keys;        // error: not  safe
    auto v = x.values;      // error: not  safe
    auto bk = x.byKey;      // error: not  safe
    auto bv = x.byValue;    // error: not  safe
    auto g = x.get(0, 1);   // error: not  safe
    auto l = x.length;      // error: not  safe
    foreach (va; x) {}      // error: not  safe
    foreach (ke, va; x) {}  // error: not  safe
    x.rehash;               // error: not  safe (as it should be?)
    x[0] = 4;               // ok
    auto i = x[0];          // ok
    auto p = 0 in x;        // ok
    x.remove(0);            // ok
}
-------------------------------------

They are not 'pure' and 'nothrow' as well

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 20 2011
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6357


kennytm gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrew.spott gmail.com


--- Comment #1 from kennytm gmail.com 2011-08-05 12:43:37 PDT ---
*** Issue 6440 has been marked as a duplicate of this issue. ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 05 2011
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6357


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |htvennik gmail.com


--- Comment #2 from Kenji Hara <k.hara.pg gmail.com> 2011-09-20 12:54:04 PDT ---
*** Issue 6702 has been marked as a duplicate of this issue. ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 20 2011
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6357


bearophile_hugs eml.cc changed:

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


--- Comment #3 from bearophile_hugs eml.cc 2011-09-20 13:58:30 PDT ---
The same as bug 5555 ?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 20 2011
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6357


Dmitry Olshansky <dmitry.olsh gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dmitry.olsh gmail.com


--- Comment #4 from Dmitry Olshansky <dmitry.olsh gmail.com> 2011-09-26
07:55:45 PDT ---
*** Issue 6731 has been marked as a duplicate of this issue. ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 26 2011
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6357


lt.infiltrator gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lt.infiltrator gmail.com


--- Comment #5 from lt.infiltrator gmail.com 2012-12-18 17:14:03 PST ---
Personally, I would mark this a duplicate of #5555.

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