[Issue 21236] Associative array opApply is not nothrow

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Nov 13 06:23:34 UTC 2020


https://issues.dlang.org/show_bug.cgi?id=21236

Lionello Lunesu <lio+bugzilla at lunesu.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lio+bugzilla at lunesu.com

--- Comment #1 from Lionello Lunesu <lio+bugzilla at lunesu.com> ---
This is problematic when trying to implement `toHash` for a type that has a
nested AA.

Without `nothrow` on `toHash` you get:

source/value.d(481,13): Error: _aaApply2 is not nothrow

With `nothrow` you get:

source/value.d(461,12): Warning: toHash() must be declared as extern (D) size_t
toHash() const nothrow @safe, not const pure @trusted ulong()

--


More information about the Digitalmars-d-bugs mailing list