Thread overview
[Issue 21236] Associative array opApply is not nothrow
Nov 13, 2020
Lionello Lunesu
Feb 27, 2022
Walter Bright
Dec 17, 2022
Iain Buclaw
November 13, 2020
https://issues.dlang.org/show_bug.cgi?id=21236

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

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

--- Comment #1 from Lionello Lunesu <lio+bugzilla@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()

--
February 27, 2022
https://issues.dlang.org/show_bug.cgi?id=21236

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla@digitalmars.com

--- Comment #2 from Walter Bright <bugzilla@digitalmars.com> ---
What happens when you declare toHash() as extern (D) size_t toHash() const
nothrow @safe ?

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=21236

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P2

--