[Issue 21947] RedBlackTree and hashOf do not play well together

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Apr 3 02:21:22 UTC 2022


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

Steven Schveighoffer <schveiguy at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |schveiguy at gmail.com

--- Comment #1 from Steven Schveighoffer <schveiguy at gmail.com> ---
This recently came up again:
https://forum.dlang.org/post/kcrkxqsoeziyxouhbeik@forum.dlang.org

It's because the machinery to infer @safe and nothrow is not done for class
methods, even on templated classes.

What needs to happen is a 2-layer method for `toHash`, where one is inferred,
and the other one must copy the attributes.

I'm not sure why the hard-coded attributes were added, but they seem to have
been added when `toHash` was added.

--


More information about the Digitalmars-d-bugs mailing list