[Issue 6357] New: Almost all AA methods are not pure/nothrow/@safe
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jul 20 09:35:34 PDT 2011
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 at puremagic.com
ReportedBy: kennytm at gmail.com
Depends on: 5555
--- Comment #0 from kennytm at 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: -------
More information about the Digitalmars-d-bugs
mailing list