[Issue 6333] New: The 'capacity' function is not pure/nothrow/@safe.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Jul 16 02:05:03 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6333
Summary: The 'capacity' function is not pure/nothrow/@safe.
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: trivial
Priority: P2
Component: druntime
AssignedTo: nobody at puremagic.com
ReportedBy: kennytm at gmail.com
--- Comment #0 from kennytm at gmail.com 2011-07-16 01:59:47 PDT ---
As titled. Probably it is expected, or not.
Test case:
----------------------------------------
pure @safe nothrow int f6333() {
auto x = [1,3];
return x.capacity;
}
----------------------------------------
x.d(3): Error: pure function 'f6333' cannot call impure function 'capacity'
x.d(3): Error: safe function 'f6333' cannot call system function 'capacity'
x.d(3): Error: capacity is not nothrow
x.d(1): Error: function x.f6333 'f6333' is nothrow yet may throw
----------------------------------------
--
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